openLuup: MySensors gateways

I haven’t tried the WiFi gateway and only used the unmodified Ethernet gateway (and also tweaked that a bit to use the serial bridge on an Arduino Yun.)

The MySensors plugin within Vera does recognize the arduino Wifi gateway with no communication error. I don't have a ethernet gateway to test that one out right now, but I figured that it (Wifi)should be possible too.

It’s definitely worth a go - I’m keen to see this work too, although I don’t have an ESP8266 or whatever you’re using at the other end. Happy to help.

When adding the plugin D_Arduino1.xml via the ALTUI create device, it's created, but the UI isn't working anymore after a reload luup.(page shows no handler) BTW datayours is still working after a beaglebone reboot. Logs shows trying to use serial gateway so I assume the proper variables are not correctly set.

Yes, that’s almost definitely the problem. The IP address needs to be saved before the plugin is started. Unfortunately, there is no way to do this interactively, but due to a subtlety of the startup process (true for both a real Vera and openLuup) it works if you do it then, since the actual startup of any device does not occur until after the startup script is completed. Does that make sense?

When adding the Arduino gateway with the startup.lua method I got the same page showing no handler but the logs shows a better initialization: [code]2016-01-10 21:32:23.719 luup_log:4: Arduino plugin: loading library L_Arduino ... 2016-01-10 21:32:23.729 luup_log:4: Arduino plugin: library L_Arduino loaded 2016-01-10 21:32:23.729 luup_log:4: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,PluginVersion, 1.5, 4 2016-01-10 21:32:23.729 luup_log:4: Arduino: Using network connection: IP address is 10.0.0.164:5003 2016-01-10 21:32:23.758 luup.io.open:: connecting to 10.0.0.164:5003 2016-01-10 21:32:23.758 openLuup.io:: [b]connect OK[/b] 2016-01-10 21:32:23.759 luup_log:4: Arduino: Sending: 0;0;3;0;2;Get Version 2016-01-10 21:32:23.759 luup.io.write:: bytes sent: 22, status: OK [/code]

Yes, that looks correct to me.

and almost at the end of the log file it shows:

2016-01-10 21:32:26.181 openLuup.context_switch:: ERROR: [string "[3] I_ALTUI.xml"]:1927: bad argument #1 to 'find' (string expected, got nil) 2016-01-10 21:32:26.181 luup.delay_callback:: function: 0xd7700 ERROR: [string "[3] I_ALTUI.xml"]:1927: bad argument #1 to 'find' (string expected, got nil) 2016-01-10 21:32:26.181 luup.io.incoming:: bytes received: 36, status: OK 2016-01-10 21:32:26.182 luup_log:4: Arduino: Log: Gateway startup complete. 2016-01-10 21:32:26.182 luup.io.incoming:: bytes received: 15, status: OK 2016-01-10 21:32:26.182 luup_log:4: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,ArduinoLibVersion, 1.5.1, 4 2016-01-10 21:32:26.182 luup.variable_set:4: 4.urn:upnp-arduino-cc:serviceId:arduino1.ArduinoLibVersion was: EMPTY now: 1.5.1 #hooks:0

Any thoughts on this?

Well, that’s definitely NOT correct! What version of AltUI are you using?

[…]

Yes, that's almost definitely the problem. The IP address needs to be saved [i]before[/i] the plugin is started. Unfortunately, there is no way to do this interactively, but due to a subtlety of the startup process (true for both a real Vera and openLuup) it works if you do it then, since the [i]actual[/i] startup of any device does not occur until [i]after[/i] the startup script is completed. Does that make sense?

Yes I guess it does.

Well, that's definitely NOT correct! What version of AltUI are you using?

Latest version: AltUI v1.02.1094
But this did happen a few versions back as well.

grtz,
Berry

[quote=“greenberry, post:2, topic:190527”]Latest version: AltUI v1.02.1094
But this did happen a few versions back as well.[/quote]

I’m using 1054, but I don’t expect that the AltUI plugin Lua has changed much. This seems to be a problem with this…

function fixVariableWatches( lul_device )

So I’d suggest that you may have some stale data in the [tt]VariablesToWatch[/tt] device variable of AltUI. Take a look at that - I think it’s OK to delete/edit if necessary.

[quote=“akbooer, post:3, topic:190527”][quote=“greenberry, post:2, topic:190527”]Latest version: AltUI v1.02.1094
But this did happen a few versions back as well.[/quote]

I’m using 1054, but I don’t expect that the AltUI plugin Lua has changed much. This seems to be a problem with this…

function fixVariableWatches( lul_device )

So I’d suggest that you may have some stale data in the [tt]VariablesToWatch[/tt] device variable of AltUI. Take a look at that - I think it’s OK to delete/edit if necessary.[/quote]

The [tt]VariablesToWatch[/tt] are empty but the [tt]VariablesToSend[/tt] has a lot to send to thingspeak, I’ll remove them for now to test it.
But I don’t see why these are only an issue when using the Arduino gateway, that one isn’t referenced in there…

Hi,

So I’ve removed all variables from the ALTUI variable [tt]VariablesToWatch[/tt] (was empty already) and [tt]VariablesToSend[/tt].
Re-did the reload with startup.lua, but it didn’t fixed it.
I took a look into the generated [tt]user_data.json[/tt] and removed the part for the created [tt]D_Arduino1[/tt] device, after a restart with using [tt]user_data.json[/tt], it started up with ALTUI nicely, as expected.Just to be very sure it was indeed the arduino device causing it.
The json part for the device looks like this (cut after ALTUI device json and before vera bridge):

