The Problem: my PC doesn't like to sleep (the fans never turn off) and Wake-On-Lan can be really touchy, usually turning on my PC when I didn't ask it to and after only 2-3 minutes of sleep. Also, sometimes I forget to turn on my computer when I am at work or school so I can't access any of my files or services.
The Solution: I'm going to buy a Raspberry Pi. The Pi will host a web server (via wireless) which will have a single web page with a single button to Power On or Off my PC. When I click the button, I will use the GPIO pins on the Raspberry Pi to switch a relay connected to the power pins on my PC. This will all fit nicely inside my PC case.
So, I need to set up a web server on Linux, which I can do. I need to wire up a relay circuit which I can sorta do but my EE roommate can help me with. Then I need to code the web page to actually switch the relay which I have no idea how to do but my roommate says he does.
All in all I'm not sure how I'm going to fit this project into my time but I hope to get it done in the next month or so. Anyone done this sort of thing before?
Raspberry Pi, USB power brick, Wireless N adapter, and an old 4GB SD card I had lying around.
Installing the OS was extremely easy. Download the image, format the card, copy the files, and let it do its thing.
Setup was a breeze. I had to edit a few lines of text for my wifi settings and one or two clicks to enable SSH. I'm installing the web server components now and then I need to start reading up on coding for the GPIO pins and how to get my webpage to send a command there.
Last night I was also able to get the python libraries for the GPIO installed as well as messing around with the Pi a bit. If anyone wants a cheap way to play with Linux, this is a pretty amazing option.
I've been meaning to play around with a raspberry pi for a while.
Strongly recommend securing that page via htaccess or other means - is there a web based API you're using to interface the site with the hardware?
I was thinking about that. I'll do some simple security and might move it to an isolated VLAN so I don't have to worry about and intrusions. The web page will run on a non-standard port which will help.
As for interfacing the site with the hardware, I found that you can run terminal commands via php and so I should be able to run the python API triggers directly. I may wire up the reset button as well and then have the power button ping the PC first so it doesn't switch if the PC is already on, if that makes sense.