Replies: 20 comments
-
This is Ethernet correct? And you can confirm this happens all the time, so from the EMS-ESP web page click on 'Restart' it will not connect to the MQTT server and you'll see these errors in the Console log? |
Beta Was this translation helpful? Give feedback.
-
All the time. In console no errors. |
Beta Was this translation helpful? Give feedback.
-
No errors on ethernet. The same situation when i'm connected via wifi. This time only ethernet. faster and more stable, and more bandwith :) |
Beta Was this translation helpful? Give feedback.
-
I can't reproduce. You will need to compile the code yourself and use the debug flags (see pio_local.ini_example) and watch the MQTT client logs in the serial console. |
Beta Was this translation helpful? Give feedback.
-
I installed ha some days ago (next to my ioBroker installation) for test. I observed MQTT problems as well. My ems-esp system still reboots after a while (some 3 to 5 days in the moment). Last time this night. When restarting from web-ui everything works fine. I will further observe the MQTT stability ... |
Beta Was this translation helpful? Give feedback.
-
Same issue here, MQTT stops working after some time and can only be enabled by switching on/off the MQTT. |
Beta Was this translation helpful? Give feedback.
-
@mtc716 anything happen up to this point? i.e. wifi reconnected, MQTT broker restarted etc... |
Beta Was this translation helpful? Give feedback.
-
Nothing at all. It happens just randomly during normal operation. Sometimes after 1 day, sometimes after 2-4 days. |
Beta Was this translation helpful? Give feedback.
-
if the MQTT disconnects there should be an INFO log message. Do you see this in the system log? If it happens after a few days its easier to use a SysLog server to capture the logs. In the next build I'll change it to Warning to make it easier to spot. |
Beta Was this translation helpful? Give feedback.
-
Will check for it and I guess it should reoccure latest tomorrow.... |
Beta Was this translation helpful? Give feedback.
-
It happened again and just before the disconnect, the WiFi was disconnected according to the logs.... 2022-07-20 09:26:38.109 INFO 18305: [emsesp] WiFi connection dropped, stopping NTP |
Beta Was this translation helpful? Give feedback.
-
thanks for checking. The reason for the wifi says "WIFI_REASON_AUTH_LEAVE" which doesn't tell us much. Your wifi is down for about 4 minutes. I'll run some tests here again to see if the MQTT reconnects when the wifi is off for a long period. |
Beta Was this translation helpful? Give feedback.
-
I can't reproduce. I used connected the EMS-ESP to a Wifi AP, then switched off the AP and back on after a few minutes. As soon as the WiFi reconnected so did MQTT. @mtc716 could you share your MQTT settings in EMS-ESP? Are you using authentication, clean session.... |
Beta Was this translation helpful? Give feedback.
-
I even had it a second time today. Settings for MQTT are below: |
Beta Was this translation helpful? Give feedback.
-
Can you try the latest beta? Looks like you're using an older firmware. Not sure it'll make a difference but worth trying. The problem we need to fix is why EMS-ESP loses the WiFi connectivity. The system information we need you can download from the Help page. |
Beta Was this translation helpful? Give feedback.
-
The problem occured with the latest Beta 3.4.2b3. I switched today back to 3.4.1 to check If it happens as well... Do you need the debug information? |
Beta Was this translation helpful? Give feedback.
-
ah ok. The emsesp_info.txt file which you can download from the Help page (latest beta) would be useful as it shows the settings and also your WiFi strength (called RSSI). If the WiFi is unstable you can try playing with the settings like using a lower bandwidth or turning on nosleep. |
Beta Was this translation helpful? Give feedback.
-
could the instability come from the mqtt broker? Since I installed a new mqtt broker within homeassistant as add in it seem to be stable now and reconnect works |
Beta Was this translation helpful? Give feedback.
-
the file can be found below. As you will see the RSSI is good and by the way, it worked since month at the same location. The difference is just the sw-version. If I can be of any further help, let me know. |
Beta Was this translation helpful? Give feedback.
-
I am using already the internal mqtt broker of homeassistant and there has been no change since month. |
Beta Was this translation helpful? Give feedback.
-
After software restart doesn't start automatic mqtt connection - I must to go to mqtt settings tab, click save, than mqtt connects to my ha server. On previous versions - no problem - only in 3.4.2b2. No hardware changes beetween present and previous version. No errors in log.
Beta Was this translation helpful? Give feedback.
All reactions