4 Answers
4

Power On

You can simply enable Wake-on-LAN on your computer through BIOS setup, then use any of the several WOL apps to send the power-on command over the network. Some apps like SyncMe also include WOL functionality, so a separate WOL app may not be needed.

Shutdown on Windows

In general it will involve some server utility installed on the computer, and the client-side Android app communicating with it, for example oneID. These apps usually include other features, which may be overkill. You could use SSH and call the shutdown.exe utility, but it may be overkill too. Besides, these solutions may not shut down Windows "properly". For example, neither oneID nor shutdown.exe were able to trigger my "backup on logoff" routine.

HTTP Shutdown

For these reasons I end up writing my own small solution. HTTP Shutdown is a small web server written in Python which is going to shut down the computer when a specific HTTP GET request is received. That means you can turn off your computer from Android device by simply tapping a Tasker or web shortcut on home screen. Windows is going to shut down "properly", meaning your logoff scripts configured in Group Policy will get executed normally.

You can run the server on computer startup like this for example: python http-shutdown.py 192.168.0.1 80 valid_password.txt. Then, on Android device you access the web address http://192.168.0.1/shutdown?auth=<password>. Server will respond in plain text with started if the shutdown has been started, denied if the password does not match the file contents, or something else otherwise.

If your network card can use Wake-On-LAN and/or is supported, and is remotely accessible, then yes, it is quite possible to achieve it (wake-on-lan apps are in abundance on the play store), taking into account of security considerations which is outside of the scope of this site, double check and make sure no other service is on that public facing PC otherwise bad guys will get in and wreak havoc.

Power ON

WOL enabled BIOS: In order to power up the remote host, you first have to enable WOL in his bios. The way you have to do this will vary from motherboard to motherboard, sou you'll have to figure it out by your self, or ask Google for some help.

Enter that number when WOLdroid asks you for a mac adress. And your done.

Now you're able to powerup remotely

Power OFF

1. Prepare the Remote Host:

Remote host with Ubuntu 12.04

Create your private and public key files

To follow these steps you'll have to access your remote host, physically, or using another computer. I'll describe this as if you have physical access to the remote.host

Open a command window and install the ssh protocol:

sudo apt-get install ssh

Create public and private keys using ssh-key-gen

ssh-keygen

You should save the generated key in:

/home/yourusername/.ssh/id_rsa

Press enter twice to leave the passphrase empty.

Your identification has been saved in /home/yourusername/.ssh/id_rsa.
Your public key has been saved in /home/yourusername/.ssh/id_rsa.pub.
The key fingerprint is:
XX:XX:XX:xX:XX:xX:XX:XX:XX:XX:XX:XX:XX:XX yourusername@remote-host

Now copy the id_rsa.pub to your ~/.ssh/authorized_keys file with this command: