github.com/Luzifer/ediplug_ctrl


Properties

Last built 1 month ago using go version go1.7.5 linux/amd64 and 120 seconds of time

Downloads
Filename
File Size
 
ediplug_ctrl_master_darwin-386.zip
2.7MiB
ediplug_ctrl_master_darwin-amd64.zip
2.9MiB
ediplug_ctrl_master_linux-386.zip
2.7MiB
ediplug_ctrl_master_linux-amd64.zip
2.9MiB
ediplug_ctrl_master_linux-arm.zip
2.6MiB
ediplug_ctrl_master_windows-386.zip
2.6MiB
ediplug_ctrl_master_windows-amd64.zip
2.8MiB
Project-Readme for this version

Download on GoBuilder License: Apache v2.0 GoDoc reference Go Report Card

Luzifer / ediplug_ctrl

ediplug_ctrl is a small webserver to wrap some amount of EdiPlug SP2101W smart plugs. It is capable of fetching metrics from those plugs and to set the state through a simple API instead of messing with XML on the controlling side.

Usage

Starting

# ediplug_ctrl --help
Usage of ./ediplug_ctrl:
      --ip=[]: IPs of plugs to monitor / control
      --listen=":3000": Address to listen on for HTTP interface
      --password="1234": Password of the plugs
      --poll=10: Poll every N seconds
      --version[=false]: Show version and exit

You can run the ediplug_ctrl using docker or as a single binary:

# docker run luzifer/ediplug_ctrl --ip=10.0.0.111

# ./ediplug_ctrl --ip=10.0.0.111

API

The API exposes following methods:

  • /metrics - Metrics endpoint to be fetched by a Prometheus instance
  • /switch/<plug name>/<on/off> - Control the plug via its name you set in the settings