{
		"ControlURLs": {
			"service_5": {
				"ControlURL": "upnp\/control\/dev_5",
				"EventURL": "\/upnp\/event\/dev_5",
				"service": "urn:upnp-arduino-cc:serviceId:arduino1",
				"serviceType": "urn:schemas-arduino-cc:service:arduino:1"
			}
		},
		"altid": "MySensors",
		"category_num": 0,
		"device_file": "D_Arduino1.xml",
		"device_json": "D_Arduino1.json",
		"device_type": "urn:schemas-arduino-cc:device:arduino:1",
		"id": 4,
		"id_parent": 0,
		"impl_file": "I_Arduino1.xml",
		"invisible": "0",
		"ip": "10.0.0.164",
		"mac": "",
		"manufacturer": "Arduino",
		"model": "",
		"name": "MySensors-gateway",
		"room": "0",
		"states": [{
			"id": 3,
			"service": "urn:upnp-arduino-cc:serviceId:arduino1",
			"value": "1.5",
			"variable": "PluginVersion"
		},
		{
			"id": 4,
			"service": "urn:upnp-arduino-cc:serviceId:arduino1",
			"value": "M",
			"variable": "Unit"
		}],
		"subcategory_num": 0,
		"time_created": 1452527226
	},

Perhaps amg0. or @akbooer can tell from this json what’s wrong?

thnx!
berry.

Thanks for the experiment, and sorry it didn’t work!

That JSON looks perfectly normal to me.

May I repeat some advice I’ve given previously on debugging a plugin? I suggest that you create a system, using startup.lua, with ONLY AltUI and the plugin you are trying out, remembering to backup your current user_data.json so that you can restore it later. This way, we can make the log shorter and home in on any problems.

If you do that in this case, I’d like to see the full log since reload up to the point of the error. It’s not always something that happens immediately before which is the cause of the problem.

Just to be clear, this IS the regular Arduino gateway that you are trying to get running?

You’re welcome!

That JSON looks perfectly normal to me.
Good.
May I repeat some advice I've given previously on debugging a plugin? I suggest that you create a system, using startup.lua, with ONLY AltUI and the plugin you are trying out, remembering to backup your current user_data.json so that you can restore it later. This way, we can make the log shorter and home in on any problems.
Yes I did almost that but still have the bridge active, and yes I've got some backups for my user_data.json.Nothing special in my setup right now.Most logic I really want to move from Vera is everything around my heating system, but doing that with PLEG, so have to wait patiently.
If you do that in this case, I'd like to see the full log since reload up to the point of the error. It's not always something that happens immediately before which is the cause of the problem.

Yes I will do that right now.

Just to be clear, this IS the regular Arduino gateway that you are trying to get running?

Yes except it’s the wifi gateway on the arduino sketch side.But with regular you mean the same D_Arduino1.xml etc files?

Ok here is the log when starting up with only ALTUI and Arduino gateway

