Turn On/Off relay in windows 7
-
Any know how i can turn off/on a relay sensor sending a command from windows to the gw connected with usb? Using a program, script, etc? I cant buy a Rpi or Vera =( im use 1.4b
Thanks all!
-
@ch3b7 Send command by serial monitor. In serial monitor window (at the bottom) choose NL(New Line), type something like this 15;1;1;0;2;1(radio id 15, child id, and sensor number 1) in input field, and push send. At the end of the command 1 means relay on, 0 means relay off.
-
@jendrush thanks for reply! I know this method but i need not use the arduino serial monitor im try to make a program send throught serial but the gateway dont listen the serial input from the usb
-
@ch3b7 you need to set 115200 and se parameters. check my mysensors-gw. pl on that
-
First need to find out which com port it is set. and then enter the following at the command line:
mode com[NUMBER] BAUD=115200 PARITY=n DATA=8 STOP=1
Replace [NUMBER] with the number used.
The enter the next to send something:
echo "[LINETOSEND]\n" > COM[NUMBER]
Replace [LINETOSEND] with what you want to send.
Havn't tried it myself, but the above should work... I think.
-
no work =( i send "2;1;1;3;2;1\n" (turn on relay)
-
@ch3b7
shouldn't it be "2;1;1;0;2;1\n" or "2;1;1;1;2;1\n" ?
-
@jendrush said:
15;1;1;0;2;1
I agree, and i did write sample message 15;1;1;0;2;1. This 0 is for not requesting ACK.
-
I need change something in the gateway? The gw read the serial imput from the usb? I try with the 0 but nothing
-
Are you running the SerialGateway.ino on the Arduino connected to your computer?
Does the commands work when you type them into Serial Monitor of Arduino IDE?If so, open the same com-port (port speed/stop bits settings described by in this thread) in your own script and send the same command. Remember newline.
-
Im install the gateway sketch and Yes if i put.the.command.in the serial monitor work turning on off a led in the sensor i have but without a 0 for ack like this "2;1;1;3;2;1\n" Im use the example this "echo " (command)\n" > comXX and this config
mode com[NUMBER] BAUD=115200 PARITY=n DATA=8 STOP=1