WebIOPi on the PiStore !

Following the PiStore announcement, I submitted WebIOPi so you can now install it in one single click from the store. This is a new version (0.5.2), that includes few changes and fixes :

  • Fixed blank page and file handling when server start at boot
  • Improved macros handling to allow zero, one, or more args
  • Added server loop helper
  • Improved setup.sh for the PiStore
  • Added play.sh for the PiStore to open the browser

You can find it on the PiStore WebIOPi page, but you need to use the PiStore on the Pi to install it.

I’m working on the next 0.5.3 version which will be released on both Google Code and PiStore. For people who need the 0.5.2 release but think they cannot use the PiStore without a display, you can install tightvncserver on the Pi and VNC Viewer on your computer.

15 thoughts on “WebIOPi on the PiStore !

  1. Hi,

    I have tried to install webiopi 0.5.2 via pi store, but after installation, I cannot get my code working. Error message as follows:

    Exception happened during processing of request from (’192.168.1.5′, 2763)
    Traceback (most recent call last):
    File “/usr/lib/python2.7/SocketServer.py”, line 284, in _handle_request_noblock
    self.process_request(request, client_address)
    File “/usr/lib/python2.7/SocketServer.py”, line 310, in process_request
    self.finish_request(request, client_address)
    File “/usr/lib/python2.7/SocketServer.py”, line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
    File “/usr/lib/python2.7/SocketServer.py”, line 638, in __init__
    self.handle()
    File “/usr/lib/python2.7/BaseHTTPServer.py”, line 340, in handle
    self.handle_one_request()
    File “/usr/lib/python2.7/BaseHTTPServer.py”, line 328, in handle_one_request
    method()
    File “/usr/local/lib/python2.7/dist-packages/WebIOPi-0.5.2-py2.7-linux-armv6l.egg/webiopi.py”, line 249, in do_GET
    f = open(realPath, encoding=”utf-8″)
    TypeError: ‘encoding’ is an invalid keyword argument for this function
    —————————————-

    Anybody can help? Thanks

    • This is an issue with python2 I’ve spotted right after the store submission. I fixed that but it will be released with the next version, which I hope next week. You can use python3 if you cannot wait.
      Sorry for this.

    • Thanks for your help, but there are also several error message when I use python3. Originally I have a jpeg in html but now it cannot display properly. Here’s the error code:

      —————————————-
      Exception happened during processing of request from (’192.168.1.196′, 59584)
      Traceback (most recent call last):
      File “/usr/lib/python3.2/socketserver.py”, line 295, in _handle_request_noblock
      self.process_request(request, client_address)
      File “/usr/lib/python3.2/socketserver.py”, line 321, in process_request
      self.finish_request(request, client_address)
      File “/usr/lib/python3.2/socketserver.py”, line 334, in finish_request
      self.RequestHandlerClass(request, client_address, self)
      File “/usr/lib/python3.2/socketserver.py”, line 648, in __init__
      self.handle()
      File “/usr/lib/python3.2/http/server.py”, line 396, in handle
      self.handle_one_request()
      File “/usr/lib/python3.2/http/server.py”, line 384, in handle_one_request
      method()
      File “/usr/local/lib/python3.2/dist-packages/WebIOPi-0.5.2-py3.2-linux-armv6l.egg/webiopi.py”, line 250, in do_GET
      data = f.read()
      File “/usr/lib/python3.2/codecs.py”, line 300, in decode
      (result, consumed) = self._buffer_decode(data, self.errors, final)
      UnicodeDecodeError: ‘utf-8′ codec can’t decode byte 0xff in position 0: invalid start byte
      —————————————-

  2. Hi,

    I`m having problems for customize it. I just make the code, but I don`t know where I have to upload it.

    Help please.

    Thanking you in advance.

    • you can save where you want on your pi, but put both HTML and Python files in the same folder.
      then execute your script from that folder :
      sudo python myscript.py
      I suggest using samba to share a Pi folder with your Windows computer ou netatalk for Mac.

    • this is because you certainly have the default webiopi service running.
      you have to stop it before launching your script or change the port used by webiopi.Server in your script.
      to stop :
      sudo /etc/init.d/webiopi stop
      to permanently remove the webiopi service from boot start :
      sudo update-rc.d webiopi remove

  3. Thanks for your fine work. Please accept my PayPal donation as a small token of my appreciation.

    I do have a question regarding WebIOPi. Now that we can read the inputs, how can we access those values over an ethernet connection?

    Specifically, I would like to use the Pi inputs to monitor the state of motion sensors. These motion sensors are currently wired into an Arduino, which has been functioning for years as a security system

    I plan to parallel the motion sensor inputs on the Arduino with the inputs on the PI (with resistors to compensate for the voltage difference, of course).

    Ultimately, I would like to trigger an Applescript every time the motion sensor changes state.

    Do you have a suggestion on how to get the status of the WebOIPi inputs to a Mac over ethernet?

    Thanks very much for your efforts.

    • You simply have to go to the Pi IP using your browser as webiopi binds itself on all IPs.
      If your Pi’s IP is 192.168.1.10, then on your Mac, open http://192.168.1.10:8000/webiopi/
      Many thanks for the donation, I really appreciate each token, it’s encouraging me to continue improvements and support.

  4. Thanks for your reply.

    Yes, the part you described works fine.

    Now let’s say a voltage is applied to GPIO 11 and it goes high.

    How can I use that to run an Applescript, or some other type of script?