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

Open
opened 2023-04-10 21:45:24 -04:00 by kennyrkun · 0 comments
kennyrkun commented 2023-04-10 21:45:24 -04:00 (Migrated from github.com)

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

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](https://gpiozero.readthedocs.io/en/stable/index.html) have the capability of ignoring subsequent requests of the same type. See [Button](https://gpiozero.readthedocs.io/en/stable/api_input.html#button) and [DigitalInputDevice](https://gpiozero.readthedocs.io/en/stable/api_input.html#digitalinputdevice)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kerrishaus/portal-rpi#3
No description provided.