Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

radar based motion detection rapidly calls both activate and deactivate. #3

Open
kennyrkun opened this issue Apr 11, 2023 · 0 comments
Assignees
Labels
bug: confirmed Something isn't working help wanted Extra attention is needed

Comments

@kennyrkun
Copy link
Member

kennyrkun commented Apr 11, 2023

The Radar motion detection module seems to call when_activated and when_deactivated over and over, many times per second, spamming the device API with updates. obviously, this is bad.

I have almost no idea why this could be happening, aside from perhaps loose pins on the detector, or perhaps a defective detector. The status light that is directly tied into the radar detector's output pin lights up consistently though, and does not flash. Though, it may not be flashing because the updates happen so frequently. Perhaps some kind of visual or audible cue that a network request is being made will make diagnosing easier.

It is possible that the DitigalInputDevice class from GPIOZero repeats back and fourth between the active and inactive state, causing the methods to be called repeatedly. Other classes in GPIOZero have the capability of ignoring subsequent requests of the same type. See Button and DigitalInputDevice

@kennyrkun kennyrkun added bug: confirmed Something isn't working help wanted Extra attention is needed labels Apr 11, 2023
@kennyrkun kennyrkun self-assigned this Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant