Skip to content

py-webrelais offers a REST-API to control the K8IO Relais-Card

Notifications You must be signed in to change notification settings

k00mi/py-webrelais

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py-webrelais

What it does

py-webrelais offers a REST-API to control the [1] K8IO Relais-Card from Pollin, connected to the parallel port. Its developed explicitly for Linux, but should run on Windows, too (not tested)

Basic Usage

  • GET / Shows a page to control the relais card

  • POST /ports/[0-7]? Set a relais

  • GET /ports/[0-7]? Get the state of a specific relais

  • DELETE /ports/[0-7]? Set relais to off

If no number is given, it will return/set/reset all relais

Dependencies

  • flask
  • pyparallel

Installation

sudo apt-get install python-parallel python-flask

You need to do this to get the parallel library to work:

sudo rmmod lp
sudo modprobe ppdev

Add your user to the lp group or change the permissions on /dev/parport0

Now everything should work fine

[1] http://www.pollin.de/shop/dt/NzcyOTgyOTk-/Bausaetze_Module/Bausaetze/Bausatz_PC_Relaiskarte_K8IO.html

About

py-webrelais offers a REST-API to control the K8IO Relais-Card

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 51.0%
  • PHP 32.2%
  • Haskell 16.8%