Domoticz on windows and os.execute command

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Foxdesign
Posts: 2
Joined: Wednesday 30 March 2016 6:05
Target OS: Windows
Domoticz version:
Contact:

Domoticz on windows and os.execute command

Post by Foxdesign »

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!
mrf68

Re: Domoticz on windows and os.execute command

Post by mrf68 »

Hi Foxdesign,

I'm running Domoticz on a Windows system and use the os.execute command this way:

os.execute ("C:\\PS\\pomachterdeur.cmd")

This command works, so my answer to your assumption that os.execute doesn't work, is imo not correct. But I can't say why yours isn't working.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest