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 4.4k 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!

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

      J Offline
      J 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
      • J 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
        • E Offline
          E 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!

            J Offline
            J 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)

              J 1 Reply Last reply
              0
              • ch3b7C ch3b7

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

                J Offline
                J 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

                J 1 Reply Last reply
                0
                • J John

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

                  J Offline
                  J 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

                    H 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

                      H Offline
                      H 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

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        18

                        Online

                        12.0k

                        Users

                        11.2k

                        Topics

                        113.4k

                        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