Skip to content
This repository has been archived by the owner on Mar 6, 2022. It is now read-only.

bug in clearing timeout #120

Open
alexandru-2016 opened this issue May 16, 2021 · 0 comments
Open

bug in clearing timeout #120

alexandru-2016 opened this issue May 16, 2021 · 0 comments

Comments

@alexandru-2016
Copy link

I have added logging and noticed the pir.watch sometimes sends consecutive false values (sometimes three times) before a new true value. Not sure why this happens, but when it does there will be multiple setTimeout called for deactivateMonitor.

So even if there is movement, the next movement detection will only deactivate the last setTimeout, and the others will still turn off the display at some point.

Before calling self.deactivateMonitorTimeout = setTimeout(function(), there should always be a clearTimeout, even in the (value == valueOff) case (line 177 of node_helper.js )

If you want I can do a pull request with this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant