Raspberry Pi 3 (RPI 3) gateway initialization loop
-
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_01My 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.
-
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_01My 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.
@Oumuamua When you set
--my-controller-ip-address=127.0.0.1you 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 mosquittoyou will have to add the lines to /etc/mosquitto/mosquitto.conf
allow_anonymous true listener 1883 0.0.0.0After 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
-
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 -
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@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
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