feat: add PIRMotionInput plugin for HC-SR501 motion sensor#2476
Open
Wanbogang wants to merge 3 commits intoOpenMind:mainfrom
Open
feat: add PIRMotionInput plugin for HC-SR501 motion sensor#2476Wanbogang wants to merge 3 commits intoOpenMind:mainfrom
Wanbogang wants to merge 3 commits intoOpenMind:mainfrom
Conversation
- Support four hardware backends: serial, gpio, zenoh, mock - Serial connector for Arduino/USB microcontrollers - GPIO connector for Raspberry Pi and Jetson (RPi.GPIO / Jetson.GPIO) - Zenoh connector for network-distributed setups - Mock connector as default for safe out-of-box experience - Cooldown parameter to prevent LLM context flooding - All backends degrade gracefully if library not installed - Add pir_guard.json5 config with all required schema fields - Add docs/robotics/pir_hc_sr501.md hardware documentation - Update docs/developing/4_inputs.md with PIR entry
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new input plugin for the HC-SR501 Passive Infrared (PIR) motion sensor. The plugin converts hardware motion detection events into natural language context for the LLM. #365
Changes
src/inputs/plugins/pir_motion.py— main plugin with four hardware backendsconfig/pir_guard.json5— ready-to-use security guard configdocs/robotics/pir_hc_sr501.md— hardware wiring and configuration guidedocs/developing/4_inputs.md— added PIR entry to input plugin examplestests/inputs/plugins/test_pir_motion.py— 55 tests, 94% coverageHardware Backends
serialgpiozenohmockNotes
mock— safe to run on any machine without hardwarecooldownparameter prevents LLM context flooding when sensor stays HIGH (HC-SR501 can hold HIGH up to ~200s)