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. Announcements
  3. 💬 Door, Window and Push-button Sensor

💬 Door, Window and Push-button Sensor

Scheduled Pinned Locked Moved Announcements
110 Posts 36 Posters 22.5k Views 32 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.
  • AteszA Offline
    AteszA Offline
    Atesz
    wrote on last edited by
    #23

    Hi Everyone
    Be carefull a newby here... :-)

    I have ordered all the parts for my sensor network. My plan is to have battery powered sensor sensing the following: Door/window status AND temp/humidity. Doing all this in a low power fashion.

    My question is: Would these code in the build section be easily combined (dooe switch and temp/hum) in a way that it measures the temp/hum regurarly (every 15-30 min) and if during the sleep a door event happens it sends the door event to the gateway (and probably since we are awake do a temp/hum measurement as well)?

    Every piece of direction, advice is appreciated.

    Atesz

    1 Reply Last reply
    0
    • AteszA Offline
      AteszA Offline
      Atesz
      wrote on last edited by
      #24

      Like I said..newby here. Hold back your horses for a moment, I did a deep search and found some interesting forum topics here :-)

      mfalkviddM 1 Reply Last reply
      0
      • AteszA Atesz

        Like I said..newby here. Hold back your horses for a moment, I did a deep search and found some interesting forum topics here :-)

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #25

        @Atesz very welcome to the MySensors community!
        "easily" is in the eye of the beholder, but I'd say yes. https://forum.mysensors.org/topic/2597/combining-mysensors-examples is a great starting poing for combining sketches.

        AteszA 1 Reply Last reply
        0
        • mfalkviddM mfalkvidd

          @Atesz very welcome to the MySensors community!
          "easily" is in the eye of the beholder, but I'd say yes. https://forum.mysensors.org/topic/2597/combining-mysensors-examples is a great starting poing for combining sketches.

          AteszA Offline
          AteszA Offline
          Atesz
          wrote on last edited by
          #26

          @mfalkvidd Thank you very much, it is almost what I've been looking for !

          1 Reply Last reply
          1
          • TON RIJNAARDT Offline
            TON RIJNAARDT Offline
            TON RIJNAARD
            wrote on last edited by
            #27

            Goodevening,
            I am new to mysensors (newby) i wil make 3 sensors on my mini pro can some one help me with the sketch.
            I am working a hole day but i can't get it writh help is very use vol.
            One switch (reed contact) is working.

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

              Hi Ton,

              You have to give us a little bit more information here (and please start a new thread for your project).

              Normally good to give information about:

              1. What are you trying to accomplish?
              2. What is working?
              3. What is not working?
              4. What did you try yourself before posting?
              5. What is the expected result?
              6. Logs from the sensor/gateway/controller.
              1 Reply Last reply
              0
              • Svante TegelandS Offline
                Svante TegelandS Offline
                Svante Tegeland
                wrote on last edited by
                #29

                I had big problems getting this one to work in Domoticz... But then I downgraded the Arduino IDE to IDE 1.6.7 (https://forum.mysensors.org/topic/5164/ethernet-gw-w5100-can-not-connect-to-domoticz/2) and then it worked!

                1 Reply Last reply
                0
                • TON RIJNAARDT Offline
                  TON RIJNAARDT Offline
                  TON RIJNAARD
                  wrote on last edited by
                  #30

                  @hek,

                  Thanks for the reply.

                  What are you trying to accomplish?
                  I want to try 3 reed/door contacts on one mini-pro on pin 3,4 and 5

                  What is working?
                  One reed/door contact is working

                  What is not working?
                  I don't no how i must make a second reed/door contact in the sketch (door/window push button)
                  I am new to programming arduino and don't undertsand how to do that, ik look for a hint how i can implement a second reed/door switch in the sketch

                  What did you try yourself before posting?
                  I look many sketches on internet and try to copy a copple of line in the working sketch but i don't get a second reed/switch in domoticz. I am trying this a hole day (i am with pension).

                  What is the expected result? a second, thirth reed/sensor in domoticz i see here only the first sensor.

                  Logs from the sensor/gateway/controller.
                  The log for the first reed/door switch i see and it is working in domoticz, that is not the problem.

                  Sorry for the bad English.

                  1 Reply Last reply
                  0
                  • TON RIJNAARDT Offline
                    TON RIJNAARDT Offline
                    TON RIJNAARD
                    wrote on last edited by
                    #31

                    @ Svante

                    Thanks for the reply but is is working well with one reed switch. So that is not the problem I want on the mini/pro a second and thirt switch.

                    1 Reply Last reply
                    0
                    • N Offline
                      N Offline
                      nickgosling
                      wrote on last edited by
                      #32

                      Hi, New here but stumbled across this.
                      I am planning on re-using an old wired alarm system that has door and window sensors all over my house terminating under my stairs. Can I combine one sketch into multiple door reed switches on one arduino. That seems to have been asked before but there doesn't seem to be an answer. It would be quite annoying to have 8 arduinos next to each other in order to do so.
                      Nick

                      sundberg84S 1 Reply Last reply
                      0
                      • N nickgosling

                        Hi, New here but stumbled across this.
                        I am planning on re-using an old wired alarm system that has door and window sensors all over my house terminating under my stairs. Can I combine one sketch into multiple door reed switches on one arduino. That seems to have been asked before but there doesn't seem to be an answer. It would be quite annoying to have 8 arduinos next to each other in order to do so.
                        Nick

                        sundberg84S Offline
                        sundberg84S Offline
                        sundberg84
                        Hardware Contributor
                        wrote on last edited by
                        #33

                        @nickgosling - no problem if you have 1 wire for each reedswitch you could just add it to different input/pins and have 1 arduno check which pins is high or low.

                        Controller: Proxmox VM - Home Assistant
                        MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                        MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                        RFLink GW - Arduino Mega + RFLink Shield, 433mhz

                        1 Reply Last reply
                        0
                        • N Offline
                          N Offline
                          nickgosling
                          wrote on last edited by
                          #34

                          Thanks for the response. OK I'm fine with assigning a pin as an input but how would I change the code to reflect this .thanks.

                          sundberg84S 1 Reply Last reply
                          0
                          • N nickgosling

                            Thanks for the response. OK I'm fine with assigning a pin as an input but how would I change the code to reflect this .thanks.

                            sundberg84S Offline
                            sundberg84S Offline
                            sundberg84
                            Hardware Contributor
                            wrote on last edited by
                            #35

                            @nickgosling - take the sketch and add one child for each sensor. Define one input for each sensor and in the loop check each pin for a statechange. With a if you can then send the status for each changed pin.

                            Controller: Proxmox VM - Home Assistant
                            MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                            MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                            RFLink GW - Arduino Mega + RFLink Shield, 433mhz

                            1 Reply Last reply
                            0
                            • N Offline
                              N Offline
                              nickgosling
                              wrote on last edited by
                              #36

                              Thank you I'll give that a go.

                              1 Reply Last reply
                              0
                              • J Offline
                                J Offline
                                Justas
                                wrote on last edited by
                                #37

                                Hi,
                                Maybe it is a little off-topic here, but maybe you could point me to the right direction: I want to build nice wall switch, and from technological point of view it is not that difficult using mysensors, this part is clear, including battery powering or making some kind of power conversion from AC to DC (in openhardware there are quite a few examples on that). What is bothering me is the switch "enclosure". I have one example from TKB Home:
                                http://www.ebay.de/itm/TKB-Home-Z-Wave-Plus-Dual-Paddle-Wall-Switch-TZ56D-ZW5-/122201876698?ssPageName=ADME:X:EAC:GB:1120
                                that I have bought to try with smarttnings controller (which is not intended to work with, now I know), but what it has - it is the enclosure: it is nice switch with 2 micro switches inside (4 in total, since it is dual wall switch), that are not locking in the pressed position - you press up and it clicks one button/switch and returns back to its initial "neutral" position, you press down - again, click and back to "neutral".
                                I think the similar are are in aliexpress, that are called like wall wireless remote switch Transmitter, but I'm not sure about that, since I didn't bought one to disassemble.
                                Maybe some one have met something similar for making some nice RF controlled wall switches?

                                Thanks in advance!
                                Regards

                                Nca78N 1 Reply Last reply
                                0
                                • J Justas

                                  Hi,
                                  Maybe it is a little off-topic here, but maybe you could point me to the right direction: I want to build nice wall switch, and from technological point of view it is not that difficult using mysensors, this part is clear, including battery powering or making some kind of power conversion from AC to DC (in openhardware there are quite a few examples on that). What is bothering me is the switch "enclosure". I have one example from TKB Home:
                                  http://www.ebay.de/itm/TKB-Home-Z-Wave-Plus-Dual-Paddle-Wall-Switch-TZ56D-ZW5-/122201876698?ssPageName=ADME:X:EAC:GB:1120
                                  that I have bought to try with smarttnings controller (which is not intended to work with, now I know), but what it has - it is the enclosure: it is nice switch with 2 micro switches inside (4 in total, since it is dual wall switch), that are not locking in the pressed position - you press up and it clicks one button/switch and returns back to its initial "neutral" position, you press down - again, click and back to "neutral".
                                  I think the similar are are in aliexpress, that are called like wall wireless remote switch Transmitter, but I'm not sure about that, since I didn't bought one to disassemble.
                                  Maybe some one have met something similar for making some nice RF controlled wall switches?

                                  Thanks in advance!
                                  Regards

                                  Nca78N Offline
                                  Nca78N Offline
                                  Nca78
                                  Hardware Contributor
                                  wrote on last edited by
                                  #38

                                  @Justas Hello, please check the dedicated category, if you don't find your hapiness please post there :)

                                  https://forum.mysensors.org/category/42/enclosures-3d-printing

                                  1 Reply Last reply
                                  0
                                  • skywatchS Offline
                                    skywatchS Offline
                                    skywatch
                                    wrote on last edited by
                                    #39

                                    I tried this today and it wouldn't find a parent.

                                    Adding #define MY_NODE_ID 1 seems to have solved the problem, so maybe this (and other) examples need to be updated with this info?

                                    Thanks for the work on this project though, I think it will be a lort of fun when I get it all working! :)

                                    mfalkviddM 1 Reply Last reply
                                    0
                                    • skywatchS skywatch

                                      I tried this today and it wouldn't find a parent.

                                      Adding #define MY_NODE_ID 1 seems to have solved the problem, so maybe this (and other) examples need to be updated with this info?

                                      Thanks for the work on this project though, I think it will be a lort of fun when I get it all working! :)

                                      mfalkviddM Offline
                                      mfalkviddM Offline
                                      mfalkvidd
                                      Mod
                                      wrote on last edited by
                                      #40

                                      @skywatch that shouldn't bee needed. Would it be possible for you to post the entire log from when the node was unable to find parent?

                                      1 Reply Last reply
                                      0
                                      • skywatchS Offline
                                        skywatchS Offline
                                        skywatch
                                        wrote on last edited by
                                        #41

                                        I'll see if I can replicate it ...been nusy trying to sork out a controller now Heheh.....Not fun!

                                        1 Reply Last reply
                                        0
                                        • skywatchS Offline
                                          skywatchS Offline
                                          skywatch
                                          wrote on last edited by
                                          #42

                                          I just uploaded the sketch again without the define and it is working - I didn't clear the eeprom before uploading so maybe that would have made a difference? Is there a list of what is held in eeprom anywhere?

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


                                          16

                                          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