i guess first we want to figure out at which point in the process it is failing, so a few questions are:
-
is your variableContainer device updating when your pool status changes? (change the pool heat set point on your Jandy one touch and confirm autelis sees the change, then reload your web browser on UI5 and see if variable 1 in your variable container device updated. then turn your pool pump on or off, confirm autelis updated and check Variable11 in your variable container to make sure it updated).
-
when you issue an http command to autelis from vera (i like using LuaTest for this sorta testing) does autelis do what it should?
eg: does this turn off your pool heat
local vCode, vData = luup.inet.wget("http://<autelis_ip>/set.cgi?name=poolht&value=0",5,"<autelis_username>","<autelis_password>")
- if you test a line of code to set the state of a multiswitch button, does it do that correctly?
eg: does this turn on button 5 on your multiswitch?
luup.call_action("urn:dcineco-com:serviceId:MSwitch1","SetStatus5",{newStatus5=1},218)
and does this turn button 5 off?
luup.call_action("urn:dcineco-com:serviceId:MSwitch1","SetStatus5",{newStatus5=0},218)
if all that is working, then next step is to put some logging into the startup lua functions to see if they are being called when variable container variables change and when multiswitch buttons are turned on or off. if you use eventwatcher then add a user log item to it, if note then just luup.log with a prefix, and ssh into vera and 'tail -f /var/log/cmh/LuaUPnP.log | grep autelis" to confirm the functions are being called when you turn things on/off on your jandy. for example:
in the update spa pump switch function add a log line e.g.:
[code]-- update spa pump switch
function f_watch_spapump(lul_device, lul_service, lul_variable, lul_value_old, lul_value_new)
luup.log("autelis update spa pump switch - new value is ".. lul_value_new)
luup.call_action("urn:dcineco-com:serviceId:MSwitch1","SetStatus3",{newStatus3=lul_value_new},218)
f_SetPoolStatusOnline()
end
luup.variable_watch(“f_watch_spapump”,“urn:upnp-org:serviceId:VContainer1”,“Variable12”, autelis_vc)
[/code]
and e.g. does the update spa jets function get called when you turn button 5 of your multiswitch on or off:
[code]-- update spa jets
function f_watch_spajetSwitch(lul_device, lul_service, lul_variable, lul_value_old, lul_value_new)
luup.log("autelis update spa jets when multiswitch button is pressed - new value is ".. lul_value_new)
local vURL =“http://”…autelis_ip…“/set.cgi?name=aux1&value=”… lul_value_new
luup.log("autelis update spa jets when multiswitch button is pressed - vURL is “… vURL…” user is "… autelis_user… " passwd is "… autelis_passwd)
local vCode, vData = luup.inet.wget(vURL,5,autelis_user,autelis_passwd)
end
luup.variable_watch(‘f_watch_spajetSwitch’,‘urn:dcineco-com:serviceId:MSwitch1’,‘Status5’,218)
[/code]
if all of that is working and the url, username and password in the log are correct then we need to keep digging. if any of that is not working then we know where to focus.