1.0.2 • Published 10 months ago

homebridge-http-leak-sensor v1.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
10 months ago

Homebridge HTTP Leak Sensor

Description

This homebridge plugin exposes a web-based Leak Sensor to Apple's HomeKit. Using simple HTTP requests, the plugin allows you to monitor the status of leak sensors.

Leak sensors enabled with this plugin will appear in Homekit as sensors. You will be able to check whether or not they detect a leak. When a leak is detected Homekit will send you CRITICAL alert notifications.

npm.io

npm.io

npm.io

Installation

  1. Install homebridge
  2. Install this plugin. npm install -g homebridge-http-leak-sensor.
  3. Configure the accessory in config.json.

Configuration

"accessories": [
    {
        "accessory": "HomebridgeHTTPLeakSensor",
        "name": "Leak Sensor",
        "url": "http://192.168.1.54/status",
        "pollInterval": 60,
        "failedRequestsLimit": 100,
        "manufacturer": "Homebridge",
        "model": "Leak Sensor",
        "serialNumber": "ESP-32"
    }
]

Required

KeyDescriptionDefault
accessoryMust be "HomebridgeHTTPLeakSensor"
nameName to appear in the Home app
urlURL route to your device

Optional

KeyDescriptionDefault
pollIntervalTime (in seconds) to check device status.60
failedRequestsLimitLimit of failed requests that can be made to url before the plugin stops making requests. Value of 0 allows unlimited failed requests.120
modelAppears under the Model field for the accessory"Leak Sensor"
serialAppears under the Serial field for the accessory"000000"
manufacturerAppears under the Manufacturer field for the accessory"Homebridge"

Device API

Your Leak Sensor API should be able to return JSON information when it receives /status:

{
    "currentState": "WET"
}
StateDescription
"WET"Device is detecting a leak.
"DRY"Device is not detecting a leak.

Sensors

This plugin is intended to communicate with very simple DIY leak sensors. To build your own Leak Sensor see sample code in the /examples folder.

npm.io

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago