Site updated at 2016-06-23 09:16:46 UTC

This commit is contained in:
Travis CI 2016-06-23 09:16:46 +00:00
parent 2bacccd5cc
commit 51d7cd5f5f
118 changed files with 1670 additions and 1135 deletions

View file

@ -212,6 +212,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -235,12 +241,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -216,6 +216,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -239,12 +245,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -218,6 +218,12 @@ Example of the new views in the frontend. <a href="/components/group/">Learn mor
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -241,12 +247,6 @@ Example of the new views in the frontend. <a href="/components/group/">Learn mor
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -405,6 +405,12 @@ Z-Wave light bulb |
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -428,12 +434,6 @@ Z-Wave light bulb |
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -355,6 +355,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -378,12 +384,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -221,6 +221,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -244,12 +250,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -323,6 +323,12 @@ output = audioresample ! audio/x-raw,rate=48000,channels=2,format=S16LE ! audioc
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -346,12 +352,6 @@ output = audioresample ! audio/x-raw,rate=48000,channels=2,format=S16LE ! audioc
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -231,6 +231,12 @@ Hold your NFC tag against the belly of Garfield to unlock the alarm.
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -254,12 +260,6 @@ Hold your NFC tag against the belly of Garfield to unlock the alarm.
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -220,6 +220,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -243,12 +249,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -226,6 +226,12 @@ player state attributes. This change affects automations, scripts and scenes.</l
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -249,12 +255,6 @@ player state attributes. This change affects automations, scripts and scenes.</l
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -237,6 +237,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -260,12 +266,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -189,6 +189,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -212,12 +218,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -195,6 +195,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -218,12 +224,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -203,6 +203,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -226,12 +232,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -187,6 +187,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -210,12 +216,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -204,6 +204,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -227,12 +233,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -222,6 +222,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -245,12 +251,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -313,6 +313,12 @@ For example, my wife works next door - and I couldnt detect whether shes a
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -336,12 +342,6 @@ For example, my wife works next door - and I couldnt detect whether shes a
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -185,6 +185,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -208,12 +214,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -275,6 +275,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -298,12 +304,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -185,6 +185,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -208,12 +214,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -199,6 +199,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -222,12 +228,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -220,6 +220,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -243,12 +249,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -191,6 +191,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -214,12 +220,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -329,6 +329,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -352,8 +358,6 @@
</li>
</ul>
</section>

View file

@ -205,6 +205,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -224,12 +230,6 @@
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -239,6 +239,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -258,12 +264,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -210,6 +210,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
@ -229,12 +235,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -234,6 +234,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
<li class="post">
@ -253,12 +259,6 @@
</li>
<li class="post">
<a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">iBeacons: How to track things that cant track themselves (part II)</a>
</li>
</ul>
</section>

View file

