Closed pedrogense closed 5 years ago
I'm having the same problem, did you fix that?
nevermind, restart the esp32 and worked again
@pedrogense: Do these messages actually have any functional impact or do you still see the measurements? It looks to me like the ESP32 is going to deep sleep and mosquitto eventually complains about a timeout. We could properly log off from mosquitto before going to sleep, but that would potentially waste precious battery power...
I am also experiencing the same issue. Only changes to config are MACS for sensors, WIFI credentials and MQTT credentials.
1550212766: New connection from 3.14.1.191 on port 1883. 1550212766: New client connected from 3.14.1.191 as miflora-client (c1, k15, u''). 1550212766: Sending CONNACK to miflora-client (0, 0) 1550212787: Client miflora-client has exceeded timeout, disconnecting. 1550212787: Socket error on client miflora-client, disconnecting.
No data from the sensors is published to MQTT.
Problem might be the wrong order of two lines of code. Wifi gets disconnected before the mqtt client is disconnected. Just have a look at the lines 366 and 367
Didn't test it so far. Will test it tomorrow on my own.
Let me know what comes out of it.
Seems to only partly fix the issue. I will debug the problem a bit more in detail.
Did some debugging. Seems that the communication to the flora-devices gets stuck quite often. This causes that the forced hibernate triggers and nothing is being disconnected gracefully. 1 successful out of 15 reads for both configured floras is not such a good rate.
Thats not a good rate, i can see that it not always updates, i have mutiple esp's on different levels in my house. Do you think you can fix it?
I am not sure. At the moment I am thinking about starting a new project (with a bit of a different idea) for this task. But before doing so I will dig a bit around and give it one last try.
Just started my own implementation and noticed that I am facing the same problem. Reason seems to be the concurrent connection to wifi. So if we want to have successful reads we have to change the concept a bit.
Cannot it be connect tru wifi all the time?
In case of an active connection to WiFi the ESP will quite often get stuck during reading the Floras. This leads to the forced hibernate and results in the harsh disconnect from MQTT and WiFi.
I also organized another type of ESP32 and tried it. Also no success. => I am stopping the active investigations here and switch to my alternative implementation.
I already stopped to use this, i recently found esphome integration and it works how it looks for now.
Im having this error in my mosquitto broker on home assistant
1543960126: New client connected from 192.168.1.61 as xiaomiflora-client (c1, k15, u'peke'). 1543960148: Client xiaomiflora-client has exceeded timeout, disconnecting. 1543960148: Socket error on client xiaomiflora-client, disconnecting.
My config: // sleep between to runs in seconds
define SLEEP_DURATION 60 * 60
// emergency hibernate countdown in seconds
define EMERGENCY_HIBERNATE 1 * 60
// how often should the battery be read - in run count
define BATTERY_INTERVAL 2
// how often should a device be retried in a run when something fails
define RETRY 5
and for mqtt: const int MQTT_RETRY_WAIT = 5000;
Can someone point me in the right direction