wuwentao / midea_ac_lan

Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network.
MIT License
258 stars 11 forks source link

Device status unknown #231

Closed Yeahoover closed 2 months ago

Yeahoover commented 2 months ago

HA core version

2024.7.2

Current integration version

v0.5.2

Last known working integration version

v0.4.3

Device type and model

Dehumidifier 00000Q12 (0)

Used App

NetHome Plus

The description of problem

Hi there,

I have updated the integration and since then the device status switches to unknown more or less directly after a reload. I have removed the device and added it again. Some behavior. I switched on debug log and pasted what I found. I hope this is enough: Logger: midealocal.device Quelle: /usr/local/lib/python3.12/site-packages/midealocal/device.py:239 Erstmals aufgetreten: 11:21:16 (1 Vorkommnisse) Zuletzt protokolliert: 11:21:16

[153931628307436] Unknown error : /usr/local/lib/python3.12/site-packages/midealocal/device.py, 219 Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/midealocal/device.py", line 219, in connect self.refresh_status(wait_response=True) File "/usr/local/lib/python3.12/site-packages/midealocal/device.py", line 344, in refresh_status raise SocketException midealocal.exceptions.SocketException

Thanks!

The logs

Logger midealocal device.txt

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. πŸ‘―πŸ‘­πŸ»πŸ§‘β€πŸ€β€πŸ§‘πŸ‘«πŸ§‘πŸΏβ€πŸ€β€πŸ§‘πŸ»πŸ‘©πŸΎβ€πŸ€β€πŸ‘¨πŸΏπŸ‘¬πŸΏ


Title: Device status unknown

chemelli74 commented 2 months ago

Last known working integration version

last version before update

We need the version you was using, last is not an identifier.

The logs

Logger midealocal device.txt

We also need full debug log.

22kW commented 2 months ago

Same here midea.log

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. πŸ‘―πŸ‘­πŸ»πŸ§‘β€πŸ€β€πŸ§‘πŸ‘«πŸ§‘πŸΏβ€πŸ€β€πŸ§‘πŸ»πŸ‘©πŸΎβ€πŸ€β€πŸ‘¨πŸΏπŸ‘¬πŸΏ


Same here midea.log

chemelli74 commented 2 months ago

Use the thump up in the issue opening, no need to write "same here" is just overwhelming notifications.

Yeahoover commented 2 months ago

Sorry, first time I open an issue. I don't know the previous version I had. Is there a way to find it out without loading a backup? home-assistant_midea_ac_lan_2024-07-11T09-48-51.056Z.log

wuwentao commented 2 months ago

@Yeahoover firt of all: this device works well in previous midea_ac_lan ? all the device status and device control action can execute pass and works well? just to confirm you had used it to control device pass and control pass, not only add it pass.....

I'm not sure with your old configs and whethere you have edit some configs to got add device job pass.

so we can recheck with below steps:

  1. remove this device from HA web UI from midea_ac_lan
  2. you need to login HA terimal via ssh or just Terminal add-on from the web UI
  3. run this command cat /config/.storage/midea_ac_lan/153931628307436.json in ssh or Terminal
  4. copy the file content output and share it to us in current issue, also used as a config backup.
  5. continue delete this backup file with run rm -rf /config/.storage/midea_ac_lan/153931628307436.json

once it done, all the env is clear now, make sure you have enabled midea_ac_lan and midealocal debug log (got it from README in current repo), restart HA.

add your device and confirm it again.

it used to confirm you are not using an error configs file, for example, if your device is v3 and you just manual add it with v2, it still can add pass.

after got this check, if it still can't works, you can use HACS to rollback to a old version to confirm it again. you can select the version number via HACS--> Midea_AC_LAN --> redownload action in the right top of the page with three dot.

syntesys87 commented 2 months ago

home-assistant_midea_ac_lan_2024-07-11T14-30-49.268Z.log

This is my log with configuration: cat 142936511635146.json { "name": "Clima Cameretta", "device_id": 142936511635146, "type": 172, "protocol": 3, "ip_address": "192.168.1.26", "port": 6444, "model": "00000Q1C", "subtype": 44204, "token": "26A151DC3C4097927D79A8E630EF4B7BF6043D303965B2A1EC686042C8D5DED6E9772E6E14AC3BD368FCF85112BDE1DCCEEAC1FFAF9702A30BFFA89194C403B6", "key": "5EA160607FEB47ABAA2021387D00C1631F9AF8A444414453A1B51BDFB984973E" }#

From today, the climate stopped working, I don't know if the problem is related to some HA update or other, I also downgraded to 0.4.3 version (where all worked), but the refresh call crashes everything; on HA start the climate works, after a refresh they became unavailable; if I reload the device, for 30 seconds it works, but after auto refresh it became unavailable.

Yeahoover commented 2 months ago

Hi, sorry, I do not fully understand what you want me to do.

I restored a backup to get Home Assistant Core back to 2024.7.1 and this integration to v0.4.3 and it worked again (I get the status and I an execute actions on it). I only updated this integration to v0.5.2 and it shows the described error.

syntesys87 commented 2 months ago

I have HAOS version 2024.7.1, tried to redownload 0.4.3 version, full reboot and working.

rokam commented 2 months ago

https://github.com/rokam/midea-local/pull/217 should fix it

rokam commented 2 months ago

@syntesys87 is v0.5.3 working?

Yeahoover commented 2 months ago

@rokam I updated to v0.5.3 (and Home Assistant Core 2024.7.2), The status can now be read, but actions do not work. home-assistant_midea_ac_lan_2024-07-13T07-41-52.045Z.log

rokam commented 2 months ago

Can you please follow the instrutions from readme to enable debug?

Yeahoover commented 2 months ago

@rokam home-assistant_midea_ac_lan_2024-07-13T12-32-26.127Z.log

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. πŸ‘―πŸ‘­πŸ»πŸ§‘β€πŸ€β€πŸ§‘πŸ‘«πŸ§‘πŸΏβ€πŸ€β€πŸ§‘πŸ»πŸ‘©πŸΎβ€πŸ€β€πŸ‘¨πŸΏπŸ‘¬πŸΏ


@rokam home-assistant_midea_ac_lan_2024-07-13T12-32-26.127Z.log

rokam commented 2 months ago

@Yeahoover without complete logs we aren't able to identify the root cause of the issue. Your logs are partial and they have almost the same content.

Yeahoover commented 2 months ago

I switched the debug on as explained in the read me. I don't know what else to do. maybe somebody else can provide a log.

Yeahoover commented 2 months ago

@rokam I had to restore an older backup because my history suddenly stopped working. Backup was from before I ever had any issues with the integration. I upgraded Home Assistant Core to 2024.7.2 and after that the integration to v0.5.3. Everything works for me now (Status and Actions).

syntesys87 commented 2 months ago

@Yeahoover also for me seems working, launched from remote, I'll test in 5-6 hours at home.

eldonzo commented 2 months ago

I'm still having issues, even automatic configuration doesn't work well, it gives me same information for the two AC split I have... Unfortunately I don't have a working backup, any advice on how can I reset the situation to making it work again?

rokam commented 2 months ago

@eldonzo your error might be a different one. Please open an issue and attach a complete log.