ediplug_ctrl

command module
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL