Open phantomski77 opened 3 months ago
A very similar issue (state not reflected in HK and Meross app when operated by meross_lan/HA) was reported in the past and it is likely due to a 'glitch' (say bug) in the device fw where maybe, if the device receives a command over HTTP, it doesn't broadcast the state change over HK. Have you tried 'forcing' the device protocol to use MQTT and see if any difference appears? This is just 'for knowledge' since, if it's a fw issue there's nothing we can do.
I have tried, but unfortunately I'm not able to change the setting.
If I select mqtt and submit, I get an error message:
Meross cloud profile ([e-mail]) doesn't allow MQTT publishing
I have also tried to reconfigure the device for local MQTT binding, but whatever local MQTT broker (local HA, my own with insecure access, both SSL and not) I have I select, I always get
unable to connect: TimeoutError
(the device is otherwise reachable on the network and can communicate to HA)
The Meross cloud profile ([e-mail]) doesn't allow MQTT publishing
is a reminder you have to configure your Meross account profile (in meross_lan) to allow MQTT publishing. This is an option you'll find by entering your account configuration under the meross_lan integration page.
It works as a kind of 'last safety measure' to prevent banning from Meross account services due to MQTT traffic growing too big.
There's a rate limiting feature always in place nevertheless that reduces the likelyhood of this (banning due to high traffic) happening so you should be safe enough by allowing MQTT publishing (at least just for trying out if this solves the issue)
First of all - thanks for your patience explaining all this and also for the amount of effort that went into making this integration. Reading through the docs and the functionality available, you've clearly put a lot of thought into this and it seems to use a lot of tools available to us in hass. So thank you.
I have enabled the MQTT publishing in the profile (missed this master option, sorry) and then switched one of the devices to MQTT connection protocol. I've tried to switch the outlet on / off a few times. No obvious errors in the debug log, but HomeKit still didn't play ball - no state changes were reflected there. Soon after that the rate limit was exceeded (probably because rest of the devices are "auto", so started using MQTT as well), so I've disabled it again.
Like you say, it might be a glitch in the device fw. Is there any way how to test it to be sure? is it worth trying to get it through Meross support? When it occurred before, did they respond to bug reports or it just suddenly started working with more recent fw?
Same thing is happening for the MSS110. One workaround I thought about was piggy-backing the HomeKit integration through HA and bridging it over to Apple's UI for the family. Watching this thread.
I'm also getting the same behaviour on the MSS310 - state not reflected back via Matter.
Version of the custom_component
5.3.0
Configuration
Describe the bug
I have a strange state synchronisation issue between Home Assistant, Apple HomeKit and Meross app.
I have installed the plug the following way:
Everything is correctly setup, everything works and shows correct entity values and states. There are no errors in the debug logs, all the polling and push (both HTTP and MQTT) seems to operate correctly.
However, there's a strange discrepancy of the outlet state in between the apps:
It's as if the Home Assistant command operates the physical switch, but the switch state is not forwarded as a state change to Meross App and Apple Home app.
To add to a confusion, it happens for all 4 of my MS315 Metering Plugs. It doesn't happen to 5 of my MSS426 Power Surge Protectors. Same setup, same configuration, same basically everything, just different device.
Debug log
Snippet of all 3 ways of switching (no warnings or errors, no obvious issues)