I am running hass.io on a Raspberry Pi 3 and would like to use a standard USB-Webcam.
The webcam is recognized in Hass.io / System / Hardware:
input:
Microsoft® LifeCam HD-3000: Mi
I know that the plugin motionEye does currently not support local USB Webcams, but is there any way of using this device with a hass.io installation? Maybe via an installation of a webcam-server via the SSH console that forwards the pictures to motionEye? Would that be possible? Or is there another plugin for such cases?
Thanks for your reply! How did you install motion? Are you running hass.io on a “normal” Linux?
I am asking because I am running the standalone hass.io image for the Raspberry Pi, and as far as I know, I can only install the hass.io addons there.
I migrated recently from Motion to mjpg-streamer. It less resource hungry. I have 2 USB webcams on the HASS server. With Motion the server sometimes was very slow and unreacheable. Memory and CPU consuption was not high… So I decided to try something else.
[-d | --device ].......: video device to open (your camera)
[-r | --resolution ]...: the resolution of the video device,
can be one of the following strings:
QSIF QCIF CGA QVGA CIF VGA
SVGA XGA SXGA
or a custom value like the following
example: 640x480
[-f | --fps ]..........: frames per second
[-y | --yuv ]..........: enable YUYV format and disable MJPEG mode
[-q | --quality ]......: JPEG compression quality in percent
(activates YUYV format, disables MJPEG)
[-m | --minimum_size ].: drop frames smaller then this limit, useful
if the webcam produces small-sized garbage frames
may happen under low light conditions
[-n | --no_dynctrl ]...: do not initalize dynctrls of Linux-UVC driver
[-l | --led ]..........: switch the LED "on", "off", let it "blink" or leave
it up to the driver using the value "auto
Options for the output:
[-w | --www ]...........: folder that contains webpages in
flat hierarchy (no subfolders)
[-p | --port ]..........: TCP port for this HTTP server
[-c | --credentials ]...: ask for "username:password" on connect
[-n | --nocommands ]....: disable execution of commands
I’m not so familiar about the HassOS but it uses docker. You can get to the shell and run docker commands or install Portainer addon. After you can install mjpeg-streamer image to docker.
Google it: https://www.google.com/search?q=docker+mjpg-streamer
ailispaw/mjpg-streamer looks promising to me. Maybe I’ll move to doker from shell too.
Hello, I install Home Assistant OS on raspberry pi 3 and wished to do the same as you. I’ve browse the community and can’t find to integrate usb webcam to home assistant. Do you have any idea where should i start? Thanks
you are lucky - the maintainer just released an updated two days ago which finally makes it possible to use USB Webcams!
I’ve just tried it and it works like a charm!
I am using the latest version of HomeAssistant and the latest version of the Addon motionEye
You should find the addon under “Supervisor” - Addon-Store under the Community Addons.
I also used the latest version of home assistant and motion eye. So it just recently updated, that’s why I can’t find any walkthrough. Do you mind share to me how to use USB webcam? Thanks.
Well, I don’t know at which point you have problems…
After installing the plugin, you have to logon with username “admin” and leave the password field empty.
While adding a camera, I have selected Local V4L2 camera as the “Camera Type”, and in the dropdown menu next to “Camera”, I have selected my camera (it’s there twice, but only the first one was working for me):
After confirming with OK, I was directly able to see the video - I only had to adjust the framerate and resolution to the camera / my needs.
I successfully login after installing the plugin. I missed the second step, because i don’t know what camera type that i should add. Thanks to you now i know that my USB camera is in V4L2 camera.
Thanks a lot Now i want to display the live streaming on the lovelace user interface. Any idea how?
Has anyone tried this with home assistant running in PROXMOX (virtualization)? In proxmox I have passed my USB camera through to the home assistant server. But it does nog show up as a camera under Loval V4L2 Camera in motion eye.
I do notice that my usb camera also does not show up under the hardware tab in home assistant (supervisor -> system -> hardware).
Hello, Idk why, but my webcam doesn’t seem to be detected, all I get is those “bcm2835-codec-decode”… Shouldn’t my webcam be automatically detected? Thank you,