Skip to content

Matthias-pixel/voltcraft-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

voltcraft-api

Web API for Voltcraft SEM6000 Outlets

Getting started

1. Clone repository

$ git clone --recurse-submodules https://github.com/Matthias-pixel/voltcraft-api.git voltcraft-api
$ cd voltcraft-api

2. Setup environment

  1. Create a virtual environment
$ virtualenv -p python3 venv
  1. Enter the virtual environment
$ source venv/bin/activate
  1. Install packages
$ pip3 install -r requirements.txt

Usage

1. Configure server

Configure aliases in config.yaml

3. Start server

  1. Go into the server directory
$ cd server
  1. Start server
$ python3 -m voltcraft_api

Use API

1. Turn an outlet on

GET /v1/on/{alias}
replace {alias} with the outlet's alias

2. Turn an outlet off

GET /v1/off{alias}

3. Get measurement data

GET /v1/info/{alias}

4. List all outlets from config.yaml

GET /v1/list

About

Web API for Voltcraft SEM6000 Outlets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published