Domoticz Switch Can't Find NetCat from LUA Script
Posted: Thursday 30 March 2017 22:47
Update: Fixed it by adding the full path to netcat folder in LUA script. e.g.
I've been following the quindorian.org instructions on how to setup a PWM dimmer. This solution uses Netcat to send instructions to the ESP and has worked all the way up until I use a LUA script for the Switch device in Domoticz. The NetCat message...
Code: Select all
runcommand = "echo " .. (Fadetimer) .."" .. (FadeTime1) .. "," .. (LEDtarget) .. "" .. (CalcValue) .. " | c:\\temp\\NetCat\\netcat-win32-1.12\\nc -w " .. (Waittime) .. " " .. (IP) .. " " .. (Port) .. " ";
works fine from a command prompt and dims the LED light accordingly. However Domoticz cannot find the "nc" application in "the" path. I've copied nc application into my windows 10 .../system32 folder but domoticz produces an error in the console log...2017-03-30 21:05:59.013 LUA: echo Fadetimer=5000,LED1_Target=924 | nc -w 2 xxx.xxx.x.xx 43333
I guess this is something to do with a path used by Domoticz but I don't know how to fix this. I've installed Domoticz as an application, and have tried as a server but still the same problem. Thanks in anticipation...2017-03-30 21:05:59.013 LUA: echo Fadetimer=5000,LED1_Target=924 | nc -w 2 192.168.1.89 43333
'nc' is not recognized as an internal or external command,
operable program or batch file.