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. Troubleshooting
  3. How to make sure an relay is really switched?

How to make sure an relay is really switched?

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 4 Posters 1.6k Views 3 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.
  • S Offline
    S Offline
    sharky0815
    wrote on last edited by
    #1

    Hi all!

    I am using running a serial gateway connected to OpenHAB, using the examples provided in the forum. I can switch an array on and off using the OpenHAB Controller.

    For a start my question is general in nature because I might not have understood something correctly. When I switch the array from the interface the rule I am using is sending the command and then updating the status in the interface. What I am wondering is, what if something goes wrong and the transmission is dropped or there is a bug so the array doesn't really turn on or off? Is there some way to check for this, only updating the status if the node reports success?

    Is this done on the controller or the gateway?

    I am getting "ack"'s back on the sensor node for data I send from the node to the gateway but haven't figured out a way for the other direction.

    1 Reply Last reply
    1
    • NeverDieN Offline
      NeverDieN Offline
      NeverDie
      Hero Member
      wrote on last edited by NeverDie
      #2

      Maybe use a double pole relay and use the second pole as the trigger to send a "success" message back? Or perhaps monitor the voltage difference between the contacts on a single pole relay, and send a "success" signal back when voltage goes to zero (indicating closure) or from zero to non-zero (indicating opening)? There may be better ways, and hopefully others will chime in with suggestions.

      I can see how that could be useful. e.g. If you sent a command to close an irrigation valve (or anything "mission critical"), you may want positive confirmation that the relay closed, not just confirmation that radio received a wireless command to close the relay.

      1 Reply Last reply
      0
      • TD22057T Offline
        TD22057T Offline
        TD22057
        Hardware Contributor
        wrote on last edited by
        #3

        Having an independent sensor on the thing being controlled is really useful if you can get it. That way the sensor gives you good information (is it on/off) as well as checking that the relay actually worked. FYI in the case of valves, I found some nice (but cost $30) actuated valves on aliexpress that have an independent sensor signal that tells you when the valve is open or closed which is really convenient (see this thread for info)

        1 Reply Last reply
        0
        • hekH Offline
          hekH Offline
          hek
          Admin
          wrote on last edited by
          #4

          @sharky0815 said:

          I am getting "ack"'s back on the sensor node for data I send from the node to the gateway but haven't figured out a way for the other direction.

          You can enable ack from controller side as well. Have a look at the serial protocol.

          No changes is needed in the sketch.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            sharky0815
            wrote on last edited by
            #5

            Ok, good ideas, as I am working on a ventilation project I thought I'd query the rpm of the fans as a hardware failsafe.

            Regarding the software ack @hek , I am not clear on this, is it up to me to react on not getting an ack or does requesting an ack automatically make sure the message is repeated until it gets trough?

            1 Reply Last reply
            0
            • hekH Offline
              hekH Offline
              hek
              Admin
              wrote on last edited by
              #6

              No, enabling ack does not repeat any transmissions. If you want this you have to code it in the controller.

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


              23

              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