bwp91 / homebridge-meross

Homebridge plugin to integrate Meross devices into HomeKit.
MIT License
194 stars 32 forks source link

MTS200 reporting lots of mqtt open/close. Is it a problem? (Homebridge 1.7.0 on Synology NAS 7.2.1 - Plugin 10.3.0) #564

Open Nepomucene opened 5 months ago

Nepomucene commented 5 months ago

What issue do you have? Please be as thorough and explicit as possible.

I have a Homekit house with quite a few devices. I had the MTS200 linked direct via native homekit, but these DO NOT LIKE Wifi roaming (and I have a few APs in the house). Regularly if they roamed from an AP to another, they would lose the Homekit link (but keep their Meross Cloud connection). So I moved them to Homebridge using the homekit-meross plugin.

Result: So far, so good, and connection seems stable BUT: Every minute, each MTS200 opens a MQTT connection for 55s, closes it for 5s, before restarting the process.

Is this a problem, or an expected behavior of the MQTT connection?

Details of your setup.

Please paste any relevant logs below.

[1/26/2024, 9:26:13 AM] [Meross] [1st Bathroom Sensor] mqtt connection closed.
[1/26/2024, 9:26:13 AM] [Meross] [LG Bathroom Sensor] mqtt connection closed.
[1/26/2024, 9:26:18 AM] [Meross] [LG Bathroom Sensor] mqtt connection reconnecting.
[1/26/2024, 9:26:18 AM] [Meross] [1st Bathroom Sensor] mqtt connection reconnecting.
[1/26/2024, 9:27:13 AM] [Meross] [1st Bathroom Sensor] mqtt connection closed.
[1/26/2024, 9:27:13 AM] [Meross] [LG Bathroom Sensor] mqtt connection closed.
[1/26/2024, 9:27:18 AM] [Meross] [LG Bathroom Sensor] mqtt connection reconnecting.
[1/26/2024, 9:27:18 AM] [Meross] [1st Bathroom Sensor] mqtt connection reconnecting.
[1/26/2024, 9:28:13 AM] [Meross] [1st Bathroom Sensor] mqtt connection closed.
[1/26/2024, 9:28:13 AM] [Meross] [LG Bathroom Sensor] mqtt connection closed.
[1/26/2024, 9:28:18 AM] [Meross] [LG Bathroom Sensor] mqtt connection reconnecting.
[1/26/2024, 9:28:18 AM] [Meross] [1st Bathroom Sensor] mqtt connection reconnecting.
neiloakley commented 5 months ago

I'm also facing this issue with multiple device types. Most seem to be coming from switches (MSS210, MSS210n and MSS310).

homebridge-meross v10.3.0

Firmware on MSS210 is 6.2.3 MSS210n is 6.1.5 MSS310 is 2.1.17 No firmware updates available

I have other 210 and 310 switches that do not show these issues in the logs.

[05/02/2024, 15:37:04] [Meross] [Lounge Sidelight 1] mqtt connection closed. [05/02/2024, 15:37:05] [Meross] [Garden Outdoor Light] mqtt connection closed. [05/02/2024, 15:37:05] [Meross] [Lounge Sidelight 2] mqtt connection closed. [05/02/2024, 15:37:08] [Meross] [Gazebo Lights] mqtt connection closed. [05/02/2024, 15:37:09] [Meross] [Lounge Sidelight 1] mqtt connection reconnecting. [05/02/2024, 15:37:10] [Meross] [Garden Outdoor Light] mqtt connection reconnecting. [05/02/2024, 15:37:10] [Meross] [Lounge Sidelight 2] mqtt connection reconnecting. [05/02/2024, 15:37:13] [Meross] [Gazebo Lights] mqtt connection reconnecting. [05/02/2024, 15:37:38] [Meross] [Computer Equipment Non-Critica] mqtt connection closed. [05/02/2024, 15:37:43] [Meross] [Computer Equipment Non-Critica] mqtt connection reconnecting. [05/02/2024, 15:38:04] [Meross] [Lounge Sidelight 1] mqtt connection closed. [05/02/2024, 15:38:05] [Meross] [Garden Outdoor Light] mqtt connection closed. [05/02/2024, 15:38:05] [Meross] [Lounge Sidelight 2] mqtt connection closed. [05/02/2024, 15:38:08] [Meross] [Gazebo Lights] mqtt connection closed. [05/02/2024, 15:38:09] [Meross] [Lounge Sidelight 1] mqtt connection reconnecting. [05/02/2024, 15:38:10] [Meross] [Garden Outdoor Light] mqtt connection reconnecting. [05/02/2024, 15:38:10] [Meross] [Lounge Sidelight 2] mqtt connection reconnecting. [05/02/2024, 15:38:13] [Meross] [Gazebo Lights] mqtt connection reconnecting. [05/02/2024, 15:38:38] [Meross] [Computer Equipment Non-Critica] mqtt connection closed. [05/02/2024, 15:38:43] [Meross] [Computer Equipment Non-Critica] mqtt connection reconnecting.

gileswells commented 5 months ago

I'm also seeing lots of connection closed and reconnecting log messages. Also interacting with these devices is quite temperamental. I have almost exclusively mss110 plugs. This was happening with a previous firmware (2.1.21) and still after updating a single plug's firmware to latest (2.2.4).

~Of note, after restarting Homebridge, the error logs of disconnects appear to have gone away entirely and I'm back to normal operation.~ Edit: restarting seems to have only solved the issue for a short period of time and now the disconnects are happening again as before.

Nepomucene commented 5 months ago

Reproducing is very easy. All I have to do is reboot the router. in the 90s between shutdown and 4G back connection, the cycle of mqtt errors starts. Connecting, closing after 55s, then reconnecting after 5s... [Meross] [1st Bathroom Sensor] mqtt connection reconnecting. [Meross] [1st Bathroom Sensor] mqtt connection closed.

During these cycles, temperature updates are reported correctly. To fix, all I have to do is restart the Child Bridge.

Disabling the logging for now, as it otherwise makes it impossible to use logging for my other plugins...

SemoTech commented 4 months ago

Same here, log is full of mqtt warning messages for all brands of Meross wall switches and dimmers! Any way to stop them?

image

gileswells commented 1 month ago

In #566 people are reporting that changing the connection type to Hybrid resolves the issue for them. I am testing this myself now and while I'd prefer to use a local only connection half of my requests route through homebridge-gsh anyways so ¯\_(ツ)_/¯