rsg98 / homebridge-gpio-wpi2

Homebridge Raspberry Pi GPIO Platform (API 2) Plugin - using WiringPi as a backend
48 stars 16 forks source link

MotionSensor Update #37

Closed jvmahon closed 6 years ago

jvmahon commented 6 years ago

I've updated the index.js to allow for a Motion Sensor to be wired to the GPIO pins rather than just Contact Sensor. This adds a new variable to the config.json wehreby you set a "type" : "ContactSensor" or "type" : "MotionSensor" for each pin. I'm not familiar enough with GitHub to properly add this as a pull request. I'll try to figure that out, but in the meantime, I've attached the modified index.js and an example configuration file for those interested.

MotionSensor Update.zip

jvmahon commented 6 years ago

Changed this into a pull request, so closing the issue.