Skip to content
ReinierNel edited this page Jan 13, 2022 · 4 revisions
██████╗ ███████╗██╗      █████╗ ██╗   ██╗ ██████╗████████╗██╗     
██╔══██╗██╔════╝██║     ██╔══██╗╚██╗ ██╔╝██╔════╝╚══██╔══╝██║     
██████╔╝█████╗  ██║     ███████║ ╚████╔╝ ██║        ██║   ██║     
██╔══██╗██╔══╝  ██║     ██╔══██║  ╚██╔╝  ██║        ██║   ██║     
██║  ██║███████╗███████╗██║  ██║   ██║   ╚██████╗   ██║   ███████╗
╚═╝  ╚═╝╚══════╝╚══════╝╚═╝  ╚═╝   ╚═╝    ╚═════╝   ╚═╝   ╚══════╝
                                                                                                      

What is relayctl?

It is a collection of shell scripts that provides the ability to switch relays connected to the GPIO pins on and off via CLI, schedule, external switches connected to the GPIO pin, and a REST API.

Why write it in Shell scripts and not Python or Golng?

The idea was to keep it lightweight and dependencies less. The only other programs this system dependent on is nginx and fcgiwrap if the API is enabled.

What can you use this for?

Well, I mainly use it to automate when my water heater geysers switch on or off via the schedule feature to save some money on the utility bill, and when my home's reserve water supply gets low I switch on a water pump automatically using the external switches feature to top it up. But you could use it to switch on or off any appliance so long the relays connected to the Pi can support the amperage.

Clone this wiki locally