1.6.0 • Published 2 years ago

homebridge-http-sprinkler v1.6.0

Weekly downloads
2
License
ISC
Repository
github
Last release
2 years ago

homebridge-http-sprinkler

npm npm

Description

This homebridge plugin exposes a web-based sprinkler/valve to Apple's HomeKit and allows you to control it via HTTP requests.

Installation

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

Configuration

Core

KeyDescriptionDefault
accessoryMust be HttpSprinklerN/A
nameName to appear in the Home appN/A
onUrlURL to turn on sprinklersN/A
offUrlURL to turn off sprinklersN/A

Optional fields

KeyDescriptionDefault
icon (optional)Icon to be shown in the Home app (0, 1, 2, 3)0
checkStatus (optional)Whether the status should be checked via the API (once, polling, no)no
jsonPath (optional)JSON Path where the status can be found - required when checkStatus is once or pollingN/A
onValue (optional)Value for On when status is checkedOn
offValue (optional)Value for Off when status is checkedOff
useTimer (optional)Indication if a timer can be used (yes or no)no
defaultTime (optional)Default time (in seconds) the timer should be set to if enabled300
pollingInterval (optional)If checkStatus is set to polling, this is the time (in ms) between status checks3000

Additional fields

KeyDescriptionDefault
timeout (optional)Time (in milliseconds) until the accessory will be marked as Not Responding if it is unreachable5000
httpMethod (optional)HTTP method used to communicate with the deviceGET
model (optional)Appears under the Model field for the accessoryhomebridge-http-sprinkler
serial (optional)Appears under the Serial field for the accessoryhomebridge-http-sprinkler
manufacturer (optional)Appears under the Manufacturer field for the accessorygoedh452

Configuration Examples

Simple configuration:

"accessories": [
     {
       "accessory": "HttpSprinkler",
       "name": "HTTP Sprinkler",
       "onUrl": "http://myurl.com/on",
       "offUrl": "http://myurl.com/off"
     }
]

Sample based on Domoticz JSON API:

"accessories": [ 
    {
      "accessory": "HttpSprinkler",
      "name": "Sprinkler backyard",
      "icon": 1,
      "onUrl": "http://localhost:8080/json.htm?type=command&param=switchlight&idx=135&switchcmd=On",
      "offUrl": "http://localhost:8080/json.htm?type=command&param=switchlight&idx=135&switchcmd=Off",
      "timeout": 3000,
      "checkStatus": "polling",
      "pollingInterval": 5000,
      "statusUrl": "http://localhost:8080/json.htm?type=devices&rid=135",
      "jsonPath": "result[0].Status",
      "onValue": "On",
      "offValue": "Off",
      "useTimer": "yes",
      "defaultTime": 900,
      "httpMethod": "GET"
    }
]
1.6.0

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago

1.1.0

6 years ago