Skip to content

Interface control for Energenie sockets using Raspberry Pi controller board

License

Notifications You must be signed in to change notification settings

drweaver/socket-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

socket-control

A service to control Energenie sockets using the Raspberry Pi control board (PiMote). Communication via MQTT.

Installation

Dependencies

  1. MQTT - on a Raspberry Pi you can install mosquitto.
sudo apt-get update && sudo apt-get install mosquitto
  1. PiMote Energenie board attached to Raspberry Pi.

Docker Method (recommended)

  1. Install docker
curl -sSL https://get.docker.com | sh

sudo systemctl enable docker

sudo systemctl start docker

sudo usermod -aG docker $(whoami)
  1. Run the socket-control container
docker run --restart=always --privileged -e MQTT_URL=mqtt://<IP/name>:<port> -e MQTT_USERNAME=<user> -e MQTT_PASSWORD=<pass> -d --name socket-control handymoose/rpi:socket-control

Native method

  1. Install NodeJS v6+

  2. With apt-get install python python-gpiozero python-rpi.gpio

  3. Clone the repository, run npm install, run node index.js

Usage

MQTT API

State topics (to subscribe to):

home/socket/[1-4] on|off

Change topics (to publish to, retain=false):

home/socket/[1-4]/set on|off

Example, socket 3 is currently off, topic will be:

home/socket/3 off

to turn on socket 3 publish following message:

home/socket/3/set on

About

Interface control for Energenie sockets using Raspberry Pi controller board

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published