Control relay(s) with a Raspberry Pi. Should run as a system service and update the relay state(s) based on messages via MQTT/AMQP or physical momentary switch(es).
Place populated config.json
next to main.py
with configured values. See config.sample.json
for what this should look like.
Copy raspberry-pi-relay-controller.service
to /etc/systemd/system
and then run sudo systemctl start raspberry-pi-relay-controller.service
. If satisfied, enable it with sudo systemctl enable raspberry-pi-relay-controller.service
. The service can be stopped at any time by running sudo systemctl stop raspberry-pi-relay-controller.service
.
- set up messaging via RabbitMQ
- consume messages to toggle relay channels
- publish messages with latest status of relay channels
- add output logging of switch state changes and around RabbitMQ messages
- look into how to properly package this for easier installation/deployment (thinking about installing python dependencies)
- tests??