Announcement

Collapse
No announcement yet.

Monitor a dry contact switch help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Monitor a dry contact switch help

    I'm trying to monitor whether a switch is opened or closed. I am using a mini D1 with pin D4 as an input. I've used a resistor between ground and pin D4 so I'm sure it's wired right but I'm absolutely certain I'm missing the required code. Running it without the code it will sense that the switch goes open but that's where it ends. In order to get the board to reconnect and reset I have to remove power from the board. I've looked in the forums and google for possible hints to no avail. I'm 72 years old and kind of new to the Arduino and would appreciate it someone can help an old man out.

    #2
    There is no need for any resistors on the switched input, just connect the pin to ground for closed and disconnect to show open in HS.

    Did you follow the manual for the board setup? Please answer the following to help find the problem.
    1. Are you using Arduino plugin V.166?
    2. Did you set up the board and then download the sketch from the plugin?
    3. Did you upload the sketch to the board?
    4. Is the board showing connected in HS?
    5. Did you set up pin D4 in HS as an input pin in the board setup page?

    If you can not get this to work then please enable debugging in the plugin settings page then try and connect the board, wait 5min then disable debug logging and download the debug file and send it to me.

    Greig.
    Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
    X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
    Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
    Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
    Scripts =
    Various

    Comment


      #3
      Yes using V.166
      Yes downloaded the sketch
      Yes sketch is uploaded to the board
      Yes shows connected in HS3
      Yes pin 4 set as input pin with debounce as 500

      So what you are saying the two leads to the dry contact switch go from 5V and pin 4? No need for a resistor to ground?

      This is my 13th board but the first that monitors whether a switch is open or closed.

      Have upgraded to HS4 and your plugin but want to get this working before I switch.

      Thanks

      Comment


        #4
        No, your input is between D4 and ground no 5v required.

        This is an Uno with pin2 as a switched input.

        Click image for larger version

Name:	Input.png
Views:	192
Size:	217.5 KB
ID:	1408841
        Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
        X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
        Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
        Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
        Scripts =
        Various

        Comment


          #5
          Well, I'll be darned. Been doing it all wrong as usual. Like I said I'm 72 and not the sharpest tack in the box....

          Comment


            #6
            Thank you so much for taking the time to help out a lost soul. That did the trick and everything is humming. I use this to monitor if a window is open/closed. If open and inside temperature is above 72, the window fan turns on. Amazing devices!

            Comment


              #7
              No problems. Have Fun!
              Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
              X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
              Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
              Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
              Scripts =
              Various

              Comment


                #8
                Originally posted by enigmatheatre View Post
                No, your input is between D4 and ground no 5v required.

                This is an Uno with pin2 as a switched input.

                Click image for larger version

Name:	Input.png
Views:	192
Size:	217.5 KB
ID:	1408841
                Hi guys

                If I plan to have 3 or 4 buttons attached to UNO, should I use some additional power source to run it, or a 9V/5Z adapter should cover it? (attaching also an ethernet board onto UNO, since I need it to communicate with HS)

                Comment


                  #9
                  If you just have an Uno with Ethernet and 3 inputs then a 9v psu will do fine. Just make sure the current is hi enough as the Ethernet shields can be funny if not.
                  Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
                  X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
                  Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
                  Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
                  Scripts =
                  Various

                  Comment


                    #10
                    Originally posted by enigmatheatre View Post
                    If you just have an Uno with Ethernet and 3 inputs then a 9v psu will do fine. Just make sure the current is hi enough as the Ethernet shields can be funny if not.
                    Oh my oh my... I wanted to write 9V/5A psu... that should be OK, I hope

                    Comment


                      #11
                      Originally posted by simon_bagola View Post

                      Oh my oh my... I wanted to write 9V/5A psu... that should be OK, I hope
                      Yep that will be more than fine.

                      Sent from my SM-G991B using Tapatalk

                      Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
                      X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
                      Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
                      Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
                      Scripts =
                      Various

                      Comment

                      Working...
                      X