WebI0Pi 0.6 has been released, click here for details.
I’m proud to present my new project, WebIOPi.
This is a web application which allows you to control your Raspberry Pi’s GPIO. Just install it on your Pi, and use any browser from your network.
It’s useful to start enjoying GPIOs and also to debug some circuits without writing any line of code.
It also allows to control your Pi’s GPIOs over Internet, so it’s a good starting point for home remote control.
You can even fully customize the included UI with few CSS modifications or use the REST API to build your own WebApp.
Under Apache License, full doc, code, packages and examples are available on the Google Code project page.
Features
Supports binary GPIOs, in both input and output.- HTML / Javascript / CSS client side
- Easily customize UI
- REST/JSON Web API
- Server side available in several technologies
- PHP/Apache
- PHP/lighttpd
- Python
- Smartphone compatible
- Auto-refresh
Check the roadmap for upcoming features

Cool project, I’m also doing a similar project (just have a basic prototype) to control the RaspberryPi GPIO pins (and used a ULN2003AN chip to control some relays) via WebInterface using Node.js technology. I will also be integrating the same project with XMPP protocol, so that I can use a GTalk account to send ON/OFF commands (on my todo list): https://github.com/nneves/Raspberrypi_GPIO
I’m also thinking about a XMPP version and also SIP/RCS-e
But I will first add importants features and fix some security issues with the HTTP version first
How to run this project on my raspberry pi????
Definitely, what a magnificent blog and revealing posts, I will bookmark your website.Best Regards!
Very interesting. Now I just need to wait to get my Pi. It’s apparently in the post.
Would you mind posting a schematic of your hardware? I have read a number of do’s and don’ts and really don’t want to mess up my Pi by blowing something. I assume you used some sort of buffer (74HC541 or similar).
Thanks for the great post and your site has definitely been added to my bookmarks.
Gertboard or something like that should be for you.
I didn’t used any buffer as I didn’t used it to control other self powered device.
You can find a simple schematic I used for the customization doc : http://code.google.com/p/webiopi/wiki/CUSTOMIZE
I did something similar to get around the root requirement for acessing gpio’s. There is one change you should make to make it more secure. Take a look here
http://www.mobilewill.us/2012/07/raspberry-pi-and-gpio-permissions.html
I set www-data in the sudoers file to only run the apps that are needed for gpio’s instead of all.
Yes, thanks, seen the tips few days ago
I may use something like that (but with a C process) if I don’t find something better.
I did some C stuff, I can’t remember why I ended using python. First for me to use python. It is great to see that my blog is getting around and helpful. Thanks!
Can you fix this so it doesn’t require the use of sudo (and the consequential security issues) ?
You can write strings directly into the files in /sys/class/gpio. You don’t have to use echo .
THen you can just put the www-data user into the gpio group.
HTH
Not so simple, as some nodes are created dynamically by the kernel with the root:root ownership when enabling each GPIO.
Ah… I had failed to notice that the command line tool gpio-admin is setuid root.. Oh well, back to the drawing board !
PeterO
You should try the python server side, which also requires to run as root, but is standalone
There is a simple fix!
Add a “system(“gpio-admin export $pin”);” to setPINSEnabled when enabling a pin.
Also, you need to check some function return codes (from fopen for example) because they will fail if the pin is already exported to another user !
Other than that it works well
Nice job.
PeterO
Great project. Will be useful for people who need to test or play with the GPIO but without having to write any code. Also good if you are running your Pi with no monitor.
après avoir essayé hier votre implémentation AIRpi qui fonctionne remarquablement, je viens de tester votre accès des I/O par Internet et ça marche remarquablement bien.J’ai vu votre roadmap avec la possibilité d’utiliser un serveur java. Je pense que nodejs serait vraiment bien. Il y a le site de Mr Alapetite qui présente une réalisation de mesure de température qui marche bien.Elle utilise des données au format Json pour envoyer les paramètres de température. Nodejs est interressant car il a déja les routines serialport pour communiquer avec l’uart de Raspberry.Cela permet de connecter n’importe quel controlleur au PÏ pour remonter par exemple des mesures de tensions/temperatures etc..Il ne reste plus qu’a integrer les fenetres de visualisation des mesures dans votre application
merci pour le commentaire FR !
petite précision concernant AirPi, je ne parlerai pas d’implémentation mais plutôt d’intégration de shairport
A propos de l’uart, on peut s’en servir avec n’importe quoi. En Java, il y a RxTx qui fais très bien le boulot. Le problème vient de la bibliothèque Python que j’utilise pour les GPIO qui m’empêche d’utiliser l’UART. Par soucis d’homogénéité entre les différents serveurs, j’ai préféré reporté cette fonctionnalité.
merci pour votre réponse.En fait n’étant pas du tout un spécialiste ni de php ni de java je compte profiter de vos développement pour pouvoir interfacer facilement mes contrôleurs PIC programmés en C ou en Basic avec le RasPberry utilisé en serveur WEB.Et vraiment encore merci pour vos didacticiels qui sont une mine de renseignements pour les débutants sur applications WEB.
Hi my family member! I want to say that this article is amazing, nice written and come with almost all vital infos. I would like to look more posts like this .
I have written a simple little web-GPIO controller using bash script and the gpio command on archlinux. See this at http://www.dorcan.com:888
Thanks for the excellent project. I have been working on something similar, but nowhere near as elegant as yours (http://www.windon.themoon.co.uk/NVSM/WebControl). Am I correct in thinking that your script requires www-data to have sudoer status?
Interesting application! I found it works from my Samsung Android phone, but only with the built-in browser, and it doesn’t refresh until I do so manually. Does not work with Opera-Mini browser on the phone. Works OK with Firefox from my desktop. It does seem very slow to load (over 30 seconds, although Pi CPU load is 0.03). I am running the python version, are the others faster?
Hello,
cool project.
Then i would like to control servo motor. Can it be possible.
Can you help me plz ?
I can not find any PHP server implementation. Is your text accurate or ??
“Server side available in several technologies
PHP/Apache
PHP/lighttpd
Python”
This is a very old post, check recents posts and changelog.
PHP version has been discontinued with v0.4