1.0.2 • Published 8 months ago

homebridge-electromagnetic-lock v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Homebridge GPIO Electromagnetic Lock

Homebridge plugin to control electromagnetic lock via Raspberry Pi GPIO pins.

Objective

Electromagnetic lock working with wiringpi

Installation

  1. install homebridge npm install -g homebridge
  2. install this plugin npm install -g homebridge-wiringpi-electromagnetic-lock
  3. update your ~/.homebridge/config.json file (use sample-config.json as a reference)

Configuration

Sample accessory:

"accessories": [
  {
    "accessory": "ElectromagneticLock",
    "name": "Lock",
    "lockPin": 5,
    "activeLow": true,
    "unlockingDuration": 2
  }
]

Fields:

  • accessory must always be ElectromagneticLock
  • name accessory name, e.g. Lock
  • lockPin 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 lockPin
  • unlockingDuration optional, default: 2 how long lockPin should be active (seconds)

Troubleshooting