Using a Raspberry Pi to control a togglable power strip that a laptop-server is plugged in to.
Go to file
kiichan 9edf31d3d0 Update 'README.md' 2019-08-15 23:49:31 -05:00
LICENSE Initial commit 2019-08-15 23:35:28 -05:00
README.md Update 'README.md' 2019-08-15 23:49:31 -05:00
client.py Add 'client.py' 2019-08-15 23:38:08 -05:00
server.py Add 'server.py' 2019-08-15 23:36:00 -05:00

README.md

serv-power

Using a Raspberry Pi to control a togglable power strip that a laptop-server is plugged in to. This is completely tailored to my own needs and is not necessarily meant to be something anyone can download and run. I've put it here to serve as some inspiration for others who may have similar needs or situations.

The power strip I use is one of these

Usage

Put server.py on the Raspberry Pi and run the script on boot with sufficient privileges to control the GPIO pins. The script is set up to use pin 36 to toggle the power strip, so update that if you don't want to use that pin.

Put client.py on your server and run it every X minutes using cron or similar. Change the server_ip variable in client.py to have your server's IP address.