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. Momentary button to control lights

Momentary button to control lights

Scheduled Pinned Locked Moved Troubleshooting
29 Posts 6 Posters 7.0k Views 7 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.
  • Boots33B Boots33

    @MasMat You could try increasing your delay time out to several seconds to see what happens (probably should use wait instead of delay as well) and maybe comment out the sleep line too. This may at least give you an idea of where to start.

    perhaps post some of the serial monitor output from the node.

    MasMatM Offline
    MasMatM Offline
    MasMat
    wrote on last edited by MasMat
    #21

    @Boots33 I increased it already but it didnt help. I can comment out the sleep but eventually I will need it because the sensor is obviously bat powered.
    I also tested putting delay before the read to let things stabilize. Tried 50 but same behavior.
    Im not really familiar with using the interrupts. Is my syntax correct in the sleep-line? I read somewhere that pin2 =interrupt0? Or use sleep (0, falling, 0)? Instead of "change"?

    Boots33B 1 Reply Last reply
    0
    • MasMatM MasMat

      @Boots33 I increased it already but it didnt help. I can comment out the sleep but eventually I will need it because the sensor is obviously bat powered.
      I also tested putting delay before the read to let things stabilize. Tried 50 but same behavior.
      Im not really familiar with using the interrupts. Is my syntax correct in the sleep-line? I read somewhere that pin2 =interrupt0? Or use sleep (0, falling, 0)? Instead of "change"?

      Boots33B Offline
      Boots33B Offline
      Boots33
      Hero Member
      wrote on last edited by
      #22

      @MasMat said in Momentary button to control lights:

      @Boots33 I increased it already but it didnt help. I can comment out the sleep but eventually I will need it because the sensor is obviously bat powered.

      You still need to find the cause of the multiple sends so comment out sleep and see if that is the cause. It is an easy thing to try.

      I also tested putting delay before the read to let things stabilize. Tried 50 but same behavior.
      Im not really familiar with using the interrupts. Is my syntax correct in the sleep-line? I read somewhere that pin2 =interrupt0? Or use sleep (0, falling, 0)? Instead of "change"?

      I have no battery powered nodes so probably not the best person to ask on the use of sleep. I would definitely try

      sleep(0, FALLING, 0);
      

      and see what that brings.
      If you comment out sleep and the node works as expected then it may be worth starting a new thread focusing on the sleep problem, at least that may bring the problem to the attention of others who have used sleep before.

      Again serial output may shed further light on what is going wrong.

      1 Reply Last reply
      0
      • MasMatM Offline
        MasMatM Offline
        MasMat
        wrote on last edited by
        #23

        Fighting with this after a while.
        I got the serial output from the sending node, but it appears to send the message only once.
        However when I checked the gateway it seems to receive and forward the message three times. Then it reboots. Power issue? I have a NRF24-LA on the gateway so could that be pulling too much juice?

        Could there be a signalling bounce?

        Serial output from when I clicked the button on the remote:

        0;255;3;0;9;TSF:MSG:READ,7-7-3,s=3,c=1,t=2,pt=0,l=1,sg=0:1
        0;255;3;0;9;TSF:MSG:REL MSG
        0;255;3;0;9;TSF:MSG:SEND,7-0-9-3,s=3,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:1
        0;255;3;0;9;TSF:MSG:READ,7-7-3,s=3,c=1,t=2,pt=0,l=1,sg=0:1
        0;255;3;0;9;TSF:MSG:REL MSG
        0;255;3;0;9;TSF:MSG:SEND,7-0-9-3,s=3,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:1
        0;255;3;0;9;TSF:MSG:READ,7-7-3,s=3,c=1,t=2,pt=0,l=1,sg=0:1
        0;255;3;0;9;TSF:MSG:REL MSG
        0;255;3;0;9;!TSF:MSG:SEND,7-0-9-3,s=3,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=NACK:1
        0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1
        0;255;3;0;9;TSM:INIT
        0;255;3;0;9;TSF:WUR:MS=0
        0;255;3;0;9;TSM:INIT:TSP OK
        0;255;3;0;9;TSM:INIT:GW MODE
        0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
        0;255;3;0;9;MCO:REG:NOT NEEDED
        0;255;3;0;9;TSF:MSG:READ,3-9-0,s=3,c=1,t=2,pt=1,l=1,sg=0:0
        IP: 192.168.0.201
        0;255;3;0;9;MCO:BGN:STP
        0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
        IP: 192.168.0.201
        0;255;3;0;9;Attempting MQTT connection...
        0;255;3;0;9;MQTT connected```
        1 Reply Last reply
        0
        • gohanG Offline
          gohanG Offline
          gohan
          Mod
          wrote on last edited by
          #24

          you could try to update mysensors to 2.2 from development branch

          MasMatM 1 Reply Last reply
          0
          • gohanG gohan

            you could try to update mysensors to 2.2 from development branch

            MasMatM Offline
            MasMatM Offline
            MasMat
            wrote on last edited by
            #25

            @gohan I'm just gonna let my n00b flag fly here....
            How do I do that? Arduino IDE library?

            To combat the reboots, I'm rebuilding the GW with adequate power and capacitors.
            Hopefully that will solve some problems.

            1 Reply Last reply
            0
            • gohanG Offline
              gohanG Offline
              gohan
              Mod
              wrote on last edited by
              #26

              Just download the library from github and replace the mysensors folder in the library folder on your pc

              MasMatM 1 Reply Last reply
              0
              • gohanG gohan

                Just download the library from github and replace the mysensors folder in the library folder on your pc

                MasMatM Offline
                MasMatM Offline
                MasMat
                wrote on last edited by
                #27

                @gohan OK. Doesn't sound too hard. Does that mean I also have to update the GW? All my other nodes as well? Or are they backwards compatible?

                1 Reply Last reply
                0
                • gohanG Offline
                  gohanG Offline
                  gohan
                  Mod
                  wrote on last edited by
                  #28

                  Start from gw and see if you are getting any changes. Later you may update the nodes if you want.

                  1 Reply Last reply
                  0
                  • dbemowskD Offline
                    dbemowskD Offline
                    dbemowsk
                    wrote on last edited by
                    #29

                    My gateway is a serial gateway built with an easy newbie PCB and a pro mini.
                    What I did when I upgraded my 1.4 setup to 2.0, I pulled my pro mini that I had flashed with the 1.4 setup and put a new pro mini in that had 2.0. That way if there were any problems, I could easily swap the 1.4 pro mini back in to easily be back where I started.

                    Likewise when replacing your library, pull the MySensors folder out of your arduino libraries folder to keep as a backup until you know things will work. That way if you have to revert back, you can easily swap back the old MySensors folder. You have to completely remove it from the libraries folder though, you can't just rename it to something else.

                    Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                    Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                    1 Reply Last reply
                    2
                    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