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
91 stars 5 forks source link

[152832116461697] Unknown error #49

Open Dino0005 opened 4 weeks ago

Dino0005 commented 4 weeks ago

HA core version

2024.5.5

Integration version

v0.4.0 (even if in the manifest.json file the version reported is v0.4.0-alpha)

Device type and model

Air Conditioner 00000Q18 (44204)

Used App

MSartHome and Home Assistant

The description of problem

Registratore: midealocal.device Fonte: /usr/local/lib/python3.12/site-packages/midealocal/device.py:397 Prima occorrenza: 11:47:39 (1 occorrenze) Ultima registrazione: 11:47:39

[152832116461697] Unknown error :/usr/local/lib/python3.12/site-packages/midealocal/device.py, 378, Exception('not an 8370 message')

the same error also occurred with previous versions of Midea AC Lan, which I reported here: https://github.com/CyrielRct/midea_ac_lan/issues/8#issue-2278947288

The logs

2024-05-31 11:47:39.529 ERROR (AC Tavernetta) [midealocal.device] [152832116461697] Unknown error :/usr/local/lib/python3.12/site-packages/midealocal/device.py, 378, Exception('not an 8370 message')

home-assistant_midea_ac_lan_2024-05-31T17-03-43.741Z.log

rokam commented 3 weeks ago

It looks like it is expecting a v3 message but receiving another protocol type. Is your AC a v3 one? How have you configured it? By discover?

Dino0005 commented 3 weeks ago

After adding it to MSartHome, I added it to Home Assistant with "Automatically Discover" option (Midea AC LAN v.0.3.22)

in Home Assistant, this is shown on the device information page: Air Conditioner 00000Q18 (44204) from Midea.

...despite this error, the appliance works normally.

chemelli74 commented 3 days ago

Hi @Dino0005 , can you please update to latest and report back if the error is still there ?

Xeyrruken commented 3 days ago

Hi @Dino0005 , can you please update to latest and report back if the error is still there ?

I'm having the same issue on the latest build.

chemelli74 commented 3 days ago

Please attach a fresh debug log

Xeyrruken commented 3 days ago

Please attach a fresh debug log

I'm trying to add a new device. With auto discovery function.

File "/config/custom_components/midea_ac_lan/config_flow.py", line 478, in async_step_manually self._save_device_config(data) File "/config/custom_components/midea_ac_lan/config_flow.py", line 128, in _save_device_config record_file = Path(storage_path, data[CONF_DEVICE_ID], ".json") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

image

wuwentao commented 2 days ago

Please attach a fresh debug log

I'm trying to add a new device. With auto discovery function.

File "/config/custom_components/midea_ac_lan/config_flow.py", line 478, in async_step_manually self._save_device_config(data) File "/config/custom_components/midea_ac_lan/config_flow.py", line 128, in _save_device_config record_file = Path(storage_path, data[CONF_DEVICE_ID], ".json") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

thanks, it's a known issue for add a new device . we have fixed it. Is this possible for you to clone current repo and copy all the file under custom_components/midea_ac_lan/

to your HA install path: /config/custom_components/midea_ac_lan/

once file replaced, reboot your HA and it should works.

it only can fix add new device error, and you still need to provide the debug log for your device error.

for how to enable debug log, please refer to DEBUG setting in the end of README.

Dino0005 commented 2 days ago

Hi @Dino0005 , can you please update to latest and report back if the error is still there ?

with version v0.4.2, after restarting Home Assistant, these are the logs

2024-06-25 20:55:29.198 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration midea_ac_lan which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-06-26 01:56:09.021 ERROR (AC Tavernetta) [midealocal.device] [152832116461697] Unknown error : /usr/local/lib/python3.12/site-packages/midealocal/device.py, 522
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/midealocal/device.py", line 522, in run
result = self.parse_message(msg)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/midealocal/device.py", line 339, in parse_message
messages, self._buffer = self._security.decode_8370(self._buffer + msg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/midealocal/security.py", line 338, in decode_8370
raise MessageWrongFormat("not an 8370 message")
midealocal.exceptions.MessageWrongFormat: not an 8370 message
2024-06-26 14:00:56.786 ERROR (AC Tavernetta) [midealocal.device] [152832116461697] Socket error - Connection closed by peer
wuwentao commented 2 days ago

Hi @Dino0005 , can you please update to latest and report back if the error is still there ?

with version v0.4.2, after restarting Home Assistant, these are the logs

2024-06-25 20:55:29.198 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration midea_ac_lan which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-06-26 01:56:09.021 ERROR (AC Tavernetta) [midealocal.device] [152832116461697] Unknown error : /usr/local/lib/python3.12/site-packages/midealocal/device.py, 522
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/midealocal/device.py", line 522, in run
result = self.parse_message(msg)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/midealocal/device.py", line 339, in parse_message
messages, self._buffer = self._security.decode_8370(self._buffer + msg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/midealocal/security.py", line 338, in decode_8370
raise MessageWrongFormat("not an 8370 message")
midealocal.exceptions.MessageWrongFormat: not an 8370 message
2024-06-26 14:00:56.786 ERROR (AC Tavernetta) [midealocal.device] [152832116461697] Socket error - Connection closed by peer

thanks, seems the message is error, and not include the original message info, so this is not enough. you should download your log file and attach it to current issue. we can check with the message content and detail error with the full log file.

Dino0005 commented 2 days ago

Hi @Dino0005 , can you please update to latest and report back if the error is still there ?

with version v0.4.2, after restarting Home Assistant, these are the logs

2024-06-25 20:55:29.198 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration midea_ac_lan which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-06-26 01:56:09.021 ERROR (AC Tavernetta) [midealocal.device] [152832116461697] Unknown error : /usr/local/lib/python3.12/site-packages/midealocal/device.py, 522
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/midealocal/device.py", line 522, in run
result = self.parse_message(msg)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/midealocal/device.py", line 339, in parse_message
messages, self._buffer = self._security.decode_8370(self._buffer + msg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/midealocal/security.py", line 338, in decode_8370
raise MessageWrongFormat("not an 8370 message")
midealocal.exceptions.MessageWrongFormat: not an 8370 message
2024-06-26 14:00:56.786 ERROR (AC Tavernetta) [midealocal.device] [152832116461697] Socket error - Connection closed by peer

thanks, seems the message is error, and not include the original message info, so this is not enough. you should download your log file and attach it to current issue. we can check with the message content and detail error with the full log file.

Hi @wuwentao, here is the log file home-assistant_midea_ac_lan_2024-06-27T07-41-07.187Z.log

wuwentao commented 1 day ago

@Dino0005 sorry, you didin't follow the debug step to enable the debug log ? or you have enabled it and not reboot your HA ?

the log is the same as previous txt info, no any debug log print.

please confirm you have enabled debug mode for both midea_ac_lan and midealocal or you forgot to reboot it .

Dino0005 commented 1 day ago

Sorry... actually after activating debug logging I didn't restart Home Assistant. Now I'll do it