Search found 5 matches

by typiak84
Friday 26 April 2019 13:51
Forum: LUA
Topic: LUA os.execute on Synology
Replies: 8
Views: 1311

Re: LUA os.execute on Synology

I must be a little dumb but when it try the -c option, it close effectively the connection but it don't send the datas...(the connection just open and close)
by typiak84
Wednesday 24 April 2019 18:56
Forum: LUA
Topic: LUA os.execute on Synology
Replies: 8
Views: 1311

Re: LUA os.execute on Synology

Thank you but -q 0 don't works for me (certainly my version of netcat on Synology) I've found a temporary solution by adding this at the end of the script: os.execute("sleep 1 && killall netcat"); It work perfectly but, if i have a netcat session open for another usage (not domoticz) it will be ...
by typiak84
Wednesday 24 April 2019 11:31
Forum: LUA
Topic: LUA os.execute on Synology
Replies: 8
Views: 1311

Re: LUA os.execute on Synology

Ok Thank you waaren. I have read the post and i found my ridiculous issue: I've just forgot the path before netcat (/opt/bin/netcat) Now, the sript works but not completely (not very responsive). After this, the Domoticz logs wtite an error message on each scene command: 2019-04-24 01:49:13.976 ...
by typiak84
Tuesday 23 April 2019 20:55
Forum: LUA
Topic: LUA os.execute on Synology
Replies: 8
Views: 1311

Re: LUA os.execute on Synology

Thank you but it don't works:
The escape caracters are already in the line i've tested before.
When i try yours, i've a syntax error.
With my first version: no syntax error...
by typiak84
Tuesday 23 April 2019 20:18
Forum: LUA
Topic: LUA os.execute on Synology
Replies: 8
Views: 1311

LUA os.execute on Synology

Hello. Here is my configuration: Domoticz on Synology Yeelight Bulb Lua Scene Script: runcommandoff = "echo -ne '{\"id\":1,\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | netcat -w1 " ..IP.." " ..PORT..""; os.execute(runcommandoff); print(runcommandoff) Here is my problem ...