This homebridge plugin was inspired by (https://github.com/dhop90/homebridge-http-esp8266-battery) and based on the homebridge examples. This plugins exposes a web-based battery status to Apple's HomeKit. Using simple HTTP requests, the plugin displays the current SOC (State Of Charge) of a connected AGM battery.
- Install homebridge
- Install this plugin:
npm install -g homebridge-http-battery-soc
- Update your
config.json
file
"accessories": [
{
"accessory": "esp8266Battery",
"name": "esp8266Battery",
"apiroute": "http://192.168.x.x,
"pollInterval": 300, //default (optional)
"timeout": 10000 //default (optional)
}
]
Key | Description | Default |
---|---|---|
accessory |
Must be accessory | N/A |
name |
Name to appear in the Home app | N/A |
apiroute |
Root URL of your device | N/A |
pollInterval |
Time (in seconds) between device polls | 300 |
timeout |
Time (in milliseconds) until the accessory will be marked as Not Responding if it is unreachable | 10000 |
Example of expected response for 50% State Of Charge (SOC)
{
"charge": 50
}