No commit activity in last 3 years
No release in over 3 years
Lock or unlock a door using this plugin with the HumbleRPi gem
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 0.4.2, ~> 0.4
 Project Readme

Introducing the Humble_RPi-plugin-doorlock gem

Usage

require 'humble_rpi-plugin-doorlock'

dl = HumbleRPiPluginDoorLock.new(settings: {pins: [4]})
dl.start
dl.on_doorlock_message 'unlock'

The above example is for testing purposes only.

Using the plugin with Humble_RPi gem

require 'humble_rpi'
require 'humble_rpi-plugin-doorlock'

r = HumbleRPi.new device_name: 'ottavia', sps_address: '192.168.4.140',\
  plugins: {DoorLock: {pins: [4]} }
r.start

As you can see above the named keyword plugins expects a Hash with each item containing a key for the name of the plugin and a value which contains the settings.

Unlocking the door using an SPS message

require 'sps-pub'

SPSPub.notice 'HumbleRPi/root/ottavia/do/doorlock: unlock', 'sps'

Resources

humblerpi plugin doorlock gem