@ -0,0 +1,345 @@
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Using USB webcams with Home Assistant - Home Assistant</title>
<meta name="author" content="Paulus Schoutsen">
<meta name="description" content="A How-to about the integration of USB webcams into Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/blog/2016/06/23/usb-webcams-and-home-assistant/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Using USB webcams with Home Assistant">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/blog/2016/06/23/usb-webcams-and-home-assistant/">
<meta property="og:type" content="article">
<meta property="og:description" content="A How-to about the integration of USB webcams into Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/blog/2016-06-cranberry/motion.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:creator" content="@fabaff">
<meta name="twitter:title" content="Using USB webcams with Home Assistant">
<meta name="twitter:description" content="A How-to about the integration of USB webcams into Home Assistant.">
<meta name="twitter:image" content="https://home-assistant.io/images/blog/2016-06-cranberry/motion.png">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
<link rel='shortcut icon' href='/images/favicon.ico' />
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
</head>
<body >
<header>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
<a href="/" class="site-title">
<img width='40' src='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</a>
</div>
<div class="grid__item seven-tenths lap-four-sixths palm-one-whole">
<nav>
<input type="checkbox" id="toggle">
<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu"></label>
<ul class="menu pull-right">
<li><a href='/getting-started/'>Getting started</a></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></li>
<li><a href="/blog/">Blog</a></li>
<li><a href="/help/">Need help?</a></li>
</ul>
</nav>
</div>
</div>
</div>
</header>
<div class="grid-wrapper">
<div class="grid grid-center">
<div class="grid__item two-thirds lap-one-whole palm-one-whole">
<article class="post">
<header>
<h1 class="title indent">Using USB webcams with Home Assistant</h1>
<div class="meta clearfix">
<time datetime="2016-06-23T06:00:00+00:00" pubdate data-updated="true"><i class="icon-calendar"></i> June 23, 2016</time>
<span class="byline author vcard"><i class='icon-user'></i> Fabian Affolter</span>
<span><i class='icon-time'></i> three minutes reading time</span>
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
</ul>
</span>
<a class='comments'
href="#disqus_thread"
>Comments</a>
</div>
</header>
<p><img src="/images/blog/2016-06-cranberry/motion.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;" width="200" /><br />
In the past month I was thinking about way to integrate USB webcams into Home Assistant again. The main reason was that this would give those devices a second life and enable one to benefit from low-cost video surveillance. There are a couple of options available like <a href="http://www.pygame.org/hifi.html">pygame</a> or <a href="http://www.simplecv.org/">SimpleCV</a> but I never finished something. With the <a href="https://home-assistant.io/components/camera.local_file/">Local File camera platform</a> by <a href="https://github.com/Landrash">Landrash</a> and <a href="http://lavrsen.dk/foswiki/bin/view/Motion/WebHome">motion</a> you could integrate a local USB webcam with a few very easy steps.</p>
<p>In this blog post I using a Fedora 24 (will most likely work on other distributions too) installation with Home Assistant 0.22.1 on a Foxconn nT-330i with an old <a href="http://support.logitech.com/en_us/product/quickcam-sphere-af">Logitech QuickCam Orbit AF</a> and a <a href="http://support.logitech.com/en_us/product/hd-webcam-c270">Logitech HD Webcam C270</a>. As a start only the Quickcam is used. No multi-camera setup for now.</p>
<a name="read-more"></a>
<p>Check first if the your operating system lists your cameras.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ lsusb
[...]
Bus 002 Device 016: ID 046d:08cc Logitech, Inc. Mic (PTZ)
[...]
</pre></div>
</div>
</div>
<p>The camera we are going to use is available at <code>/dev/video1</code>. The C270 is the one on <code>/dev/video0</code>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ ls -al /dev/video*
crw-rw----+ 1 root video 81, 0 Jun 23 08:05 /dev/video0
crw-rw----+ 1 root video 81, 1 Jun 23 08:36 /dev/video1
</pre></div>
</div>
</div>
<p>We need an additional software part to handle the cameras. <a href="http://lavrsen.dk/foswiki/bin/view/Motion/WebHome">motion</a> is capable of monitoring the video signal from USB and network cameras, do motion detection, and other nifty stuff like saving images, add text, or basic image manipulations.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo dnf -y install motion
</pre></div>
</div>
</div>
<p>For your setup we need to modify the file <code>/etc/motion/motion.conf</code>. For now the most important parameters are <code>videodevice</code>, <code>snapshot_interval</code>, and <code>target_dir</code>. We are going to use the device <code>/dev/video1</code>, use a 30 seconds interval, and set the path to <code>/tmp</code>. Edit <code>/etc/motion/motion.conf</code> or use <code>sed</code>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo sed -i 's|videodevice /dev/video0|videodevice /dev/video1|g' /etc/motion/motion.conf
$ sudo sed -i 's|target_dir /var/motion|target_dir /tmp|g' /etc/motion/motion.conf
$ sudo sed -i 's|snapshot_interval 0|snapshot_interval 30|g' /etc/motion/motion.conf
</pre></div>
</div>
</div>
<p>Its suggested that you adjust at least <code>width</code> and <code>height</code> to get a bigger image from your camera. Now fire up <code>motion</code>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo motion
[0] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motion/motion.conf
[0] [ALR] [ALL] conf_cmdparse: Unknown config option &quot;sdl_threadnr&quot;
[0] [NTC] [ALL] motion_startup: Motion 3.3.0 Started
[0] [NTC] [ALL] motion_startup: Logging to file (/var/log/motion.log)
</pre></div>
</div>
</div>
<p>Your <code>target_dir</code> will start filling up with images from your camera. <code>motion</code> will create a symlink called <code>lastsnap.jpg</code> which always point to the latest snapshot. We will setup the <a href="https://home-assistant.io/components/camera.local_file/">Local File camera platform</a> to use this file.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">camera</span>:
- <span class="string"><span class="content">platform: local_file</span></span>
<span class="key">name</span>: <span class="string"><span class="content">Cranberry cam</span></span>
<span class="key">file_path</span>: <span class="string"><span class="content">/tmp/lastsnap.jpg</span></span>
</pre></div>
</div>
</div>
<p class="img">
<img src="/images/blog/2016-06-cranberry/cam.png" />
The “Cranberry cam” in action
</p>
<p>The machine with the attached USB camera will become a webcam server as well because <code>motion</code>s built-in HTTP server is enabled by default. This means that you could connect your USB webcams to a different machine in your network, run <code>motion</code> there, adjust your firewall rules, and use Home Assistant to display the videos. Just check <a href="http://[IP of your webcam host]:8081/">http://[IP of your webcam host]:8081/</a> to see the stream. This required more powerful hardware than using snapshots, of course.</p>
<p>In a scenario like this needs a <a href="https://home-assistant.io/components/camera.mjpeg/">Generic MJPEG IP Camera </a> in your <code>configuration.yaml</code> file.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">camera</span>:
- <span class="string"><span class="content">platform: mjpeg</span></span>
<span class="key">mjpeg_url</span>: <span class="string"><span class="content">http://[IP of your webcam host]:8081</span></span>
<span class="key">name</span>: <span class="string"><span class="content">Cranberry Live cam</span></span>
</pre></div>
</div>
</div>
<p><a href="http://lavrsen.dk/foswiki/bin/view/Motion/WebHome">motion</a> is a powerful tool and this blog post only showed two very simple use cases. Take a look at the <a href="http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionGuide">documentation</a> of <code>motion</code> to unleash its potential.</p>
</article>
<section id="disqus">
<h3 class="indent title">Comments</h3>
<div id="disqus_thread" aria-live="polite"><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript></div>
</section>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<h1 class="title delta">About Home Assistant</h1>
<ul class="divided">
<li>
Home Assistant is an open-source home automation platform running on Python 3. Track and control all devices at home and automate control.
</li>
<li><a href='/getting-started/'>Get started with Home Assistant</a></li>
<li><a href='/demo/'>Try the online demo</a></li>
<li><a class="twitter-follow-button" href="https://twitter.com/Home_Assistant">Follow Home Assistant on Twitter</a></li>
</ul>
</section>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.async=true;js.src='//platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<section class="sharing aside-module grid__item one-whole lap-one-half">
<h1 class="title delta">Share this post</h1>
<a href="//twitter.com/share"
class="twitter-share-button"
data-via="home_assistant"
data-related="home_assistant"
data-url="https://home-assistant.io/blog/2016/06/23/usb-webcams-and-home-assistant/"
data-counturl="https://home-assistant.io/blog/2016/06/23/usb-webcams-and-home-assistant/" >Tweet</a>
<div class="fb-share-button" style='top: -6px;'
data-href="https://home-assistant.io/blog/2016/06/23/usb-webcams-and-home-assistant/"
data-layout="button_count">
</div>
<div class="g-plusone" data-size="standard"></div>
</section>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<script>
window.fbAsyncInit = function() {
FB.init({appId: '338291289691179', xfbml: true, version: 'v2.2'});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<section id="recent-posts" class="aside-module grid__item one-whole lap-one-half">
<h1 class="title delta">Recent Posts</h1>
<ul class="divided">
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
<li class="post">
<a href="/blog/2016/06/13/home-assistant-at-pycon-2016/">Home Assistant at PyCon 2016</a>
</li>
<li class="post">
<a href="/blog/2016/06/08/super-fast-web-enocean-lirc/">0.21: Improved Web and support for EnOcean, LIRC and Osram Lightify</a>
</li>
<li class="post">
<a href="/blog/2016/06/01/community-highlights/">Community Highlights</a>
</li>
</ul>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<script>
var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
<script>
var disqus_shortname = 'home-assistant';
// var disqus_developer = 1;
var disqus_identifier = 'https://home-assistant.io/blog/2016/06/23/usb-webcams-and-home-assistant/';
var disqus_url = 'https://home-assistant.io/blog/2016/06/23/usb-webcams-and-home-assistant/';
var disqus_script = 'embed.js';
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/' + disqus_script;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
}());
</script>
</body>
</html>