-
Notifications
You must be signed in to change notification settings - Fork 139
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
Add support for attached motion sensor on GPIO #34
base: master
Are you sure you want to change the base?
Conversation
That looks great. I do have a HC-SR501 IR motion sensor. Hopefully I can test the pull request asap. |
This assumes running on Raspberry Pi, using an HC-SR501. This device outputs a HIGH signal when motion is detected, or a low signal when no motion is detected after a certain delay. Can be set by specifying --motion-pin to the GPIO pin on the raspberry to which the HC-SR501 data pin is connected. Implements brutella#5
667ac5b
to
8a12572
Compare
FYI I tested this change today with an actual sensor, and the motion device in Homekit worked perfectly. |
Hello I'm new here but find the hkcam project very intreresting. The connections between the Pi and RCWL-0516 are as follows. More infos on how to connect this motion detector can be found here |
if err != nil { | ||
log.Info.Panic(err) | ||
} | ||
pin := rpio.Pin(10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that must be:
pin := rpio.Pin(10) | |
pin := rpio.Pin(motionPin) |
Is there any way to get this PR approved and documented a little? It's exactly what I'm looking for |
I don't know Go so I don't really know what I'm doing. Also I don't have a HC-SR501 myself yet, so this is more theoretical, but figured it might be useful for some.
This assumes running on Raspberry Pi, using an HC-SR501. This device
outputs a HIGH signal when motion is detected, or a low signal when
no motion is detected after a certain delay.
Can be set by specifying --motion_pin to the GPIO pin on the raspberry
to which the HC-SR501 data pin is connected.
Implements #5