Code: Select all
commandArray = {}
print("test")
return commandArray
When I set the switch in the Off position, I see the following lines in my Domiticz log:
The print("test") is not visible here (I am not sure if I should expect it in the log-file) and it seems that the script ran fine. Now when I set the switch in the "On" possition I see the following:2019-01-07 15:56:17.632 (@Home) Light/Switch (Televisie woonkamer)
2019-01-07 15:56:17.603 Status: User: admin initiated a switch command (43/Televisie woonkamer/Off)
Both the On and Off scripts are defined in the switch settings as below (note the 3 slashes)2019-01-07 15:57:03.365 (@Home) Light/Switch (Televisie woonkamer)
2019-01-07 15:57:03.336 Status: User: admin initiated a switch command (43/Televisie woonkamer/On)
2019-01-07 15:57:03.344 Error: SQLHelper: Error script not found '/lua/tvswitch.lua'
Code: Select all
script:///lua/tvswitch.lua
What am I doing wrong? Should this work? Any help is appreciated!2019-01-07 15:59:30.103 Error: Error executing script command (/home/pi/domoticz/scripts/lua/tvswitchon.lua). returned: 512
I have been testing this with Domotics version 4.10303 (which is a beta I think)