1.0.0 • Published 5 years ago

homebridge-http-opensprinkler v1.0.0

Weekly downloads
4
License
ISC
Repository
github
Last release
5 years ago

homebridge-http-opensprinkler

A switch plugin for homebridge (https://github.com/nfarina/homebridge) which integrates with HTTP(S) APIs.

A plugin for OpenSprinkler fw 1.8.3. Based on homebridge-http-sprinkler by goedh452 (https://github.com/goedh452/homebridge-http-sprinkler)

Installation

  1. Install homebridge using: npm install -g homebridge
  2. Install this plugin: npm install -g homebridge-http-opensprinkler
  3. Update your config.json configuration file

Configuration

NameRequiredDescription
accessoryYesHas to be HttpOpenSprinkler
nameNoName in home app (default OpenSprinkler)
iconNoIcon displayed in Home app (possible values: 0, 1, 2, 3; default 0)
onUrlYesURL for turning on the sprinkler
offUrlYesURL for turning off the sprinkler
timeoutNoHTTP request timeout in ms (default 5s)
checkStatusNoIndicator if status should be checked via the API (possible values: once, polling, no; default no)
pollingIntervalNoIf checkStatus is polling, the pollinginterval can be specified in milliseconds (default 3000 (3 seconds))
statusUrlNoURL to check the status via the API; required when checkStatus is once or polling
onValueNoValue for On when status is checked (default 1)
offValueNoValue for Off when status is checked (default 0)
useTimerNoIndication if a timer can be used (possible values: yes, no; default no)
defaultTimeNoDefault time in seconds the timer should be set to; can be changed in the settings page of the accessory, but resets every time homebridge is restarted; hence here the possibility to set a default
httpMethodNoMethod for sending requests (default GET)

Configuration sample based:

"accessories": [ 
       {
               "accessory": "HttpOpenSprinkler",
               "name": "Sprinkler backyard",
               "icon": 1,
               "onUrl": "http://192.168.1.22/sn1=1",
               "offUrl": "http://192.168.1.22/sn1=0",
               "timeout": 3000,
               "checkStatus": "polling",
               "pollingInterval": 5000,
               "statusUrl": "http://192.168.1.22/sn1",
               "onValue": "1",
               "offValue": "0",
               "useTimer": "yes",
               "defaultTime": 900,
               "httpMethod": "GET"
       }