AdyRock / SwitchBotBLEHub

Code for a ESP32, Arduino compatible board to make into to a network local hub for SwichBot BLE devices.
GNU General Public License v3.0
9 stars 0 forks source link

ESP32 module stops working after one day in use #6

Open BerndGaykema opened 1 month ago

BerndGaykema commented 1 month ago

After a reboot the ESP32-hub works great. All devices within range (on a much larger distance than Homey Pro 2023) react fast. But before the 24 hours have passed the commands from Homey do no longer reach the curtains.

I use version 2.1 (loaded this version via OTA programming, file description says "Reset when memory below 20k".

I have 2x ESP32 in use with your hub-firmware. As a work-around I now have added a mechanical time switch to each of the power supplies which toggles the power every 12 hours for 15 minutes (both on different hours so that there is always a hub active). Problem "solved".....

If you have the time and want to challence this issue, please let me test new drops.

AdyRock commented 1 month ago

I am working on it, trying to improve the auto-reboot. I still haven't tracked down where the memory goes, but I think it's in the BLE library.

AdyRock commented 1 month ago

I have uploaded new code and the binary.

BerndGaykema commented 1 month ago

Thanks.

I have loaded the two ESP32 hubs and it is working again, but time will tell if it keeps working over a day. I will keep you posted.

With your previous solution the hubs stopped working at all. It was possible to view all BLE devices but the communication with Homey seems broken. Only the curtain directly working with the Homey Pro base was moving, the rest was frozen. A power cycle did not help.

AdyRock commented 1 month ago

I have seen on a couple of occasions the ESP32 send the notifications to Homey but Homey just rejects them with error code 400. On the occasions the only fix was to reboot the ESP32. I have assumed it is down to the same memory issue, so the ESP32 fails to format the data correctly.

BerndGaykema commented 1 month ago

For the last couple of days I don't see any problems. Both ESP32-hubs I use keep working correctly. My curtains open and close when Homey tells them to do so. THANK YOU !!!

BerndGaykema commented 2 weeks ago

Hmmm, Yesterday September 18, 2024, the ESP32 unit stopped working. It was impossible to address the unit by its IP-address. A simple power cycle was enough to have a working hub again. Just FYI. I will monitor and come back when it fails again.