2016-01-11 21:00:02.795   :: openLuup STARTUP :: 
2016-01-11 21:00:02.796   openLuup.init::      version 2015.11.27  @akbooer
2016-01-11 21:00:02.827   openLuup.scheduler:: version 2015.11.27  @akbooer
2016-01-11 21:00:02.828   openLuup.server::    version 2015.12.09  @akbooer
2016-01-11 21:00:02.833   openLuup.plugins::   version 2015.11.06  @akbooer
2016-01-11 21:00:02.840   openLuup.scenes::    version 2015.11.12  @akbooer
2016-01-11 21:00:02.846   openLuup.chdev::     version 2015.11.09  @akbooer
2016-01-11 21:00:02.848   openLuup.io::        version 2015.10.15  @akbooer
2016-01-11 21:00:02.848   openLuup.luup:0:      version 2015.11.16  @akbooer
2016-01-11 21:00:02.858   openLuup.rooms::     version 2015.10.15  @akbooer
2016-01-11 21:00:02.858   openLuup.requests::  version 2015.11.09  @akbooer
2016-01-11 21:00:02.871   luup.create_device:: [1] D_ZWaveNetwork.xml / I_ZWave.xml / 
2016-01-11 21:00:02.880   luup.create_device:: [2] D_SceneController1.xml /  / D_SceneController1.json
2016-01-11 21:00:02.881   openLuup.init:: loading configuration user_data.json
2016-01-11 21:00:02.881   openLuup.init:: loading user_data json...
2016-01-11 21:00:02.890   openLuup.init:: loading rooms...
2016-01-11 21:00:02.890   openLuup.init:: ...room loading completed
2016-01-11 21:00:02.890   openLuup.init:: loading devices...
2016-01-11 21:00:02.892   luup.create_device:: [1] D_ZWaveNetwork.xml / I_ZWave.xml / 
2016-01-11 21:00:02.893   luup.create_device:: [2] D_SceneController1.xml /  / D_SceneController1.json
2016-01-11 21:00:02.990   luup.create_device:: [3] D_ALTUI.xml / I_ALTUI.xml / D_ALTUI_UI7.json
2016-01-11 21:00:03.018   luup.create_device:: [4] D_Arduino1.xml / I_Arduino1.xml / D_Arduino1.json
2016-01-11 21:00:03.019   openLuup.init:: loading scenes...
2016-01-11 21:00:03.021   openLuup.init:: number of scenes = 0
2016-01-11 21:00:03.021   openLuup.init:: ...scene loading completed
2016-01-11 21:00:03.021   openLuup.init:: loading installed plugin info...
2016-01-11 21:00:03.022   openLuup.init:: ...user_data loading completed
2016-01-11 21:00:03.022   openLuup.init:: running _openLuup_STARTUP_
2016-01-11 21:00:03.022   openLuup.init:: init phase completed
2016-01-11 21:00:03.023   openLuup.server:: starting HTTP server on 10.0.0.178:3480 tcp{server}: 0xc8408
2016-01-11 21:00:03.023   openLuup.scheduler:: starting
2016-01-11 21:00:03.023   openLuup.scheduler:: [3] device startup
2016-01-11 21:00:03.023   luup_log:3: ALTUI: initstatus(3) starting version: v1.02
2016-01-11 21:00:03.024   openLuup.scheduler:: [3] device startup completed: status=nil, msg=nil, name=nil
2016-01-11 21:00:03.024   openLuup.scheduler:: [4] device startup
2016-01-11 21:00:03.024   luup_log:4: Arduino plugin: loading library L_Arduino ...
2016-01-11 21:00:03.040   luup_log:4: Arduino plugin: library L_Arduino loaded
2016-01-11 21:00:03.041   luup_log:4: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,PluginVersion, 1.5, 4
2016-01-11 21:00:03.041   luup.variable_set:4: 4.urn:upnp-arduino-cc:serviceId:arduino1.PluginVersion was: EMPTY now: 1.5 #hooks:0
2016-01-11 21:00:03.041   luup_log:4: Arduino: Using network connection: IP address is 10.0.0.164:5003
2016-01-11 21:00:03.177   luup.io.open:: connecting to 10.0.0.164:5003
2016-01-11 21:00:03.178   openLuup.io:: connect OK
2016-01-11 21:00:03.178   luup_log:4: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,Unit, M, 4
2016-01-11 21:00:03.179   luup.variable_set:4: 4.urn:upnp-arduino-cc:serviceId:arduino1.Unit was: EMPTY now: M #hooks:0
2016-01-11 21:00:03.179   luup_log:4: Arduino: Sending: 0;0;3;0;2;Get Version
2016-01-11 21:00:03.179   luup.io.write:: bytes sent: 22, status: OK
2016-01-11 21:00:03.179   openLuup.scheduler:: [4] device startup completed: status=nil, msg=nil, name=nil
2016-01-11 21:00:03.183   luup.io.incoming:: bytes received: 36, status: OK
2016-01-11 21:00:03.184   luup_log:4: Arduino: Log: Gateway startup complete.
2016-01-11 21:00:03.188   luup.io.incoming:: bytes received: 15, status: OK
2016-01-11 21:00:03.188   luup_log:4: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,ArduinoLibVersion, 1.5.1, 4
2016-01-11 21:00:03.189   luup.variable_set:4: 4.urn:upnp-arduino-cc:serviceId:arduino1.ArduinoLibVersion was: EMPTY now: 1.5.1 #hooks:0
2016-01-11 21:00:04.191   luup_log:3: ALTUI: startupDeferred, called on behalf of device:3
2016-01-11 21:00:04.192   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.Debug was: EMPTY now: 0 #hooks:0
2016-01-11 21:00:04.192   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.Version was: EMPTY now: v1.02 #hooks:0
2016-01-11 21:00:04.193   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.Present was: EMPTY now: 0 #hooks:0
2016-01-11 21:00:04.194   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.RemoteAccess was: EMPTY now: https://vera-ui.strongcubedfitness.com/Veralogin.php #hooks:0
2016-01-11 21:00:04.195   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.LocalHome was: EMPTY now: /port_3480/data_request?id=lr_ALTUI_Handler&command=home #hooks:0
2016-01-11 21:00:04.196   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.ThemeCSS was: EMPTY now:  #hooks:0
2016-01-11 21:00:04.197   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.ExtraController was: EMPTY now:  #hooks:0
2016-01-11 21:00:04.197   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.ServerOptions was: EMPTY now:  #hooks:0
2016-01-11 21:00:04.198   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.LocalCDN was: EMPTY now:  #hooks:0
2016-01-11 21:00:04.199   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.LocalBootstrap was: EMPTY now:  #hooks:0
2016-01-11 21:00:04.214   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.PluginConfig was: EMPTY now: {"urn:schemas-micasaverde-com:device:PowerMeter:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawPowerMeter","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-futzle-com:device:CombinationSwitch:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawCombinationSwitch","ScriptFile":"J_ALTUI_plugins.js"},"urn:richardgreen:device:VeraAlert:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawVeraAlerts","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-futzle-com:device:UPnPProxy:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawPnPProxy","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:Heater:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawHeater","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:HVAC_ZoneThermostat:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawZoneThermostat","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:DoorLock:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawDoorLock","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:DoorSensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawDoorSensor","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-rts-services-com:device:ProgramLogicTS:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawProgLogicTimerSwitch","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:RGBController:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawBinaryLight","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:PowerMeter:2":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawPowerMeter","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:IPX800:1":{"DeviceDrawFunc":"ALTUI_IPhoneLocator.drawIPX","ScriptFile":"J_ALTUI_iphone.js"},"urn:schemas-arduino-cc:device:arduino:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawMySensors","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-dcineco-com:device:MSwitch:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawMultiswitch","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-rts-services-com:device:ProgramLogicEG:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawPLEG","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:Sonos:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawSonos","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-cd-jackson-com:device:SystemMonitor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawSysMonitor","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:DigitalSecurityCamera:2":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawCamera","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:DimmableLight:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawDimmable","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:TempLeakSensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawTempLeak","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-rts-services-com:device:DayTime:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawDayTime","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:DimmableRGBLight:2":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawDimmableRGB","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:DimmableRGBLight:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawDimmableRGB","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:VSwitch:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawVswitch","ScriptFile":"J_ALTUI_plugins.js"},"urn:demo-micasaverde-com:device:weather:1":{"DeviceIconFunc":"ALTUI_PluginDisplays.drawWeatherIcon","DeviceDrawFunc":"ALTUI_PluginDisplays.drawWeather","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:IPhoneLocator:1":{"StyleFunc":"ALTUI_IPhoneLocator.getStyle","DeviceDrawFunc":"ALTUI_IPhoneLocator.drawIPhone","ScriptFile":"J_ALTUI_iphone.js"},"urn:schemas-utz-com:device:GCal:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawGCal","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:VContainer:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawMultiString","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:altui:1":{"DeviceDrawFunc":"ALTUI_IPhoneLocator.drawAltUI","ScriptFile":"J_ALTUI_iphone.js"},"urn:schemas-micasaverde-com:device:HumiditySensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawHumidity","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-futzle-com:device:CountdownTimer:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawCountDown","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:SmokeSensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawSmoke","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-cd-jackson-com:device:DataMine:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawDataMine","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-a-lurker-com:device:InfoViewer:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawInfoViewer","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-futzle-com:device:holidayvirtualswitch:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawVacation","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:MotionSensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawMotion","ScriptFile":"J_ALTUI_plugins.js"},"urn:antor-fr:device:SamsungTVRemote:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawBinaryLight","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:cplus:1":{"DeviceDrawFunc":"ALTUI_IPhoneLocator.drawCanalplus","ControlPanelFunc":"ALTUI_IPhoneLocator.drawCanaplusControlPanel","ScriptFile":"J_ALTUI_iphone.js"},"urn:schemas-micasaverde-com:device:TemperatureSensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawTempSensor","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:DigitalSecurityCamera:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawCamera","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:BinaryLight:1":{"StyleFunc":"ALTUI_PluginDisplays.getStyle","DeviceDrawFunc":"ALTUI_PluginDisplays.drawBinaryLight","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:LightSensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawLight","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:WindowCovering:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawWindowCover","ScriptFile":"J_ALTUI_plugins.js"}} #hooks:0
2016-01-11 21:00:04.216   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.Version was: v1.02 now: v1.02 #hooks:0
2016-01-11 21:00:04.217   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.VariablesToWatch was: EMPTY now:  #hooks:0
2016-01-11 21:00:04.217   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.VariablesToSend was: EMPTY now:  #hooks:0
2016-01-11 21:00:04.218   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.RemoteVariablesToWatch was: EMPTY now:  #hooks:0
2016-01-11 21:00:04.219   openLuup.context_switch::  ERROR: [string "[3] I_ALTUI.xml"]:1927: bad argument #1 to 'find' (string expected, got nil)
2016-01-11 21:00:04.220   luup.delay_callback:: function: 0xc3a18 ERROR: [string "[3] I_ALTUI.xml"]:1927: bad argument #1 to 'find' (string expected, got nil)
2016-01-11 21:00:10.375   openLuup.server:: new client connection: tcp{client}: 0x109260
2016-01-11 21:00:10.376   openLuup.server:: new client connection: tcp{client}: 0x1afe20
2016-01-11 21:00:10.377   openLuup.server:: new client connection: tcp{client}: 0x17eb50
2016-01-11 21:00:10.379   openLuup.server:: /data_request?id=lr_ALTUI_Handler&command=home tcp{client}: 0x109260
2016-01-11 21:00:10.383   openLuup.server:: request completed (10 bytes, 1 chunks, 4 ms) tcp{client}: 0x109260
2016-01-11 21:00:10.478   openLuup.server:: /favicon.ico tcp{client}: 0x109260
2016-01-11 21:00:10.480   openLuup.HTTP.FILE:: file not found:favicon.ico
2016-01-11 21:00:10.481   openLuup.server:: request completed (0 bytes, 0 chunks, 2 ms) tcp{client}: 0x109260
2016-01-11 21:00:21.434   openLuup.server:: receive error: closed tcp{client}: 0x1afe20
2016-01-11 21:00:21.436   openLuup.server:: receive error: closed tcp{client}: 0x17eb50

