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. SerialGateway is rebooting on relay.

SerialGateway is rebooting on relay.

Scheduled Pinned Locked Moved Troubleshooting
13 Posts 3 Posters 3.1k Views 2 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.
  • hekH hek

    Do you have any capacitor mounted on the gateway radio?

    The radio will send a burst of messages (when no ack is received) which could result in power drop (resetting the arduino) if the radio isn't decoupled correctly.

    delinendD Offline
    delinendD Offline
    delinend
    wrote on last edited by
    #4

    @hek
    Yes. 100uF and a 10nF (parallel) on all Radio's.
    I see no problem, when I send from Node(ID 6) to the SerialGateway.
    And I see no problem when I send from Node(ID 6) via the SerialGateway to Node(ID 7).

    The SerialGateway reboot's, if I turn OFF Node(ID 7) and the SerialGateway can't send to it.

    tekkaT 1 Reply Last reply
    0
    • delinendD delinend

      @hek
      Yes. 100uF and a 10nF (parallel) on all Radio's.
      I see no problem, when I send from Node(ID 6) to the SerialGateway.
      And I see no problem when I send from Node(ID 6) via the SerialGateway to Node(ID 7).

      The SerialGateway reboot's, if I turn OFF Node(ID 7) and the SerialGateway can't send to it.

      tekkaT Offline
      tekkaT Offline
      tekka
      Admin
      wrote on last edited by tekka
      #5

      @delinend Can you provide a full debug log of all involved nodes for both scenarios? This would help to investigate the issue further. Also, please indicate AVR board def version.

      delinendD 1 Reply Last reply
      0
      • tekkaT tekka

        @delinend Can you provide a full debug log of all involved nodes for both scenarios? This would help to investigate the issue further. Also, please indicate AVR board def version.

        delinendD Offline
        delinendD Offline
        delinend
        wrote on last edited by delinend
        #6

        @tekka
        Sure.. AVR Boards version 1.6.14

        Here the SerialGateway:

        0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.0.1-beta
        0;255;3;0;9;TSM:INIT
        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
        0;255;3;0;14;Gateway startup complete.
        0;255;0;0;18;2.0.1-beta
        0;255;3;0;9;MCO:REG:NOT NEEDED
        0;255;3;0;9;MCO:BGN:STP
        0;255;3;0;9;MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
        0;255;3;0;9;TSF:MSG:READ,6-6-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
        0;255;3;0;9;TSF:MSG:BC
        0;255;3;0;9;TSF:MSG:FPAR REQ,ID=6
        0;255;3;0;9;TSF:PNG:SEND,TO=0
        0;255;3;0;9;TSF:CKU:OK
        0;255;3;0;9;TSF:MSG:GWL OK
        0;255;3;0;9;TSF:MSG:SEND,0-0-6-6,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
        0;255;3;0;9;TSF:MSG:READ,6-6-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
        0;255;3;0;9;TSF:MSG:PINGED,ID=6,HP=1
        0;255;3;0;9;TSF:MSG:SEND,0-0-6-6,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
        0;255;3;0;9;TSF:MSG:READ,6-6-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
        0;255;3;0;9;TSF:MSG:SEND,0-0-6-6,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
        0;255;3;0;9;TSF:MSG:READ,6-6-0,s=255,c=0,t=17,pt=0,l=10,sg=0:2.0.1-beta
        6;255;0;0;17;2.0.1-beta
        0;255;3;0;9;TSF:MSG:READ,6-6-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
        6;255;3;0;6;0
        0;255;3;0;9;TSF:MSG:READ,6-6-0,s=255,c=3,t=11,pt=0,l=13,sg=0:Binary Sensor
        6;255;3;0;11;Binary Sensor
        0;255;3;0;9;TSF:MSG:READ,6-6-0,s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
        6;255;3;0;12;1.0
        0;255;3;0;9;TSF:MSG:READ,6-6-0,s=3,c=0,t=0,pt=0,l=0,sg=0:
        6;3;0;0;0;
        0;255;3;0;9;TSF:MSG:READ,6-6-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
        0;255;3;0;9;TSF:MSG:SEND,0-0-6-6,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
        0;255;3;0;9;TSF:MSG:READ,6-6-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
        6;3;1;0;16;1
        0;255;3;0;9;TSF:MSG:READ,6-6-7,s=3,c=1,t=16,pt=1,l=1,sg=0:1
        0;255;3;0;9;TSF:MSG:REL MSG
        0;255;3;0;9;!TSF:MSG:SEND,6-0-7-7,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=NACK:1
        0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.0.1-beta
        0;255;3;0;9;TSM:INIT
        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
        0;255;3;0;14;Gateway startup complete.
        0;255;0;0;18;2.0.1-beta
        0;255;3;0;9;MCO:REG:NOT NEEDED
        0;255;3;0;9;MCO:BGN:STP
        0;255;3;0;9;MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
        

        Here Node(ID 6) that sends data to the SerialGateway, and Node(ID 7). The Node(ID 7) is turned OFF.:

        0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.0.1-beta
        4 TSM:INIT
        10 TSM:INIT:TSP OK
        12 TSM:INIT:STATID=6
        14 TSF:SID:OK,ID=6
        16 TSM:FPAR
        53 TSF:MSG:SEND,6-6-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
        137 TSF:MSG:READ,0-0-6,s=255,c=3,t=8,pt=1,l=1,sg=0:0
        143 TSF:MSG:FPAR OK,ID=0,D=1
        2062 TSM:FPAR:OK
        2062 TSM:ID
        2064 TSM:ID:OK
        2066 TSM:UPL
        2070 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
        2088 TSF:MSG:READ,0-0-6,s=255,c=3,t=25,pt=1,l=1,sg=0:1
        2095 TSF:MSG:PONG RECV,HP=1
        2099 TSM:UPL:OK
        2101 TSM:READY
        2103 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
        2113 TSF:MSG:SEND,6-6-0-0,s=255,c=0,t=17,pt=0,l=10,sg=0,ft=0,st=OK:2.0.1-beta
        2123 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
        2131 TSF:MSG:READ,0-0-6,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
        4134 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=11,pt=0,l=13,sg=0,ft=0,st=OK:Binary Sensor
        4145 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.0
        4153 TSF:MSG:SEND,6-6-0-0,s=3,c=0,t=0,pt=0,l=0,sg=0,ft=0,st=OK:
        4161 MCO:REG:REQ
        4165 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
        4175 TSF:MSG:READ,0-0-6,s=255,c=3,t=27,pt=1,l=1,sg=0:1
        4182 MCO:PIM:NODE REG=1
        4184 MCO:BGN:STP
        4186 MCO:BGN:INIT OK,ID=6,PAR=0,DIS=1,REG=1
        4190 MCO:SLP:MS=5,SMS=0,I1=255,M1=255,I2=255,M2=255
        4196 MCO:SLP:TPD
        4198 MCO:SLP:WUP=-1
        4202 TSF:MSG:SEND,6-6-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:1
        4210 TSF:MSG:SEND,6-6-0-7,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:1
        4218 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
        4222 MCO:SLP:TPD
        

        Btw. I have tryed to set all radio's to MIN power. But same result. If I turn ON Node(ID 7), everything works fine.

        tekkaT 1 Reply Last reply
        0
        • delinendD delinend

          @tekka
          Sure.. AVR Boards version 1.6.14

          Here the SerialGateway:

          0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.0.1-beta
          0;255;3;0;9;TSM:INIT
          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
          0;255;3;0;14;Gateway startup complete.
          0;255;0;0;18;2.0.1-beta
          0;255;3;0;9;MCO:REG:NOT NEEDED
          0;255;3;0;9;MCO:BGN:STP
          0;255;3;0;9;MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
          0;255;3;0;9;TSF:MSG:READ,6-6-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
          0;255;3;0;9;TSF:MSG:BC
          0;255;3;0;9;TSF:MSG:FPAR REQ,ID=6
          0;255;3;0;9;TSF:PNG:SEND,TO=0
          0;255;3;0;9;TSF:CKU:OK
          0;255;3;0;9;TSF:MSG:GWL OK
          0;255;3;0;9;TSF:MSG:SEND,0-0-6-6,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
          0;255;3;0;9;TSF:MSG:READ,6-6-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
          0;255;3;0;9;TSF:MSG:PINGED,ID=6,HP=1
          0;255;3;0;9;TSF:MSG:SEND,0-0-6-6,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
          0;255;3;0;9;TSF:MSG:READ,6-6-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
          0;255;3;0;9;TSF:MSG:SEND,0-0-6-6,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
          0;255;3;0;9;TSF:MSG:READ,6-6-0,s=255,c=0,t=17,pt=0,l=10,sg=0:2.0.1-beta
          6;255;0;0;17;2.0.1-beta
          0;255;3;0;9;TSF:MSG:READ,6-6-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
          6;255;3;0;6;0
          0;255;3;0;9;TSF:MSG:READ,6-6-0,s=255,c=3,t=11,pt=0,l=13,sg=0:Binary Sensor
          6;255;3;0;11;Binary Sensor
          0;255;3;0;9;TSF:MSG:READ,6-6-0,s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
          6;255;3;0;12;1.0
          0;255;3;0;9;TSF:MSG:READ,6-6-0,s=3,c=0,t=0,pt=0,l=0,sg=0:
          6;3;0;0;0;
          0;255;3;0;9;TSF:MSG:READ,6-6-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
          0;255;3;0;9;TSF:MSG:SEND,0-0-6-6,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
          0;255;3;0;9;TSF:MSG:READ,6-6-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
          6;3;1;0;16;1
          0;255;3;0;9;TSF:MSG:READ,6-6-7,s=3,c=1,t=16,pt=1,l=1,sg=0:1
          0;255;3;0;9;TSF:MSG:REL MSG
          0;255;3;0;9;!TSF:MSG:SEND,6-0-7-7,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=NACK:1
          0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.0.1-beta
          0;255;3;0;9;TSM:INIT
          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
          0;255;3;0;14;Gateway startup complete.
          0;255;0;0;18;2.0.1-beta
          0;255;3;0;9;MCO:REG:NOT NEEDED
          0;255;3;0;9;MCO:BGN:STP
          0;255;3;0;9;MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
          

          Here Node(ID 6) that sends data to the SerialGateway, and Node(ID 7). The Node(ID 7) is turned OFF.:

          0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.0.1-beta
          4 TSM:INIT
          10 TSM:INIT:TSP OK
          12 TSM:INIT:STATID=6
          14 TSF:SID:OK,ID=6
          16 TSM:FPAR
          53 TSF:MSG:SEND,6-6-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          137 TSF:MSG:READ,0-0-6,s=255,c=3,t=8,pt=1,l=1,sg=0:0
          143 TSF:MSG:FPAR OK,ID=0,D=1
          2062 TSM:FPAR:OK
          2062 TSM:ID
          2064 TSM:ID:OK
          2066 TSM:UPL
          2070 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
          2088 TSF:MSG:READ,0-0-6,s=255,c=3,t=25,pt=1,l=1,sg=0:1
          2095 TSF:MSG:PONG RECV,HP=1
          2099 TSM:UPL:OK
          2101 TSM:READY
          2103 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
          2113 TSF:MSG:SEND,6-6-0-0,s=255,c=0,t=17,pt=0,l=10,sg=0,ft=0,st=OK:2.0.1-beta
          2123 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
          2131 TSF:MSG:READ,0-0-6,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
          4134 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=11,pt=0,l=13,sg=0,ft=0,st=OK:Binary Sensor
          4145 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.0
          4153 TSF:MSG:SEND,6-6-0-0,s=3,c=0,t=0,pt=0,l=0,sg=0,ft=0,st=OK:
          4161 MCO:REG:REQ
          4165 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
          4175 TSF:MSG:READ,0-0-6,s=255,c=3,t=27,pt=1,l=1,sg=0:1
          4182 MCO:PIM:NODE REG=1
          4184 MCO:BGN:STP
          4186 MCO:BGN:INIT OK,ID=6,PAR=0,DIS=1,REG=1
          4190 MCO:SLP:MS=5,SMS=0,I1=255,M1=255,I2=255,M2=255
          4196 MCO:SLP:TPD
          4198 MCO:SLP:WUP=-1
          4202 TSF:MSG:SEND,6-6-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:1
          4210 TSF:MSG:SEND,6-6-0-7,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:1
          4218 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
          4222 MCO:SLP:TPD
          

          Btw. I have tryed to set all radio's to MIN power. But same result. If I turn ON Node(ID 7), everything works fine.

          tekkaT Offline
          tekkaT Offline
          tekka
          Admin
          wrote on last edited by
          #7

          @delinend Ok, could you also enable MY_DEBUG_VERBOSE_RF24 in your GW, I need to see how far the message goes in the RF24 driver - I suspect a power issue.

          delinendD 1 Reply Last reply
          0
          • tekkaT tekka

            @delinend Ok, could you also enable MY_DEBUG_VERBOSE_RF24 in your GW, I need to see how far the message goes in the RF24 driver - I suspect a power issue.

            delinendD Offline
            delinendD Offline
            delinend
            wrote on last edited by
            #8

            @tekka
            Hmm.. That is ode..
            If I enable the MY_DEBUG_VERBOSE_RF24, the SerialGateway is NOT rebooting ?!?!

            Here a snip from the LOG:

            0;255;3;0;9;RF24:read register, reg=23, value=17
            0;255;3;0;9;RF24:read register, reg=23, value=17
            0;255;3;0;9;RF24:read register, reg=23, value=17
            0;255;3;0;9;RF24:read register, reg=23, value=17
            0;255;3;0;9;RF24:read register, reg=23, value=16
            0;255;3;0;9;RF24:read message, len=8
            0;255;3;0;9;RF24:write register, reg=7, value=64
            0;255;3;0;9;TSF:MSG:READ,6-6-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
            6;3;1;0;16;1
            0;255;3;0;9;RF24:read register, reg=23, value=16
            0;255;3;0;9;RF24:read message, len=8
            0;255;3;0;9;RF24:write register, reg=7, value=64
            0;255;3;0;9;TSF:MSG:READ,6-6-7,s=3,c=1,t=16,pt=1,l=1,sg=0:1
            0;255;3;0;9;TSF:MSG:REL MSG
            0;255;3;0;9;RF24:stop listening
            0;255;3;0;9;RF24:write register, reg=0, value=14
            0;255;3;0;9;RF24:open writing pipe, recipient=7
            0;255;3;0;9;RF24:write register, reg=10, value=7
            0;255;3;0;9;RF24:write register, reg=16, value=7
            0;255;3;0;9;RF24:send message to 7, len=8
            0;255;3;0;9;RF24:flushTX
            0;255;3;0;9;RF24:write register, reg=7, value=48
            0;255;3;0;9;RF24:MAX_RT
            0;255;3;0;9;RF24:flushTX
            0;255;3;0;9;RF24:start listening
            0;255;3;0;9;RF24:write register, reg=0, value=15
            0;255;3;0;9;RF24:write register, reg=10, value=0
            0;255;3;0;9;!TSF:MSG:SEND,6-0-7-7,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=NACK:1
            0;255;3;0;9;RF24:read register, reg=23, value=17
            0;255;3;0;9;RF24:read register, reg=23, value=17
            0;255;3;0;9;RF24:read register, reg=23, value=17
            0;255;3;0;9;RF24:read register, reg=23, value=17
            0;255;3;0;9;RF24:read register, reg=23, value=17```
            tekkaT 1 Reply Last reply
            0
            • delinendD delinend

              @tekka
              Hmm.. That is ode..
              If I enable the MY_DEBUG_VERBOSE_RF24, the SerialGateway is NOT rebooting ?!?!

              Here a snip from the LOG:

              0;255;3;0;9;RF24:read register, reg=23, value=17
              0;255;3;0;9;RF24:read register, reg=23, value=17
              0;255;3;0;9;RF24:read register, reg=23, value=17
              0;255;3;0;9;RF24:read register, reg=23, value=17
              0;255;3;0;9;RF24:read register, reg=23, value=16
              0;255;3;0;9;RF24:read message, len=8
              0;255;3;0;9;RF24:write register, reg=7, value=64
              0;255;3;0;9;TSF:MSG:READ,6-6-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
              6;3;1;0;16;1
              0;255;3;0;9;RF24:read register, reg=23, value=16
              0;255;3;0;9;RF24:read message, len=8
              0;255;3;0;9;RF24:write register, reg=7, value=64
              0;255;3;0;9;TSF:MSG:READ,6-6-7,s=3,c=1,t=16,pt=1,l=1,sg=0:1
              0;255;3;0;9;TSF:MSG:REL MSG
              0;255;3;0;9;RF24:stop listening
              0;255;3;0;9;RF24:write register, reg=0, value=14
              0;255;3;0;9;RF24:open writing pipe, recipient=7
              0;255;3;0;9;RF24:write register, reg=10, value=7
              0;255;3;0;9;RF24:write register, reg=16, value=7
              0;255;3;0;9;RF24:send message to 7, len=8
              0;255;3;0;9;RF24:flushTX
              0;255;3;0;9;RF24:write register, reg=7, value=48
              0;255;3;0;9;RF24:MAX_RT
              0;255;3;0;9;RF24:flushTX
              0;255;3;0;9;RF24:start listening
              0;255;3;0;9;RF24:write register, reg=0, value=15
              0;255;3;0;9;RF24:write register, reg=10, value=0
              0;255;3;0;9;!TSF:MSG:SEND,6-0-7-7,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=NACK:1
              0;255;3;0;9;RF24:read register, reg=23, value=17
              0;255;3;0;9;RF24:read register, reg=23, value=17
              0;255;3;0;9;RF24:read register, reg=23, value=17
              0;255;3;0;9;RF24:read register, reg=23, value=17
              0;255;3;0;9;RF24:read register, reg=23, value=17```
              tekkaT Offline
              tekkaT Offline
              tekka
              Admin
              wrote on last edited by
              #9

              @delinend weird indeed. If you disable all debugs, how does it behave then?

              delinendD 2 Replies Last reply
              0
              • tekkaT tekka

                @delinend weird indeed. If you disable all debugs, how does it behave then?

                delinendD Offline
                delinendD Offline
                delinend
                wrote on last edited by
                #10

                @tekka
                Her my codes...

                Node(ID 6):

                // Enable debug prints to serial monitor
                #define MY_DEBUG
                
                // Enable and select radio type attached
                #define MY_RADIO_NRF24
                
                #define MY_NODE_ID 6
                //#define MY_DEFAULT_ERR_LED_PIN 4
                #define MY_RF24_CHANNEL 101
                #define MY_RF24_DATARATE RF24_250KBPS
                #define MY_RF24_PA_LEVEL RF24_PA_MIN
                
                //#define MY_PARENT_NODE_ID 0
                //#define MY_TRANSPORT_DONT_CARE_MODE
                
                #include <MySensors.h>
                
                #define SKETCH_NAME "Binary Sensor"
                #define SKETCH_MAJOR_VER "1"
                #define SKETCH_MINOR_VER "0"
                
                #define PRIMARY_CHILD_ID 3
                
                
                #define PRIMARY_BUTTON_PIN 2   // Arduino Digital I/O pin for button/reed switch
                
                
                // Change to V_LIGHT if you use S_LIGHT in presentation below
                MyMessage msg(PRIMARY_CHILD_ID, V_TRIPPED);
                
                
                void setup()
                {
                  // Setup the buttons
                  pinMode(PRIMARY_BUTTON_PIN, INPUT);
                
                }
                
                void presentation() {
                  // Send the sketch version information to the gateway and Controller
                  sendSketchInfo(SKETCH_NAME, SKETCH_MAJOR_VER "." SKETCH_MINOR_VER);
                
                  // Register binary input sensor to sensor_node (they will be created as child devices)
                  // You can use S_DOOR, S_MOTION or S_LIGHT here depending on your usage.
                  // If S_LIGHT is used, remember to update variable type you send in. See "msg" above.
                  present(PRIMARY_CHILD_ID, S_DOOR);
                
                }
                
                // Loop will iterate on changes on the BUTTON_PINs
                void loop()
                {
                  uint8_t value;
                  static uint8_t sentValue=2;
                  //static uint8_t sentValue2=2;
                
                  // Short delay to allow buttons to properly settle
                  sleep(5);
                
                  value = digitalRead(PRIMARY_BUTTON_PIN);
                
                  if (value != sentValue) {
                     // Value has changed from last transmission, send the updated value
                     send(msg.setDestination(0).set(value==HIGH));
                     send(msg.setDestination(7).set(value==HIGH));
                     
                     sentValue = value;
                  }
                
                
                
                  // Sleep until something happens with the sensor
                  sleep(PRIMARY_BUTTON_PIN-2, CHANGE, 0);
                }
                

                Here the SerialGateway code:

                // Enable debug prints to serial monitor
                #define MY_DEBUG
                //#define MY_DEBUG_VERBOSE_RF24
                
                
                // Enable and select radio type attached
                #define MY_RADIO_NRF24
                
                #define MY_RF24_CHANNEL 101
                #define MY_RF24_DATARATE RF24_250KBPS
                #define MY_RF24_PA_LEVEL RF24_PA_MIN
                
                
                // Enable serial gateway
                #define MY_GATEWAY_SERIAL
                
                // Define a lower baud rate for Arduino's running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
                #if F_CPU == 8000000L
                //#define MY_BAUD_RATE 38400
                #endif
                
                // Enable inclusion mode
                #define MY_INCLUSION_MODE_FEATURE
                // Enable Inclusion mode button on gateway
                //#define MY_INCLUSION_BUTTON_FEATURE
                
                // Inverses behavior of inclusion button (if using external pullup)
                //#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
                
                // Set inclusion mode duration (in seconds)
                #define MY_INCLUSION_MODE_DURATION 60
                // Digital pin used for inclusion mode button
                //#define MY_INCLUSION_MODE_BUTTON_PIN  3
                
                // Set blinking period
                #define MY_DEFAULT_LED_BLINK_PERIOD 300
                
                // Inverses the behavior of leds
                //#define MY_WITH_LEDS_BLINKING_INVERSE
                
                // Flash leds on rx/tx/err
                // Uncomment to override default HW configurations
                //#define MY_DEFAULT_ERR_LED_PIN 4  // Error led pin
                //#define MY_DEFAULT_RX_LED_PIN  6  // Receive led pin
                //#define MY_DEFAULT_TX_LED_PIN  5  // the PCB, on board LED
                
                #include <MySensors.h>
                
                void setup() {
                  // Setup locally attached sensors
                }
                
                void presentation() {
                 // Present locally attached sensors
                 
                }
                
                void loop() {
                  delay(1);
                }
                
                void receive(const MyMessage &message) {
                }
                
                
                1 Reply Last reply
                0
                • tekkaT tekka

                  @delinend weird indeed. If you disable all debugs, how does it behave then?

                  delinendD Offline
                  delinendD Offline
                  delinend
                  wrote on last edited by
                  #11

                  @tekka
                  And yes... If I remove the MY_DEBUG, it do NOT reboot !?!

                  So the SerialGateway reboot only, when I use the #define MY_DEBUG

                  Strange :-(

                  tekkaT 1 Reply Last reply
                  0
                  • delinendD delinend

                    @tekka
                    And yes... If I remove the MY_DEBUG, it do NOT reboot !?!

                    So the SerialGateway reboot only, when I use the #define MY_DEBUG

                    Strange :-(

                    tekkaT Offline
                    tekkaT Offline
                    tekka
                    Admin
                    wrote on last edited by tekka
                    #12

                    @delinend Yeah, and I assume if you downgrade your AVR board defs to 1.6.11 or .12, everything is fine?

                    delinendD 1 Reply Last reply
                    1
                    • tekkaT tekka

                      @delinend Yeah, and I assume if you downgrade your AVR board defs to 1.6.11 or .12, everything is fine?

                      delinendD Offline
                      delinendD Offline
                      delinend
                      wrote on last edited by delinend
                      #13

                      @tekka
                      Hmmm Strange. It work fine with 1.6.11 ?!?

                      Why is there errors with 1.6.14 - 1.6.13 and 1.6.12 ?

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


                      11

                      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