Netherlands-based Ed has created a script which wraps around amixer to allow you to specify volume as a percentage, or to increment/decrement the volume, very easily.
Eben Upton wins a Silver Medal from the Royal Academy of Engineering for the #RaspberryPi
Eben Upton has been awarded a silver medal from the Royal Academy. The medal, first awarded in 1994, will be presented next month.
Solar powered #RaspberryPi
An enterprising hacker has set his Model B Raspberry Pi up to be powered by solar panels. Read all about how he did it by seeing his website that is hosted on the Pi. So far, it’s been up a massive 143 days!
Use Zoneminder on the #RaspberryPi with the camera module
Over on the Foundation forum, a chap called ‘jimmyst’ has been working on getting Linux-based security surveillance software Zoneminder to work with the Raspberry Pi camera module. Here’s what he wrote…
Here is some progress I made on using Raspberry Pi camera as an IP camera for Zoneminder. I decided to try mjpg-streamer (http://sourceforge.net/projects/mjpg-streame). You can also check this blog http://www.phillips321.co.uk/2012/11/05 … ream-cctv/ on very similar topic but utilizing USB camera, thanks phillips321.
Here are the steps of what I did:
1. Get the source code for the mjpg-streamer and build it. I did that on the rpi itself in the home folder (/home/pi). Feel free to use any place you find appropriate for your experiments
- CODE: SELECT ALL
svn co https://mjpg-streamer.svn.sourceforge.net/svnroot/mjpg-streamer mjpg-streamer
cd mjpg-streamer/mjpg-streamer
make USE_LIBV4L2=false clean all
sudo make DESTDIR=/usr install
NOTE: the subversion (svn) is not installed by default in raspbian, so if you did not installed it already you will need to do:
- CODE: SELECT ALL
sudo apt-get install subversion
or whatever the name of the package is in debian/raspbian. Alternatively you can fetch the code on your host machine and then scp it to raspberry pi. Honestly this is what I did. If you decide to go that route one more word of caution: make sure the rpi clock is properly ntp synced and there is no difference between the time on the host machine and the rpi. Otherwise the copy may get time in the future related to the rpi clock which will cause issues building the code.
2. It is time to start the raspberry pi camera. I use the following command:
- CODE: SELECT ALL
raspistill -w 640 -h 480 -q 80 -e jpg -n -o /tmp/rpi-img.jpg -tl 500 -t 999999999 &
Which takes still pictures every 500ms (two in a second) and store them in the /tmp folder under the file name rpi-img.jpg. I believe for security monitoring more than VGA resolution would be overkill this is why I use 640×480 capture and 2 frames per second I believe are quite enough to capture any bad happenings. That is my opinion, please feel free to play with that command and adjust it to your liking. Just keep in mind that every still is written to the file system (/tmp folder) which, if I am not wrong, appears on raspbian is configured to be on the sd card. Writing to the flash is not the fastest operation, so it very likely will be the bottle neck and if the resolution is higher that will increase the toll. Also the flash memory has relatively low number of writes limit and regardless the all great effort to improve it and implement sophisticated ware-leveling algorithms, still writing too often large file to the SD card would eventually fry it. You were warned!
NOTE: One improvement on that approach would be to use RAM based filing system as destination for the image file. This will definitely mitigate any flash wearing concerns but also will improve the performance. If somebody knows how to create file system in RAM for that purpose please post instructions. I do not plan to look further on that because have different plans (see bottom of this post).
3. Now let’s fire up the mjpg-streamer and see how good we are doing:
- CODE: SELECT ALL
mjpg_streamer -b -i "input_file.so -f /tmp -n rpi-img.jpg -d 200" -o "output_http.so -w /usr/www -p 8090"
This will start the streamer instructing it to check every 200ms for new image being written to our image file /tmp/rpi-img.jpg and steam it in mjpeg format on port 8090. Again feel free to experiment with that and tweak it to your liking.
4. Let’s test the streaming before going to the Zoneminder:
- CODE: SELECT ALL
http://<RPI_IP_ADDRESS>:8090/?action=stream
Type the above into your favorite browser on the host machine and in few seconds you should see on the browser screen what the rpi camera see.
5. Now is time for the ultimate step: configure the Zoneminder to use our Raspberry Pi camera to make us safer. Assuming you have running and properly configured Zoneminder here is how to add the streaming rpi as a monitor:
- * From the ZM console click “Add New Monitor”
- * Under the “General” tab name your monitor, set “Source Type” to “Remote”, then select the function you like.
- * Under the “Source” tab set:
- – “Remote Protocol” to “HTTP”
- – “Remote Method” to “Simple”
- – “Remote Host Name” to <RPI_IP_ADDRESS>
- – “Remote Host Port” to “8090” (or whatever you used in mjpg_streamer command)
- – “Remote Host Path” to “?action=stream”
- – “Remote Image Colours” to “24 bit colour”
- – “Capture Width” to “640” (or whatever you set in the raspistill command)
- – “Capture Height” to “480” (or whatever you set in the raspistill command)
Save and … there you go… Our beloved Raspberry Pi is our safety watch dog.
6. Just in case you like to stop the mjpg_streamer and the raspistill processes, on rpi do:
- CODE: SELECT ALL
sudo killall mjpg_streamer
sudo killall raspistill
WHAT’S NEXT:
The described procedure gives us a solution for using rpi as an IP camera and feeding in Zoneminder but is far from ideal. See above note from point 2 for example. Even though the proposed solution for using RAM filing system would help it is still not ideal.
I have plans for the near future to actually develop new input plugin for mjpg_streamer that will directly integrate it with the raspberry pi camera. I believe this approach would bring us quite close to ideal. Of course when the V4L2 driver is available another box of possibilities and solutions will open but until then we can still use whatever is available on the table now and do our best.
Hope that helps somewhat and please post any suggestions and comments.
If you give this a go, perhaps you’d respond either here or on the original topic on the Foundation forum with your results!
#RaspberryPi powered aquatic drone seeks funding
A team from Portugal is seeking funding on Kickstarter for their aquatic drone that uses a Raspberry Pi. They have just 29 days to raise $125,000. Currently, you can donate $245 to actually get a Ziphius, which considering the capabilities of the drone is quite a good deal. You can donate as low as $1 (and get a thanks on their website). If you’d like to contribute a donation to this exciting project, visit the Kickstarter page.
I’m not affiliated to the project, just thought it was cool 🙂
#RaspberryPi Foundation and OCR launch online resources for GCSE Computing
Fantastic news from the Foundation today. After months of work, a preview of a ‘Massive Open Online Course’ (MOOC) has been launched for the GCSE Computing qualification.
In their words:
This MOOC will comprise an enormous suite of short, interactive videos and animations on every part of the curriculum, all presented by some of the UK’s best teachers.
You can read more about it on the Foundation blog or visit the Cambridge GCSE Computing website and view the resources already available.
This is a great initiative and I hope that, once the Computing GCSE really kicks into gear, it’ll become a resource for students, teachers and parents alike. It has been made completely open internationally, too, so anyone will be able to use the videos and resources wherever they are in the world.