albertogeniola / meross-homeassistant

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

some MSS310 switching on/off constantly #462

Closed ruckelronny closed 9 months ago

ruckelronny commented 9 months ago

Describe the bug I own a couple Meross Plugs, MSS210 and MSS310. Two MSS310 switch on/off like crazy since ~2 days. They even continue to do so when I completely erased the meross integration, and I have to let them do their thing. Unplugging doesnt help, I have to let them do their turn on/off thingy. They're not even connected to the wifi when they're doing it (I also tried to turn off the whole IoT Wifi). After some time without the meross integration, they are 'normal' again. When integrating again, the 'fun' begins anew.

No other plugs show this behaviour. I tried several versions of this integration and HA, details below. Looking at the logs I see the timeouts, but cant explain why they would happen. I tried to remap mqtt-eu-2 to mqtt-eu-3 in my local dns, but then no plugs worked.

Right now, I have them disabled in the integration, so I can use the other plugs with HA. The plug which was the worst, is completely silent. The other one does switch on/off like 3 times per hour, idk why. The logs were identical for both plugs.

I'm not 100% sure this is a bug of this integration, but I really appreciate any help before throwing them away. Thanks in advance.

//edit: The other one still turning on/off after disabling could have been my error. I forgot to restart HA after disabling the device / all entities. When up-/downgrading versions of the integrations I always restarted HA to do it as cleanly as possible.

Your environment HomeAssistant version: HA 2023.9.2, also tried older like 2023.7.3 Hardware environment: VMware ESXi x86, Debian 12, HA Supervised Installation Devices: MSS310, Firmware 2.1.17, HW Version 2.0.0 Integration versions tested: 1.2.6 (doenst work anymore), 1.2.8, 1.2.9b1, 1.2.10b0 - had 1.2.8 when it started

Logs taken when the issue happened

Timeout occurred while waiting a response for message b'{"header":{"from":"/app/661006-8858a48e2e46994f955d3804db9ef9bf/subscribe","messageId":"f91ffa1a5a10c4dd4ee5a994be9e2925","method":"GET","namespace":"Appliance.Control.Electricity","payloadVersion":1,"sign":"7796c9d3f7174daa260161c0c667f7b7","timestamp":1695315684,"triggerSrc":"Android","uuid":"21020361851252251h6148e1e94ab8ff"},"payload":{"channel":0}}' sent to device uuid 21020361851252251h6148e1e94ab8ff. Timeout was: 10.000000 seconds. Mqtt Host: mqtt-eu-2.meross.com:443.
Timeout occurred while waiting a response for message b'{"header":{"from":"/app/661006-8858a48e2e46994f955d3804db9ef9bf/subscribe","messageId":"497f47f43b52f92328a83740e4a7154f","method":"GET","namespace":"Appliance.Control.Electricity","payloadVersion":1,"sign":"55d8629d61feceeaa7627951e0a16619","timestamp":1695316524,"triggerSrc":"Android","uuid":"21020361851252251h6148e1e94ab8ff"},"payload":{"channel":0}}' sent to device uuid 21020361851252251h6148e1e94ab8ff. Timeout was: 10.000000 seconds. Mqtt Host: mqtt-eu-2.meross.com:443.
Error occurred. ------------------------------------- Component version: 0.4.6.0rc2 Device info: Name: Plug4 UUID: 21020361851252251h6148e1e94ab8ff Type: mss310 HW Version: 2.0.0 FW Version: 2.1.17 Error Message: "An exception occurred"
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/tasks.py", line 490, in wait_for
    return fut.result()
           ^^^^^^^^^^^^
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/meross_iot/manager.py", line 903, in _async_send_and_wait_ack
    return await asyncio.wait_for(future, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/tasks.py", line 492, in wait_for
    raise exceptions.TimeoutError() from exc
TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/meross_cloud/sensor.py", line 147, in async_update
    await self._device.async_get_instant_metrics(channel=self._channel_id)
  File "/usr/local/lib/python3.11/site-packages/meross_iot/controller/mixins/electricity.py", line 41, in async_get_instant_metrics
    result = await self._execute_command(method="GET",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/meross_iot/controller/device.py", line 308, in _execute_command
    return await self._manager.async_execute_cmd(destination_device_uuid=self.uuid,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/meross_iot/manager.py", line 847, in async_execute_cmd
    return await self.async_execute_cmd_client(client=client,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/meross_iot/manager.py", line 884, in async_execute_cmd_client
    response = await self._async_send_and_wait_ack(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/meross_iot/manager.py", line 910, in _async_send_and_wait_ack
    raise CommandTimeoutError(message=str(message), target_device_uuid=target_device_uuid, timeout=timeout)
meross_iot.model.exception.CommandTimeoutError
ruckelronny commented 9 months ago

Meross says it looks like hardware issue.

Maybe really two chips/capacitators/whatever gave in at the same time.