Domoticz Switch Can't Find NetCat from LUA Script

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.
Post Reply
robatbentley
Posts: 19
Joined: Saturday 18 March 2017 22:24
Target OS: Raspberry Pi
Domoticz version: 3.8889
Location: Newcastle/UK
Contact:

Domoticz Switch Can't Find NetCat from LUA Script

Post by robatbentley » Thursday 30 March 2017 22:47

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...

tolunaygul
Posts: 1
Joined: Saturday 15 April 2017 10:09
Target OS: Windows
Domoticz version:
Contact:

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

Post by tolunaygul » Saturday 15 April 2017 10:38

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests