albertogeniola / meross-homeassistant

Custom component that leverages the Meross IoT library to integrate with Homeassistant
MIT License
728 stars 83 forks source link

msl120d light bulb no color, white hue and luminositty support #454

Closed Electrocat01 closed 10 months ago

Electrocat01 commented 1 year ago

Describe the bug I have a Meross MSL1220D light bulb wich support RVB, white hue and luminosity setiings but in home assistant I only have one entity that controls only the on/off state.

Your environment HomeAssistant version: -- 2023.8.1 -- Hassio Version (if applicable): -- N/A -- Hardware environment: -- Orange Pi 5 Plus, 16G of RAM, 500G NVMe SSD, Intel AX200 WiFi card, Home Assistant in Docker on Ubuntu 22.04 --

Logs taken when the issue happened

2023-08-18 22:09:04.631 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration meross_cloud 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
2023-08-18 22:09:05.855 WARNING (MainThread) [homeassistant.config_entries] Config entry 'AC:19:8E:A2:71:18' for bluetooth integration not ready yet: hci0 (AC:19:8E:A2:71:18): DBus service not found; docker config may be missing `-v /run/dbus:/run/dbus:ro`: {ex}; Retrying in background
2023-08-18 22:09:08.462 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:09:08.473 WARNING (MainThread) [homeassistant.components.freebox.router] Home access is not granted
2023-08-18 22:09:08.560 WARNING (MainThread) [homeassistant.config_entries] Config entry 'AC:19:8E:A2:71:18' for bluetooth integration not ready yet: hci0 (AC:19:8E:A2:71:18): DBus service not found; docker config may be missing `-v /run/dbus:/run/dbus:ro`: {ex}; Retrying in background
2023-08-18 22:09:28.666 WARNING (MainThread) [homeassistant.config_entries] Config entry 'AC:19:8E:A2:71:18' for bluetooth integration not ready yet: hci0 (AC:19:8E:A2:71:18): DBus service not found; docker config may be missing `-v /run/dbus:/run/dbus:ro`: {ex}; Retrying in background
2023-08-18 22:09:38.941 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:10:08.934 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:10:38.942 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:10:52.811 WARNING (MainThread) [homeassistant.config_entries] Config entry 'AC:19:8E:A2:71:18' for bluetooth integration not ready yet: hci0 (AC:19:8E:A2:71:18): DBus service not found; docker config may be missing `-v /run/dbus:/run/dbus:ro`: {ex}; Retrying in background
2023-08-18 22:11:08.990 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:11:33.666 WARNING (MainThread) [homeassistant.config_entries] Config entry 'AC:19:8E:A2:71:18' for bluetooth integration not ready yet: hci0 (AC:19:8E:A2:71:18): DBus service not found; docker config may be missing `-v /run/dbus:/run/dbus:ro`: {ex}; Retrying in background
2023-08-18 22:11:38.928 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:12:08.937 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:12:38.943 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:12:57.813 WARNING (MainThread) [homeassistant.config_entries] Config entry 'AC:19:8E:A2:71:18' for bluetooth integration not ready yet: hci0 (AC:19:8E:A2:71:18): DBus service not found; docker config may be missing `-v /run/dbus:/run/dbus:ro`: {ex}; Retrying in background
2023-08-18 22:13:08.981 ERROR (MainThread) [custom_components.meross_cloud.config_flow] Unable to connect to Meross HTTP api, ex: Failed request to API. Response code: 404
Traceback (most recent call last):
  File "/config/custom_components/meross_cloud/config_flow.py", line 271, in async_step_configure_manager
    creds = await self._test_authorization(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/meross_cloud/config_flow.py", line 357, in _test_authorization
    client = await MerossHttpClient.async_from_user_password(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/meross_iot/http_api.py", line 106, in async_from_user_password
    creds = await cls.async_login(email=email,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/meross_iot/http_api.py", line 203, in async_login
    response_data = await MerossHttpClient._async_authenticated_post(url=url,
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/meross_iot/http_api.py", line 286, in _async_authenticated_post
    raise AuthenticatedPostException("Failed request to API. Response code: %s" % str(response.status))
meross_iot.model.http.exception.AuthenticatedPostException: Failed request to API. Response code: 404
2023-08-18 22:13:08.988 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:13:38.924 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:14:08.927 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:14:38.948 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:15:08.981 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:15:38.945 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:16:08.937 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:16:38.926 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:16:48.340 WARNING (MainThread) [custom_components.meross_cloud] Skip MQTT cert validation option set to: True
2023-08-18 22:16:48.635 WARNING (MainThread) [custom_components.meross_cloud] 
===============================
Meross Cloud Custom component
Developed by Alberto Geniola
Low level library version: 0.4.5.7
-------------------------------
This custom component is under development and not yet ready for production use.
In case of errors/misbehave, please report it here: 
https://github.com/albertogeniola/meross-homeassistant/issues

If you like this extension and you want to support it, please consider donating.
-------------------------------
List of devices reported by HTTP API:
- Lustre chambre (msl120d) - OnlineStatus.ONLINE
===============================
2023-08-18 22:16:49.302 WARNING (MainThread) [meross_iot.manager] Found a new device Lustre chambre (msl120d, HW 6.0.0, FW 6.1.2, class: msl120d:6.0.0:6.1.2) that has become online while we were offline.
2023-08-18 22:17:08.989 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:17:38.940 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:18:08.936 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:18:38.954 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:19:09.003 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:19:15.940 WARNING (MainThread) [homeassistant.config_entries] Config entry 'AC:19:8E:A2:71:18' for bluetooth integration not ready yet: hci0 (AC:19:8E:A2:71:18): DBus service not found; docker config may be missing `-v /run/dbus:/run/dbus:ro`: {ex}; Retrying in background
2023-08-18 22:19:39.001 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:20:08.934 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:20:35.354 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry https://iot.meross.com for light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 544, in async_unload
    result = await component.async_unload_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 634, in async_unload_entry
    return await component.async_unload_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
    await platform.async_reset()
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 764, in async_reset
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1028, in async_remove
    await self.async_will_remove_from_hass()
  File "/config/custom_components/meross_cloud/__init__.py", line 319, in async_will_remove_from_hass
    self._coordinator.async_remove_listener(self._http_data_changed)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MerossCoordinator' object has no attribute 'async_remove_listener'
2023-08-18 22:20:35.364 WARNING (MainThread) [custom_components.meross_cloud] Skip MQTT cert validation option set to: True
2023-08-18 22:20:35.662 WARNING (MainThread) [custom_components.meross_cloud] 
===============================
Meross Cloud Custom component
Developed by Alberto Geniola
Low level library version: 0.4.5.7
-------------------------------
This custom component is under development and not yet ready for production use.
In case of errors/misbehave, please report it here: 
https://github.com/albertogeniola/meross-homeassistant/issues

If you like this extension and you want to support it, please consider donating.
-------------------------------
List of devices reported by HTTP API:
- Lustre chambre (msl120d) - OnlineStatus.ONLINE
===============================
2023-08-18 22:20:36.325 WARNING (MainThread) [meross_iot.manager] Found a new device Lustre chambre (msl120d, HW 6.0.0, FW 6.1.2, class: msl120d:6.0.0:6.1.2) that has become online while we were offline.
2023-08-18 22:20:37.204 ERROR (MainThread) [homeassistant.components.light] Platform meross_cloud does not generate unique IDs. ID light:#BASE:2103199920118890846448e1e9656fe1:0 already exists - ignoring light.lustre_chambre_msl120d_main_channel
2023-08-18 22:20:38.948 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:20:47.723 WARNING (MainThread) [custom_components.meross_cloud] Skip MQTT cert validation option set to: True
2023-08-18 22:20:47.873 WARNING (MainThread) [custom_components.meross_cloud] 
===============================
Meross Cloud Custom component
Developed by Alberto Geniola
Low level library version: 0.4.5.7
-------------------------------
This custom component is under development and not yet ready for production use.
In case of errors/misbehave, please report it here: 
https://github.com/albertogeniola/meross-homeassistant/issues

If you like this extension and you want to support it, please consider donating.
-------------------------------
List of devices reported by HTTP API:
- Lustre chambre (msl120d) - OnlineStatus.ONLINE
===============================
2023-08-18 22:20:48.511 WARNING (MainThread) [meross_iot.manager] Found a new device Lustre chambre (msl120d, HW 6.0.0, FW 6.1.2, class: msl120d:6.0.0:6.1.2) that has become online while we were offline.
2023-08-18 22:20:48.816 ERROR (MainThread) [homeassistant.components.light] Platform meross_cloud does not generate unique IDs. ID light:#BASE:2103199920118890846448e1e9656fe1:0 already exists - ignoring light.lustre_chambre_msl120d_main_channel
2023-08-18 22:20:59.591 WARNING (MainThread) [homeassistant.config_entries] Config entry 'AC:19:8E:A2:71:18' for bluetooth integration not ready yet: hci0 (AC:19:8E:A2:71:18): DBus service not found; docker config may be missing `-v /run/dbus:/run/dbus:ro`: {ex}; Retrying in background
2023-08-18 22:21:09.017 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:21:09.262 WARNING (MainThread) [custom_components.meross_cloud] Skip MQTT cert validation option set to: True
2023-08-18 22:21:09.465 WARNING (MainThread) [custom_components.meross_cloud] 
===============================
Meross Cloud Custom component
Developed by Alberto Geniola
Low level library version: 0.4.5.7
-------------------------------
This custom component is under development and not yet ready for production use.
In case of errors/misbehave, please report it here: 
https://github.com/albertogeniola/meross-homeassistant/issues

If you like this extension and you want to support it, please consider donating.
-------------------------------
List of devices reported by HTTP API:
- Lustre chambre (msl120d) - OnlineStatus.ONLINE
===============================
2023-08-18 22:21:10.120 WARNING (MainThread) [meross_iot.manager] Found a new device Lustre chambre (msl120d, HW 6.0.0, FW 6.1.2, class: msl120d:6.0.0:6.1.2) that has become online while we were offline.
2023-08-18 22:21:20.941 WARNING (MainThread) [homeassistant.config_entries] Config entry 'AC:19:8E:A2:71:18' for bluetooth integration not ready yet: hci0 (AC:19:8E:A2:71:18): DBus service not found; docker config may be missing `-v /run/dbus:/run/dbus:ro`: {ex}; Retrying in background
2023-08-18 22:21:38.954 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:22:08.960 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:22:38.951 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:23:04.592 WARNING (MainThread) [homeassistant.config_entries] Config entry 'AC:19:8E:A2:71:18' for bluetooth integration not ready yet: hci0 (AC:19:8E:A2:71:18): DBus service not found; docker config may be missing `-v /run/dbus:/run/dbus:ro`: {ex}; Retrying in background
2023-08-18 22:23:09.019 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:23:38.950 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:24:08.968 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:24:38.943 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:25:09.006 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:25:38.974 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:26:08.961 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:26:38.963 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:27:09.031 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:27:38.958 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks
2023-08-18 22:28:09.029 WARNING (MainThread) [homeassistant.components.freebox.router] Unable to enumerate raid disks

Thanks in advance for your help !

Electrocat01 commented 10 months ago

Idk what changed but now it works great.