2.0.5 • Published 3 years ago

homebridge-iovalve v2.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Homebridge GPIO Valve

Control a valve over a GPIO pin as a HomeKit valve accessory.

Features

  • Quick & easy configuration
  • Add as many valves as you need: just duplicate the configuration object
  • Supports timed valves with duration customizable within the Home app
  • Identify support: by default, pressing "Identify" in the Home app will open the valve for ten seconds
  • Logs each event (valve open, valve closed, identify) in the Homebridge log

Installation

sudo npm install homebridge-gpio-valve -g --unsafe-perm

Depending on how you have Node installed, you may or may not need sudo and the --unsafe-perm flag.

Configuration

NameDescriptionValid ValuesDefault
pinThe pin to use for opening and closing the valveThe GPIO pin number of any valid pin. The selected pin should not be written to by any external applicationsNone
openOnHighWhether or not the valve opens when the pin is hightrue or falsetrue
defaultDurationThe duration to open the value for when triggered. The user can change this value in the Home appA duration in seconds no greater than 3600 (one hour)600 seconds (ten minutes)
typeThe type of attached valve. Affects the icon displayed for the accessory in the Home app.As of iOS 11.3: "GENERIC_VALVE", "IRRIGATION", "SHOWER_HEAD", or "WATER_FAUCET""GENERIC_VALVE"
isTimedWhether or not the valve is on a timertrue or falsefalse
supportsIdentifyWhether or not the valve opens in responce to an identify request. The user can trigger an identify request when adding the accessory to their hometrue or falsetrue
identifyDurationThe duration to open the valve for in responce to an identify requestAny duration in seconds. Keep this valve as short as possible; just allow the valve to open and be identified10 seconds
storageDirectoryThe directory for storing the user set duration. The directory is created if it does not existThe path to any directory which is readable and writeable to NodeA subdirectory called gpio_valve within the Homebridge storage directory. Using the default Homebridge storage directory: ~/.homebridge/gpio_valve
manufacturerThe value of the manufacturer characteristic of the information serviceAny stringThe author of this package
modelThe value of the model characteristic of the information serviceAny string"GPIO Valve"
serialNumberThe value of the serial number characteristic of the information serviceAny string"None"
firmwareRevisionThe value of the firmware revision characteristic of the information serviceAny stringThe current version of this package

Sample

 {
    "accessory": "GPIOValve",
    "name": "Grass",
    "pin": 11,
    "openOnHigh": false,
    "isTimed": true,
    "defaultDuration": 1200,
    "type": "IRRIGATION"
}

Known Issues

  • As of iOS 11.3, the Home app only displays a special icon for irrigation valves. All other valve types receive the same generic icon.