I did run this also one more time without the Arduino gateway and only the ALTUI, and these are the log lines not in the one log above anymore:

2016-01-11 20:49:52.790 luup.set_failure:3: status = 0 2016-01-11 20:49:52.791 luup.register_handler:3: global_function_name=myALTUI_Handler, request=lr_ALTUI_Handler 2016-01-11 20:49:52.838 luup.call_action:3: 0.urn:micasaverde-com:serviceId:HomeAutomationGateway1.RunLua 2016-01-11 20:49:52.844 luup.register_handler:0: global_function_name=ALTUI_LuaRunHandler, request=lr_ALTUI_LuaRunHandler 2016-01-11 20:49:52.846 luup_log:3: ALTUI: startup completed

I wish I could compare these with a working ethernet gateway to be able to further debug it…

thnx!

Your wish is my command:

2016-01-11 20:42:22.175   :: openLuup STARTUP :: 
2016-01-11 20:42:22.176   openLuup.init::      version 2015.11.27  @akbooer
2016-01-11 20:42:22.185   openLuup.scheduler:: version 2015.11.27  @akbooer
2016-01-11 20:42:22.185   openLuup.server::    version 2015.12.19  @akbooer
2016-01-11 20:42:22.200   openLuup.plugins::   version 2015.12.22  @akbooer
2016-01-11 20:42:22.202   openLuup.scenes::    version 2015.11.12  @akbooer
2016-01-11 20:42:22.203   openLuup.chdev::     version 2015.11.09  @akbooer
2016-01-11 20:42:22.204   openLuup.io::        version 2015.10.15  @akbooer
2016-01-11 20:42:22.204   openLuup.luup:0:      version 2015.11.16  @akbooer
2016-01-11 20:42:22.206   openLuup.rooms::     version 2015.10.15  @akbooer
2016-01-11 20:42:22.206   openLuup.requests::  version 2015.11.09  @akbooer
2016-01-11 20:42:22.206   luup.create_device:: [1] D_ZWaveNetwork.xml /  / 
2016-01-11 20:42:22.206   luup.create_device:: [2] D_SceneController1.xml /  / 
2016-01-11 20:42:22.206   openLuup.init:: loading configuration user_data.json
2016-01-11 20:42:22.206   openLuup.init:: loading user_data json...
2016-01-11 20:42:22.208   openLuup.init:: loading rooms...
2016-01-11 20:42:22.208   openLuup.init:: room#1 'Upstairs'
2016-01-11 20:42:22.208   openLuup.init:: room#2 'Downstairs'
2016-01-11 20:42:22.208   openLuup.init:: room#3 'My Lady's Chamber'
2016-01-11 20:42:22.208   openLuup.init:: ...room loading completed
2016-01-11 20:42:22.208   openLuup.init:: loading devices...
2016-01-11 20:42:22.208   luup.create_device:: [1] D_ZWaveNetwork.xml /  / 
2016-01-11 20:42:22.208   luup.create_device:: [2] D_SceneController1.xml /  / 
2016-01-11 20:42:22.230   luup.create_device:: [3] D_ALTUI.xml / I_ALTUI.xml / D_ALTUI_UI7.json
2016-01-11 20:42:22.238   luup.create_device:: [4] D_Arduino1.xml / I_Arduino1.xml / D_Arduino1.json
2016-01-11 20:42:22.238   openLuup.init:: loading scenes...
2016-01-11 20:42:22.238   openLuup.init:: number of scenes = 0
2016-01-11 20:42:22.238   openLuup.init:: ...scene loading completed
2016-01-11 20:42:22.238   openLuup.init:: loading installed plugin info...
2016-01-11 20:42:22.238   openLuup.init:: ...user_data loading completed
2016-01-11 20:42:22.238   openLuup.init:: running _openLuup_STARTUP_
2016-01-11 20:42:22.239   openLuup.init:: init phase completed
2016-01-11 20:42:22.239   openLuup.server:: starting HTTP server on 0.0.0.0:3480 tcp{server}: 0x357b10
2016-01-11 20:42:22.239   openLuup.scheduler:: starting
2016-01-11 20:42:22.239   openLuup.scheduler:: [3] device startup
2016-01-11 20:42:22.239   luup_log:3: ALTUI: initstatus(3) starting version: v1.02
2016-01-11 20:42:22.251   openLuup.scheduler:: [3] device startup completed: status=nil, msg=nil, name=nil
2016-01-11 20:42:22.251   openLuup.scheduler:: [4] device startup
2016-01-11 20:42:22.251   luup_log:4: Arduino plugin: loading library L_Arduino ...
2016-01-11 20:42:22.254   luup_log:4: Arduino plugin: library L_Arduino loaded
2016-01-11 20:42:22.254   luup.set_failure:4: status = false
2016-01-11 20:42:22.254   luup_log:4: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,PluginVersion, 1.4, 4
2016-01-11 20:42:22.254   luup.variable_set:4: 4.urn:upnp-arduino-cc:serviceId:arduino1.PluginVersion was: EMPTY now: 1.4 #hooks:0
2016-01-11 20:42:22.254   luup_log:4: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,GWAddress, -, 4
2016-01-11 20:42:22.254   luup.variable_set:4: 4.urn:upnp-arduino-cc:serviceId:arduino1.GWAddress was: EMPTY now: - #hooks:0
2016-01-11 20:42:22.254   luup_log:4: Arduino: Using network connection: IP address is 172.16.42.21:5003
2016-01-11 20:42:22.254   luup.io.open:: connecting to 172.16.42.21:5003
2016-01-11 20:42:22.254   openLuup.io:: connect OK
2016-01-11 20:42:22.254   luup_log:4: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,GWAddress, 172.16.42.21:5003, 4
2016-01-11 20:42:22.254   luup.variable_set:4: 4.urn:upnp-arduino-cc:serviceId:arduino1.GWAddress was: - now: 172.16.42.21:5003 #hooks:0
2016-01-11 20:42:22.254   luup_log:4: Arduino: urn:upnp-org:serviceId:altui1,DisplayLine1, gateway: 172.16.42.21:5003, 4
2016-01-11 20:42:22.254   luup.variable_set:4: 4.urn:upnp-org:serviceId:altui1.DisplayLine1 was: EMPTY now: gateway: 172.16.42.21:5003 #hooks:0
2016-01-11 20:42:22.254   luup_log:4: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,Unit, M, 4
2016-01-11 20:42:22.254   luup.variable_set:4: 4.urn:upnp-arduino-cc:serviceId:arduino1.Unit was: EMPTY now: M #hooks:0
2016-01-11 20:42:22.254   luup_log:4: Arduino: Sending: 0;0;3;0;2;Get Version
2016-01-11 20:42:22.254   luup.io.write:: bytes sent: 22, status: OK
2016-01-11 20:42:22.255   openLuup.scheduler:: [4] device startup completed: status=nil, msg=nil, name=nil
2016-01-11 20:42:22.257   luup.io.incoming:: bytes received: 36, status: OK
2016-01-11 20:42:22.257   luup_log:4: Arduino: Log: Gateway startup complete.
2016-01-11 20:42:22.273   luup.io.incoming:: bytes received: 13, status: OK
2016-01-11 20:42:22.273   luup_log:4: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,ArduinoLibVersion, 1.5, 4
2016-01-11 20:42:22.273   luup.variable_set:4: 4.urn:upnp-arduino-cc:serviceId:arduino1.ArduinoLibVersion was: EMPTY now: 1.5 #hooks:0
2016-01-11 20:42:22.316   openLuup.server:: new client connection: tcp{client}: 0x373548
2016-01-11 20:42:22.316   openLuup.server:: /data_request?id=lu_status2&output_format=json&DataVersion=544869442&Timeout=60&MinimumDelay=1500&_=1452467698624 tcp{client}: 0x373548
2016-01-11 20:42:23.318   luup_log:3: ALTUI: startupDeferred, called on behalf of device:3
2016-01-11 20:42:23.318   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.Debug was: EMPTY now: 0 #hooks:0
2016-01-11 20:42:23.318   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.Version was: EMPTY now: v1.02 #hooks:0
2016-01-11 20:42:23.318   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.Present was: EMPTY now: 0 #hooks:0
2016-01-11 20:42:23.318   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.RemoteAccess was: EMPTY now: https://vera-ui.strongcubedfitness.com/Veralogin.php #hooks:0
2016-01-11 20:42:23.318   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.LocalHome was: EMPTY now: /port_3480/data_request?id=lr_ALTUI_Handler&command=home #hooks:0
2016-01-11 20:42:23.318   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.ThemeCSS was: EMPTY now:  #hooks:0
2016-01-11 20:42:23.319   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.ExtraController was: EMPTY now:  #hooks:0
2016-01-11 20:42:23.319   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.ServerOptions was: EMPTY now:  #hooks:0
2016-01-11 20:42:23.319   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.LocalCDN was: EMPTY now:  #hooks:0
2016-01-11 20:42:23.319   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.LocalBootstrap was: EMPTY now:  #hooks:0
2016-01-11 20:42:23.320   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.PluginConfig was: EMPTY now: {"urn:schemas-upnp-org:device:Heater:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawHeater"},"urn:schemas-rts-services-com:device:ProgramLogicEG:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawPLEG"},"urn:antor-fr:device:SamsungTVRemote:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawBinaryLight"},"urn:schemas-upnp-org:device:BinaryLight:1":{"ScriptFile":"J_ALTUI_plugins.js","StyleFunc":"ALTUI_PluginDisplays.getStyle","DeviceDrawFunc":"ALTUI_PluginDisplays.drawBinaryLight"},"urn:schemas-micasaverde-com:device:TemperatureSensor:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawTempSensor"},"urn:schemas-upnp-org:device:DimmableRGBLight:2":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawDimmableRGB"},"urn:schemas-upnp-org:device:VContainer:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawMultiString"},"urn:schemas-upnp-org:device:DigitalSecurityCamera:2":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawCamera"},"urn:schemas-micasaverde-com:device:LightSensor:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawLight"},"urn:schemas-micasaverde-com:device:DoorSensor:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawDoorSensor"},"urn:schemas-micasaverde-com:device:Sonos:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawSonos"},"urn:schemas-upnp-org:device:DimmableRGBLight:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawDimmableRGB"},"urn:schemas-micasaverde-com:device:HumiditySensor:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawHumidity"},"urn:schemas-micasaverde-com:device:PowerMeter:2":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawPowerMeter"},"urn:schemas-micasaverde-com:device:MotionSensor:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawMotion"},"urn:schemas-upnp-org:device:DimmableLight:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawDimmable"},"urn:schemas-futzle-com:device:CountdownTimer:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawCountDown"},"urn:schemas-upnp-org:device:cplus:1":{"ScriptFile":"J_ALTUI_iphone.js","ControlPanelFunc":"ALTUI_IPhoneLocator.drawCanaplusControlPanel","DeviceDrawFunc":"ALTUI_IPhoneLocator.drawCanalplus"},"urn:schemas-upnp-org:device:IPhoneLocator:1":{"ScriptFile":"J_ALTUI_iphone.js","StyleFunc":"ALTUI_IPhoneLocator.getStyle","DeviceDrawFunc":"ALTUI_IPhoneLocator.drawIPhone"},"urn:schemas-micasaverde-com:device:WindowCovering:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawWindowCover"},"urn:schemas-upnp-org:device:VSwitch:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawVswitch"},"urn:schemas-upnp-org:device:RGBController:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawBinaryLight"},"urn:schemas-upnp-org:device:DigitalSecurityCamera:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawCamera"},"urn:schemas-dcineco-com:device:MSwitch:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawMultiswitch"},"urn:schemas-rts-services-com:device:ProgramLogicTS:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawProgLogicTimerSwitch"},"urn:schemas-upnp-org:device:HVAC_ZoneThermostat:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawZoneThermostat"},"urn:schemas-futzle-com:device:UPnPProxy:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawPnPProxy"},"urn:schemas-micasaverde-com:device:TempLeakSensor:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawTempLeak"},"urn:richardgreen:device:VeraAlert:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawVeraAlerts"},"urn:schemas-utz-com:device:GCal:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawGCal"},"urn:schemas-cd-jackson-com:device:SystemMonitor:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawSysMonitor"},"urn:schemas-rts-services-com:device:DayTime:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawDayTime"},"urn:schemas-upnp-org:device:IPX800:1":{"ScriptFile":"J_ALTUI_iphone.js","DeviceDrawFunc":"ALTUI_IPhoneLocator.drawIPX"},"urn:schemas-cd-jackson-com:device:DataMine:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawDataMine"},"urn:demo-micasaverde-com:device:weather:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceIconFunc":"ALTUI_PluginDisplays.drawWeatherIcon","DeviceDrawFunc":"ALTUI_PluginDisplays.drawWeather"},"urn:schemas-micasaverde-com:device:PowerMeter:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawPowerMeter"},"urn:schemas-a-lurker-com:device:InfoViewer:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawInfoViewer"},"urn:schemas-micasaverde-com:device:SmokeSensor:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawSmoke"},"urn:schemas-micasaverde-com:device:DoorLock:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawDoorLock"},"urn:schemas-upnp-org:device:altui:1":{"ScriptFile":"J_ALTUI_iphone.js","DeviceDrawFunc":"ALTUI_IPhoneLocator.drawAltUI"},"urn:schemas-arduino-cc:device:arduino:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawMySensors"},"urn:schemas-futzle-com:device:holidayvirtualswitch:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawVacation"},"urn:schemas-futzle-com:device:CombinationSwitch:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawCombinationSwitch"}} #hooks:0
2016-01-11 20:42:23.321   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.Version was: v1.02 now: v1.02 #hooks:0
2016-01-11 20:42:23.321   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.VariablesToWatch was: EMPTY now:  #hooks:0
2016-01-11 20:42:23.321   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.VariablesToSend was: EMPTY now:  #hooks:0
2016-01-11 20:42:23.321   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.RemoteVariablesToWatch was: EMPTY now:  #hooks:0
2016-01-11 20:42:23.321   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.VariablesToSend was:  now:  #hooks:0
2016-01-11 20:42:23.321   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.RemoteVariablesToWatch was:  now:  #hooks:0
2016-01-11 20:42:23.321   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.VariablesToWatch was:  now:  #hooks:0
2016-01-11 20:42:23.321   luup.set_failure:3: status = 0
2016-01-11 20:42:23.321   luup.register_handler:3: global_function_name=myALTUI_Handler, request=lr_ALTUI_Handler
2016-01-11 20:42:23.325   luup.call_action:3: 0.urn:micasaverde-com:serviceId:HomeAutomationGateway1.RunLua 
2016-01-11 20:42:23.326   luup.register_handler:0: global_function_name=ALTUI_LuaRunHandler, request=lr_ALTUI_LuaRunHandler
2016-01-11 20:42:23.326   luup_log:3: ALTUI: startup completed
2016-01-11 20:42:23.833   openLuup.server:: request completed (9770 bytes, 1 chunks, 1516 ms) tcp{client}: 0x373548
2016-01-11 20:42:23.848   openLuup.server:: /data_request?id=user_data&output_format=json&DataVersion=544869215&_=1452467698625 tcp{client}: 0x373548
2016-01-11 20:42:23.855   openLuup.server:: request completed (25055 bytes, 2 chunks, 7 ms) tcp{client}: 0x373548

