Update 'README.md'

This commit is contained in:
kiichan 2019-08-15 23:49:31 -05:00
parent d01acda8f5
commit 9edf31d3d0

View file

@ -1,3 +1,11 @@
# serv-power # serv-power
Using a Raspberry Pi to control a togglable power strip that a laptop-server is plugged in to. 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](https://dlidirect.com/products/iot-power-relay)
# 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.