1.1.2 • Published 10 months ago
homebridge-gpio-electromagnetic-lock v1.1.2
Homebridge GPIO Electromagnetic Lock
Homebridge plugin to control electromagnetic lock via Raspberry Pi GPIO pins.
Motivation
I haven't found similar script working with Raspberry Pi GPIO.
Installation
- install homebridge
npm install -g homebridge - install this plugin
npm install -g homebridge-gpio-electromagnetic-lock - update your
~/.homebridge/config.jsonfile (usesample-config.jsonas a reference)
Configuration
Sample accessory:
"accessories": [
{
"accessory": "ElectromagneticLock",
"name": "Lock",
"lockPin": 5,
"doorPin": 16,
"activeLow": false,
"reedSwitchActiveLow": false,
"unlockingDuration": 2,
"lockWithMemory": true
}
]Fields:
accessorymust always be ElectromagneticLocknameaccessory name, e.g. LocklockPinpin for unlocking lock (use gpio numbering, not physical)doorPinoptional door contact sensor, ignored when lockWithMemory is set to falseactiveLowoptional, default: true true: relay activated by low state (0), false: relay activated by high state (1), affects lockPinreedSwitchActiveLowoptional, default: true true: reed switch activated by low state (0), false: reed switch activated by high state (1), affects doorPinunlockingDurationoptional, default: 2 how long lockPin should be active (seconds)lockWithMemoryoptional, default: true true: electromagnetic lock that stays unlocked until full door cycle, false: stays unlocked only for unlockingDuration seconds
Troubleshooting
- check platform: Homebridge
- check plugin dependency: rpio
- or create issue