WebIOPi : control your Pi’s GPIO with a browser !

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

 

 

25 thoughts on “WebIOPi : control your Pi’s GPIO with a browser !

  1. 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

  2. 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.

    • 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!

  3. 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.

    • 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

  4. 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.

  5. 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.

  6. 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?

  7. Hello,

    cool project.

    Then i would like to control servo motor. Can it be possible.
    Can you help me plz ?

  8. I can not find any PHP server implementation. Is your text accurate or ??
    “Server side available in several technologies
    PHP/Apache
    PHP/lighttpd
    Python”

  9. This is a very old post, check recents posts and changelog.
    PHP version has been discontinued with v0.4