Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device unavailable - does not respond to energy usage requests #273

Open
Bonabrux opened this issue Nov 23, 2024 · 8 comments
Open

Device unavailable - does not respond to energy usage requests #273

Bonabrux opened this issue Nov 23, 2024 · 8 comments
Labels
device issue Issue is due to device limitation

Comments

@Bonabrux
Copy link

Bonabrux commented Nov 23, 2024

Hello,
first of all, thanks for your great work.
I've two Midea AC, one of them works correctly, and for the other it works for "seconds" before it goes unavailable, I tried all the suggestions about adjusting the connection time, without any luck.
So, when doing some in deep check in log files I found this:

2024-11-12 19:33:43.089 INFO (MainThread) [custom_components.midea_ac] Starting midea-ac-py for device ID 14293651214782 (10.100.200.222:6444). Using msmart-ng version 2024.9.0.
2024-11-12 19:33:43.089 INFO (MainThread) [msmart.lan] Creating new connection to 10.100.200.222:6444.
2024-11-12 19:33:43.091 INFO (MainThread) [msmart.lan] Authenticating with 10.100.200.222:6444.
2024-11-12 19:33:43.526 INFO (MainThread) [msmart.lan] Authentication with 10.100.200.222:6444 successful. Expiration: 2024-11-13T10:33:43+00:00, Local key: 73e6ddea5fac44102a7ef678acd679e8baf71cba60f3c18b3c49e82ecf589c8a
2024-11-12 19:33:44.528 INFO (MainThread) [custom_components.midea_ac] Querying capabilities for device ID 14293651214782.
2024-11-12 19:33:46.648 ERROR (MainThread) [msmart.device.AC.device] Payload '1eacb200000000000d010103dec8640aff000001' failed CRC and checksum. Received: 0x1, Expected: 0x13 or 0x5F.
2024-11-12 19:33:46.649 ERROR (MainThread) [msmart.device.AC.device] Failed to query capabilities from 10.100.200.222:6444.

As soon as the Checksum error comes for the Capabilities Query, the device goes unavailable. A simple "integration reload" triggers it back to normal for a few seconds again... and so far, so on.

Checking more in deep in HA logs I also figured that right after this checksum error, a connection error to the device is shown:
Network timeout 10.100.200.222:6444: No response from host.
No response from 10.100.200.222:6444 in 6.010000 seconds.
No response from 10.100.200.222:6444 in 6.000000 seconds.
Network timeout 10.100.200.222:6444: Read cancelled.
No response from 10.100.200.222:6444 in 2.450000 seconds.

Just to be clear, there is no network issue to that IP address, and indeed other integrations do work with it.

  • I'm running the latest version of the pulgin 2024.10.4

Do you have any idea about how to fix this? let me know if you need any extra information from my side.

Thanks

@mill1000
Copy link
Owner

Hi, could you provide full debug logs for a timespan of about 5 minutes? The capability request failing shouldn't be a fatal event so something else must be wrong.

@mill1000 mill1000 added the need more info Further information is requested label Nov 25, 2024
@Bonabrux
Copy link
Author

msmart_logs.zip
Sure, here you have a log of about 10 minutes... the device with issues is the one with IP address 10.100.200.222, as you might see, during the debug creating time the integration was alternating between "working" and "unavailable".

Let me know if I can help in anything else.

@mill1000
Copy link
Owner

It appears the device in question (10.100.200.222) doesn't support the energy usage request and is ignoring it which causes the device to timeout.

Try disabling the power and energy sensors on the device.

Something similar happened in #188 with respect to humidity and here as well: #198

@mill1000 mill1000 added device issue Issue is due to device limitation and removed need more info Further information is requested labels Nov 26, 2024
@Bonabrux
Copy link
Author

Bonabrux commented Nov 28, 2024

Hi @mill1000. You're totally right. Disabling the power sensor fixed the constant disconnection... However, testing over the time I still see some random disconnection of both devices (as the classical report you already now, where there is a temp disconnection every 3-4 hours). I tried several different connection time outs like 45, 60, 90, 120 and the issue is still there.

If I start a debug collecting for a few hours until I catch one of those issues, are you willing to check it ?

@mill1000
Copy link
Owner

Absolutely, I'd be glad to take a look

@mill1000 mill1000 changed the title Smart AC goes offline because of falice checksum check when checking Capabilities Device unavailable - does not respond to energy usage requests Dec 3, 2024
@Bonabrux
Copy link
Author

Bonabrux commented Dec 5, 2024

Hey @mill1000 sorry for the late, it's being a though week over here.

So, I was finally able to catch one of those disconnection events and contrast them with debug information.

I'm attaching here the screenshot where we see the device going unavailable at 00:17:50, and the debug information for exactly that time frame.

debug-info-mideaAC_LAN.txt
Captura de pantalla 2024-11-30 103124

@mill1000
Copy link
Owner

mill1000 commented Dec 6, 2024

Could you provide the full debug log and not the trimmed version?

@Bonabrux
Copy link
Author

Sure, here is the complete file
home-assistant_midea_ac_2024-11-30T13-31-01.958Z.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
device issue Issue is due to device limitation
Projects
None yet
Development

No branches or pull requests

2 participants