I hope you can help me.
I want to update a user variable with this script:
Code: Select all
commandArray = {}
local switchName = "On signal motion sensor"
local USERVARIABLENAME = "counter1 var"
local USERVARIABLETYPE = "0"
local USERVARIABLEVALUE = "11"
if devicechanged[switchName] == 'On' then
http://192.168.2.10:8080/json.htm?type=command¶m=updateuservariable&vname=USERVARIABLENAME&vtype=USERVARIABLETYPE&vvalue=USERVARIABLEVALUE
end
return commandArrayHowever, it does not work and I get the following error: Error: EventSystem: in update user value: [string " ..."]:11: expected near '/'
I have followed these instructions from the Domoticz wiki: http://www.domoticz.com/wiki/Domoticz_A ... g_variable:
Update an existing variable
/json.htm?type=command¶m=updateuservariable&vname=USERVARIABLENAME&vtype=USERVARIABLETYPE
&vvalue=USERVARIABLEVALUE
Remember to change:
USERVARIABLENAME with the name of your variable
USERVARIABLETYPE according to the table from "Store a new variable"
USERVARIABLEVALUE with the new value
Can someone please tell me what I am doing wrong?
Thanks!