kovapatrik / homebridge-midea-platform

Homebridge plugin for Midea devices
https://www.npmjs.com/package/homebridge-midea-platform
Apache License 2.0
29 stars 2 forks source link

After restart it works, but after some time it stops #91

Closed ageorgios closed 3 months ago

ageorgios commented 4 months ago
[7/2/2024, 6:16:46 AM] [midea-platform] [net_ac_497E] Create new socket, reconnect
[7/2/2024, 6:16:49 AM] [midea-platform] Socket error:
Error: connect EHOSTUNREACH 192.168.0.234:6444
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1605:16)
[7/2/2024, 6:16:49 AM] [midea-platform] Socket closed with error
[7/2/2024, 6:16:49 AM] [midea-platform] Socket error:
Error: connect EHOSTUNREACH 192.168.0.106:6444
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1605:16)
[7/2/2024, 6:16:49 AM] [midea-platform] Socket closed with error
[7/2/2024, 6:16:50 AM] [midea-platform] [net_ac_CE46] Create new socket, reconnect
[7/2/2024, 6:16:53 AM] [midea-platform] Socket error:
Error: connect EHOSTUNREACH 192.168.0.226:6444
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1605:16)
[7/2/2024, 6:16:53 AM] [midea-platform] Socket closed with error
kovapatrik commented 4 months ago

My first guess is that your router's DHCP server assigns a new IP to the device after some time, so it cannot be reached. Could you please check if this is the case?

booruce commented 4 months ago

Have the same issue. I have DHCP reservation set so it’s always using the same IP. Also tried setting a local IP in the plugin config but it still eventually disconnects after a couple days

kovapatrik commented 4 months ago

Do you actively use the AC? One thing that I noticed is the ACs cannot even be discovered after they didn't receive any command for a time.

booruce commented 4 months ago

Yes I do, when i check the logs it looks like it does recover from socket errors automatically. But after a few days it doesn't seem to recover?

[11/07/2024, 16:44:05] [midea-platform] Socket error: Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:217:20) [11/07/2024, 16:44:05] [midea-platform] [Living Room Air Conditioner | run] Error reading from socket: Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:217:20) [11/07/2024, 16:44:05] [midea-platform] Socket closed with error [11/07/2024, 16:44:05] [midea-platform] [Living Room Air Conditioner] Create new socket, reconnect [11/07/2024, 17:38:47] [midea-platform] Socket error: Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:217:20) [11/07/2024, 17:38:47] [midea-platform] [Living Room Air Conditioner | run] Error reading from socket: Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:217:20) [11/07/2024, 17:38:47] [midea-platform] Socket closed with error [11/07/2024, 17:38:47] [midea-platform] [Living Room Air Conditioner] Create new socket, reconnect [11/07/2024, 18:17:08] [midea-platform] [Living Room Air Conditioner] Set device attribute POWER to: false

kovapatrik commented 4 months ago

I would need more information to debug this as my unit doesn't behave like you described. Could you please turn on debug logging in the plugin config (the verbose, logRecoverableErrors fields should be enabled) and also enable debug mode in your Homebridge instance?

kovapatrik commented 3 months ago

Any news on this one?

booruce commented 3 months ago

Any news on this one?

oddly i haven't had this issue for a while now. and i haven't even been using the AC lately as the weather is getting cooler.

kovapatrik commented 3 months ago

I will close this then now, but feel free to open this again or open a new ticket if it happens again.