Domoticz on windows and os.execute command
Posted: Tuesday 05 April 2016 0:39
Hi there,
below is a snippet of code I've copied from a linux Domoticz installation:
runcommand = "echo " .. (Fadetimer) .."" .. (FadeTime1) .. "," .. (LEDtarget) .. "" .. (CalcValue) .. " | nc -w " .. (Waittime) .. " " .. (IP) .. " " .. (Port) .. " ";
print (runcommand);
os.execute(runcommand);
end
return commandArray
So the print command here works, and spits out the following format:
echo Fadetimer2=4000,LED2_target=0 | nc -w 2 192.168.1.2 43333 (which I can send to the device using Cygwin.)
So i'm guessing the os.execute command doesn't work? . Is this because os.execute is a Linux specific function?
If so, what command should I be using on a windows machine?
Thanks for any help in advance!
below is a snippet of code I've copied from a linux Domoticz installation:
runcommand = "echo " .. (Fadetimer) .."" .. (FadeTime1) .. "," .. (LEDtarget) .. "" .. (CalcValue) .. " | nc -w " .. (Waittime) .. " " .. (IP) .. " " .. (Port) .. " ";
print (runcommand);
os.execute(runcommand);
end
return commandArray
So the print command here works, and spits out the following format:
echo Fadetimer2=4000,LED2_target=0 | nc -w 2 192.168.1.2 43333 (which I can send to the device using Cygwin.)
So i'm guessing the os.execute command doesn't work? . Is this because os.execute is a Linux specific function?
If so, what command should I be using on a windows machine?
Thanks for any help in advance!