WebIOPi – Browser based GPIO for the Raspberry Pi

WebIOPi is a webserver and a combination of libraries to control the Pis GPIO from the browser or from any application via HTTP/REST. It also has support for many common ICs like I2C IO expander etc.

The feature list:

  • Control, debug, and use your Pi’s GPIO, sensors and converters from a web browser or any app
  • WebIOPi is the perfect Swiss-knife to make connected things
  • Written in Python, with facilities to load and execute custom script, using a comprehensive structure with setup and loop functions
  • Unified Serial/SPI/I2C support with a complete and consistent set of functions to control more than 30 devices, including most used analog converters, I/O expander and sensors
  • Javascript/HTML client library to make Web UI
  • Python/Java clients, to make Pi-to-Pi systems or Android applications
  • CoAP support brings the best Internet of Things protocol on the Pi, as a future proof of Pi possibilities
  • Includes simple web apps, to debug GPIO, devices and Serial interface

webiopi-new

Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone

Raspberry Pi – Webcam Streaming

Link

Streaming an external cam

Several options exist to stream the picture of a webcam or the Raspberry Pi cam from the  Pi. The first is using a MJPEG stream. This is the most compatible as many applications and even browsers can display such a stream.

The second one is H264. Also H264 can be encoded on the Pis GPU it has a very high latency, at least five seconds from my experience.

And last but not least you can simply pipe the video stream over netcat to transmit it to another client.

1. Motion

“Motion” can serve up a MJPEG stream. Apart from that is has several other features as listed below: eg. a simple motion detection. It may run in the background as Linux daemon. Here’s a guide how to get motion going with a PS3 Eye Cam.

  • Taking snapshots of movement
  • Watch multiple video devices at the same time
  • Watch multiple inputs on one capture card at the same time
  • Live streaming webcam (using multipart/x-mixed-replace)
  • Real time creation of mpeg movies using libraries from ffmpeg
  • Take automated snapshots on regular intervals
  • Take automated snapshots at irregular intervals using cron
  • Execute external commands when detecting movement (and e.g. send SMS or email)
  • Motion tracking (camera follow motion – special hardware required)
  • Feed events to a MySQL or PostgreSQL database.
  • Feed video back to a video4linux loopback for real time viewing
  • Lots of user contributed related projects with web interfaces etc.
  • User configurable and user defined on screen display.
  • Control via browser (older versions used xml-rpc)
  • Automatic noise and threshold control
  • Motion is a daemon with low CPU consumption and small memory footprint.

2. With MJPEG streamer.

A nice guide how to build and run the open source MJPEG streamer on the pi by Miguel Grindberg.

2. As a H264 Stream with VLC

Install VLC Player on the Pi. VLC will act as the streaming server.

sudo apt-get install vlc

Run raspivid and pipe the videostream into vlc for streaming.

raspivid -o – -t 0  -w 1280 -h 720 -fps 25|cvlc -vvv stream:///dev/stdin –sout ‘#standard{access=http,mux=ts,dst=:8080}’ :demux=h264

you can now display the stream in VLC using http://[raspi IP]:8080 as your address.

Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone