albertogeniola / meross-homeassistant

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

No data shown after some time #394

Closed fload0 closed 2 years ago

fload0 commented 2 years ago

Describe the bug I have been using the meross integration for quite some time and all worked well until recently. I am using it to track the power generation of a solar panel. I now see data coming in but after some time (several hours) it stops. After restarting HA, data is coming in again. In the logs I saw that updating the meross_cloud sensor took longer than the scheduled update and I also got a couple of other errors related to other meross smart plugs I am using.

Thanks for your help.

Your environment HomeAssistant version: 2022.10.5 Hassio Version (if applicable): -- PLEASE SPECIFY -- Hardware environment: Raspberry PI 4

Logs taken when the issue happened Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:796 Integration: Sensor First occurred: 19:59:50 (273 occurrences) Last logged: 22:15:50

Updating meross_cloud sensor took longer than the scheduled update interval 0:00:30


Logger: meross_iot.manager Source: custom_components/meross_cloud/sensor.py:147 Integration: Meross Cloud IoT First occurred: 18:28:30 (1 occurrences) Last logged: 18:28:30

Timeout occurred while waiting a response for message b'{"header":{"from":".....


Logger: custom_components.meross_cloud.sensor Source: custom_components/meross_cloud/sensor.py:186 Integration: Meross Cloud IoT First occurred: 18:28:30 (1 occurrences) Last logged: 18:28:30

Error occurred. ------------------------------------- Component version: 0.4.5.0 Device info: Name:xxx UUID: xxxx Type: mss310 HW Version: 6.0.0 FW Version: 6.1.10 Error Message: "An exception occurred" Traceback (most recent call last): File "/usr/local/lib/python3.10/asyncio/tasks.py", line 456, in wait_for return fut.result() asyncio.exceptions.CancelledError....

hammy1988 commented 2 years ago

I have the same Problem.

fload0 commented 2 years ago

Does anybody have an idea how this can be resolved? Currently I am restarting HA 2 times a day to keep correct data coming in. Thanks for your help.

albertogeniola commented 2 years ago

Hi @fload0 , this might be somehow related to the Meross cloud temporarily banning the HA integration token from accessing the APIs. The last versions of the integration have added a new capability which should help solve this issue: use local HTTP api calls instead.

You can configure that option from the integration options, as shown below: image

Can you please test it and tell if that solves the issue?

fload0 commented 2 years ago

Hi, I had tried that as well some weeks ago when I initially had the problem. Unfortunately this did not work either. In the meantime I have switched to another integration (https://github.com/krahabb/meross_lan) because I couldn't find another solution for the meross-homeassistant integration and rebooting my HA two times a day became an issue. So for me the issue is resolved by switching to another integration. If nobody else has the issue, it can be closed.