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. Raspberry Pi 3 (RPI 3) gateway initialization loop

Raspberry Pi 3 (RPI 3) gateway initialization loop

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 3 Posters 583 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.
  • OumuamuaO Offline
    OumuamuaO Offline
    Oumuamua
    wrote on last edited by
    #1

    Hi all,

    I have a working ESP8266 gateway with 2 nodes, but I want to move the gateway to my Raspberry.

    I followed all the instructions on the website and had a successful installation.

    However, I notice that the gateway enters a loop on its initialization and keeps sending the version of MySensors to the MQTT server.

    The gateway configuration is:

    ./configure --my-transport=rfm69 --my-rfm69-frequency=433 --my-is-rfm69hw --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-user=user --my-mqtt-password=password --my-mqtt-publish-topic-prefix=mygateway1-out --my-mqtt-subscribe-topic-prefix=mygateway1-in --my-mqtt-client-id=gw_01
    

    My Raspberry runs:

    Raspbian GNU/Linux 11 (bullseye)
    

    Where I run Openhab 3.3.0

    When I run mysgw or start the service, it keeps sending the same message over an over again (many times per second) as below:

    Aug 27 23:16:00 INFO  Starting gateway...
    Aug 27 23:16:00 INFO  Protocol version - 2.3.2
    Aug 27 23:16:00 DEBUG MCO:BGN:INIT GW,CP=RPNGL---,FQ=NA,REL=255,VER=2.3.2
    Aug 27 23:16:00 DEBUG TSF:LRT:OK
    Aug 27 23:16:00 DEBUG TSM:INIT
    Aug 27 23:16:00 DEBUG TSF:WUR:MS=0
    Aug 27 23:16:00 DEBUG TSM:INIT:TSP OK
    Aug 27 23:16:00 DEBUG TSM:INIT:GW MODE
    Aug 27 23:16:00 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
    Aug 27 23:16:00 DEBUG MCO:REG:NOT NEEDED
    Aug 27 23:16:00 DEBUG MCO:BGN:STP
    Aug 27 23:16:00 DEBUG MCO:BGN:INIT OK,TSP=1
    Aug 27 23:16:00 DEBUG GWT:RMQ:CONNECTING...
    Aug 27 23:16:00 DEBUG connected to 127.0.0.1
    Aug 27 23:16:00 DEBUG GWT:RMQ:OK
    Aug 27 23:16:00 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
    Aug 27 23:16:00 DEBUG TSM:READY:NWD REQ
    Aug 27 23:16:00 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
    Aug 27 23:16:00 DEBUG GWT:RMQ:CONNECTING...
    Aug 27 23:16:00 DEBUG connected to 127.0.0.1
    Aug 27 23:16:00 DEBUG GWT:RMQ:OK
    Aug 27 23:16:00 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
    Aug 27 23:16:01 DEBUG GWT:RMQ:CONNECTING...
    Aug 27 23:16:01 DEBUG connected to 127.0.0.1
    Aug 27 23:16:01 DEBUG GWT:RMQ:OK
    Aug 27 23:16:01 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
    Aug 27 23:16:01 DEBUG GWT:RMQ:CONNECTING...
    Aug 27 23:16:01 DEBUG connected to 127.0.0.1
    Aug 27 23:16:01 DEBUG GWT:RMQ:OK
    Aug 27 23:16:01 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
    Aug 27 23:16:01 DEBUG GWT:RMQ:CONNECTING...
    Aug 27 23:16:01 DEBUG connected to 127.0.0.1
    Aug 27 23:16:01 DEBUG GWT:RMQ:OK
    Aug 27 23:16:01 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
    Aug 27 23:16:01 DEBUG GWT:RMQ:CONNECTING...
    Aug 27 23:16:01 DEBUG connected to 127.0.0.1
    Aug 27 23:16:01 DEBUG GWT:RMQ:OK
    Aug 27 23:16:01 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
    Aug 27 23:16:01 DEBUG GWT:RMQ:CONNECTING...
    
    

    Many thanks for any help.

    OldSurferDudeO 1 Reply Last reply
    0
    • OumuamuaO Oumuamua

      Hi all,

      I have a working ESP8266 gateway with 2 nodes, but I want to move the gateway to my Raspberry.

      I followed all the instructions on the website and had a successful installation.

      However, I notice that the gateway enters a loop on its initialization and keeps sending the version of MySensors to the MQTT server.

      The gateway configuration is:

      ./configure --my-transport=rfm69 --my-rfm69-frequency=433 --my-is-rfm69hw --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-user=user --my-mqtt-password=password --my-mqtt-publish-topic-prefix=mygateway1-out --my-mqtt-subscribe-topic-prefix=mygateway1-in --my-mqtt-client-id=gw_01
      

      My Raspberry runs:

      Raspbian GNU/Linux 11 (bullseye)
      

      Where I run Openhab 3.3.0

      When I run mysgw or start the service, it keeps sending the same message over an over again (many times per second) as below:

      Aug 27 23:16:00 INFO  Starting gateway...
      Aug 27 23:16:00 INFO  Protocol version - 2.3.2
      Aug 27 23:16:00 DEBUG MCO:BGN:INIT GW,CP=RPNGL---,FQ=NA,REL=255,VER=2.3.2
      Aug 27 23:16:00 DEBUG TSF:LRT:OK
      Aug 27 23:16:00 DEBUG TSM:INIT
      Aug 27 23:16:00 DEBUG TSF:WUR:MS=0
      Aug 27 23:16:00 DEBUG TSM:INIT:TSP OK
      Aug 27 23:16:00 DEBUG TSM:INIT:GW MODE
      Aug 27 23:16:00 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
      Aug 27 23:16:00 DEBUG MCO:REG:NOT NEEDED
      Aug 27 23:16:00 DEBUG MCO:BGN:STP
      Aug 27 23:16:00 DEBUG MCO:BGN:INIT OK,TSP=1
      Aug 27 23:16:00 DEBUG GWT:RMQ:CONNECTING...
      Aug 27 23:16:00 DEBUG connected to 127.0.0.1
      Aug 27 23:16:00 DEBUG GWT:RMQ:OK
      Aug 27 23:16:00 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
      Aug 27 23:16:00 DEBUG TSM:READY:NWD REQ
      Aug 27 23:16:00 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
      Aug 27 23:16:00 DEBUG GWT:RMQ:CONNECTING...
      Aug 27 23:16:00 DEBUG connected to 127.0.0.1
      Aug 27 23:16:00 DEBUG GWT:RMQ:OK
      Aug 27 23:16:00 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
      Aug 27 23:16:01 DEBUG GWT:RMQ:CONNECTING...
      Aug 27 23:16:01 DEBUG connected to 127.0.0.1
      Aug 27 23:16:01 DEBUG GWT:RMQ:OK
      Aug 27 23:16:01 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
      Aug 27 23:16:01 DEBUG GWT:RMQ:CONNECTING...
      Aug 27 23:16:01 DEBUG connected to 127.0.0.1
      Aug 27 23:16:01 DEBUG GWT:RMQ:OK
      Aug 27 23:16:01 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
      Aug 27 23:16:01 DEBUG GWT:RMQ:CONNECTING...
      Aug 27 23:16:01 DEBUG connected to 127.0.0.1
      Aug 27 23:16:01 DEBUG GWT:RMQ:OK
      Aug 27 23:16:01 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
      Aug 27 23:16:01 DEBUG GWT:RMQ:CONNECTING...
      Aug 27 23:16:01 DEBUG connected to 127.0.0.1
      Aug 27 23:16:01 DEBUG GWT:RMQ:OK
      Aug 27 23:16:01 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
      Aug 27 23:16:01 DEBUG GWT:RMQ:CONNECTING...
      
      

      Many thanks for any help.

      OldSurferDudeO Offline
      OldSurferDudeO Offline
      OldSurferDude
      wrote on last edited by
      #2

      @Oumuamua When you set

      --my-controller-ip-address=127.0.0.1
      

      you are saying your MQTT broker is on the same machine as your gateway. If, on your RPi you installed your broker with (what I do)

      sudo apt install mosquitto
      

      you will have to add the lines to /etc/mosquitto/mosquitto.conf

      allow_anonymous true
      listener 1883 0.0.0.0
      

      After that, reboot.

      Alas, this may not fix your problem. I see you're looping on connecting/connected/sent. I make the assumption that the debug message aren't quite accurate because ... well ... sometimes they aren't.

      Let us know if this works :)

      OSD

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

        Add --extra-cxxflags="-DMY_DEBUG_VERBOSE_GATEWAY to the configure command and run make again. This will give more details in the debug log.

        Edit: the log file of your mqtt broker might give some iseful info as well.

        1 Reply Last reply
        0
        • OumuamuaO Offline
          OumuamuaO Offline
          Oumuamua
          wrote on last edited by
          #4

          @mfalkvidd and @OldSurferDude

          My thanks for the quick hints.

          Yes, Mosquitto is running on the same machine.

          I added --extra-cxxflags="-DMY_DEBUG_VERBOSE_GATEWAY to the configure file and also updated the Mosquitto conf as per @mfalkvidd suggestion.

          Unfortunately the log did change (see below).

          One important comment: the connection is actually successful with the MQTT server as I can see all the publications in it using MQTT Explorer. It seems to me that the problem is with the gateway in some way that keeps sending it non-stop.

          The problem happens if I just run mysgw or when I start the service.

          Aug 28 07:39:11 INFO  Starting gateway...
          Aug 28 07:39:11 INFO  Protocol version - 2.3.2
          Aug 28 07:39:11 DEBUG MCO:BGN:INIT GW,CP=RPNGL---,FQ=NA,REL=255,VER=2.3.2
          Aug 28 07:39:11 DEBUG TSF:LRT:OK
          Aug 28 07:39:11 DEBUG TSM:INIT
          Aug 28 07:39:11 DEBUG TSF:WUR:MS=0
          Aug 28 07:39:11 DEBUG TSM:INIT:TSP OK
          Aug 28 07:39:11 DEBUG TSM:INIT:GW MODE
          Aug 28 07:39:11 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
          Aug 28 07:39:11 DEBUG MCO:REG:NOT NEEDED
          Aug 28 07:39:11 DEBUG MCO:BGN:STP
          Aug 28 07:39:11 DEBUG MCO:BGN:INIT OK,TSP=1
          Aug 28 07:39:11 DEBUG GWT:RMQ:CONNECTING...
          Aug 28 07:39:11 DEBUG connected to 127.0.0.1
          Aug 28 07:39:11 DEBUG GWT:RMQ:OK
          Aug 28 07:39:11 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
          Aug 28 07:39:11 DEBUG TSM:READY:NWD REQ
          Aug 28 07:39:12 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
          Aug 28 07:39:12 DEBUG GWT:RMQ:CONNECTING...
          Aug 28 07:39:12 DEBUG connected to 127.0.0.1
          Aug 28 07:39:12 DEBUG GWT:RMQ:OK
          Aug 28 07:39:12 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
          Aug 28 07:39:12 DEBUG GWT:RMQ:CONNECTING...
          Aug 28 07:39:12 DEBUG connected to 127.0.0.1
          Aug 28 07:39:12 DEBUG GWT:RMQ:OK
          Aug 28 07:39:12 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
          Aug 28 07:39:12 DEBUG GWT:RMQ:CONNECTING...
          Aug 28 07:39:12 DEBUG connected to 127.0.0.1
          Aug 28 07:39:12 DEBUG GWT:RMQ:OK
          Aug 28 07:39:12 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
          Aug 28 07:39:12 DEBUG GWT:RMQ:CONNECTING...
          Aug 28 07:39:12 DEBUG connected to 127.0.0.1
          Aug 28 07:39:12 DEBUG GWT:RMQ:OK
          Aug 28 07:39:12 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
          Aug 28 07:39:12 DEBUG GWT:RMQ:CONNECTING...
          Aug 28 07:39:12 DEBUG connected to 127.0.0.1
          Aug 28 07:39:12 DEBUG GWT:RMQ:OK
          Aug 28 07:39:12 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
          Aug 28 07:39:13 DEBUG GWT:RMQ:CONNECTING...
          Aug 28 07:39:13 DEBUG connected to 127.0.0.1
          Aug 28 07:39:13 DEBUG GWT:RMQ:OK
          Aug 28 07:39:13 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
          
          
          OldSurferDudeO 1 Reply Last reply
          0
          • OumuamuaO Oumuamua

            @mfalkvidd and @OldSurferDude

            My thanks for the quick hints.

            Yes, Mosquitto is running on the same machine.

            I added --extra-cxxflags="-DMY_DEBUG_VERBOSE_GATEWAY to the configure file and also updated the Mosquitto conf as per @mfalkvidd suggestion.

            Unfortunately the log did change (see below).

            One important comment: the connection is actually successful with the MQTT server as I can see all the publications in it using MQTT Explorer. It seems to me that the problem is with the gateway in some way that keeps sending it non-stop.

            The problem happens if I just run mysgw or when I start the service.

            Aug 28 07:39:11 INFO  Starting gateway...
            Aug 28 07:39:11 INFO  Protocol version - 2.3.2
            Aug 28 07:39:11 DEBUG MCO:BGN:INIT GW,CP=RPNGL---,FQ=NA,REL=255,VER=2.3.2
            Aug 28 07:39:11 DEBUG TSF:LRT:OK
            Aug 28 07:39:11 DEBUG TSM:INIT
            Aug 28 07:39:11 DEBUG TSF:WUR:MS=0
            Aug 28 07:39:11 DEBUG TSM:INIT:TSP OK
            Aug 28 07:39:11 DEBUG TSM:INIT:GW MODE
            Aug 28 07:39:11 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
            Aug 28 07:39:11 DEBUG MCO:REG:NOT NEEDED
            Aug 28 07:39:11 DEBUG MCO:BGN:STP
            Aug 28 07:39:11 DEBUG MCO:BGN:INIT OK,TSP=1
            Aug 28 07:39:11 DEBUG GWT:RMQ:CONNECTING...
            Aug 28 07:39:11 DEBUG connected to 127.0.0.1
            Aug 28 07:39:11 DEBUG GWT:RMQ:OK
            Aug 28 07:39:11 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
            Aug 28 07:39:11 DEBUG TSM:READY:NWD REQ
            Aug 28 07:39:12 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
            Aug 28 07:39:12 DEBUG GWT:RMQ:CONNECTING...
            Aug 28 07:39:12 DEBUG connected to 127.0.0.1
            Aug 28 07:39:12 DEBUG GWT:RMQ:OK
            Aug 28 07:39:12 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
            Aug 28 07:39:12 DEBUG GWT:RMQ:CONNECTING...
            Aug 28 07:39:12 DEBUG connected to 127.0.0.1
            Aug 28 07:39:12 DEBUG GWT:RMQ:OK
            Aug 28 07:39:12 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
            Aug 28 07:39:12 DEBUG GWT:RMQ:CONNECTING...
            Aug 28 07:39:12 DEBUG connected to 127.0.0.1
            Aug 28 07:39:12 DEBUG GWT:RMQ:OK
            Aug 28 07:39:12 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
            Aug 28 07:39:12 DEBUG GWT:RMQ:CONNECTING...
            Aug 28 07:39:12 DEBUG connected to 127.0.0.1
            Aug 28 07:39:12 DEBUG GWT:RMQ:OK
            Aug 28 07:39:12 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
            Aug 28 07:39:12 DEBUG GWT:RMQ:CONNECTING...
            Aug 28 07:39:12 DEBUG connected to 127.0.0.1
            Aug 28 07:39:12 DEBUG GWT:RMQ:OK
            Aug 28 07:39:12 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
            Aug 28 07:39:13 DEBUG GWT:RMQ:CONNECTING...
            Aug 28 07:39:13 DEBUG connected to 127.0.0.1
            Aug 28 07:39:13 DEBUG GWT:RMQ:OK
            Aug 28 07:39:13 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
            
            
            OldSurferDudeO Offline
            OldSurferDudeO Offline
            OldSurferDude
            wrote on last edited by
            #5

            @Oumuamua said in Raspberry Pi 3 (RPI 3) gateway initialization loop:
            This is a clue (or a red herring) because there is a ? in the message.

            Aug 28 07:39:12 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:

            Hopefully @mfalkvidd can tell us what it means

            1 Reply Last reply
            0
            • OumuamuaO Offline
              OumuamuaO Offline
              Oumuamua
              wrote on last edited by
              #6

              Problem solved: I was using as --my-mqtt-client-id the same name as my previous broker.

              Thanks for your help all!

              1 Reply Last reply
              1

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              20

              Online

              12.0k

              Users

              11.2k

              Topics

              113.4k

              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