krahabb / meross_lan

Home Assistant integration for Meross devices
MIT License
449 stars 47 forks source link

meross_lan does not generate unique IDs #214

Closed Ameglialuna closed 2 years ago

Ameglialuna commented 2 years ago

I don't know if it's really an issue, maybe it's only my configuration that is wrong. I' m using the last version of the component (but I had this behaviour also with the previous versions) and randomly I find in the log the message that all the devices have not a unique id. Restating Home Assistant the message disappears and then after three or four days returns. It's an issue? And how can i fix it? Thanks in advance, Maurizio.

These are the messages in the log:

2022-09-25 12:09:47.428 ERROR (MainThread) [homeassistant.components.sensor] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01008A8D_battery already exists - ignoring sensor.smart_thermostat_01008a8d_battery 2022-09-25 12:09:47.431 ERROR (MainThread) [homeassistant.components.climate] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01008A8D already exists - ignoring climate.smart_thermostat_01008a8d 2022-09-25 12:09:47.432 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01008A8D_config_temperature_comfort already exists - ignoring number.smart_thermostat_01008a8d_comfort_temperature 2022-09-25 12:09:47.433 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01008A8D_config_temperature_economy already exists - ignoring number.smart_thermostat_01008a8d_sleep_temperature 2022-09-25 12:09:47.434 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01008A8D_config_temperature_away already exists - ignoring number.smart_thermostat_01008a8d_away_temperature 2022-09-25 12:09:47.435 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01008A8D_window already exists - ignoring binary_sensor.smart_thermostat_01008a8d_window 2022-09-25 12:09:47.436 ERROR (MainThread) [homeassistant.components.sensor] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01008A8D_temperature already exists - ignoring sensor.smart_thermostat_01008a8d_temperature 2022-09-25 12:09:47.437 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01008A8D_config_adjust_temperature already exists - ignoring number.smart_thermostat_01008a8d_adjust_temperature 2022-09-25 12:09:47.438 ERROR (MainThread) [homeassistant.components.sensor] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01009820_battery already exists - ignoring sensor.smart_thermostat_01009820_battery 2022-09-25 12:09:47.439 ERROR (MainThread) [homeassistant.components.climate] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01009820 already exists - ignoring climate.smart_thermostat_01009820 2022-09-25 12:09:47.439 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01009820_config_temperature_comfort already exists - ignoring number.smart_thermostat_01009820_comfort_temperature 2022-09-25 12:09:47.440 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01009820_config_temperature_economy already exists - ignoring number.smart_thermostat_01009820_sleep_temperature 2022-09-25 12:09:47.441 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01009820_config_temperature_away already exists - ignoring number.smart_thermostat_01009820_away_temperature 2022-09-25 12:09:47.442 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01009820_window already exists - ignoring binary_sensor.smart_thermostat_01009820_window 2022-09-25 12:09:47.443 ERROR (MainThread) [homeassistant.components.sensor] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01009820_temperature already exists - ignoring sensor.smart_thermostat_01009820_temperature 2022-09-25 12:09:47.444 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01009820_config_adjust_temperature already exists - ignoring number.smart_thermostat_01009820_adjust_temperature 2022-09-25 12:09:47.444 ERROR (MainThread) [homeassistant.components.sensor] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01007911_battery already exists - ignoring sensor.smart_thermostat_01007911_battery 2022-09-25 12:09:47.445 ERROR (MainThread) [homeassistant.components.climate] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01007911 already exists - ignoring climate.smart_thermostat_01007911 2022-09-25 12:09:47.446 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01007911_config_temperature_comfort already exists - ignoring number.smart_thermostat_01007911_comfort_temperature 2022-09-25 12:09:47.447 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01007911_config_temperature_economy already exists - ignoring number.smart_thermostat_01007911_sleep_temperature 2022-09-25 12:09:47.448 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01007911_config_temperature_away already exists - ignoring number.smart_thermostat_01007911_away_temperature 2022-09-25 12:09:47.449 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01007911_window already exists - ignoring binary_sensor.smart_thermostat_01007911_window 2022-09-25 12:09:47.450 ERROR (MainThread) [homeassistant.components.sensor] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01007911_temperature already exists - ignoring sensor.smart_thermostat_01007911_temperature 2022-09-25 12:09:47.451 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_01007911_config_adjust_temperature already exists - ignoring number.smart_thermostat_01007911_adjust_temperature 2022-09-25 12:09:47.451 ERROR (MainThread) [homeassistant.components.sensor] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_0100AC45_battery already exists - ignoring sensor.smart_thermostat_0100ac45_battery 2022-09-25 12:09:47.452 ERROR (MainThread) [homeassistant.components.climate] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_0100AC45 already exists - ignoring climate.smart_thermostat_0100ac45 2022-09-25 12:09:47.453 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_0100AC45_config_temperature_comfort already exists - ignoring number.smart_thermostat_0100ac45_comfort_temperature 2022-09-25 12:09:47.454 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_0100AC45_config_temperature_economy already exists - ignoring number.smart_thermostat_0100ac45_sleep_temperature 2022-09-25 12:09:47.455 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_0100AC45_config_temperature_away already exists - ignoring number.smart_thermostat_0100ac45_away_temperature 2022-09-25 12:09:47.456 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_0100AC45_window already exists - ignoring binary_sensor.smart_thermostat_0100ac45_window 2022-09-25 12:09:47.457 ERROR (MainThread) [homeassistant.components.sensor] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_0100AC45_temperature already exists - ignoring sensor.smart_thermostat_0100ac45_temperature 2022-09-25 12:09:47.457 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_0100AC45_config_adjust_temperature already exists - ignoring number.smart_thermostat_0100ac45_adjust_temperature 2022-09-25 12:09:47.458 ERROR (MainThread) [homeassistant.components.sensor] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_010072A7_battery already exists - ignoring sensor.smart_thermostat_010072a7_battery 2022-09-25 12:09:47.459 ERROR (MainThread) [homeassistant.components.climate] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_010072A7 already exists - ignoring climate.smart_thermostat_010072a7 2022-09-25 12:09:47.461 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_010072A7_config_temperature_comfort already exists - ignoring number.smart_thermostat_010072a7_comfort_temperature 2022-09-25 12:09:47.462 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_010072A7_config_temperature_economy already exists - ignoring number.smart_thermostat_010072a7_sleep_temperature 2022-09-25 12:09:47.463 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_010072A7_config_temperature_away already exists - ignoring number.smart_thermostat_010072a7_away_temperature 2022-09-25 12:09:47.464 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_010072A7_window already exists - ignoring binary_sensor.smart_thermostat_010072a7_window 2022-09-25 12:09:47.466 ERROR (MainThread) [homeassistant.components.sensor] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_010072A7_temperature already exists - ignoring sensor.smart_thermostat_010072a7_temperature 2022-09-25 12:09:47.467 ERROR (MainThread) [homeassistant.components.number] Platform meross_lan does not generate unique IDs. ID 1911081739627126280348e1e9114374_010072A7_config_adjust_temperature already exists - ignoring number.smart_thermostat_010072a7_adjust_temperature

