ESP8266Wifi Gateway won't connect
-
Tried on windows 11 machine Arduino 1.8.19 with latest MySensors Library. Tried on Windows 10 machine with Arduino 1.8.13 and latest MySensors library. Just an FYI. Thanks for staying with me.
@dpcons As you are seeing no serial debug data. Have you checked that your serial data monitor is set for the same baud rate as set in the sketch (9600 on MySensors GatewayESP8266 sketch) as other sketches use default 115200
-
No comm at any baud rate except trash I/O at boot time. The gateway code specifies 9600 but I've tried them all. The problem is the system is not connecting with the network.
In addition, built up a new system using an ESP32 module and an nRF24L01 module.
Tried the "GatewayESP32" example app on the known good ESP32 module. After uploading, this module spits good data out the serial port at 115200 KHz (See below:)...but never tries to connect to the network. I'm using the "GatewayESP32" example with my network credentials added.
The ESP32 appears to be getting data from my 2.4GHz sensors, but never gets to my network.16:57:05.271 -> 10009772 TSF:MSG:BC
16:57:05.271 -> 10009774 TSF:MSG:FPAR REQ,ID=12
16:57:05.271 -> 10009776 TSF:PNG:SEND,TO=0
16:57:05.271 -> 10009779 TSF:CKU:OK
16:57:05.271 -> 10009781 TSF:MSG:GWL OK
16:57:05.505 -> 10010001 !TSF:MSG:SEND,0-0-12-12,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
16:57:05.505 -> 10010008 TSF:MSG:READ,9-9-0,s=0,c=1,t=0,pt=7,l=5,sg=0:26.0
16:57:21.018 -> 10025533 TSF:MSG:READ,7-7-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
16:57:21.018 -> 10025539 TSF:MSG:BC
16:57:21.018 -> 10025540 TSF:MSG:FPAR REQ,ID=7
16:57:21.018 -> 10025543 TSF:PNG:SEND,TO=0
16:57:21.018 -> 10025545 TSF:CKU:OK
16:57:21.018 -> 10025547 TSF:MSG:GWL OK
16:57:21.674 -> 10026174 !TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
16:57:29.313 -> 10033832 TSF:MSG:READ,3-3-0,s=0,c=1,t=37,pt=2,l=2,sg=0:1380
16:57:31.843 -> 10036367 TSF:MSG:READ,5-5-0,s=0,c=1,t=0,pt=7,l=5,sg=0:-0.3
16:57:31.937 -> 10036433 TSF:MSG:READ,5-5-0,s=1,c=1,t=0,pt=7,l=5,sg=0:-19.5
16:57:43.934 -> 10048467 TSF:MSG:READ,7-7-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
16:57:43.981 -> 10048472 TSF:MSG:PINGED,ID=7,HP=1
16:57:43.981 -> 10048516 !TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
16:57:56.119 -> 10060615 TSF:MSG:READ,2-2-0,s=0,c=1,t=1,pt=7,l=5,sg=0:43.3
16:57:56.119 -> 10060635 TSF:MSG:READ,2-2-0,s=1,c=1,t=0,pt=7,l=5,sg=0:26.0
16:58:04.393 -> 10068900 TSF:MSG:READ,3-3-0,s=0,c=1,t=37,pt=2,l=2,sg=0:1380
16:58:05.190 -> 10069700 TSF:MSG:READ,9-9-0,s=0,c=1,t=0,pt=7,l=5,sg=0:26.0
16:58:06.736 -> 10071270 TSF:MSG:READ,5-5-0,s=0,c=1,t=0,pt=7,l=5,sg=0:-0.1
16:58:06.830 -> 10071334 TSF:MSG:READ,5-5-0,s=1,c=1,t=0,pt=7,l=5,sg=0:-19.4
16:58:35.125 -> 10099641 TSF:MSG:READ,9-9-0,s=0,c=1,t=0,pt=7,l=5,sg=0:26.0
16:58:39.437 -> 10103962 TSF:MSG:READ,3-3-0,s=0,c=1,t=37,pt=2,l=2,sg=0:1380
16:58:41.640 -> 10106168 TSF:MSG:READ,5-5-0,s=0,c=1,t=0,pt=7,l=5,sg=0:0.0
16:58:59.372 -> 10123897 TSF:MSG:READ,2-2-0,s=0,c=1,t=1,pt=7,l=5,sg=0:43.3
16:58:59.419 -> 10123914 TSF:MSG:READ,2-2-0,s=1,c=1,t=0,pt=7,l=5,sg=0:26.0
16:59:05.091 -> 10129603 TSF:MSG:READ,9-9-0,s=0,c=1,t=0,pt=7,l=5,sg=0:26.0
16:59:14.527 -> 10139033 TSF:MSG:READ,3-3-0,s=0,c=1,t=37,pt=2,l=2,sg=0:1380
16:59:16.571 -> 10141065 TSF:MSG:READ,5-5-0,s=0,c=1,t=0,pt=7,l=5,sg=0:0.1
Again, as with the ESP8266 gateway the "Advanced Web Server" for the ESP32 chip uploads nicely, connects to my network and runs as expected. I'm stopped anyway I try to go. -
No comm at any baud rate except trash I/O at boot time. The gateway code specifies 9600 but I've tried them all. The problem is the system is not connecting with the network.
In addition, built up a new system using an ESP32 module and an nRF24L01 module.
Tried the "GatewayESP32" example app on the known good ESP32 module. After uploading, this module spits good data out the serial port at 115200 KHz (See below:)...but never tries to connect to the network. I'm using the "GatewayESP32" example with my network credentials added.
The ESP32 appears to be getting data from my 2.4GHz sensors, but never gets to my network.16:57:05.271 -> 10009772 TSF:MSG:BC
16:57:05.271 -> 10009774 TSF:MSG:FPAR REQ,ID=12
16:57:05.271 -> 10009776 TSF:PNG:SEND,TO=0
16:57:05.271 -> 10009779 TSF:CKU:OK
16:57:05.271 -> 10009781 TSF:MSG:GWL OK
16:57:05.505 -> 10010001 !TSF:MSG:SEND,0-0-12-12,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
16:57:05.505 -> 10010008 TSF:MSG:READ,9-9-0,s=0,c=1,t=0,pt=7,l=5,sg=0:26.0
16:57:21.018 -> 10025533 TSF:MSG:READ,7-7-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
16:57:21.018 -> 10025539 TSF:MSG:BC
16:57:21.018 -> 10025540 TSF:MSG:FPAR REQ,ID=7
16:57:21.018 -> 10025543 TSF:PNG:SEND,TO=0
16:57:21.018 -> 10025545 TSF:CKU:OK
16:57:21.018 -> 10025547 TSF:MSG:GWL OK
16:57:21.674 -> 10026174 !TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
16:57:29.313 -> 10033832 TSF:MSG:READ,3-3-0,s=0,c=1,t=37,pt=2,l=2,sg=0:1380
16:57:31.843 -> 10036367 TSF:MSG:READ,5-5-0,s=0,c=1,t=0,pt=7,l=5,sg=0:-0.3
16:57:31.937 -> 10036433 TSF:MSG:READ,5-5-0,s=1,c=1,t=0,pt=7,l=5,sg=0:-19.5
16:57:43.934 -> 10048467 TSF:MSG:READ,7-7-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
16:57:43.981 -> 10048472 TSF:MSG:PINGED,ID=7,HP=1
16:57:43.981 -> 10048516 !TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
16:57:56.119 -> 10060615 TSF:MSG:READ,2-2-0,s=0,c=1,t=1,pt=7,l=5,sg=0:43.3
16:57:56.119 -> 10060635 TSF:MSG:READ,2-2-0,s=1,c=1,t=0,pt=7,l=5,sg=0:26.0
16:58:04.393 -> 10068900 TSF:MSG:READ,3-3-0,s=0,c=1,t=37,pt=2,l=2,sg=0:1380
16:58:05.190 -> 10069700 TSF:MSG:READ,9-9-0,s=0,c=1,t=0,pt=7,l=5,sg=0:26.0
16:58:06.736 -> 10071270 TSF:MSG:READ,5-5-0,s=0,c=1,t=0,pt=7,l=5,sg=0:-0.1
16:58:06.830 -> 10071334 TSF:MSG:READ,5-5-0,s=1,c=1,t=0,pt=7,l=5,sg=0:-19.4
16:58:35.125 -> 10099641 TSF:MSG:READ,9-9-0,s=0,c=1,t=0,pt=7,l=5,sg=0:26.0
16:58:39.437 -> 10103962 TSF:MSG:READ,3-3-0,s=0,c=1,t=37,pt=2,l=2,sg=0:1380
16:58:41.640 -> 10106168 TSF:MSG:READ,5-5-0,s=0,c=1,t=0,pt=7,l=5,sg=0:0.0
16:58:59.372 -> 10123897 TSF:MSG:READ,2-2-0,s=0,c=1,t=1,pt=7,l=5,sg=0:43.3
16:58:59.419 -> 10123914 TSF:MSG:READ,2-2-0,s=1,c=1,t=0,pt=7,l=5,sg=0:26.0
16:59:05.091 -> 10129603 TSF:MSG:READ,9-9-0,s=0,c=1,t=0,pt=7,l=5,sg=0:26.0
16:59:14.527 -> 10139033 TSF:MSG:READ,3-3-0,s=0,c=1,t=37,pt=2,l=2,sg=0:1380
16:59:16.571 -> 10141065 TSF:MSG:READ,5-5-0,s=0,c=1,t=0,pt=7,l=5,sg=0:0.1
Again, as with the ESP8266 gateway the "Advanced Web Server" for the ESP32 chip uploads nicely, connects to my network and runs as expected. I'm stopped anyway I try to go.@dpcons I assembled a board copied from yours for testing.

