Hello, friends. I don’t speak English well, sorry for that.
I have installed home assistant in venv.
Everything worked well, but a few days ago, motion sensors began to malfunction. I have 4 sensors and they all work poorly.
I added a line to the config:
logger:
default: info
logs:
xiaomi_gateway: debug
Then I saw that when a motion is detected, the xiaomi gateway sometimes sends the event “motion” and “lux”, and sometimes just “lux”:
2020-02-02 15:06:44 DEBUG (Thread-2) [xiaomi_gateway] MCAST (report) << {'cmd': 'report', 'model': 'sensor_motion.aq2', 'sid': '158d0003f*****', 'short_id': 19236, 'data': '{"lux":"18"}'}
2020-02-02 15:06:44 DEBUG (Thread-2) [xiaomi_gateway] MCAST (report) << {'cmd': 'report', 'model': 'sensor_motion.aq2', 'sid': '158d0003f*****', 'short_id': 19236, 'data': '{"status":"motion"}'}
and only “lux” event, when motion detected:
2020-02-02 15:08:03 DEBUG (Thread-2) [xiaomi_gateway] MCAST (report) << {'cmd': 'report', 'model': 'sensor_motion.aq2', 'sid': '158d0003f*****', 'short_id': 19236, 'data': '{"lux":"16"}'}
It can work well for a while and detect motion every time, but then it starts to work badly again.
All other sensors and switches work well. I installed the home assistant on a new SD card with a clean config, but this failed. I removed the sensors from the gateway and reconnected them, but that didn’t help either. I don’t know what to do, maybe someone had this? Thanks.