-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MS600 light sensor unavailable #517
Comments
Upon further testing, it seems that this update issue is applicable to all MS600 sensors and not only the light sensor.
|
Hello @Lestat78,
By the look of your debug log the device is not locally reachable (over http) and that might be because either the ip address/hostname is wrong or because the device key is wrong (when the device key is wrong devices used to reply with an error but I have the feeling that this has changed lately and they now refuse to reply) If you have a diagnostic (or can grab a new one) pls submit it so I can better check. Another small experiment could be carried on by configuring the device entry in meross_lan to only use HTTP protocol. This way you'll surely loose 'instant' pushed updates coming through cloud MQTT but we can better check if the local polling queries work. This is needed because, as an optimization, meross_lan doesn't perform full state queries (over HTTP) when it detects updates can come through MQTT. Instead, when MQTT is unavailable, it will always perform these 'full state queries' through HTTP at every 'polling cycle'. Also, when you configure 'HTTP only' for the device entry, the code will accept the config change only if the HTTP connection works so that we can also check that. |
Hi @krahabb, |
Well, the HTTP connection is ok so everything is working as expected. |
Thank you, let me know if there anything I can do to help. |
Hi, I have the same problem with this sensor. HTTP only does not work and when on Auto the changes have a high latency, maybe because of the "cloud only" push. |
Hello, |
Hi @krahabb , |
Occasionally, the light sensor from MS600 devices is reported as "unavailable". When this happens, the diagnostic JSON does not, in fact, contain any reference to "light".
I suspect this happens if a device does not register any luminance change for an extended period of time (like if placed inside a dark place with no windows like a garage or storeroom), so it stops sending values for the sensor until there is a significant change and in fact I've noticed this happening more frequently with a sensor I have in the garage. I will monitor this behaviour to better understand why this happens.
BTW, when this happens the Meross app reports 0lux as usual and the other sensors in HA work correctly.
While not critical, this causes issues with automations that rely on both presence detection and light level (for example, to turn on the light if there is presence and light level below a certain threshold), as these will not trigger if the light sensor is unavailable (I guess this could probably be worked around with a template sensor that returns 0 if the status is unavailable).
If my assumption above is correct, may I suggest implementing a persistence of the last available value for this sensor (or simply, return 0), instead of reporting it as unavailable?
Thank you!
UPDATE1:
Yesterday night for whatever reason the garage sensor did not update at all in HA and got stuck on "presence detected". BTW, the device was working correctly and the Meross app notified me of "absence" when I left. This morning I manually turned off the light and reloaded the device in HA. After a short while, the sensor got updated with the latest values (so, correctly reporting absence), but the light sensor was "unavailable". I turned on the light and the value got then updated in HA. It seems that my assumption about the sensor not reporting the light status if there are no changes for a while may be correct.
The text was updated successfully, but these errors were encountered: