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. [solved] RPI Gateway with RFM95 does not receive any nodes

[solved] RPI Gateway with RFM95 does not receive any nodes

Scheduled Pinned Locked Moved Troubleshooting
27 Posts 2 Posters 5.7k 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.
  • mfalkviddM Offline
    mfalkviddM Offline
    mfalkvidd
    Mod
    wrote on last edited by mfalkvidd
    #4

    I now have the gateway up and running, at least it seems so:

    pi@raspi1:~/MySensors $ sudo ./bin/mysgw -d
    mysgw: Config file /etc/mysensors.dat does not exist, creating new config file.
    mysgw: Starting gateway...
    mysgw: Protocol version - 2.2.0-beta
    mysgw: MCO:BGN:INIT GW,CP=RLNG----,VER=2.2.0-beta
    mysgw: TSF:LRT:OK
    mysgw: TSM:INIT
    mysgw: TSF:WUR:MS=0
    mysgw: TSM:INIT:TSP OK
    mysgw: TSM:INIT:GW MODE
    mysgw: TSM:READY:ID=0,PAR=0,DIS=0
    mysgw: MCO:REG:NOT NEEDED
    mysgw: Listening for connections on 0.0.0.0:5003
    mysgw: MCO:BGN:STP
    mysgw: MCO:BGN:INIT OK,TSP=1
    

    Parsed log

    Next step is to build a rfm95 node.

    EDIT: My configure command:

    ./configure --my-transport=rfm95
    
    1 Reply Last reply
    0
    • mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #5

      My test node (a binary switch that toggles state every 2 seconds) is able to communicate with the gateway.

      Gateway log:

      mysgw: Config file /etc/mysensors.dat does not exist, creating new config file.
      mysgw: Starting gateway...
      mysgw: Protocol version - 2.2.0-beta
      mysgw: MCO:BGN:INIT GW,CP=RLNG----,VER=2.2.0-beta
      mysgw: TSF:LRT:OK
      mysgw: TSM:INIT
      mysgw: TSF:WUR:MS=0
      mysgw: TSM:INIT:TSP OK
      mysgw: TSM:INIT:GW MODE
      mysgw: TSM:READY:ID=0,PAR=0,DIS=0
      mysgw: MCO:REG:NOT NEEDED
      mysgw: Listening for connections on 0.0.0.0:5003
      mysgw: MCO:BGN:STP
      mysgw: MCO:BGN:INIT OK,TSP=1
      mysgw: TSF:SAN:OK
      mysgw: TSM:READY:NWD REQ
      mysgw: TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
      mysgw: TSF:SRT:OK
      mysgw: TSF:SAN:OK
      mysgw: TSF:MSG:READ,102-102-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      mysgw: TSF:MSG:BC
      mysgw: TSF:MSG:FPAR REQ,ID=102
      mysgw: TSF:PNG:SEND,TO=0
      mysgw: TSF:CKU:OK
      mysgw: TSF:MSG:GWL OK
      mysgw: TSF:MSG:SEND,0-0-102-102,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
      mysgw: TSF:MSG:READ,102-102-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
      mysgw: TSF:MSG:PINGED,ID=102,HP=1
      mysgw: TSF:MSG:SEND,0-0-102-102,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
      mysgw: TSF:MSG:READ,102-102-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      mysgw: TSF:MSG:SEND,0-0-102-102,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
      mysgw: TSF:MSG:READ,102-102-0,s=255,c=0,t=17,pt=0,l=10,sg=0:2.2.0-beta
      mysgw: TSF:MSG:READ,102-102-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
      mysgw: TSF:MSG:READ,102-102-0,s=255,c=3,t=11,pt=0,l=13,sg=0:Binary Sensor
      mysgw: TSF:MSG:READ,102-102-0,s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
      mysgw: TSF:MSG:READ,102-102-0,s=3,c=0,t=0,pt=0,l=0,sg=0:
      mysgw: TSF:MSG:READ,102-102-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
      mysgw: TSF:MSG:SEND,0-0-102-102,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
      mysgw: TSF:MSG:READ,102-102-0,s=3,c=1,t=16,pt=1,l=1,sg=0:0
      mysgw: TSF:MSG:READ,102-102-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
      mysgw: TSF:MSG:READ,102-102-0,s=3,c=1,t=16,pt=1,l=1,sg=0:0
      mysgw: TSF:MSG:READ,102-102-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
      mysgw: TSF:MSG:READ,102-102-0,s=3,c=1,t=16,pt=1,l=1,sg=0:0
      mysgw: TSF:MSG:READ,102-102-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
      mysgw: TSF:MSG:READ,102-102-0,s=3,c=1,t=16,pt=1,l=1,sg=0:0
      mysgw: TSF:MSG:READ,102-102-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
      

      Node log:

      5134 MCO:BGN:INIT NODE,CP=RLNNE---,VER=2.2.0-beta
      5176 TSM:INIT
      5177 TSF:WUR:MS=0
      5194 TSM:INIT:TSP OK
      5196 TSF:SID:OK,ID=102
      5198 TSM:FPAR
      5248 TSF:MSG:SEND,102-102-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      5881 TSF:MSG:READ,0-0-102,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      5886 TSF:MSG:FPAR OK,ID=0,D=1
      7255 TSM:FPAR:OK
      7256 TSM:ID
      7257 TSM:ID:OK
      7258 TSM:UPL
      7363 TSF:MSG:SEND,102-102-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
      7414 TSF:MSG:READ,0-0-102,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      7419 TSF:MSG:PONG RECV,HP=1
      7422 TSM:UPL:OK
      7423 TSM:READY:ID=102,PAR=0,DIS=1
      7558 TSF:MSG:SEND,102-102-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
      7609 TSF:MSG:READ,0-0-102,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      7764 TSF:MSG:SEND,102-102-0-0,s=255,c=0,t=17,pt=0,l=10,sg=0,ft=0,st=OK:2.2.0-beta
      7865 TSF:MSG:SEND,102-102-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
      9990 TSF:MSG:SEND,102-102-0-0,s=255,c=3,t=11,pt=0,l=13,sg=0,ft=0,st=OK:Binary Sensor
      10102 TSF:MSG:SEND,102-102-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.0
      10203 TSF:MSG:SEND,102-102-0-0,s=3,c=0,t=0,pt=0,l=0,sg=0,ft=0,st=OK:
      10209 MCO:REG:REQ
      10305 TSF:MSG:SEND,102-102-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
      10356 TSF:MSG:READ,0-0-102,s=255,c=3,t=27,pt=1,l=1,sg=0:1
      10361 MCO:PIM:NODE REG=1
      10363 MCO:BGN:STP
      10365 MCO:BGN:INIT OK,TSP=1
      10501 TSF:MSG:SEND,102-102-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:0
      12614 TSF:MSG:SEND,102-102-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:1
      14728 TSF:MSG:SEND,102-102-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:0
      16833 TSF:MSG:SEND,102-102-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:1
      18938 TSF:MSG:SEND,102-102-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:0
      21052 TSF:MSG:SEND,102-102-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:1
      23158 TSF:MSG:SEND,102-102-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:0
      25272 TSF:MSG:SEND,102-102-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:1
      
      1 Reply Last reply
      0
      • M Offline
        M Offline
        micropet
        wrote on last edited by
        #6

        Thanks for testing.

        Transport word in it. The line was something mixed up here in the forum. :)

        ./configure --my-gateway=mqtt --my-controller-ip-address=192.168.0.23 --my-mqtt-publish-topic-prefix=mysensors2-out --my-mqtt-subscribe-topic-prefix=mysensors2-in --my-mqtt-client-id=mygateway5 --my-transport=rfm95 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18

        The Gateway shows:

        ./bin/mysgw -d
        mysgw: Starting gateway...
        mysgw: Protocol version - 2.2.0-beta
        mysgw: MCO:BGN:INIT GW,CP=RLNG----,VER=2.2.0-beta
        mysgw: TSF:LRT:OK
        mysgw: TSM:INIT
        mysgw: TSF:WUR:MS=0
        mysgw: TSM:INIT:TSP OK
        mysgw: TSM:INIT:GW MODE
        mysgw: TSM:READY:ID=0,PAR=0,DIS=0
        mysgw: MCO:REG:NOT NEEDED
        mysgw: MCO:BGN:STP
        mysgw: MCO:BGN:INIT OK,TSP=1
        mysgw: Attempting MQTT connection...
        mysgw: connected to 192.168.0.23
        mysgw: MQTT connected
        mysgw: Sending message on topic: mysensors2-out/0/255/0/0/18

        I have to look for a MySensor Node.
        I had changed everything to the TTN network.

        I'll get back to you.

        Greetings Peter

        mfalkviddM 1 Reply Last reply
        0
        • M micropet

          Thanks for testing.

          Transport word in it. The line was something mixed up here in the forum. :)

          ./configure --my-gateway=mqtt --my-controller-ip-address=192.168.0.23 --my-mqtt-publish-topic-prefix=mysensors2-out --my-mqtt-subscribe-topic-prefix=mysensors2-in --my-mqtt-client-id=mygateway5 --my-transport=rfm95 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18

          The Gateway shows:

          ./bin/mysgw -d
          mysgw: Starting gateway...
          mysgw: Protocol version - 2.2.0-beta
          mysgw: MCO:BGN:INIT GW,CP=RLNG----,VER=2.2.0-beta
          mysgw: TSF:LRT:OK
          mysgw: TSM:INIT
          mysgw: TSF:WUR:MS=0
          mysgw: TSM:INIT:TSP OK
          mysgw: TSM:INIT:GW MODE
          mysgw: TSM:READY:ID=0,PAR=0,DIS=0
          mysgw: MCO:REG:NOT NEEDED
          mysgw: MCO:BGN:STP
          mysgw: MCO:BGN:INIT OK,TSP=1
          mysgw: Attempting MQTT connection...
          mysgw: connected to 192.168.0.23
          mysgw: MQTT connected
          mysgw: Sending message on topic: mysensors2-out/0/255/0/0/18

          I have to look for a MySensor Node.
          I had changed everything to the TTN network.

          I'll get back to you.

          Greetings Peter

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

          @micropet great. The problem might be mqtt related. I am not sure if I have a mqtt broker to connect to so I just tried the ethernet variant. Could you see if switching to ethernet helps? That would narrow down the scope.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            micropet
            wrote on last edited by
            #8

            Thus, the node is in operation. The gateway does not show anything new.

            I need mqtt. My RFM69 Nodes (433 MHz and 868 MHz) also run with mqtt.

            The Node output is:

            0 MCO:BGN:INIT NODE,CP=RLNNA---,VER=2.2.0-beta
            4 TSM:INIT
            4 TSF:WUR:MS=0
            6 RFM95:INIT
            8 RFM95:INIT:PIN,CS=10,IQP=4,IQN=0
            22 RFM95:PTX:LEVEL=5
            24 TSM:INIT:TSP OK
            26 TSM:INIT:STATID=150
            28 TSF:SID:OK,ID=150
            30 TSM:FPAR
            32 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
            2037 TSF:MSG:SEND,150-150-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            4046 !TSM:FPAR:NO REPLY
            4048 TSM:FPAR
            4050 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
            6057 TSF:MSG:SEND,150-150-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            8067 !TSM:FPAR:NO REPLY
            8069 TSM:FPAR
            8071 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
            10076 TSF:MSG:SEND,150-150-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            12085 !TSM:FPAR:NO REPLY
            12087 TSM:FPAR
            12089 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
            14094 TSF:MSG:SEND,150-150-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            16103 !TSM:FPAR:FAIL
            16105 TSM:FAIL:CNT=1
            16107 TSM:FAIL:DIS
            16109 TSF:TDI:TSL
            16111 RFM95:RSL
            26114 TSM:FAIL:RE-INIT
            26116 TSM:INIT
            26118 RFM95:INIT
            26120 RFM95:INIT:PIN,CS=10,IQP=4,IQN=0
            26134 RFM95:PTX:LEVEL=5
            26136 TSM:INIT:TSP OK
            26138 TSM:INIT:STATID=150
            26140 TSF:SID:OK,ID=150
            26144 TSM:FPAR
            26146 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
            28151 TSF:MSG:SEND,150-150-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            30162 !TSM:FPAR:NO REPLY
            30164 TSM:FPAR
            30167 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
            32172 TSF:MSG:SEND,150-150-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:

            mfalkviddM 1 Reply Last reply
            0
            • M micropet

              Thus, the node is in operation. The gateway does not show anything new.

              I need mqtt. My RFM69 Nodes (433 MHz and 868 MHz) also run with mqtt.

              The Node output is:

              0 MCO:BGN:INIT NODE,CP=RLNNA---,VER=2.2.0-beta
              4 TSM:INIT
              4 TSF:WUR:MS=0
              6 RFM95:INIT
              8 RFM95:INIT:PIN,CS=10,IQP=4,IQN=0
              22 RFM95:PTX:LEVEL=5
              24 TSM:INIT:TSP OK
              26 TSM:INIT:STATID=150
              28 TSF:SID:OK,ID=150
              30 TSM:FPAR
              32 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
              2037 TSF:MSG:SEND,150-150-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
              4046 !TSM:FPAR:NO REPLY
              4048 TSM:FPAR
              4050 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
              6057 TSF:MSG:SEND,150-150-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
              8067 !TSM:FPAR:NO REPLY
              8069 TSM:FPAR
              8071 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
              10076 TSF:MSG:SEND,150-150-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
              12085 !TSM:FPAR:NO REPLY
              12087 TSM:FPAR
              12089 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
              14094 TSF:MSG:SEND,150-150-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
              16103 !TSM:FPAR:FAIL
              16105 TSM:FAIL:CNT=1
              16107 TSM:FAIL:DIS
              16109 TSF:TDI:TSL
              16111 RFM95:RSL
              26114 TSM:FAIL:RE-INIT
              26116 TSM:INIT
              26118 RFM95:INIT
              26120 RFM95:INIT:PIN,CS=10,IQP=4,IQN=0
              26134 RFM95:PTX:LEVEL=5
              26136 TSM:INIT:TSP OK
              26138 TSM:INIT:STATID=150
              26140 TSF:SID:OK,ID=150
              26144 TSM:FPAR
              26146 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
              28151 TSF:MSG:SEND,150-150-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
              30162 !TSM:FPAR:NO REPLY
              30164 TSM:FPAR
              30167 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
              32172 TSF:MSG:SEND,150-150-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:

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

              @micropet I understand you prefer mqtt. But if you are able to verify that the gateway works with ethernet, we would know that the problem is mqtt related. Now the problem might be related to anything.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                micropet
                wrote on last edited by
                #10

                Yes I understand.
                I'm just checking the pin assignment of the node.
                How did you connect the Node to the RFM95?

                mfalkviddM 1 Reply Last reply
                0
                • M Offline
                  M Offline
                  micropet
                  wrote on last edited by
                  #11

                  I use the same connections as for a TTN node.

                  Board is Arduino Pro mini.

                  10 NSS CS
                  13 SCK
                  11 MOSI
                  12 MISO

                  4 DI00
                  5 DIO1

                  And have in the sketch:

                  #define MY_RFM95_CS_PIN 10 // NSS
                  #define MY_RFM95_IRQ_PIN 4 // IRQ D100

                  1 Reply Last reply
                  0
                  • M micropet

                    Yes I understand.
                    I'm just checking the pin assignment of the node.
                    How did you connect the Node to the RFM95?

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

                    @micropet mqtt works:

                    pi@raspi1:~/MySensors $ sudo ./bin/mysgw -d
                    mysgw: Starting gateway...
                    mysgw: Protocol version - 2.2.0-beta
                    mysgw: MCO:BGN:INIT GW,CP=RLNG----,VER=2.2.0-beta
                    mysgw: TSF:LRT:OK
                    mysgw: TSM:INIT
                    mysgw: TSF:WUR:MS=0
                    mysgw: TSM:INIT:TSP OK
                    mysgw: TSM:INIT:GW MODE
                    mysgw: TSM:READY:ID=0,PAR=0,DIS=0
                    mysgw: MCO:REG:NOT NEEDED
                    mysgw: MCO:BGN:STP
                    mysgw: MCO:BGN:INIT OK,TSP=1
                    mysgw: Attempting MQTT connection...
                    mysgw: connected to 192.168.1.101
                    mysgw: MQTT connected
                    mysgw: Sending message on topic: mysensors-rfm95-out/0/255/0/0/18
                    mysgw: TSF:MSG:READ,102-102-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
                    mysgw: TSF:MSG:BC
                    mysgw: TSF:MSG:FPAR REQ,ID=102
                    mysgw: TSF:PNG:SEND,TO=0
                    mysgw: TSF:CKU:OK
                    mysgw: TSF:MSG:GWL OK
                    mysgw: TSF:MSG:SEND,0-0-102-102,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
                    mysgw: TSF:MSG:READ,102-102-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
                    mysgw: TSF:MSG:PINGED,ID=102,HP=1
                    mysgw: TSF:MSG:SEND,0-0-102-102,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
                    mysgw: TSF:MSG:READ,102-102-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
                    mysgw: TSF:MSG:SEND,0-0-102-102,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
                    mysgw: TSF:MSG:READ,102-102-0,s=255,c=0,t=17,pt=0,l=10,sg=0:2.2.0-beta
                    mysgw: Sending message on topic: mysensors-rfm95-out/102/255/0/0/17
                    mysgw: TSF:MSG:READ,102-102-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
                    mysgw: Sending message on topic: mysensors-rfm95-out/102/255/3/0/6
                    mysgw: TSF:MSG:READ,102-102-0,s=255,c=3,t=11,pt=0,l=13,sg=0:Binary Sensor
                    mysgw: Sending message on topic: mysensors-rfm95-out/102/255/3/0/11
                    mysgw: TSF:MSG:READ,102-102-0,s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
                    mysgw: Sending message on topic: mysensors-rfm95-out/102/255/3/0/12
                    mysgw: TSF:MSG:READ,102-102-0,s=3,c=0,t=0,pt=0,l=0,sg=0:
                    mysgw: Sending message on topic: mysensors-rfm95-out/102/3/0/0/0
                    mysgw: TSF:MSG:READ,102-102-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
                    mysgw: TSF:MSG:SEND,0-0-102-102,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
                    mysgw: TSF:MSG:READ,102-102-0,s=3,c=1,t=16,pt=1,l=1,sg=0:0
                    mysgw: Sending message on topic: mysensors-rfm95-out/102/3/1/0/16
                    mysgw: TSF:MSG:READ,102-102-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
                    mysgw: Sending message on topic: mysensors-rfm95-out/102/3/1/0/16
                    mysgw: TSF:MSG:READ,102-102-0,s=3,c=1,t=16,pt=1,l=1,sg=0:0
                    mysgw: Sending message on topic: mysensors-rfm95-out/102/3/1/0/16
                    mysgw: TSF:MSG:READ,102-102-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
                    mysgw: Sending message on topic: mysensors-rfm95-out/102/3/1/0/16
                    mysgw: TSF:MSG:READ,102-102-0,s=3,c=1,t=16,pt=1,l=1,sg=0:0
                    mysgw: Sending message on topic: mysensors-rfm95-out/102/3/1/0/16
                    mysgw: TSF:MSG:READ,102-102-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
                    mysgw: Sending message on topic: mysensors-rfm95-out/102/3/1/0/16
                    

                    I used this configure command:

                    ./configure --my-gateway=mqtt --my-controller-ip-address=192.168.1.101 --my-mqtt-publish-topic-prefix=mysensors-rfm95-out --my-mqtt-subscribe-topic-prefix=mysensors-rfm95-in --my-mqtt-client-id=mygateway-rfm95 --my-transport=rfm95 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18
                    

                    For the wiring, I used the instructions for rfm69 on the raspberry pi gateway page.

                    1 Reply Last reply
                    0
                    • mfalkviddM Offline
                      mfalkviddM Offline
                      mfalkvidd
                      Mod
                      wrote on last edited by
                      #13

                      For the node, I used this sketch (esp8266 nodemcu):

                      // Enable debug prints to serial monitor
                      #define MY_DEBUG
                      
                      // Enable and select radio type attached
                      //#define MY_RADIO_NRF24
                      #define MY_RADIO_RFM95
                      
                      #define MY_RFM95_CS_PIN D8 // NSS
                      #define MY_RFM95_IRQ_PIN D1 // IRQ DIO0
                      #define MY_RFM95_RST_PIN D3 // Reset, not connected
                      
                      
                      #include <MySensors.h>
                      
                      #define SKETCH_NAME "Binary Sensor"
                      #define SKETCH_MAJOR_VER "1"
                      #define SKETCH_MINOR_VER "0"
                      
                      #define PRIMARY_CHILD_ID 3
                      #define SECONDARY_CHILD_ID 4
                      
                      #define PRIMARY_BUTTON_PIN 2   // Arduino Digital I/O pin for button/reed switch
                      #define SECONDARY_BUTTON_PIN 3 // Arduino Digital I/O pin for button/reed switch
                      
                      #if (PRIMARY_BUTTON_PIN < 2 || PRIMARY_BUTTON_PIN > 3)
                      #error PRIMARY_BUTTON_PIN must be either 2 or 3 for interrupts to work
                      #endif
                      #if (SECONDARY_BUTTON_PIN < 2 || SECONDARY_BUTTON_PIN > 3)
                      #error SECONDARY_BUTTON_PIN must be either 2 or 3 for interrupts to work
                      #endif
                      #if (PRIMARY_BUTTON_PIN == SECONDARY_BUTTON_PIN)
                      #error PRIMARY_BUTTON_PIN and BUTTON_PIN2 cannot be the same
                      #endif
                      #if (PRIMARY_CHILD_ID == SECONDARY_CHILD_ID)
                      #error PRIMARY_CHILD_ID and SECONDARY_CHILD_ID cannot be the same
                      #endif
                      
                      
                      // Change to V_LIGHT if you use S_LIGHT in presentation below
                      MyMessage msg(PRIMARY_CHILD_ID, V_TRIPPED);
                      
                      void setup()
                      {
                      
                      }
                      
                      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()
                      {
                        static uint8_t sentValue = 2;
                      
                        // Short delay to allow buttons to properly settle
                        wait(5);
                      
                        uint8_t  value = !sentValue;
                      
                        if (value != sentValue) {
                          // Value has changed from last transmission, send the updated value
                          send(msg.set(value == HIGH));
                          sentValue = value;
                        }
                      
                        wait(2000);
                      }
                      
                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        micropet
                        wrote on last edited by
                        #14

                        My gateway will work, I think.

                        Pity,

                        I am using an Arduino Pro mini.
                        I can make a node with esp8266.
                        But I can not do that today, I think I have time for it tomorrow.

                        mfalkviddM 1 Reply Last reply
                        0
                        • M micropet

                          My gateway will work, I think.

                          Pity,

                          I am using an Arduino Pro mini.
                          I can make a node with esp8266.
                          But I can not do that today, I think I have time for it tomorrow.

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

                          @micropet no rush, you've had to wait a long time to get any help :wink:
                          Just post here when/if you have some news. If you are unable to find an esp I can probably find a Pro Mini and build a node.

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            micropet
                            wrote on last edited by
                            #16

                            Have a node with a NodeMCU built.
                            Does not work either.
                            At the gateway comes nothing.
                            Since I must look further.

                            22820 !TSM:FPAR:NO REPLY
                            22822 TSM:FPAR
                            24824 TSF:MSG:SEND,33-33-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                            26831 !TSM:FPAR:NO REPLY
                            26833 TSM:FPAR
                            28835 TSF:MSG:SEND,33-33-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                            30842 !TSM:FPAR:NO REPLY
                            30844 TSM:FPAR
                            32846 TSF:MSG:SEND,33-33-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                            34853 !TSM:FPAR:FAIL
                            34854 TSM:FAIL:CNT=1
                            34856 TSM:FAIL:DIS
                            34858 TSF:TDI:TSL
                            44860 TSM:FAIL:RE-INIT
                            44861 TSM:INIT
                            44878 TSM:INIT:TSP OK
                            44880 TSF:SID:OK,ID=33
                            44882 TSM:FPAR
                            46885 TSF:MSG:SEND,33-33-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                            48892 !TSM:FPAR:NO REPLY
                            48894 TSM:FPAR
                            50896 TSF:MSG:SEND,33-33-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                            52903 !TSM:FPAR:NO REPLY
                            52905 TSM:FPAR
                            54907 TSF:MSG:SEND,33-33-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                            56914 !TSM:FPAR:NO REPLY
                            56916 TSM:FPAR
                            58918 TSF:MSG:SEND,33-33-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                            60925 !TSM:FPAR:FAIL
                            60926 TSM:FAIL:CNT=2
                            60928 TSM:FAIL:DIS
                            60930 TSF:TDI:TSL

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              micropet
                              wrote on last edited by
                              #17

                              A Node with a Pro mini or a Teensy would help me more.

                              All my RFM69 Nodes have a Pro mini (50 pcs)
                              The TTN Nodes a Pro mini or a Teensy. (Approx. 20 pieces)

                              1 Reply Last reply
                              0
                              • M Offline
                                M Offline
                                micropet
                                wrote on last edited by
                                #18

                                Now I do not understand anything anymore.

                                I have made an update on the RPI and compiled the gateway software again.
                                I had already done more than 10 times.
                                After the start of the RPI nothing worked.
                                Multiple resets of the NodeMCU also brought nothing.

                                I pulled the micro usb plug and plugged again - suddenly it works. WAU

                                Then I must have a fault in the wiring between the RFM95 and the Arduino Pro.
                                  Just for info: I had set up 5 pieces. All do not work.

                                ./bin/mysgw -d
                                mysgw: Starting gateway...
                                mysgw: Protocol version - 2.2.0-beta
                                mysgw: MCO:BGN:INIT GW,CP=RLNG----,VER=2.2.0-beta
                                mysgw: TSF:LRT:OK
                                mysgw: TSM:INIT
                                mysgw: TSF:WUR:MS=0
                                mysgw: TSM:INIT:TSP OK
                                mysgw: TSM:INIT:GW MODE
                                mysgw: TSM:READY:ID=0,PAR=0,DIS=0
                                mysgw: MCO:REG:NOT NEEDED
                                mysgw: MCO:BGN:STP
                                mysgw: MCO:BGN:INIT OK,TSP=1
                                mysgw: Attempting MQTT connection...
                                mysgw: connected to 192.168.0.23
                                mysgw: MQTT connected
                                mysgw: Sending message on topic: mysensors2-out/0/255/0/0/18
                                mysgw: TSF:MSG:READ,33-33-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
                                mysgw: Sending message on topic: mysensors2-out/33/3/1/0/16
                                mysgw: TSF:MSG:READ,33-33-0,s=3,c=1,t=16,pt=1,l=1,sg=0:0
                                mysgw: Sending message on topic: mysensors2-out/33/3/1/0/16
                                mysgw: TSF:MSG:READ,33-33-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
                                mysgw: Sending message on topic: mysensors2-out/33/3/1/0/16
                                mysgw: TSF:MSG:READ,33-33-0,s=3,c=1,t=16,pt=1,l=1,sg=0:0
                                mysgw: Sending message on topic: mysensors2-out/33/3/1/0/16
                                mysgw: TSF:MSG:READ,33-33-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
                                mysgw: Sending message on topic: mysensors2-out/33/3/1/0/16

                                1 Reply Last reply
                                0
                                • M Offline
                                  M Offline
                                  micropet
                                  wrote on last edited by
                                  #19

                                  Hi,

                                  I have connected my Arduino Pro Nodes. They do not work.
                                  The ESP Node has been running since last night without problems.

                                  Can you try an Arduino?

                                  mfalkviddM 1 Reply Last reply
                                  0
                                  • M micropet

                                    Hi,

                                    I have connected my Arduino Pro Nodes. They do not work.
                                    The ESP Node has been running since last night without problems.

                                    Can you try an Arduino?

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

                                    @micropet great work. I should be able to set up an Arduino node tomorrow. The forecast shows rain anyway :)

                                    1 Reply Last reply
                                    0
                                    • M Offline
                                      M Offline
                                      micropet
                                      wrote on last edited by
                                      #21

                                      Fine.

                                      I'm just trying a Teensy LC Node.
                                      See you tomorrow.

                                      Here in Essen, Germany, it should also rain. :)

                                      1 Reply Last reply
                                      0
                                      • M Offline
                                        M Offline
                                        micropet
                                        wrote on last edited by
                                        #22

                                        The Teensy LC also works.

                                        So the problem is the Arduino Pro mini.

                                        mfalkviddM 1 Reply Last reply
                                        1
                                        • M micropet

                                          The Teensy LC also works.

                                          So the problem is the Arduino Pro mini.

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

                                          @micropet I'm unfortunately not able to reproduce the problem. This is the output of my Pro Mini 3.3V node:

                                          0 MCO:BGN:INIT NODE,CP=RLNNA---,VER=2.2.0-beta
                                          4 TSM:INIT
                                          4 TSF:WUR:MS=0
                                          16 TSM:INIT:TSP OK
                                          18 TSF:SID:OK,ID=6
                                          20 TSM:FPAR
                                          71 TSF:MSG:SEND,6-6-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                                          1130 TSF:MSG:READ,0-0-6,s=255,c=3,t=8,pt=1,l=1,sg=0:0
                                          1134 TSF:MSG:FPAR OK,ID=0,D=1
                                          2078 TSM:FPAR:OK
                                          2078 TSM:ID
                                          2080 TSM:ID:OK
                                          2082 TSM:UPL
                                          2183 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
                                          2232 TSF:MSG:READ,0-0-6,s=255,c=3,t=25,pt=1,l=1,sg=0:1
                                          2238 TSF:MSG:PONG RECV,HP=1
                                          2242 TSM:UPL:OK
                                          2244 TSM:READY:ID=6,PAR=0,DIS=1
                                          2375 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
                                          2426 TSF:MSG:READ,0-0-6,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
                                          2578 TSF:MSG:SEND,6-6-0-0,s=255,c=0,t=17,pt=0,l=10,sg=0,ft=0,st=OK:2.2.0-beta
                                          2689 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
                                          4814 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
                                          4925 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
                                          5027 TSF:MSG:SEND,6-6-0-0,s=3,c=0,t=0,pt=0,l=0,sg=0,ft=0,st=OK:
                                          5036 MCO:REG:REQ
                                          5132 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
                                          5183 TSF:MSG:READ,0-0-6,s=255,c=3,t=27,pt=1,l=1,sg=0:1
                                          5189 MCO:PIM:NODE REG=1
                                          5191 MCO:BGN:STP
                                          5193 MCO:BGN:INIT OK,TSP=1
                                          5326 TSF:MSG:SEND,6-6-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:0
                                          7438 TSF:MSG:SEND,6-6-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:1
                                          9549 TSF:MSG:SEND,6-6-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:0
                                          11661 TSF:MSG:SEND,6-6-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:1
                                          13774 TSF:MSG:SEND,6-6-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:0
                                          15886 TSF:MSG:SEND,6-6-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:1
                                          

                                          Gateway:

                                          Jul  8 11:56:14 raspi1 mysgw: TSF:MSG:READ,6-6-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
                                          Jul  8 11:56:14 raspi1 mysgw: TSF:MSG:BC
                                          Jul  8 11:56:14 raspi1 mysgw: TSF:MSG:FPAR REQ,ID=6
                                          Jul  8 11:56:14 raspi1 mysgw: TSF:PNG:SEND,TO=0
                                          Jul  8 11:56:14 raspi1 mysgw: TSF:CKU:OK
                                          Jul  8 11:56:14 raspi1 mysgw: TSF:MSG:GWL OK
                                          Jul  8 11:56:15 raspi1 mysgw: TSF:MSG:SEND,0-0-6-6,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
                                          Jul  8 11:56:16 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
                                          Jul  8 11:56:16 raspi1 mysgw: TSF:MSG:PINGED,ID=6,HP=1
                                          Jul  8 11:56:16 raspi1 mysgw: TSF:MSG:SEND,0-0-6-6,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
                                          Jul  8 11:56:16 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
                                          Jul  8 11:56:16 raspi1 mysgw: TSF:MSG:SEND,0-0-6-6,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
                                          Jul  8 11:56:17 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=255,c=0,t=17,pt=0,l=10,sg=0:2.2.0-beta
                                          Jul  8 11:56:17 raspi1 mysgw: Sending message on topic: mysensors-rfm95-out/6/255/0/0/17
                                          Jul  8 11:56:17 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
                                          Jul  8 11:56:17 raspi1 mysgw: Sending message on topic: mysensors-rfm95-out/6/255/3/0/6
                                          Jul  8 11:56:19 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=255,c=3,t=11,pt=0,l=13,sg=0:Binary Sensor
                                          Jul  8 11:56:19 raspi1 mysgw: Sending message on topic: mysensors-rfm95-out/6/255/3/0/11
                                          Jul  8 11:56:19 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
                                          Jul  8 11:56:19 raspi1 mysgw: Sending message on topic: mysensors-rfm95-out/6/255/3/0/12
                                          Jul  8 11:56:19 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=3,c=0,t=0,pt=0,l=0,sg=0:
                                          Jul  8 11:56:19 raspi1 mysgw: Sending message on topic: mysensors-rfm95-out/6/3/0/0/0
                                          Jul  8 11:56:19 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
                                          Jul  8 11:56:19 raspi1 mysgw: TSF:MSG:SEND,0-0-6-6,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
                                          Jul  8 11:56:19 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=3,c=1,t=16,pt=1,l=1,sg=0:0
                                          Jul  8 11:56:19 raspi1 mysgw: Sending message on topic: mysensors-rfm95-out/6/3/1/0/16
                                          Jul  8 11:56:21 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
                                          Jul  8 11:56:21 raspi1 mysgw: Sending message on topic: mysensors-rfm95-out/6/3/1/0/16
                                          Jul  8 11:56:24 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=3,c=1,t=16,pt=1,l=1,sg=0:0
                                          Jul  8 11:56:24 raspi1 mysgw: Sending message on topic: mysensors-rfm95-out/6/3/1/0/16
                                          Jul  8 11:56:26 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
                                          Jul  8 11:56:26 raspi1 mysgw: Sending message on topic: mysensors-rfm95-out/6/3/1/0/16
                                          Jul  8 11:56:28 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=3,c=1,t=16,pt=1,l=1,sg=0:0
                                          Jul  8 11:56:28 raspi1 mysgw: Sending message on topic: mysensors-rfm95-out/6/3/1/0/16
                                          Jul  8 11:56:30 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
                                          Jul  8 11:56:30 raspi1 mysgw: Sending message on topic: mysensors-rfm95-out/6/3/1/0/16
                                          Jul  8 11:56:32 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=3,c=1,t=16,pt=1,l=1,sg=0:0
                                          Jul  8 11:56:32 raspi1 mysgw: Sending message on topic: mysensors-rfm95-out/6/3/1/0/16
                                          Jul  8 11:56:34 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
                                          Jul  8 11:56:34 raspi1 mysgw: Sending message on topic: mysensors-rfm95-out/6/3/1/0/16
                                          Jul  8 11:56:36 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=3,c=1,t=16,pt=1,l=1,sg=0:0
                                          Jul  8 11:56:36 raspi1 mysgw: Sending message on topic: mysensors-rfm95-out/6/3/1/0/16
                                          Jul  8 11:56:38 raspi1 mysgw: TSF:MSG:READ,6-6-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
                                          Jul  8 11:56:38 raspi1 mysgw: Sending message on topic: mysensors-rfm95-out/6/3/1/0/16
                                          

                                          Sketch for the node: (same as for the esp8266 except that I removed the pin defines)

                                          // Enable debug prints to serial monitor
                                          #define MY_DEBUG
                                          
                                          // Enable and select radio type attached
                                          //#define MY_RADIO_NRF24
                                          #define MY_RADIO_RFM95
                                          
                                          #include <MySensors.h>
                                          
                                          #define SKETCH_NAME "Binary Sensor"
                                          #define SKETCH_MAJOR_VER "1"
                                          #define SKETCH_MINOR_VER "0"
                                          
                                          #define PRIMARY_CHILD_ID 3
                                          #define SECONDARY_CHILD_ID 4
                                          
                                          #define PRIMARY_BUTTON_PIN 2   // Arduino Digital I/O pin for button/reed switch
                                          #define SECONDARY_BUTTON_PIN 3 // Arduino Digital I/O pin for button/reed switch
                                          
                                          #if (PRIMARY_BUTTON_PIN < 2 || PRIMARY_BUTTON_PIN > 3)
                                          #error PRIMARY_BUTTON_PIN must be either 2 or 3 for interrupts to work
                                          #endif
                                          #if (SECONDARY_BUTTON_PIN < 2 || SECONDARY_BUTTON_PIN > 3)
                                          #error SECONDARY_BUTTON_PIN must be either 2 or 3 for interrupts to work
                                          #endif
                                          #if (PRIMARY_BUTTON_PIN == SECONDARY_BUTTON_PIN)
                                          #error PRIMARY_BUTTON_PIN and BUTTON_PIN2 cannot be the same
                                          #endif
                                          #if (PRIMARY_CHILD_ID == SECONDARY_CHILD_ID)
                                          #error PRIMARY_CHILD_ID and SECONDARY_CHILD_ID cannot be the same
                                          #endif
                                          
                                          
                                          // Change to V_LIGHT if you use S_LIGHT in presentation below
                                          MyMessage msg(PRIMARY_CHILD_ID, V_TRIPPED);
                                          
                                          void setup()
                                          {
                                          
                                          }
                                          
                                          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()
                                          {
                                            static uint8_t sentValue = 2;
                                          
                                            // Short delay to allow buttons to properly settle
                                            wait(5);
                                          
                                            uint8_t  value = !sentValue;
                                          
                                            if (value != sentValue) {
                                              // Value has changed from last transmission, send the updated value
                                              send(msg.set(value == HIGH));
                                              sentValue = value;
                                            }
                                          
                                            wait(2000);
                                          }
                                          

                                          Wiring as per https://www.mysensors.org/build/connect_radio#rfm69-&-arduino

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


                                          19

                                          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