Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. Turn On/Off relay in windows 7

Turn On/Off relay in windows 7

Scheduled Pinned Locked Moved Development
11 Posts 5 Posters 3.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ch3b7C Offline
    ch3b7C Offline
    ch3b7
    wrote on last edited by
    #1

    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!

    jendrushJ JohnJ 2 Replies Last reply
    0
    • ch3b7C ch3b7

      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!

      jendrushJ Offline
      jendrushJ Offline
      jendrush
      wrote on last edited by jendrush
      #2

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

      ch3b7C 1 Reply Last reply
      0
      • jendrushJ jendrush

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

        ch3b7C Offline
        ch3b7C Offline
        ch3b7
        wrote on last edited by
        #3

        @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

        1 Reply Last reply
        0
        • epierreE Offline
          epierreE Offline
          epierre
          Hero Member
          wrote on last edited by
          #4

          @ch3b7 you need to set 115200 and se parameters. check my mysensors-gw. pl on that

          https://github.com/empierre

          z-wave - Vera -> Domoticz
          rfx - Domoticz <- MyDomoAtHome <- Imperihome
          mysensors -> mysensors-gw -> Domoticz

          1 Reply Last reply
          0
          • ch3b7C ch3b7

            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!

            JohnJ Offline
            JohnJ Offline
            John
            Plugin Developer
            wrote on last edited by
            #5

            @ch3b7

            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.

            My Domotica project: http://www.pidome.org

            1 Reply Last reply
            0
            • ch3b7C Offline
              ch3b7C Offline
              ch3b7
              wrote on last edited by
              #6

              no work =( i send "2;1;1;3;2;1\n" (turn on relay)

              JohnJ 1 Reply Last reply
              0
              • ch3b7C ch3b7

                no work =( i send "2;1;1;3;2;1\n" (turn on relay)

                JohnJ Offline
                JohnJ Offline
                John
                Plugin Developer
                wrote on last edited by
                #7

                @ch3b7
                shouldn't it be "2;1;1;0;2;1\n" or "2;1;1;1;2;1\n" ?

                My Domotica project: http://www.pidome.org

                jendrushJ 1 Reply Last reply
                0
                • JohnJ John

                  @ch3b7
                  shouldn't it be "2;1;1;0;2;1\n" or "2;1;1;1;2;1\n" ?

                  jendrushJ Offline
                  jendrushJ Offline
                  jendrush
                  wrote on last edited by
                  #8

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

                  1 Reply Last reply
                  0
                  • ch3b7C Offline
                    ch3b7C Offline
                    ch3b7
                    wrote on last edited by
                    #9

                    I need change something in the gateway? The gw read the serial imput from the usb? I try with the 0 but nothing

                    hekH 1 Reply Last reply
                    0
                    • ch3b7C ch3b7

                      I need change something in the gateway? The gw read the serial imput from the usb? I try with the 0 but nothing

                      hekH Offline
                      hekH Offline
                      hek
                      Admin
                      wrote on last edited by
                      #10

                      @ch3b7

                      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.

                      1 Reply Last reply
                      0
                      • ch3b7C Offline
                        ch3b7C Offline
                        ch3b7
                        wrote on last edited by
                        #11

                        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

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        25

                        Online

                        11.7k

                        Users

                        11.2k

                        Topics

                        113.1k

                        Posts


                        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • MySensors
                        • OpenHardware.io
                        • Categories
                        • Recent
                        • Tags
                        • Popular