My MotionSensor updates are inconsistent
See original GitHub issueI’m attempting to trigger the MotionDetected characteristic in a simulated MotionDetector accessory. When I set the value to ‘true’ - sometimes it shows triggers on my phone, rarely (but occasionally) it will be trigger an automation it is set to trigger. It never works if I don’t have my phone actively watching and almost never works when connecting remotely from a different network (via AppleTV)
I’ve tried multiple ways to set the Characteristic, spend hours looking through examples and the debug logs, but for the life of me can’t figure out why sometimes it works, and sometimes not. Below are two log snips - where you can see one time it’s sending the HTTP event, and one time it doesn’t.
Working:
[3/4/2017, 4:48:55 PM] [AWS] Messages matches TestMotion
[3/4/2017, 4:48:55 PM] [AWS] >>>>>> doing stuff <<<<<<<
[3/4/2017, 4:48:55 PM] [AWS] (set): TestMotion -> true
Sat, 04 Mar 2017 21:48:55 GMT EventedHTTPServer [::ffff:192.168.171.120] Sending HTTP event '12.9' with data: {"characteristics":[{"aid":12,"iid":9,"value":true}]}
Not Working:
[3/4/2017, 4:46:11 PM] [AWS] Messages matches TestMotion
[3/4/2017, 4:46:11 PM] [AWS] >>>>>> doing stuff <<<<<<<
[3/4/2017, 4:46:11 PM] [AWS] (set): TestMotion -> true
Here are the multiple ways I’ve tried calling
// service.getCharacteristic(Characteristic.MotionDetected).setValue(true);
// service.setCharacteristic(Characteristic.MotionDetected, true);
service.getCharacteristic(Characteristic.MotionDetected).updateValue(true);
I’d really appreciate a pointer in the right direction. The code is pretty straightforward:
https://github.com/jspv/homebridge-sqs/blob/updatedebug/index.js#L190
Issue Analytics
- State:
- Created 7 years ago
- Comments:24 (8 by maintainers)
Top GitHub Comments
FYI - I have 10.3 installed, and have this issue so I installed the hack, and the problem is gone 😉
Is there an “current state” on this? Did the later/stable 10.3.x iOS Versions fix this for you @jspv? I’m still facing the problem with - for example homebridge-people (register and immediate unregister >> no realtime pushes on state changes) - but with the Homekit Accessory Simulator the occupancy-statechanges pop up in realtime inside Home.app.