AlexxIT / SonoffLAN

Control Sonoff Devices with eWeLink (original) firmware over LAN and/or Cloud from Home Assistant
https://github.com/AlexxIT/Blog
MIT License
2.69k stars 414 forks source link

SNZB-06P Light sensor random readback #1501

Open spialla opened 1 week ago

spialla commented 1 week ago

The snzb-06p show random light detection status. No evidence of error. Do you have any solution?

AlexxIT commented 1 week ago

You can collect debug logs and make sure the integration is displaying what the cloud is sending https://github.com/AlexxIT/SonoffLAN?tab=readme-ov-file#issues

spioli commented 1 week ago

Here is a series of test. Looks like the light detection is updated when human presence is detected. When the room is dark the "brState" is missing.

Event with light in the room: 2024-10-07 10:56:20.965 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800a70e4 <= Cloud3 | {'sensitivity': 3, 'judgeTime': 15, 'human': 1, 'trigTime': 1728291380885, 'brState': 'brighter'} | None 2024-10-07 10:56:40.037 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800a70e4 <= Cloud3 | {'sensitivity': 3, 'judgeTime': 15, 'human': 0, 'trigTime': 1728291399988} | None

Event without light: 2024-10-07 10:59:22.519 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800a70e4 <= Cloud3 | {'sensitivity': 3, 'judgeTime': 15, 'human': 1, 'trigTime': 1728291558951} | None 2024-10-07 10:59:41.080 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800a70e4 <= Cloud3 | {'sensitivity': 3, 'judgeTime': 15, 'human': 0, 'trigTime': 1728291580873} | None

AlexxIT commented 1 week ago

It's usual situation for many motion sensors on market. They updating light only with motion event.

spioli commented 1 week ago

Ok, with an automation works properly! Thank you!