dzungpv / mitsubishi2MQTT

Mitsubishi to MQTT with ESP8266/ESP32 module
GNU General Public License v3.0
68 stars 13 forks source link

Reboot required every ~15 hours #23

Closed lrgabriel closed 5 months ago

lrgabriel commented 6 months ago

Hello again - thank you for looking!

I have three MSZ-GL12NAs with Wemos D1 Mini Clones running 2023.12.4, controlled from Home Assistant over MQTT. This works great, except:

They all stop responding after being up for 15 hours, plus or minus 20 minutes. All three of them do this, and it's very repeatable.

When they are offline, an MQTT browser shows mitsubishi2mqtt/hvac-backbedroom/availability = offline. The webpage still responds fine, and the Status page shows green CONNECTED for both HVAC and MQTT Status.

Clicking REBOOT fixes it for another 15 hours.

Is there anything I can do to fix this, or help troubleshoot it further?

At the moment, I have a watchdog that calls http://xxx.xxx.xxx.xxx/?REBOOT= when the entity become available.

Thank you again!

dzungpv commented 6 months ago

I have 2 esp8266 Wemos D1 mini running latest version for more than 60 days without reboot, you can monitor uptime in the status page or in Home Assistant. You problem may be the wifi signal or the ESPs itself. Esp8266 limit memory so change the way you monitor it like monitor offline state. This is the screenshot, ESP8266 counter show negative when it overflow after 50 days.

Untitled

dzungpv commented 6 months ago

But I am running old version, a guy push some code may fix the issue, you can download the snapshot here https://github.com/dzungpv/mitsubishi2MQTT/actions/runs/8261852251 update and test if it OK report back to me.

dzungpv commented 6 months ago

CI failed for PlatformIO, you can download it here https://github.com/dzungpv/mitsubishi2MQTT/actions/runs/8262169721

lrgabriel commented 6 months ago

CI failed for PlatformIO, you can download it here https://github.com/dzungpv/mitsubishi2MQTT/actions/runs/8262169721

25 hours of uptime and stable so far!

I noticed @SpencerMichaels was having problems every 7.5 hours publishing remote temperature readings every 30 seconds. I was publishing remote temp every minute and having the same MQTT disconnect every 15 hours--this looks like the same issue, and it looks like the fix works!

Thank you for helping me with this--I really appreciate it.

dzungpv commented 5 months ago

@lrgabriel I will close this issue, you can re-open it if still have problem.

pzbitskiy commented 2 months ago

I had a "similar" problem running without MQTT. Status page showed "free heap" went down from 42% to 22% in an hour and the Control and Setup/Unit were not able to open. Other pages were OK, /event kept reporting events. I made a fix for my case in #29 but I suspect there is a memory leak somewhere, and as soon as you get 15h * 60 req/h =~ 900 requests it stops working similar to mine.