1.0.2 • Published 8 months ago
homebridge-electromagnetic-lock v1.0.2
Homebridge GPIO Electromagnetic Lock
Homebridge plugin to control electromagnetic lock via Raspberry Pi GPIO pins.
Objective
Electromagnetic lock working with wiringpi
Installation
- install homebridge
npm install -g homebridge
- install this plugin
npm install -g homebridge-wiringpi-electromagnetic-lock
- update your
~/.homebridge/config.json
file (usesample-config.json
as a reference)
Configuration
Sample accessory:
"accessories": [
{
"accessory": "ElectromagneticLock",
"name": "Lock",
"lockPin": 5,
"activeLow": true,
"unlockingDuration": 2
}
]
Fields:
accessory
must always be ElectromagneticLockname
accessory name, e.g. LocklockPin
pin for unlocking lock (use gBCM numbering, run gpio readall)activeLow
optional, default: true true: relay activated by low state (0), false: relay activated by high state (1), affects lockPinunlockingDuration
optional, default: 2 how long lockPin should be active (seconds)
Troubleshooting
- check platform: Homebridge
- check plugin dependency: underscore(Install: npm install underscore -> https://www.npmjs.com/package/underscore)
- check plugin dependency: rpi-gpio(Install: np install rpi-gpio -> https://www.npmjs.com/package/rpi-gpio)