Skip to main content

Remotely control power sockets from the Raspberry Pi

Project description

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

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 a plug socket on and off by number
switch_on(1)
switch_off(1)

switch_on(3)
switch_off(3)

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

# 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

energenie-0.2.0.tar.gz (2.4 kB view details)

Uploaded Source

File details

Details for the file energenie-0.2.0.tar.gz.

File metadata

  • Download URL: energenie-0.2.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for energenie-0.2.0.tar.gz
Algorithm Hash digest
SHA256 17dbf472024b6fadda8efbd1e421e8f87060f56d22a68a7cc54866106ef10ac9
MD5 7b4f75c6a4ed097cabd5f63671d09c9a
BLAKE2b-256 4868a3cbd09e3026484d49dabdce7fc19db0f6db2baebe5da99d2b988b3d5107

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page