I could replicate the problem. It is with the ESP core version and the MySensor Version
MySensors version 2.3.2 and ESP8266 core 3.0.2 does not work,MySensors version 2.3.2 and ESP8266 core 2.7.4 works
Mysensors development version 2.4.0-Alpha and newest ESP8266 core 3.0.2 also works
So you can either update the esp core to older version 2.7.4, or install the development version of MySensors 2.4.0-Alpha
-
@dpcons I assembled a board copied from yours for testing.

I could replicate the problem. It is with the ESP core version and the MySensor Version
MySensors version 2.3.2 and ESP8266 core 3.0.2 does not work,MySensors version 2.3.2 and ESP8266 core 2.7.4 works
Mysensors development version 2.4.0-Alpha and newest ESP8266 core 3.0.2 also works
So you can either update the esp core to older version 2.7.4, or install the development version of MySensors 2.4.0-Alpha
@hard-shovel said in ESP8266Wifi Gateway won't connect:
MySensors version 2.3.2 and ESP8266 core 2.7.4 works
-
@dpcons I assembled a board copied from yours for testing.

I could replicate the problem. It is with the ESP core version and the MySensor Version
MySensors version 2.3.2 and ESP8266 core 3.0.2 does not work,MySensors version 2.3.2 and ESP8266 core 2.7.4 works
Mysensors development version 2.4.0-Alpha and newest ESP8266 core 3.0.2 also works
So you can either update the esp core to older version 2.7.4, or install the development version of MySensors 2.4.0-Alpha
@hard-shovel I had same issue and using older version worked for me too
-
@dpcons I assembled a board copied from yours for testing.

