albertogeniola / meross-homeassistant

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

Can not remove integration #77

Closed userMak closed 4 years ago

userMak commented 4 years ago

HA Running in docker in ubuntu NUC

Hi first of all thanks for your work. I have been using the meross integration for 8 months. From 0.109 version of HA I was getting some errors in logs regarding translation which I think you are aware.

However yesterday after a restart of HA (version 0.109.3) all my meross switches became unavailable (they were grayed in lovelace card). This has happened before so I thought before I remove the integration from HA and reinstall it to change the names of my switches in meross app because everytime I reinstalled the meross integration I had to rename all my swithes. So after the renaming of the I tried to reinstall the meross integration, and there my troubles begun.

When I reinstall it, there were double all my switches and none worked, they were all grayed and unavailable. I have tried several times to remove the integration but I can't. I tried to restore HA in previous version (0.108.9) but again the same problem. I reach to a point were I tried to reinstall HA. I deleted the .storage file of HA and begun with fresh install. HA opened without any of my integrations etc. I tried to install the meross integration and for my surprise the problem arise again! All my switches were unavailable and I couldn't restart it! Below the logs. Please can you help a little as to what to do?

Our command line:

$ ha help

~ $ ha core logs
2020-05-04 21:17:42 WARNING (MainThread) [homeassistant.helpers.entity] Update o                             f switch.kid_balcony is taking over 10 seconds
2020-05-04 21:17:42 ERROR (SyncWorker_0) [custom_components.meross_cloud.switch]                              Error occurred.
-------------------------------------
Component version: 0.3.4.4-3
Device info:
        Name: kid balcony
        UUID: 1812016823740829087334298f18972e
        Type: mss510h
        HW Version: 2.0.0
        FW Version: 2.1.7
Error Message: "An exception occurred"
Traceback (most recent call last):
  File "/config/custom_components/meross_cloud/switch.py", line 44, in update
    self._device.get_status(force_status_refresh=True)
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/devices/power_pl                             ugs.py", line 134, in get_status
    self._state = self._get_status_impl()
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/devices/power_pl                             ugs.py", line 88, in _get_status_impl
    data = self.get_sys_data()['all']
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/device.py", line                              119, in get_sys_data
    return self.execute_command("GET", ALL, {}, online_check=False)
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/device.py", line                              116, in execute_command
    return self.__cloud_client.execute_cmd(self.uuid, command, namespace, payloa                             d, callback=callback, timeout=timeout)
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/client.py", line                              301, in execute_cmd
    raise CommandTimeoutException("A timeout occurred while waiting for the ACK:                              %d" % timeout)
meross_iot.cloud.exceptions.CommandTimeoutException.CommandTimeoutException: A t                             imeout occurred while waiting for the ACK: 10
2020-05-04 21:17:52 WARNING (MainThread) [homeassistant.helpers.entity] Update o                             f switch.trapezaria is taking over 10 seconds
2020-05-04 21:17:52 ERROR (SyncWorker_7) [custom_components.meross_cloud.switch]                              Error occurred.
-------------------------------------
Component version: 0.3.4.4-3
Device info:
        Name: trapezaria
        UUID: 1812013756539529087334298f18976e
        Type: mss510h
        HW Version: 2.0.0
        FW Version: 2.1.7
Error Message: "An exception occurred"
Traceback (most recent call last):
  File "/config/custom_components/meross_cloud/switch.py", line 44, in update
    self._device.get_status(force_status_refresh=True)
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/devices/power_pl                             ugs.py", line 134, in get_status
    self._state = self._get_status_impl()
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/devices/power_pl                             ugs.py", line 88, in _get_status_impl
    data = self.get_sys_data()['all']
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/device.py", line                              119, in get_sys_data
    return self.execute_command("GET", ALL, {}, online_check=False)
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/device.py", line                              116, in execute_command
    return self.__cloud_client.execute_cmd(self.uuid, command, namespace, payloa                             d, callback=callback, timeout=timeout)
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/client.py", line                              301, in execute_cmd
    raise CommandTimeoutException("A timeout occurred while waiting for the ACK:                              %d" % timeout)
meross_iot.cloud.exceptions.CommandTimeoutException.CommandTimeoutException: A t                             imeout occurred while waiting for the ACK: 10
2020-05-04 21:18:02 WARNING (MainThread) [homeassistant.helpers.entity] Update o                             f switch.kitchen_main_main_switch is taking over 10 seconds
2020-05-04 21:18:02 ERROR (SyncWorker_13) [custom_components.meross_cloud.switch                             ] Error occurred.
-------------------------------------
Component version: 0.3.4.4-3
Device info:
        Name: kitchen main
        UUID: 1811262418516429086734298f185fa8
        Type: mss520h
        HW Version: 2.0.0
        FW Version: 2.1.2
Error Message: "An exception occurred"
Traceback (most recent call last):
  File "/config/custom_components/meross_cloud/switch.py", line 44, in update
    self._device.get_status(force_status_refresh=True)
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/devices/power_pl                             ugs.py", line 134, in get_status
    self._state = self._get_status_impl()
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/devices/power_pl                             ugs.py", line 88, in _get_status_impl
    data = self.get_sys_data()['all']
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/device.py", line                              119, in get_sys_data
    return self.execute_command("GET", ALL, {}, online_check=False)
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/device.py", line                              116, in execute_command
    return self.__cloud_client.execute_cmd(self.uuid, command, namespace, payloa                             d, callback=callback, timeout=timeout)
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/client.py", line                              301, in execute_cmd
    raise CommandTimeoutException("A timeout occurred while waiting for the ACK:                              %d" % timeout)
meross_iot.cloud.exceptions.CommandTimeoutException.CommandTimeoutException: A t                             imeout occurred while waiting for the ACK: 10
2020-05-04 21:18:12 WARNING (MainThread) [homeassistant.helpers.entity] Update o                             f switch.kitchen_main_kitchen_spot is taking over 10 seconds
2020-05-04 21:18:12 ERROR (SyncWorker_1) [custom_components.meross_cloud.switch]                              Error occurred.
-------------------------------------
Component version: 0.3.4.4-3
Device info:
        Name: kitchen main
        UUID: 1811262418516429086734298f185fa8
        Type: mss520h
        HW Version: 2.0.0
        FW Version: 2.1.2
Error Message: "An exception occurred"
Traceback (most recent call last):
  File "/config/custom_components/meross_cloud/switch.py", line 44, in update
    self._device.get_status(force_status_refresh=True)
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/devices/power_pl                             ugs.py", line 134, in get_status
    self._state = self._get_status_impl()
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/devices/power_pl                             ugs.py", line 88, in _get_status_impl
    data = self.get_sys_data()['all']
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/device.py", line                              119, in get_sys_data
    return self.execute_command("GET", ALL, {}, online_check=False)
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/device.py", line                              116, in execute_command
    return self.__cloud_client.execute_cmd(self.uuid, command, namespace, payloa                             d, callback=callback, timeout=timeout)
  File "/usr/local/lib/python3.7/site-packages/meross_iot/cloud/client.py", line                              301, in execute_cmd
    raise CommandTimeoutException("A timeout occurred while waiting for the ACK:                              %d" % timeout)
meross_iot.cloud.exceptions.CommandTimeoutException.CommandTimeoutException: A t                             imeout occurred while waiting for the ACK: 10
calexandre commented 4 years ago

I'm also having the exact same issue...I think it might be related to #70

albertogeniola commented 4 years ago

Please upgrade to the latest version of the library v1.0.0 which solves the problem.