YinHangCode / homebridge-mi-aqara

a homebridge plugin for XiaoMi Aqara plugin.
1.08k stars 154 forks source link

Aqara Motion Sensor Timeout #162

Open mtflud opened 6 years ago

mtflud commented 6 years ago

Hello,

First of all, thank you for your time developing such an awesome plugin!

I have various Aqara Motion Sensors (v2) and would like to make automations based on these. The problem is, "motion detected" status gets refreshed every ~2 minutes, which is a lot and my automations do not work as expected because of this.

Is there a way to reduce the motion detection status reporting to, say, at least 30 seconds? I also own one Philips Hue Motion sensor and it reports the status every ~15 seconds. which is great. Could we emulate this functionality?

Thanks!

DSchumacher2104 commented 6 years ago

The duration depends on sensor-type you select in Mi Home App (Icon). If you use occupancy sensor icon to "middle" position, it changes to about 5 sec.

mtflud commented 6 years ago

@DSchumacher2104 Thank you for your help! I tried changing the sensor's icon on the MiHome app but unfortunately the timeout is still the same. Could I be missing something? 🤔

daniel4099 commented 6 years ago

Hello

I Have them same issue with MotionSensor V2, can someone explain how to repair it ?

nikolaevigor commented 6 years ago

I managed to add timeout to motion sensor detection event. But it is only "frontend" solution, since motion sensor will not detect further motions in next time (I was not able to record this time, around 15-30 seconds). So is it a way to send command like "ok, I got it set motion to off" to the motion sensor? @YinHangCode

I suppose code here is doing somewhat simillar. https://github.com/YinHangCode/homebridge-mi-aqara/blob/1ae5949b65ecce5c8c90cc3ca3f27ecd0d466eee/parser/MotionSensor2Parser.js#L66-L83

nikolaevigor commented 6 years ago

@DSchumacher2104 's solution hasn't worked for me.

SEVSM commented 5 years ago

Hello 👋 Same problem.Does anyone solved this problem?

andreyoshev commented 5 years ago

Same, any updates?