Using a USB webcam with Vera

Is there any way to use a USB webcam (plugged into the USB ports on Vera) in MIOS? I have such a webcam at my house, and would prefer not to have to buy a new camera.

I don’t know of any plug-and-play solutions. But:

The premier webcam software for OpenWrt is called motion. Getting it to run on Vera hardware shouldn’t be too hard, provided there is enough storage space. motion can publish an image via its built-in web server, which Vera can probably access like any IP camera.

[quote=“futzle, post:2, topic:170196”]I don’t know of any plug-and-play solutions. But:

The premier webcam software for OpenWrt is called motion. Getting it to run on Vera hardware shouldn’t be too hard, provided there is enough storage space. motion can publish an image via its built-in web server, which Vera can probably access like any IP camera.[/quote]
Boy that futzle sure knows alot of stuff, right up there with guessed and some of our other uber geniuses, kudos to you in your active forum support! 8)

Just curious - did you, or has anyone managed to get a USB camera working with Vera?

Unfortunately I have not see anyone who was able to integrate a usb webcam into Vera. I have only seen ip based webcams or software being integrated into Vera. The only way I can think of integrating a usb webcam is to use another piece of software running on the computer, e.g. zoneminder, blue iris, or any software allowing ip access.

  • Garrett

I’d think that if your USB camera requires a driver, you’d have to have a driver that can run on Vera (if looking to hook up the camera directly to Vera), plus support in UI5 to then access it; or, when attached to a computer, generalize the access to the camera so it can be accessed through a network, as @garrettwp mentioned, which presumably means you’d have to leave that computer turned on.

I was thinking of exactly this today when I noticed couple of unused USB cams.
I assume this IcamView.com is for sale | HugeDomains would do it easier to connect the USB cam (via ethernet) to Vera. But this is a bit pricy since for the same money you can buy a cam with web server, like the Foscam. Anybody got any sugestion on a better/ cheaper product?

Raspberry Pi running motion? Should be less than fifty dollars. I don’t know if the Raspberry Pi has the oomph to decode webcam video in real time. Probably yes, because I ran my security USB camera on an NSLU2 running motion for a while.

Good point! I need to test that when it arrives (in July-August).

I am suppose to receive mine sometime in the middle of June. Hopefully that date will not change. It has been a long wait so far. Hopefully worth the wait.

  • Garrett

Raspberry Pi all round then! I couldn’t resist buying one either; despite ordering almost immediately on launch, my shipping date through element14 was also pushed back into late June :frowning:

I received an email from them a week ago stating that a ship date of June 18th. Do you have the same date strangely?

  • Garrett

No mine was June 29th I think!

edit just checked their site and its listed as the 18th now, so I guess maybe a more recent email might have been flagged as spam and I missed it!

I’ve just received my Raspberry Pi and I have this week off work to have a play to see what’s possible. Although, first on the list is to get it up and the running xbmc :wink:

I do like the potential that a Pi can bring, so hopefully there’s scope for it to play a part in making a Webcam work.

Woot…Mine shipped today also :slight_smile:

Shame its going to take a whole week to get to me from West Columbia, SC :frowning:

Received mine yesterday. Going to mess with it later on this week. Tried running xmbc on it, but having install issues (sd card timeouts).

  • Garrett

This http://www.raspbmc.com is what I installed.
I have not “integrated” it with the Vera (yet)

[quote=“HouseBot, post:17, topic:170196”]This http://www.raspbmc.com is what I installed.
I have not “integrated” it with the Vera (yet)[/quote]This is also what I installed on mine; I had various issues with other builds also due to SC card issues.

Roll on RC4!

My Raspberry Pi was ordered just over a month ago and supposedly I’ll have it in another two months. A friend of mine ordered one two weeks ago and he already has his. ???

In the interim I wanted to chip in with some experiences I have using USB webcams with Vera. I attached mine to Pogoplugs running Archlinux ARM. That distro is available for the Raspberry Pi and I’ve been very happy with it on my Pogoplugs. You should be able to support streaming quite a few webcams on your Raspberry Pi, I have as many as four hanging off my Pogoplugs.

A few recommendations I have for streaming USB webcams with linux:

1. Unless you need the capabilities of motion (that is, you are using the motion detection built in to motion) use mjpg_streamer instead of motion.
Motion processes each image to see if pixels have changed, and by default runs a lot of binary morphology on the images (erode, dilate, etc), where mjpg_streamer just streams. On my Pogoplus with four cameras this means the difference between 60%+ cpu utilization versus single digits (and to get down to 60% I had to drop the framerate to 2Hz and go through a bunch of options to turn off as much processing as possible). I have another machine running zoneminder which processes my streams which is why I don’t mind forgoing motion detection.

2. Use MJPEG instead of YUV
If you want multiple webcams on a single USB bus this is basically a necessity. Even if you don’t it means a lot less data to process. This is the default in mjpg_streamer, in motion set: “v4l2_palette 2” in motion.conf

3. Get a webcam with known support
Some webcams have a problem where the request a lot more bandwidth than they need and this means you can’t use two at the same time. There is a hack to get around this in YUV mode, but not MJPEG which isn’t much of a help. If you are up for hacking the driver yourself it should be possible to skip the BW check and make these work anyway, but that is quite a bit of work.

Cameras that work simultaneously (no bandwidth bug):
-Logitech C120
-Logitech C160
-Logitech B500
-Logitech Quickcam E 3500
-Logitech Quickcam Messenger
-Microsoft HD-3000
-Microsoft HD-5000
-Rocketfish HD Webcam Pro

Cameras that do not work in multiples (bandwidth bug?):
-Logitech C110
-Logitech C310
-Creative Live! Cam Video IM Ultra
-HP 2-Megapixel Webcam (RZ406AA)

My current recommendation is probably the HD-3000. It is 720p and can be found for about $20. It does NOT have autofocus which I think is good for a webcam you leave running 24/7. I tried the HD-5000 and it spends a lot of time refocusing. I’m afraid it would break after a few weeks. The C160 is currently the cheapest, about $8 shipped on ebay. Meritline sometimes sells it for $6. The irritating thing about the c120/c160 is that they have a focusing ring you have to adjust. For a security camera I would prefer fixed focus. I buy any webcam I can get at a firesale so I’ll keep trying more - I would appreciate results from anyone else as well.

EDIT: Added a few more cameras

It turns out you can disable autofocus on UVC supported webcams like this:

v4l2-ctl --verbose --set-ctrl=focus_auto=0

At least it works for me on all the AF cameras I have to test (Microsoft & Rocketfish).

Not only is this a good idea for camera longevity (I would think so at least) it helps prevents false motion alarms.