homebridge-meross: Plugin breaks connection to Meross cloud

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

I have a strange problem with my Homebridge/Meross setup and after a lot of troubleshooting and analysis I have the feeling that this plugin might be the cause.

When all my components are configured and homebridge is started everything is fine. I can add all thermostats to Homekit and control them totally fine from the Home app as well as the Meross app itself. But after some time all requests to control the thermostats run in a timeout and I can’t control anything anymore. Not from the Home app and also not from the Meross app.

So I first suspected the MSH300HK hub to lose connection to the Meross cloud because of WiFi issues. I tried everything I could find in similar issues (locking WiFi channel and IPs, using 2.4GHz only, deactivating “smart” router features and so on). Nothing helped, after a while all requests from Home or Meross apps time out.

Interestingly the hub itself always has connection to WiFi and internet as I checked on my router, by pinging/tracerouting it and using Wireshark network analysis (also when requests from the apps and hence requests to the Meross cloud time out).

Another strong indicator that this plugin may be the cause of the problem is that when I restart the plugin everything is fine again for a while. Until eventually the connection to the cloud gets blocked/frozen again.

So I started running a cronjob that kills the plugin every ten minutes and since I did this, it’s now been 3 days without any problem. Once I deactivate the cronjob, the timeout return after a while (as I tested again today, see logs below).

My initial guess without knowing the details of how this plugin communicates would be that the plugin maybe opens connections/websockets to the Meross cloud without closing/reusing them and hence is creating more and more open connections until the Meross Cloud is not allowing any new ones.

One other thing I noticed is that when the plugin checks the device cloud status it first sees the hub as online and 5 seconds later it is reported offline. But this doesn’t mean that it is broken already. Initially everything works fine even when the logs say the hub has been reported offline. As mentioned it takes a while until everything seizes to work (at which time the logs still look the same until you actually control something, then you see a timeout).

Do you have any idea about this? I’m happy to provide more help if I can.

Details of your setup.

  • Do you use (1) Homebridge UI-X (2) Homebridge CLI or (3) HOOBS?

    • Homebridge UI-X
  • Which version of Homebridge/HOOBS do you have?

    • Homebridge v1.6.0
  • Which platform do you run Homebridge/HOOBS on (e.g. Raspberry Pi/Windows/HOOBS Box)? Please also mention your version of Node.js/NPM if known.

    • Raspberry Pi (official image)
    • Node.js v18.15.0
    • Meross App 3.11.1
    • iOS 16.3.1
  • Which version of this plugin (homebridge-meross) do you have? Has the issue started since upgrading from a previous version?

    • v9.0.1
    • connection type: hybrid
    • cloud: iotx-eu.meross.com
  • Which Meross devices do you have that are causing issues? Please include product models if applicable.

    • MSH300HK Smart Hub
    • Several MTS100 thermostats, one MTS150
    • HW version 4.0.0
    • FW version 4.5.23

Please paste any relevant logs below.

