krahabb / meross_lan

Home Assistant integration for Meross devices
MIT License
387 stars 46 forks source link

mrs100 KeyError('togglex') in NamespaceHandler(Appliance.Control.ToggleX)._handle_list: payload={'channel': 0} #447

Closed dragonjon closed 3 weeks ago

dragonjon commented 4 weeks ago

All is working in 3 same devices types, but.... now hundreds of messages in system log KeyError('Appliance.Control.ToggleX') in NamespaceHandler(Appliance.System.All)

Registrador: custom_components.merosslan.mrs100###############################9 Fuente: custom_components/meross_lan/helpers/init.py:267 integración: Meross LAN (documentación, problemas) Ocurrió por primera vez: 12:14:18 (247 ocurrencias) Último inicio de sesión: 12:35:24

KeyError('togglex') in NamespaceHandler(Appliance.Control.ToggleX)._handle_list: payload={'channel': 0}

2024-06-06 13:10:04.568 WARNING (MainThread) [custom_components.merosslan.mrs100##############################10] KeyError('togglex') in NamespaceHandler(Appliance.Control.ToggleX)._handle_list: payload={'channel': 0} 2024-06-06 13:10:15.830 WARNING (MainThread) [custom_components.merosslan.mrs100###############################9] KeyError('togglex') in NamespaceHandler(Appliance.Control.ToggleX)._handle_list: payload={'channel': 0} 2024-06-06 13:10:15.911 WARNING (MainThread) [custom_components.merosslan.mrs100###############################8] KeyError('togglex') in NamespaceHandler(Appliance.Control.ToggleX)._handle_list: payload={'channel': 0} 2024-06-06 13:10:34.682 WARNING (MainThread) [custom_components.merosslan.mrs100##############################10] KeyError('togglex') in NamespaceHandler(Appliance.Control.ToggleX)._handle_list: payload={'channel': 0}

config_entry-meross_lan-9ae0e342435cc0684cf433bf81d59dc7.json

krahabb commented 4 weeks ago

@dragonjon, This mrs100 replies with a really 'malformed' message and that's why the log. As for why this malformed message comes out of the device I can't tell...sure it was not offending before since the query for this message was only introduced in 5.2.0. I think I could correctly 'fix' this by preventing the query since that's for a feature (the 'togglex') which has no meaning in the mrs100 device (that's why it was never queried before..also, I've never seen an mrs100 exposing this feature type in its 'api' but things change over time...)

As for now the fix should be able to silence this log but the question as to why the device replies with this 'really malformed message' remains. Maybe the fw is still 'experimental' in some new feature and it works like that (I hope this is really a glitch overall since the format of this message reply is 'totally against' every other protocol syntax rule.....

Just one question: I guess you have the latest 5.2.0 release installed but the diagnostic is dated back in 2024/03 and reports meross_lan 5.0.1 by then...maybe you've just copy-pasted the wrong file for upload ;)

dragonjon commented 3 weeks ago

Hi @krahabb, sorry for the error in the diagnostic file, when I click to download it does not download any file and I saw one in the downloads folder and I thought it was that one (it was one that I had already sent previously with another similar error from the same devices) I'm attaching a debugging file in case it helps, while I find out why I can't download any diagnostic files.

home-assistant_meross_lan_2024-06-07T08-07-28.599Z.log three mrs100m, all versions are same Firmware version 6.6.6 Hardware version 8.0.0

Thanks, in advanced Jon

dragonjon commented 3 weeks ago

Hi @krahabb thanks for the fix and your work, Work without log errors

Jon