krahabb commented 2 years ago

Hello @Ameglialuna, It could be that some entity IDs are 'stale' in the entity registry and were not correctly cleaned up from a previous uninstall-reinstall. Or, since all of these messages are related to entities binded to the MSH hub it could be an error in meross_lan in the code for this device (which is treated a bit differently than common switches lights or so) Could you confirm you also have (or don't have) other devices in your setup which are not working through the MSH300? Like I said: switches MSS or lights MSL or any other standalone wifi device

MaurizioScala commented 2 years ago

Hi @krahabb thanks for the answer! In effect I had uninstalled everything and the reinstalled again. I have only the devices present in the log, a MSH300 hub with 5 MTS100 valves, no other devices like plugs or lights.

krahabb commented 2 years ago

Hello @MaurizioScala , I think I've detected a possible issue in the code that manages dynamic addition/removal of hub subdevices: when a subdevice disappears from the hub meross_lan tries to automatically remove that by reloading an updated list of currently available devices. This is where the duplicate IDs might come. I'm slightly modifying that code trying to be more safe on deletions/additions but I'm highly unsure how to test all this. At any rate, could you also confirm/check if one or more messages like 'removing subdevice xxxxxxxx(yyyyyyyy) - configuration will be reloaded in 15 sec' appears in the general HA log slightly before (15 seconds in theory) the offending 'Platform meross_lan does not generate...'.

Ameglialuna commented 2 years ago

Hello, first of all I apologize for the answer as Maurizio Scala, it's always me, @Ameglialuna, I used the wrong Github account :-( Yes I can do all the test you need, I need to wait for the new version, right?

krahabb commented 2 years ago

Not really, the log message should be there anyway.

I'm likely releasing a small patch which would hopefully fix the duplicate IDs if I got it right but seeing the logs we could confirm the issue is there (before publishing the patch)

Ameglialuna commented 2 years ago

Ok, I understood. I wait it happens again and I will check the log.

Ameglialuna commented 2 years ago

Obviously since I started to check the log it has not yet occurred :-(

Ameglialuna commented 2 years ago

Hello @krahabb I saw you released the update. What do you prefer I do, wait to see if there is the message in the log with the 2.6.1 version or I install the new 2.6.2?

krahabb commented 2 years ago

You could install the update anyway. This should prevent the duplicate IDs.

At any rate, the event that was causing that should be signaled by this other warning: "removing subdevice %s(%s) - configuration will be reloaded in 15 sec". This will still happen but the patch should avoid the duplicates.

This event happens when the list of subdevices paired to the hub changes (not very often then....or not at all after you finish setup your devices)

Ameglialuna commented 2 years ago

ok, thanks, I install the new version

Ameglialuna commented 2 years ago

A quick update: no "meross_lan does not generate unique IDs" message in the log until now

Ameglialuna commented 2 years ago

And after 11 days still no message in the log. I think that we can consider the issue solved. Thanks again!