[20/03/2023, 11:36:02] Registering platform 'homebridge-meross.Meross'
[20/03/2023, 11:36:07] [Meross] Initializing Meross platform...
[20/03/2023, 11:36:07] [Meross] Initializing child bridge *****
[20/03/2023, 11:36:12] [Meross] Launched child bridge with PID 3576
[20/03/2023, 11:36:14] Registering platform 'homebridge-meross.Meross'
[20/03/2023, 11:36:15] [Meross] Loaded homebridge-meross v9.0.1 child bridge successfully
[20/03/2023, 11:36:15] [Meross] Initialising plugin v9.0.1 | System linux | Node v18.15.0 | HB v1.6.0 | HAPNodeJS v0.11.0...
[20/03/2023, 11:36:15] Publishing bridge accessory (name: Meross, publishInfo: {
[20/03/2023, 11:36:15] [Meross] Plugin initialised. Setting up accessories....
[20/03/2023, 11:36:16] Homebridge v1.6.0 (HAP v0.11.0) (Meross) is running on port 51547.
[20/03/2023, 11:36:18] [Meross] [Badezimmer] initialising with options {"connection":"hybrid","lowBattThreshold":20}.
[20/03/2023, 11:36:18] [Meross] [Smart Wi-Fi Hub] [Badezimmer] subdevice initialised with id [*****].
[20/03/2023, 11:36:18] [Meross] [Wohnzimmer] initialising with options {"connection":"hybrid","lowBattThreshold":20}.
[20/03/2023, 11:36:18] [Meross] [Smart Wi-Fi Hub] [Wohnzimmer] subdevice initialised with id [*****].
[20/03/2023, 11:36:18] [Meross] [Flur] initialising with options {"connection":"hybrid","lowBattThreshold":20}.
[20/03/2023, 11:36:18] [Meross] [Smart Wi-Fi Hub] [Flur] subdevice initialised with id [*****].
[20/03/2023, 11:36:18] [Meross] [Küche] initialising with options {"connection":"hybrid","lowBattThreshold":20}.
[20/03/2023, 11:36:18] [Meross] [Smart Wi-Fi Hub] [Küche] subdevice initialised with id [*****].
[20/03/2023, 11:36:18] [Meross] [Schlafzimmer] initialising with options {"connection":"hybrid","lowBattThreshold":20}.
[20/03/2023, 11:36:18] [Meross] [Smart Wi-Fi Hub] [Schlafzimmer] subdevice initialised with id [*****].
[20/03/2023, 11:36:18] [Meross] [Smart Wi-Fi Hub] initialised with id [*****}].
[20/03/2023, 11:36:19] [Meross] ✓ Setup complete. Have a feature request? Visit https://bit.ly/hb-meross-issues to ask!
[20/03/2023, 11:36:22] [Meross] [Badezimmer] has been reported [online].
[20/03/2023, 11:36:22] [Meross] [Wohnzimmer] has been reported [online].
[20/03/2023, 11:36:22] [Meross] [Flur] has been reported [online].
[20/03/2023, 11:36:22] [Meross] [Küche] has been reported [online].
[20/03/2023, 11:36:23] [Meross] [Schlafzimmer] has been reported [online].
[20/03/2023, 11:36:23] [Meross] [Smart Wi-Fi Hub] has been reported [online].
[20/03/2023, 11:51:21] [Meross] [Smart Wi-Fi Hub] has been reported [offline].
[20/03/2023, 11:56:17] [Meross] [Badezimmer] has been reported [online].
[20/03/2023, 11:56:17] [Meross] [Wohnzimmer] has been reported [online].
[20/03/2023, 11:56:17] [Meross] [Flur] has been reported [online].
[20/03/2023, 11:56:17] [Meross] [Küche] has been reported [online].
[20/03/2023, 11:56:17] [Meross] [Schlafzimmer] has been reported [online].
[20/03/2023, 11:56:17] [Meross] [Smart Wi-Fi Hub] has been reported [online].
[20/03/2023, 11:56:22] [Meross] [Smart Wi-Fi Hub] has been reported [offline].
[20/03/2023, 12:01:17] [Meross] [Badezimmer] has been reported [online].
[20/03/2023, 12:01:17] [Meross] [Wohnzimmer] has been reported [online].
[20/03/2023, 12:01:17] [Meross] [Flur] has been reported [online].
[20/03/2023, 12:01:17] [Meross] [Küche] has been reported [online].
[20/03/2023, 12:01:17] [Meross] [Schlafzimmer] has been reported [online].
[20/03/2023, 12:01:17] [Meross] [Smart Wi-Fi Hub] has been reported [online].
[20/03/2023, 12:01:21] [Meross] [Smart Wi-Fi Hub] has been reported [offline]. <--- Reported offline
[20/03/2023, 12:01:53] [Meross] [Badezimmer] current temperature [23°C]. <--- But reading temp
[20/03/2023, 12:06:07] [Meross] [Badezimmer] current state [off]. <--- And controlling state still works fine
[20/03/2023, 12:06:09] [Meross] [Badezimmer] current state [on].
[20/03/2023, 12:06:17] [Meross] [Badezimmer] has been reported [online].
[20/03/2023, 12:06:17] [Meross] [Wohnzimmer] has been reported [online].
[20/03/2023, 12:06:17] [Meross] [Flur] has been reported [online].
[20/03/2023, 12:06:17] [Meross] [Küche] has been reported [online].
[20/03/2023, 12:06:17] [Meross] [Schlafzimmer] has been reported [online].
[20/03/2023, 12:06:17] [Meross] [Smart Wi-Fi Hub] has been reported [online].
[20/03/2023, 12:06:17] [Meross] [Schlafzimmer] current target [19.5°C].
[20/03/2023, 12:06:21] [Meross] [Smart Wi-Fi Hub] has been reported [offline].
[20/03/2023, 12:06:23] [Meross] [Schlafzimmer] current target [17°C].
[20/03/2023, 12:06:28] [Meross] [Schlafzimmer] current state [off].
[20/03/2023, 12:06:29] [Meross] [Schlafzimmer] current state [on].
...
[20/03/2023, 17:49:03] [Meross] [Badezimmer] current temperature [24°C].
[20/03/2023, 17:51:17] [Meross] [Badezimmer] has been reported [online].
[20/03/2023, 17:51:17] [Meross] [Wohnzimmer] has been reported [online].
[20/03/2023, 17:51:17] [Meross] [Flur] has been reported [online].
[20/03/2023, 17:51:17] [Meross] [Küche] has been reported [online].
[20/03/2023, 17:51:18] [Meross] [Schlafzimmer] has been reported [online].
[20/03/2023, 17:51:18] [Meross] [Smart Wi-Fi Hub] has been reported [online].
[20/03/2023, 17:51:22] [Meross] [Smart Wi-Fi Hub] has been reported [offline].
[20/03/2023, 17:52:04] [Meross] [Badezimmer] current temperature [23°C].
[20/03/2023, 17:53:34] [Meross] [Badezimmer] sending update failed as the request timed out. <--- First timeouts
[20/03/2023, 17:54:00] [Meross] [Schlafzimmer] sending update failed as the request timed out.
[20/03/2023, 17:54:09] [Meross] [Schlafzimmer] sending update failed as the request timed out.
[20/03/2023, 17:55:40] [Meross] [Schlafzimmer] current state [off].
[20/03/2023, 17:55:42] [Meross] [Schlafzimmer] current state [on].
[20/03/2023, 17:56:17] [Meross] [Badezimmer] has been reported [online].
[20/03/2023, 17:56:17] [Meross] [Wohnzimmer] has been reported [online].
[20/03/2023, 17:56:17] [Meross] [Flur] has been reported [online].
[20/03/2023, 17:56:17] [Meross] [Küche] has been reported [online].
[20/03/2023, 17:56:17] [Meross] [Schlafzimmer] has been reported [online].
[20/03/2023, 17:56:18] [Meross] [Smart Wi-Fi Hub] has been reported [online].
[20/03/2023, 17:56:22] [Meross] [Smart Wi-Fi Hub] has been reported [offline].
[20/03/2023, 17:57:18] [Meross] [Schlafzimmer] sending update failed as the request timed out.
[20/03/2023, 17:57:28] [Meross] [Schlafzimmer] sending update failed as the request timed out.
[20/03/2023, 17:58:07] [Meross] Restarting child bridge... <--- Restarted child bridge
[20/03/2023, 17:58:07] [Meross] [Smart Wi-Fi Hub] mqtt connection closed.
[20/03/2023, 17:58:12] [Meross] Child bridge process ended
[20/03/2023, 17:58:12] [Meross] Process Ended. Code: 143, Signal: null
[20/03/2023, 17:58:19] [Meross] Restarting Process...
[20/03/2023, 17:58:21] [Meross] Launched child bridge with PID 18447
[20/03/2023, 17:58:23] Registering platform 'homebridge-meross.Meross'
[20/03/2023, 17:58:23] [Meross] Loaded homebridge-meross v9.0.1 child bridge successfully
[20/03/2023, 17:58:23] [Meross] Initialising plugin v9.0.1 | System linux | Node v18.15.0 | HB v1.6.0 | HAPNodeJS v0.11.0...
[20/03/2023, 17:58:23] Publishing bridge accessory (name: Meross, publishInfo: {
[20/03/2023, 17:58:23] [Meross] Plugin initialised. Setting up accessories....
[20/03/2023, 17:58:24] Homebridge v1.6.0 (HAP v0.11.0) (Meross) is running on port 51547.
[20/03/2023, 17:58:25] [Meross] [Badezimmer] initialising with options {"connection":"hybrid","lowBattThreshold":20}.
[20/03/2023, 17:58:25] [Meross] [Smart Wi-Fi Hub] [Badezimmer] subdevice initialised with id [*****].
[20/03/2023, 17:58:25] [Meross] [Wohnzimmer] initialising with options {"connection":"hybrid","lowBattThreshold":20}.
[20/03/2023, 17:58:25] [Meross] [Smart Wi-Fi Hub] [Wohnzimmer] subdevice initialised with id [*****].
[20/03/2023, 17:58:25] [Meross] [Flur] initialising with options {"connection":"hybrid","lowBattThreshold":20}.
[20/03/2023, 17:58:25] [Meross] [Smart Wi-Fi Hub] [Flur] subdevice initialised with id [*****].
[20/03/2023, 17:58:25] [Meross] [Küche] initialising with options {"connection":"hybrid","lowBattThreshold":20}.
[20/03/2023, 17:58:25] [Meross] [Smart Wi-Fi Hub] [Küche] subdevice initialised with id [*****].
[20/03/2023, 17:58:25] [Meross] [Schlafzimmer] initialising with options {"connection":"hybrid","lowBattThreshold":20}.
[20/03/2023, 17:58:25] [Meross] [Smart Wi-Fi Hub] [Schlafzimmer] subdevice initialised with id [*****].
[20/03/2023, 17:58:25] [Meross] [Smart Wi-Fi Hub] initialised with id [*****}].
[20/03/2023, 17:58:26] [Meross] ✓ Setup complete. Check out my other Homebridge plugins! https://github.com/bwp91
[20/03/2023, 17:58:33] [Meross] [Smart Wi-Fi Hub] has been reported [offline].
[20/03/2023, 18:02:07] [Meross] [Küche] current state [off]. <--- Controlling state works again
[20/03/2023, 18:02:13] [Meross] [Küche] current state [on].
[20/03/2023, 18:02:29] [Meross] [Schlafzimmer] current target [22°C].
[20/03/2023, 18:02:34] [Meross] [Schlafzimmer] current target [17°C].

Timeout in Home app:

Timeout in Meross app:

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 22 (3 by maintainers)

Most upvoted comments

I’m still experiencing this as well. My workaround with a cronjob restarting the Meross plugin child bridge every 20 minutes works fine for me though.

Yes I saw that… I’m not ready to do that yet 😃 I would highly prefer a clean fix than this workaround.

@schemers Yes, I’m running every plugin in its own child bridge.

@schemers I don’t think that our issues are related. Mine is only about this plugin, everything else (other plugins/child bridges as well as the main bridge) works totally fine even when requests to Meross time out.