impossible execution code LUA
Posted: Wednesday 21 February 2018 22:19
Hello everyone
I start in the LUA coding, I have a contact to which I try a code it is to display a text in a virtual device, I simply copied the following code:
- Lighting Entry Light.
commandArray = {}
if (devicechanged ['tank']) then
commandArray [ 'tank'] = 'On'
print ('Ignition')
http: //192.168.X.XX: 8080 / json.htm type = command & param = udevice & idx = 4 & sValue ignition =
end
return commandArray
what is incredible is when I remove the line "http ........." I have the text "ignition" which displays in the domoticz log and when I place the line "http .. ......... "in the program I have the error:
2018-02-21 19: 53: 02.118 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_device_on.lua: /home/pi/domoticz/scripts/lua/script_device_on.lua:4: expected near ' / '
and I no longer have "ignition" in the Log
I have no null password, for the virtual sensor I chose as sensor type "TEXT"
if a charitable soul can help me, or if someone has already had this problem because I will crack
Thanks for your help
I start in the LUA coding, I have a contact to which I try a code it is to display a text in a virtual device, I simply copied the following code:
- Lighting Entry Light.
commandArray = {}
if (devicechanged ['tank']) then
commandArray [ 'tank'] = 'On'
print ('Ignition')
http: //192.168.X.XX: 8080 / json.htm type = command & param = udevice & idx = 4 & sValue ignition =
end
return commandArray
what is incredible is when I remove the line "http ........." I have the text "ignition" which displays in the domoticz log and when I place the line "http .. ......... "in the program I have the error:
2018-02-21 19: 53: 02.118 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_device_on.lua: /home/pi/domoticz/scripts/lua/script_device_on.lua:4: expected near ' / '
and I no longer have "ignition" in the Log
I have no null password, for the virtual sensor I chose as sensor type "TEXT"
if a charitable soul can help me, or if someone has already had this problem because I will crack
Thanks for your help