I fired up my old Arduino Uno with Ethernet 5100 board, with a startup file including just AltUI and these lines for the MySensors plugin:

do -- Arduino
  local arduino = luup.create_device ('', "Arduino", "Arduino", "D_Arduino1.xml")        
  luup.ip_set ("172.16.42.21", arduino)         -- Arduino Uno RF24 gateway  
end

Let’s see what differences we find…

Wow thats fast!

first thing I’d noticed, is in your log are these, missing from mine:

luup_log:4: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,GWAddress, 172.16.42.21:5003, 4 2016-01-11 20:42:22.254 luup.variable_set:4: 4.urn:upnp-arduino-cc:serviceId:arduino1.GWAddress was: - now: 172.16.42.21:5003 #hooks:0 2016-01-11 20:42:22.254 luup_log:4: Arduino: urn:upnp-org:serviceId:altui1,DisplayLine1, gateway: 172.16.42.21:5003, 4 2016-01-11 20:42:22.254 luup.variable_set:4: 4.urn:upnp-org:serviceId:altui1.DisplayLine1 was: EMPTY now: gateway: 172.16.42.21:5003 #hooks:0 2016-01-11 20:42:22.254 luup_log:4: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,Unit, M, 4

Maybe a difference in sketch, what is sent to the controller?

