No description
Find a file
Alexandra Magin 9d0862826f Allow overriding broadcast address used in device discovery.
This allows directed broadcast to $BROADCAST_ADDR
2018-09-10 18:30:43 -07:00
.dockerignore initial 2018-01-28 16:31:27 +01:00
.gitignore initial 2018-01-28 16:31:27 +01:00
Dockerfile initial 2018-01-28 16:31:27 +01:00
index.js initial 2018-01-28 16:31:27 +01:00
package-lock.json Adding package-lock 2018-08-16 19:07:37 -07:00
package.json initial 2018-01-28 16:31:27 +01:00
readme.md Allow overriding broadcast address used in device discovery. 2018-09-10 18:30:43 -07:00
reporter.js Allow overriding broadcast address used in device discovery. 2018-09-10 18:30:43 -07:00

hs110 influx exporter

A TP-link hs110 smart plug exporter for influxDB

Install

git clone https://github.com/cgarnier/hs110-influx.git
npm i

Usage

TIMER=1000 \
DEBUG=true \
INFLUX_HOST=influx.example.com \
INFLUX_USERNAME=root \
INFLUX_PASSWORD=blah \
HOSTNAME=rig_github \
BROADCAST_ADDR=10.0.0.255 \
npm start

All environment variables are optional, defaults are:

TIMER=1500
DEBUG=<unset>
INFLUX_HOST=localhost
INFLUX_PASSWORD=root
HOSTNAME=<os.hostname()>
BROADCAST_ADDR=<defaults to 255.255.255.255 in tplink_smarthome_api>

Docker usage

# Run the exporter
docker run \
  -e INFLUX_HOST=influx.example.com \
  -d cgarnier/hs110-influx

Metrics

Automatically discovers HS110 devices on the local network. Each device is tagged by its human readable 'alias' string.

This exporter export one metric: power_consumption with current, power, total and voltage.