Search

Wednesday, September 26, 2012

Raspberry Pi Logitech QuickCam Communicate STX USB cam P/N 861223 added to micasaverde Vera

Updated, based on new motion version. And it works a lot better now!

Lets hope I’m finally able to write a tutorial how I was able to add the Logitech QuickCam Communicate STX USB cam P/N 861223 to Raspberry PI and then also connect it so I can see the video in the micasaverde vera. If this looks easy it wasn’t at all. I have spent so much time testing so many software's without any good result. Some disclaimers that this is the way I got it to work, not stating that this is the way it should be done… But here it comes….
The instructions is based on the Debian Raspian “wheezy”
The camera must be plugged into a _powered_ usb hub. I also run the Pi from the same hub.
Install the software:
sudo apt-get install webcam v4l-conf
To find the value that should be in the input field in the .webcamrc file

v4l-info | grep name
        name                    : "gspca_zc3xx"
        name                    : "Brightness"
        name                    : "Contrast"
        name                    : "Gamma"
        name                    : "Exposure"
        name                    : "Gain, Automatic"
        name                    : "Power Line Frequency"
        name                    : "Sharpness"

Create the config file
sudo nano /home/pi/.webcamrc
[ftp]
host = localhost
user = pi
pass = password
dir = /var/www
file = webcam.jpg
tmp = imageup.jpg
local = 1
[grab]
device = /dev/video0
width = 640
height = 480
delay = 1
wait = 1
input = zc3xx
#norm = pal
quality = 50
trigger = 0
once = 1

For setups where the cam is on a different system than the Web server, you'd have to: Set the local value to 0 in the config file
sudo mkdir /var/www
Test it:
sudo webcam /home/pi/.webcamrc
Stop the webcam with Ctrl+C
Install the web server
sudo apt-get install apache2 &
Remove web server logging so it does not use all your disk by remarking the lines in:
sudo nano /etc/apache2/apache2.conf
#LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\""$
#LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combi$
#LogFormat "%h %l %u %t \"%r\" %>s %O" common
#LogFormat "%{Referer}i -> %U" referer
#LogFormat "%{User-agent}i" agent
sudo nano /etc/apache2/sites-available/default
#       CustomLog ${APACHE_LOG_DIR}/access.log combined
Test the web server
http://x.x.x.x/webcam.jpg?Quality=Standard
Create a bash shell script to start it:
sudo nano /home/pi/cam.sh

#!/bin/bash
while ! sudo webcam /home/pi/.webcamrc  >> /dev/null 2>&1 &

Change the file so it can be executed:
chmod 777 /home/pi/cam.sh
Run it:
sudo nohup /home/pi/cam.sh&
This time it runs in the background until you restart the Pi. Press ENTER to get your prompt back.

If you like the app to start every time you start the Pi
This will add the cam to the right run level
update-rc.d cam.sh defaults

Add the Panasonic camera plug in to Mios.com Vera and configure the URL field with webcam.jpg?Quality=Standard
First times it might not show the picture directly. Then I had to go to the settings tab and then back.

Saturday, September 15, 2012

Z-way Keyfobs


I was happy to see two different key fobs released close to each others.  The one to the left is the
Z-Wave.Me 4 Button Key Fob that you can find for a bit more than 40€ at e.g.
http://store.zwaveeurope.com/product_info.php?products_id=12282
Aeon Labs Key Fob will sell at a currently undisclosed price.
http://www.tradekey.com/product_view/id/2174986.htm
I will wait for a short while to see the price on the Aeon Lab until I place my order of some of them. It will be useful thing to have for the small quick things we need to do around the house.

Z-Wave.Me 4 Button Key FobAeon Labs Key Fob

Raspberry Pie USB Logitech QuickCam for Notebooks

I gave it my best and almost made it. Tried for 3 evenings to get the Logitech QuickCam for Notebooks to work with the Raspberry Pie.

Started with this distribution:
012-08-16-wheezy-raspbian.zip.torrent
Then got the camera connected to the Pi.
sudo apt-get update
sudo apt-get install motion
sudo apt-get install ffmpeg
then edited motion's config file
sudo nano /etc/motion/motion.conf
change these lines to "off" in that file:
control_localhost off
webcam_localhost off
mkdir /tmp/motion
Start up motion program:
sudo motion -n
then looked at  http://1.1.1.1:8081 on the PC but the picture is very distorted.
By the way if you stop motion with Ctrl+C instead of Ctrl+X then you don’t have to find and kill the web-server all the time.
Good thing is that it seems to run without powered USB hub. Next camera…

Sunday, September 9, 2012

Insteon LED lights

There seems to be a lot of promises on the web that we in the old world would also see the led lights son from insteon.... Maybe I have a chance to come back to this at some point...
http://www.insteon.net/bulb.html
http://www.automatedhome.co.uk/news/insteon-update-uk-products-in-30-to-90-days.html
http://www.engadget.com/2012/06/21/insteon-says-apps-are-better-than-switches/

RFID reader with Z-wave interface

I noticed this RFID reader with Z-wave interface
http://www.2ihome.eu/
http://www.2myhome.info/index.php/products/security/tag-reader

No information available of the actual price. And unfortunately it does not handle NFC. But still I think it would make a good and easy alarm control panel. 



TagReader