I could replicate the problem. It is with the ESP core version and the MySensor Version
MySensors version 2.3.2 and ESP8266 core 3.0.2 does not work,MySensors version 2.3.2 and ESP8266 core 2.7.4 works
Mysensors development version 2.4.0-Alpha and newest ESP8266 core 3.0.2 also works
So you can either update the esp core to older version 2.7.4, or install the development version of MySensors 2.4.0-Alpha
@hard-shovel Thanks so much for your effort and your timely resolution. I tried going back with previous versions of the library and they didn't work or didn't compile. I greatly appreciate your help with this. I assume something similar is happening to the ESP32 version also. Again, thanks.
-
@hard-shovel Thanks so much for your effort and your timely resolution. I tried going back with previous versions of the library and they didn't work or didn't compile. I greatly appreciate your help with this. I assume something similar is happening to the ESP32 version also. Again, thanks.
@dpcons @hard-shovel @paqor @chrishiscox @mfalkvidd Hi all,
I saw this and got excited that I could use my NodeMCUv1.0 as a MySensors Gateway. I made sure I had the latest MySensors library (2.3.2) and ESP8266 board (3.0.2). I successfully ran a couple examples, first file-->examples-->ESP8266-->Blink then file-->examples-->ESP8266-->interactive (with my ssid & pass), the latter with serial monitor at 115200 baud.
I ensured that my nRF24l01 was functional by connecting it to an Arduino Nano and running the scanner program.
I connected my nRF24l01 to my NodeMCU, both having pins, using new 10cm 7 conductor ribbon cable. (I have successfully used this type of connection to an RPi)
The program ... I copied the program from this page and applied my ssid and password. Nothing ... I suspected that this code is a node template, not a the gateway program.
On that same page was the instruction "Open the WiFi gateway in the Arduino IDE (File -> Sketchbook -> Libraries -> MySensors -> Esp8266Gateway)" I didn't find "Libraries" under "Sketchbook" I a file of the same name at (File -> Sketchbook -> Libraries -> MySensors -> examples --> Esp8266Gateway) which is the same file.
I tried putting into setup the line
Serial.println("com check");but nothing came out on the console.
I think I'm at the same place as @dpcons
update: rechecked my radio with the RF24 "getting started" program and found the radio good. Updated my Arduino IDE. Still not working.
-
@dpcons @hard-shovel @paqor @chrishiscox @mfalkvidd Hi all,
I saw this and got excited that I could use my NodeMCUv1.0 as a MySensors Gateway. I made sure I had the latest MySensors library (2.3.2) and ESP8266 board (3.0.2). I successfully ran a couple examples, first file-->examples-->ESP8266-->Blink then file-->examples-->ESP8266-->interactive (with my ssid & pass), the latter with serial monitor at 115200 baud.
I ensured that my nRF24l01 was functional by connecting it to an Arduino Nano and running the scanner program.
I connected my nRF24l01 to my NodeMCU, both having pins, using new 10cm 7 conductor ribbon cable. (I have successfully used this type of connection to an RPi)
The program ... I copied the program from this page and applied my ssid and password. Nothing ... I suspected that this code is a node template, not a the gateway program.
On that same page was the instruction "Open the WiFi gateway in the Arduino IDE (File -> Sketchbook -> Libraries -> MySensors -> Esp8266Gateway)" I didn't find "Libraries" under "Sketchbook" I a file of the same name at (File -> Sketchbook -> Libraries -> MySensors -> examples --> Esp8266Gateway) which is the same file.
I tried putting into setup the line
Serial.println("com check");but nothing came out on the console.
I think I'm at the same place as @dpcons
update: rechecked my radio with the RF24 "getting started" program and found the radio good. Updated my Arduino IDE. Still not working.
@OldSurferDude @dpcons Hi all,
The sample sketch could also be found using (File -> Examples -> MySensors -> Esp8266GatewayAs MySensors version 2.3.2 and ESP8266 core 3.0.2 combination does not work you need to change one or the other versions.
The simplest is to roll back the ESP8266 Core version to 2.7.4 and keep the MySensors 2.3.2 version
(Tools -> Board -> Board Manager)
Enter ESP8266 in search bar, then click within the ESP8266 data info box, click the select version pulldown.
Select 2.7.4 and then click Install.
Other option is to update the MySensors library to the development version 2.4.0-Alpha but that has to be done manually.
-
@OldSurferDude @dpcons Hi all,
The sample sketch could also be found using (File -> Examples -> MySensors -> Esp8266GatewayAs MySensors version 2.3.2 and ESP8266 core 3.0.2 combination does not work you need to change one or the other versions.
The simplest is to roll back the ESP8266 Core version to 2.7.4 and keep the MySensors 2.3.2 version
(Tools -> Board -> Board Manager)
Enter ESP8266 in search bar, then click within the ESP8266 data info box, click the select version pulldown.
Select 2.7.4 and then click Install.
Other option is to update the MySensors library to the development version 2.4.0-Alpha but that has to be done manually.
@hard-shovel Thanks! Now I'm getting output to the monitor. I think I need to set up the IP address and the port 1883 for the MQTT broker. How is that done? I am also getting data from my Arduino node sensors :) I see "controller" but when I change that to my broker's address I get streaming ETH FAIL
-
@hard-shovel Thanks! Now I'm getting output to the monitor. I think I need to set up the IP address and the port 1883 for the MQTT broker. How is that done? I am also getting data from my Arduino node sensors :) I see "controller" but when I change that to my broker's address I get streaming ETH FAIL
The port was set to 5003 and setting it to 1883 (the default MQTT broker port) it now seems to work
-
The port was set to 5003 and setting it to 1883 (the default MQTT broker port) it now seems to work
@OldSurferDude If connecting to a MQTT Broker i would have expected you to use the GatewayESP8266MQTTClient sketch.
as this is already setup with correct Port 1883 for MQTT and the publishing and subscription topics.I did a quick test of a GatewayESP8266MQTTClient sketch with mosquitto and it works fine for me.
-
@OldSurferDude @dpcons Hi all,
The sample sketch could also be found using (File -> Examples -> MySensors -> Esp8266GatewayAs MySensors version 2.3.2 and ESP8266 core 3.0.2 combination does not work you need to change one or the other versions.
The simplest is to roll back the ESP8266 Core version to 2.7.4 and keep the MySensors 2.3.2 version
(Tools -> Board -> Board Manager)
Enter ESP8266 in search bar, then click within the ESP8266 data info box, click the select version pulldown.
Select 2.7.4 and then click Install.
Other option is to update the MySensors library to the development version 2.4.0-Alpha but that has to be done manually.
@hard-shovel While it all seemed to be working, it appears that the ESP8266 MySensors Gateway was not passing the data onto the MQTT broker. Working, meaning that data from the Arduino sensors were getting to the Gateway, but that data was not getting to the broker. Here are some lines of the debug output:
6217818 TSF:MSG:READ,133-133-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 6217883 TSF:MSG:BC 6217903 TSF:MSG:FPAR REQ,ID=133 6217936 TSF:CKU:OK,FCTRL 6217962 TSF:MSG:GWL OK 6218281 !TSF:MSG:SEND,0-0-133-133,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0Also, as an indication that data was not being passed from the Gateway to the broker, I had reset my MQTT Broker and subsequently monitored it with MQTT explorer. The topic "mysensors-out" was not created.
I shut down the ESP8266 MySensors Gateway and restarted the my original one that is running on an RPi. Everything started running as expected.
Thus, my conclusion.
OK, so why isn't the ESP8266 MySensors Gateway passing on the data?
-
@OldSurferDude If connecting to a MQTT Broker i would have expected you to use the GatewayESP8266MQTTClient sketch.
as this is already setup with correct Port 1883 for MQTT and the publishing and subscription topics.I did a quick test of a GatewayESP8266MQTTClient sketch with mosquitto and it works fine for me.
@hard-shovel I try the client
-
@OldSurferDude If connecting to a MQTT Broker i would have expected you to use the GatewayESP8266MQTTClient sketch.
as this is already setup with correct Port 1883 for MQTT and the publishing and subscription topics.I did a quick test of a GatewayESP8266MQTTClient sketch with mosquitto and it works fine for me.
@hard-shovel client worked for me, too. That is, it sent the message "2.3.2" to topic "mygateway1-outx/0/255/0/0/18"
-
@OldSurferDude If connecting to a MQTT Broker i would have expected you to use the GatewayESP8266MQTTClient sketch.
as this is already setup with correct Port 1883 for MQTT and the publishing and subscription topics.I did a quick test of a GatewayESP8266MQTTClient sketch with mosquitto and it works fine for me.
@hard-shovel I tried the client and it did indeed send the MySensors version message. But it does not pass along the messages from the Arduino nodes.
-
@hard-shovel I tried the client and it did indeed send the MySensors version message. But it does not pass along the messages from the Arduino nodes.
@OldSurferDude have you set the MQTT user and MQTT passwords in the sketch and uncommented them as well?
// Enable these if your MQTT broker requires usenrame/password //#define MY_MQTT_USER "username" //#define MY_MQTT_PASSWORD "password"// Enable these if your MQTT broker requires usenrame/password #define MY_MQTT_USER "MQTTusername2022" #define MY_MQTT_PASSWORD "MQTTpassword2022"what does your debug log look like?
This sample is not connected correctly to the MQTT Broker10:33:26.151 -> dhcp client start... 10:33:26.151 -> 341 TSM:INIT:GW MODE 10:33:26.199 -> 364 TSM:READY:ID=0,PAR=0,DIS=0 10:33:26.199 -> 396 MCO:REG:NOT NEEDED 10:33:26.339 -> 505 GWT:TPC:CONNECTING... 10:33:27.365 -> 1533 MCO:BGN:STP 10:33:27.365 -> 1551 MCO:BGN:INIT OK,TSP=1 10:33:27.412 -> 1579 TSM:READY:NWD REQ 10:33:27.412 -> 1606 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK: 10:33:28.671 -> scandone 10:33:35.993 -> pm open,type:2 0 10:33:44.664 -> 18861 TSF:MSG:READ,254-254-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 10:33:44.758 -> 18924 TSF:MSG:BC 10:33:44.758 -> 18942 TSF:MSG:FPAR REQ,ID=254 10:33:44.804 -> 18973 TSF:PNG:SEND,TO=0 10:33:44.804 -> 18998 TSF:CKU:OK 10:33:44.851 -> 19016 TSF:MSG:GWL OK 10:33:45.459 -> 19646 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 10:33:46.671 -> 20876 TSF:MSG:READ,254-254-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 10:33:46.766 -> 20939 TSF:MSG:PINGED,ID=254,HP=1 10:33:46.813 -> 20980 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1 10:33:46.860 -> 21057 TSF:MSG:READ,254-254-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100This is working correctly
10:36:34.908 -> dhcp client start... 10:36:37.655 -> ip:192.168.1.202,mask:255.255.255.0,gw:192.168.1.254 10:36:37.702 -> 7014 GWT:TPC:IP=192.168.1.202 10:36:37.702 -> 7100 GWT:RMQ:CONNECTING... 10:36:37.749 -> 7144 GWT:RMQ:OK 10:36:37.795 -> 7161 GWT:TPS:TOPIC=mygateway4-out/0/255/0/0/18,MSG SENT 10:36:44.792 -> pm open,type:2 0 10:38:56.629 -> 146027 TSF:MSG:READ,254-254-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 10:38:56.723 -> 146091 TSF:MSG:BC 10:38:56.723 -> 146109 TSF:MSG:FPAR REQ,ID=254 10:38:56.770 -> 146142 TSF:PNG:SEND,TO=0 10:38:56.770 -> 146168 TSF:CKU:OK 10:38:56.816 -> 146187 TSF:MSG:GWL OK 10:38:57.655 -> 147013 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 10:38:58.683 -> 148042 TSF:MSG:READ,254-254-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 10:38:58.730 -> 148105 TSF:MSG:PINGED,ID=254,HP=1 10:38:58.776 -> 148148 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1 10:38:58.869 -> 148226 TSF:MSG:READ,254-254-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 10:38:58.916 -> 148294 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 10:38:59.010 -> 148375 TSF:MSG:READ,254-254-0,s=255,c=0,t=17,pt=0,l=11,sg=0:2.4.0-alpha 10:38:59.058 -> 148450 GWT:TPS:TOPIC=mygateway4-out/254/255/0/0/17,MSG SENT 10:38:59.151 -> 148515 TSF:MSG:READ,254-254-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0 10:38:59.197 -> 148578 GWT:TPS:TOPIC=mygateway4-out/254/255/3/0/6,MSG SENT 10:39:00.923 -> 150319 TSF:MSG:READ,254-254-0,s=255,c=3,t=11,pt=0,l=14,sg=0:MockMySensors 10:39:01.017 -> 150398 GWT:TPS:TOPIC=mygateway4-out/254/255/3/0/11,MSG SENT 10:39:01.064 -> 150462 TSF:MSG:READ,254-254-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5 10:39:01.157 -> 150529 GWT:TPS:TOPIC=mygateway4-out/254/255/3/0/12,MSG SENT 10:39:01.949 -> 151337 TSF:MSG:READ,254-254-0,s=1,c=0,t=0,pt=0,l=12,sg=0:Outside Door 10:39:02.044 -> 151410 GWT:TPS:TOPIC=mygateway4-out/254/1/0/0/0,MSG SENT 10:39:02.091 -> 151471 TSF:MSG:READ,254-254-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2 10:39:02.184 -> 151542 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1 10:39:02.699 -> 152055 TSF:MSG:READ,254-254-0,s=255,c=3,t=0,pt=1,l=1,sg=0:83 -
@OldSurferDude have you set the MQTT user and MQTT passwords in the sketch and uncommented them as well?
// Enable these if your MQTT broker requires usenrame/password //#define MY_MQTT_USER "username" //#define MY_MQTT_PASSWORD "password"// Enable these if your MQTT broker requires usenrame/password #define MY_MQTT_USER "MQTTusername2022" #define MY_MQTT_PASSWORD "MQTTpassword2022"what does your debug log look like?
This sample is not connected correctly to the MQTT Broker10:33:26.151 -> dhcp client start... 10:33:26.151 -> 341 TSM:INIT:GW MODE 10:33:26.199 -> 364 TSM:READY:ID=0,PAR=0,DIS=0 10:33:26.199 -> 396 MCO:REG:NOT NEEDED 10:33:26.339 -> 505 GWT:TPC:CONNECTING... 10:33:27.365 -> 1533 MCO:BGN:STP 10:33:27.365 -> 1551 MCO:BGN:INIT OK,TSP=1 10:33:27.412 -> 1579 TSM:READY:NWD REQ 10:33:27.412 -> 1606 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK: 10:33:28.671 -> scandone 10:33:35.993 -> pm open,type:2 0 10:33:44.664 -> 18861 TSF:MSG:READ,254-254-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 10:33:44.758 -> 18924 TSF:MSG:BC 10:33:44.758 -> 18942 TSF:MSG:FPAR REQ,ID=254 10:33:44.804 -> 18973 TSF:PNG:SEND,TO=0 10:33:44.804 -> 18998 TSF:CKU:OK 10:33:44.851 -> 19016 TSF:MSG:GWL OK 10:33:45.459 -> 19646 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 10:33:46.671 -> 20876 TSF:MSG:READ,254-254-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 10:33:46.766 -> 20939 TSF:MSG:PINGED,ID=254,HP=1 10:33:46.813 -> 20980 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1 10:33:46.860 -> 21057 TSF:MSG:READ,254-254-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100This is working correctly
10:36:34.908 -> dhcp client start... 10:36:37.655 -> ip:192.168.1.202,mask:255.255.255.0,gw:192.168.1.254 10:36:37.702 -> 7014 GWT:TPC:IP=192.168.1.202 10:36:37.702 -> 7100 GWT:RMQ:CONNECTING... 10:36:37.749 -> 7144 GWT:RMQ:OK 10:36:37.795 -> 7161 GWT:TPS:TOPIC=mygateway4-out/0/255/0/0/18,MSG SENT 10:36:44.792 -> pm open,type:2 0 10:38:56.629 -> 146027 TSF:MSG:READ,254-254-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 10:38:56.723 -> 146091 TSF:MSG:BC 10:38:56.723 -> 146109 TSF:MSG:FPAR REQ,ID=254 10:38:56.770 -> 146142 TSF:PNG:SEND,TO=0 10:38:56.770 -> 146168 TSF:CKU:OK 10:38:56.816 -> 146187 TSF:MSG:GWL OK 10:38:57.655 -> 147013 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 10:38:58.683 -> 148042 TSF:MSG:READ,254-254-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 10:38:58.730 -> 148105 TSF:MSG:PINGED,ID=254,HP=1 10:38:58.776 -> 148148 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1 10:38:58.869 -> 148226 TSF:MSG:READ,254-254-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 10:38:58.916 -> 148294 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 10:38:59.010 -> 148375 TSF:MSG:READ,254-254-0,s=255,c=0,t=17,pt=0,l=11,sg=0:2.4.0-alpha 10:38:59.058 -> 148450 GWT:TPS:TOPIC=mygateway4-out/254/255/0/0/17,MSG SENT 10:38:59.151 -> 148515 TSF:MSG:READ,254-254-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0 10:38:59.197 -> 148578 GWT:TPS:TOPIC=mygateway4-out/254/255/3/0/6,MSG SENT 10:39:00.923 -> 150319 TSF:MSG:READ,254-254-0,s=255,c=3,t=11,pt=0,l=14,sg=0:MockMySensors 10:39:01.017 -> 150398 GWT:TPS:TOPIC=mygateway4-out/254/255/3/0/11,MSG SENT 10:39:01.064 -> 150462 TSF:MSG:READ,254-254-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5 10:39:01.157 -> 150529 GWT:TPS:TOPIC=mygateway4-out/254/255/3/0/12,MSG SENT 10:39:01.949 -> 151337 TSF:MSG:READ,254-254-0,s=1,c=0,t=0,pt=0,l=12,sg=0:Outside Door 10:39:02.044 -> 151410 GWT:TPS:TOPIC=mygateway4-out/254/1/0/0/0,MSG SENT 10:39:02.091 -> 151471 TSF:MSG:READ,254-254-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2 10:39:02.184 -> 151542 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1 10:39:02.699 -> 152055 TSF:MSG:READ,254-254-0,s=255,c=3,t=0,pt=1,l=1,sg=0:83@hard-shovel My MQTT broker does not require them. Should I uncomment and leave them blank?
-
@hard-shovel My MQTT broker does not require them. Should I uncomment and leave them blank?
@OldSurferDude You should leave them commented if not required.
I have just tested with a new install on windows of mosquitto with config file for anonymous access and it is working fine with them commented out.
what do your gateway debug logs look like?
-
@OldSurferDude have you set the MQTT user and MQTT passwords in the sketch and uncommented them as well?
// Enable these if your MQTT broker requires usenrame/password //#define MY_MQTT_USER "username" //#define MY_MQTT_PASSWORD "password"// Enable these if your MQTT broker requires usenrame/password #define MY_MQTT_USER "MQTTusername2022" #define MY_MQTT_PASSWORD "MQTTpassword2022"what does your debug log look like?
This sample is not connected correctly to the MQTT Broker10:33:26.151 -> dhcp client start... 10:33:26.151 -> 341 TSM:INIT:GW MODE 10:33:26.199 -> 364 TSM:READY:ID=0,PAR=0,DIS=0 10:33:26.199 -> 396 MCO:REG:NOT NEEDED 10:33:26.339 -> 505 GWT:TPC:CONNECTING... 10:33:27.365 -> 1533 MCO:BGN:STP 10:33:27.365 -> 1551 MCO:BGN:INIT OK,TSP=1 10:33:27.412 -> 1579 TSM:READY:NWD REQ 10:33:27.412 -> 1606 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK: 10:33:28.671 -> scandone 10:33:35.993 -> pm open,type:2 0 10:33:44.664 -> 18861 TSF:MSG:READ,254-254-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 10:33:44.758 -> 18924 TSF:MSG:BC 10:33:44.758 -> 18942 TSF:MSG:FPAR REQ,ID=254 10:33:44.804 -> 18973 TSF:PNG:SEND,TO=0 10:33:44.804 -> 18998 TSF:CKU:OK 10:33:44.851 -> 19016 TSF:MSG:GWL OK 10:33:45.459 -> 19646 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 10:33:46.671 -> 20876 TSF:MSG:READ,254-254-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 10:33:46.766 -> 20939 TSF:MSG:PINGED,ID=254,HP=1 10:33:46.813 -> 20980 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1 10:33:46.860 -> 21057 TSF:MSG:READ,254-254-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100This is working correctly
10:36:34.908 -> dhcp client start... 10:36:37.655 -> ip:192.168.1.202,mask:255.255.255.0,gw:192.168.1.254 10:36:37.702 -> 7014 GWT:TPC:IP=192.168.1.202 10:36:37.702 -> 7100 GWT:RMQ:CONNECTING... 10:36:37.749 -> 7144 GWT:RMQ:OK 10:36:37.795 -> 7161 GWT:TPS:TOPIC=mygateway4-out/0/255/0/0/18,MSG SENT 10:36:44.792 -> pm open,type:2 0 10:38:56.629 -> 146027 TSF:MSG:READ,254-254-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 10:38:56.723 -> 146091 TSF:MSG:BC 10:38:56.723 -> 146109 TSF:MSG:FPAR REQ,ID=254 10:38:56.770 -> 146142 TSF:PNG:SEND,TO=0 10:38:56.770 -> 146168 TSF:CKU:OK 10:38:56.816 -> 146187 TSF:MSG:GWL OK 10:38:57.655 -> 147013 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 10:38:58.683 -> 148042 TSF:MSG:READ,254-254-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 10:38:58.730 -> 148105 TSF:MSG:PINGED,ID=254,HP=1 10:38:58.776 -> 148148 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1 10:38:58.869 -> 148226 TSF:MSG:READ,254-254-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 10:38:58.916 -> 148294 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 10:38:59.010 -> 148375 TSF:MSG:READ,254-254-0,s=255,c=0,t=17,pt=0,l=11,sg=0:2.4.0-alpha 10:38:59.058 -> 148450 GWT:TPS:TOPIC=mygateway4-out/254/255/0/0/17,MSG SENT 10:38:59.151 -> 148515 TSF:MSG:READ,254-254-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0 10:38:59.197 -> 148578 GWT:TPS:TOPIC=mygateway4-out/254/255/3/0/6,MSG SENT 10:39:00.923 -> 150319 TSF:MSG:READ,254-254-0,s=255,c=3,t=11,pt=0,l=14,sg=0:MockMySensors 10:39:01.017 -> 150398 GWT:TPS:TOPIC=mygateway4-out/254/255/3/0/11,MSG SENT 10:39:01.064 -> 150462 TSF:MSG:READ,254-254-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5 10:39:01.157 -> 150529 GWT:TPS:TOPIC=mygateway4-out/254/255/3/0/12,MSG SENT 10:39:01.949 -> 151337 TSF:MSG:READ,254-254-0,s=1,c=0,t=0,pt=0,l=12,sg=0:Outside Door 10:39:02.044 -> 151410 GWT:TPS:TOPIC=mygateway4-out/254/1/0/0/0,MSG SENT 10:39:02.091 -> 151471 TSF:MSG:READ,254-254-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2 10:39:02.184 -> 151542 TSF:MSG:SEND,0-0-254-254,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1 10:39:02.699 -> 152055 TSF:MSG:READ,254-254-0,s=255,c=3,t=0,pt=1,l=1,sg=0:83@hard-shovel This is what I'm getting (with no nodes connecting to gateway)
MCO:BGN:INIT GW,CP=RNNGE---,FQ=80,REL=255,VER=2.3.2 117 TSF:LRT:OK 133 TSM:INIT 147 TSF:WUR:MS=0 170 TSM:INIT:TSP OK 191 TSM:INIT:GW MODE 213 TSM:READY:ID=0,PAR=0,DIS=0 245 MCO:REG:NOT NEEDED scandone 1322 GWT:TIN:CONNECTING... 2351 GWT:TIN:CONNECTING... scandone state: 0 -> 2 (b0) 4097 GWT:TIN:CONNECTING... state: 2 -> 3 (0) state: 3 -> 5 (10) add 0 aid 1 cnt connected with Automation, channel 9 dhcp client start... ip:192.168.1.30,mask:255.255.255.0,gw:192.168.1.193 4316 GWT:TIN:IP: 192.168.1.30 4355 GWT:TIN:ETH OK 4378 MCO:BGN:STP 4396 MCO:BGN:INIT OK,TSP=1 4424 TSM:READY:NWD REQ 4451 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK: pm open,type:2 0And this comes when a node connects:
197868 TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 197928 TSF:MSG:BC 197947 TSF:MSG:FPAR REQ,ID=2 197977 TSF:PNG:SEND,TO=0 198003 TSF:CKU:OK 198022 TSF:MSG:GWL OK 198460 TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 200006 TSF:MSG:READ,2-2-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 200065 TSF:MSG:PINGED,ID=2,HP=1 200106 TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1 200244 TSF:MSG:READ,2-2-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 200309 TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 200385 TSF:MSG:READ,2-2-0,s=255,c=0,t=17,pt=0,l=5,sg=0:2.3.2 200456 GWT:TSA:ETH OK 200481 TSF:MSG:READ,2-2-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0 200545 GWT:TSA:ETH OK 202529 TSF:MSG:READ,2-2-0,s=255,c=3,t=11,pt=0,l=15,sg=0:BatMoistHumTemp 202611 GWT:TSA:ETH OK 202636 TSF:MSG:READ,2-2-0,s=255,c=3,t=12,pt=0,l=9,sg=0: 0.01 202710 GWT:TSA:ETH OK 202885 TSF:MSG:READ,2-2-0,s=0,c=0,t=35,pt=0,l=0,sg=0: 202948 GWT:TSA:ETH OK 203141 TSF:MSG:READ,2-2-0,s=1,c=0,t=7,pt=0,l=0,sg=0: 203203 GWT:TSA:ETH OK 203396 TSF:MSG:READ,2-2-0,s=2,c=0,t=6,pt=0,l=0,sg=0: 203458 GWT:TSA:ETH OK 203651 TSF:MSG:READ,2-2-0,s=3,c=0,t=30,pt=0,l=0,sg=0: 203713 GWT:TSA:ETH OK 203925 TSF:MSG:READ,2-2-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2 203992 TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1 204128 TSF:MSG:READ,2-2-0,s=255,c=3,t=0,pt=1,l=1,sg=0:100 204199 GWT:TSA:ETH OK 204407 TSF:MSG:READ,2-2-0,s=3,c=1,t=38,pt=7,l=5,sg=0:6.52 204475 GWT:TSA:ETH OK 204542 TSF:MSG:READ,2-2-0,s=0,c=1,t=37,pt=2,l=2,sg=0:1023 204610 GWT:TSA:ETH OK