Shutdown raspberry pi via web

I am using airprint with raspberry pi. My wife told me , airprint is awesome and save time a lot. Before that , we are using normal printer and not include network feature. When I got the raspberry pi , I decided to share printer and use airpint from iPhone , iPad.

The problem is we can’t turnoff raspberry pi after using the printer. We need to login or connect with HDMI to shutdown the raspberry pi. She don’t know SSH and can’t shutdown if I am not at home. Yes, we can run raspberry pi without shutdown because pi didn’t use too much power. But we want to shutdown , so how to do it ?

My wife is using Windows Phone 7 and iPad. I am using iPhone. I don’t want to open my computer. So, we need cross platform app. First time, I was thinking about iOS app. But it’s not good solution. The best way is shutdown from website. So, I decided to write webpage and host in raspberry pi.

Which programming language should I use ?

I decided to use Node.js because it already include web server feature. I don’t want to nginx or apache in my raspberry pi , now. Node.js is a easy to write and can call terminal command easily.

I use forever for running node.js at background and create /etc/init.d service to start and stop. After that , I added in update-rc for running node.js service. The concept is easy but compiling Node.js take a hour.

How to install ?

You can check at . I already wrote step by step guide.

Don’t foret before you start “It will take over a hour because of compiling node.js”

Pi Control On safari pi control on safari

Add to Home Screen add to home screen

Name give a name

on home screen at home screen

Run Like app run like app

comments powered byDisqus