RPi-Distro / python-energenie

Remotely control power sockets from the Raspberry Pi

Home Page:https://pypi.python.org/pypi/energenie

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Energenie

Python module to control the Energenie add-on board for the Raspberry Pi used for remotely turning power sockets on and off.

DEPRECATED

This library is deprecated in favour of GPIO Zero which has added Energenie support.

Installation

On Raspberry Pi, install the energenie module in pip.

Python 3:

sudo apt-get install python3-pip
sudo pip-3.2 install energenie

Python 2:

sudo apt-get install python-pip
sudo pip install energenie

Usage

Example usage:

from energenie import switch_on, switch_off
from time import sleep

# turn all plug sockets on and off
switch_on()
switch_off()

# turn a plug socket on and off by number
switch_on(1)
switch_off(1)

switch_on(3)
switch_off(3)

# turn some plug sockets on, then turn them off after 10 seconds
switch_on(1)
switch_on(4)
sleep(10)
switch_off(1)
switch_off(4)

Contributors

Open Source

About

Remotely control power sockets from the Raspberry Pi

https://pypi.python.org/pypi/energenie

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%