question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

My MotionSensor updates are inconsistent

See original GitHub issue

I’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:closed
  • Created 7 years ago
  • Comments:24 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
NorthernMan54commented, Apr 3, 2017

FYI - I have 10.3 installed, and have this issue so I installed the hack, and the problem is gone 😉

0reactions
skrollmecommented, Aug 27, 2017

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Motion Sensor Integration - Inconsistent Behavior · Issue #73294
The problem I have the Yo-Link Home Assistant integration. I have two YoLink motion sensors. I have the sensors set up so that...
Read more >
Troubleshooting PIR Sensor and sensitivity adjustment
This adjustment is needed if your PIR is too sensitive or not sensitive enough (clockwise turn makes it more sensitive). However, If there...
Read more >
Xiaomi Motion Sensor - Inconsistent - Zigbee
Hello, I'm using an Xiaomi Motion Sensor together with the Conbee 2 stick. The sensor does not always pick up motion.
Read more >
Solved: Motion Detection help needed please, odd inconsist...
In this case, the camera triggers when there is both a PIR detection and pixel changes within the zone. If a car passes...
Read more >
Hue Motion Sensor for presence detection. Inconsistent ...
My conclusion: the problem is caused by software [firmware] not updating the Hue bridge.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found