Page 1 of 1

Domoticz Switch Can't Find NetCat from LUA Script

Posted: Thursday 30 March 2017 22:47
by robatbentley
Update: Fixed it by adding the full path to netcat folder in LUA script. e.g.

Code: Select all

runcommand = "echo " .. (Fadetimer) .."" .. (FadeTime1) .. "," .. (LEDtarget) .. "" .. (CalcValue) .. " | c:\\temp\\NetCat\\netcat-win32-1.12\\nc -w " .. (Waittime) .. " " .. (IP) .. " " .. (Port) .. " ";
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...
2017-03-30 21:05:59.013 LUA: echo Fadetimer=5000,LED1_Target=924 | nc -w 2 xxx.xxx.x.xx 43333
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 192.168.1.89 43333
'nc' is not recognized as an internal or external command,
operable program or batch file.
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...

Re: Domoticz Switch Can't Find NetCat from LUA Script

Posted: Saturday 15 April 2017 10:38
by tolunaygul
Hii,

i am running into the same problem with quinled tutorial.
Can you please post more information on how to get it working ? ( maybe full lua script ?)

I tried several things but cannot get it working.