I’m now running AltUI 1.02.1094, so we should be the same on that score.

The differences I noted included:

[ul][li]this was the first startup of the plugin, so some variables were previously blank[/li]
[li]the difference you note “DisplayLine1” is due to the fact that I’ve added that variable to the plugin for the AltUI display [/li]
[li]you are running a different MySensors plugin version: 1.5 whereas I’m running 1.4[/li][/ul]

Have you cleared the AltUI user data in your broswer and refreshed the page?
Can you send me your complete user_data.json file ?

I’m still fixating on the AltUI failure when parsing the VariablesToWatch and VariablesToSend strings. That’s where it falls over.

I wonder if it would be worth trying the version of the MySensors Arduino plugin that I’m using? You probably only need to change the Lua file - attached.

[quote=“akbooer, post:11, topic:190527”]I’m now running AltUI 1.02.1094, so we should be the same on that score.

The differences I noted included:

[ul][li]this was the first startup of the plugin, so some variables were previously blank[/li]
[li]the difference you note “DisplayLine1” is due to the fact that I’ve added that variable to the plugin for the AltUI display [/li]
[li]you are running a different MySensors plugin version: 1.5 whereas I’m running 1.4[/li][/ul][/quote]
Ok.

Have you cleared the AltUI user data in your broswer and refreshed the page?
I hadn't, now I have and tested again with startup.lua with only ALTUI and Arduino enabled, same kind of log as before, [i](btw .log is not an allowed file type to attach here)[/i]
Can you send me your complete user_data.json file ?
Yes, here attached is the one after running the above described situation again.
I'm still fixating on the AltUI failure when parsing the VariablesToWatch and VariablesToSend strings. That's where it falls over.
Yes I agree, would it be a useful to turn on debugging within ALTUI lua file? So we can maybe see what property comes in as nil?

