Difference between Synology and PI Lua scripts?
Posted: Saturday 18 February 2017 9:25
I have a Synology DS1515, running Domoticz (latest beta) V3.6708.
To the domoticz I have a few Yeelights connected and to controle these lights I have to send a command like:
echo -ne '{"id":1, "method":"set_hsv", "params":[273, 65, "smooth", 2000]}\r\n' | nc -w1 192.168.2.81 55443
when I send this command from the command prompt (ssh to the DS1515) then it works perfectly. So no unknown commands.
I installed busybox previously to have the command "nc"
But when I send the command from a lua script like:
Then nothing happens, however if i send the same command as above from a raspberry Pi then the bulb reacts as expected, so I expect that the syntax is also ok.
But what is now the difference between Synology and RaspberryPi running the same command?
Can anyone help me to point out what I should do to make this work for Domoticz on my Synology?
For me it is rather important since I made a whole script for many lights I want to steer with these commands, so help is apreciate.
Many thanks
To the domoticz I have a few Yeelights connected and to controle these lights I have to send a command like:
echo -ne '{"id":1, "method":"set_hsv", "params":[273, 65, "smooth", 2000]}\r\n' | nc -w1 192.168.2.81 55443
when I send this command from the command prompt (ssh to the DS1515) then it works perfectly. So no unknown commands.
I installed busybox previously to have the command "nc"
But when I send the command from a lua script like:
Code: Select all
runcommandYeelight ="echo -ne '{"id":1, "method":"set_hsv", "params":[273, 65, "smooth", 2000]}\r\n' | nc -w1 192.168.2.81 55443"
os.execute(runcommandYeelight)
But what is now the difference between Synology and RaspberryPi running the same command?
Can anyone help me to point out what I should do to make this work for Domoticz on my Synology?
For me it is rather important since I made a whole script for many lights I want to steer with these commands, so help is apreciate.
Many thanks