thnx,
Berry

Yes This is working!
Doing a compare between your lua file 1.4 and mine 1.5, and it also seems you (?) have added some ALTUI service id’s, pure for logging purpose?
I’ve noticed this one too in: [tt]function startup[/tt]:luup.set_failure(false), this isn’t in 1.5.
Edit: But after checking this last comment if this helped in 1.5, it didn’t, but you would probably know that already :wink:

berry

Ok !
I think i got it:

If I change only this split method in 1.5 (copied the one from 1.4) it’s working too:

working split:

function string:split(delimiter) local result = { } for x in self:gmatch ("([^" .. delimiter .. "]+)") do result[#result+1] = x end return result end

not working:

function string:split(delimiter)
	local result = { }
	local from  = 1
	local delim_from, delim_to = string.find( self, delimiter, from  )
	while delim_from do
		table.insert( result, string.sub( self, from , delim_from-1 ) )
		from  = delim_to + 1
		delim_from, delim_to = string.find( self, delimiter, from  )
	end
	table.insert( result, string.sub( self, from  ) )
	return result
end

grtz

Ah! Beginning to make sense, perhaps. Where does the version you’re using hail from? The UI5 and UI7 branches in MySensors are not merged (actually, I kind of promised to do this myself, but haven’t had time.) Yes, the AltUI serviceId’s are for displaying useful info.

So what’s your plan? Stick with the working version?

Ah ok.
I guess I got the one from the 5.1.1 development branch, but the the UI7 and master branches are having the same (faulty for ALTUI/openLuup) split method.
UI7:
[url=https://github.com/mysensors/Vera/blob/UI7/L_Arduino.lua#L596]Vera/L_Arduino.lua at UI7 · mysensors/Vera · GitHub

dev:
[url=https://github.com/mysensors/Vera/blob/UI7/L_Arduino.lua#L596]Vera/L_Arduino.lua at UI7 · mysensors/Vera · GitHub

master:
[url=https://github.com/mysensors/Vera/blob/master/L_Arduino.lua#L596]Vera/L_Arduino.lua at master · mysensors/Vera · GitHub

Searching a bit more, I can’t find the commit with specific change, looked back within the master branch till when it was pulled from mios into github:
[url=https://github.com/mysensors/Vera/commit/a8fe57491f782ea799f7620ace176b656b98d06a]https://github.com/mysensors/Vera/commit/a8fe57491f782ea799f7620ace176b656b98d06a[/url]
It looks like this was already back to version 1.2+
So how did you come up with this one? Was it for UI5 specific,not on github or something?

For now I just stay with this fix, but would this be something for @amg0 to fix/handle or is the split function just wrongly coded and should someone (Hek?) fix it within MySensors?

Thanks a lot for all your help and fast replies!

grtz,
Berry

I didn’t like the way it was written, so ‘improved’ it. I’d have to go back to my notes to see if there was a deeper reason.

Ok good work then, maybe you can commit it into the MySensors branch?

Just one last question, are maybe if’s not one question move to other thread: I am missing akb-json module when running KodiRemote plugin, should I already have it?

thnx!

Actually, you do already have it - under openLuup it’s in openLuup/json.lua

If you run the following in the Lua Test window:

local json = require "openLuup.json"
print (pretty(json))

you should see this output:

{ _VERSION = "2015.11.29 @akbooer", decode = function: 0x98bde8, default = { huge = "8.88e888", max_array_length = 1000 }, encode = function: 0x98ee88, version = "2015.11.29 @akbooer" }

Showing that json.encode and json.decode are there. You’ll also find a stringent set of tests in the tests directory under test_json.lua.