diff --git a/atom.xml b/atom.xml index 8b0b982b24..a1a3b8674b 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ @@ -13,6 +13,103 @@ Octopress + + <![CDATA[Using USB webcams with Home Assistant]]> + + 2016-06-23T06:00:00+00:00 + https://home-assistant.io/blog/2016/06/23/usb-webcams-and-home-assistant +
+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 pygame or SimpleCV but I never finished something. With the Local File camera platform by Landrash and motion you could integrate a local USB webcam with a few very easy steps.

+ +

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 Logitech QuickCam Orbit AF and a Logitech HD Webcam C270. As a start only the Quickcam is used. No multi-camera setup for now.

+ + + +

Check first if the your operating system lists your cameras.

+ +
+
$ lsusb
+[...]
+Bus 002 Device 016: ID 046d:08cc Logitech, Inc. Mic (PTZ)
+[...]
+
+
+
+ +

The camera we are going to use is available at /dev/video1. The C270 is the one on /dev/video0.

+ +
+
$ 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
+
+
+
+ +

We need an additional software part to handle the cameras. motion 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.

+ +
+
$ sudo dnf -y install motion
+
+
+
+ +

For your setup we need to modify the file /etc/motion/motion.conf. For now the most important parameters are videodevice, snapshot_interval, and target_dir. We are going to use the device /dev/video1, use a 30 seconds interval, and set the path to /tmp. Edit /etc/motion/motion.conf or use sed.

+ +
+
$ 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
+
+
+
+ +

It’s suggested that you adjust at least width and height to get a bigger image from your camera. Now fire up motion.

+ +
+
$ sudo motion
+[0] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motion/motion.conf
+[0] [ALR] [ALL] conf_cmdparse: Unknown config option "sdl_threadnr"
+[0] [NTC] [ALL] motion_startup: Motion 3.3.0 Started
+[0] [NTC] [ALL] motion_startup: Logging to file (/var/log/motion.log)
+
+
+
+ +

Your target_dir will start filling up with images from your camera. motion will create a symlink called lastsnap.jpg which always point to the latest snapshot. We will setup the Local File camera platform to use this file.

+ +
+
camera:
+  - platform: local_file
+    name: Cranberry cam
+    file_path: /tmp/lastsnap.jpg
+
+
+
+ +

+ + The “Cranberry cam” in action +

+ +

The machine with the attached USB camera will become a webcam server as well because motion’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 motion there, adjust your firewall rules, and use Home Assistant to display the videos. Just check http://[IP of your webcam host]:8081/ to see the stream. This required more powerful hardware than using snapshots, of course.

+ +

In a scenario like this needs a Generic MJPEG IP Camera in your configuration.yaml file.

+ +
+
camera:
+  - platform: mjpeg
+    mjpeg_url: http://[IP of your webcam host]:8081
+    name: Cranberry Live cam
+
+
+
+ +

motion is a powerful tool and this blog post only showed two very simple use cases. Take a look at the documentation of motion to unleash its potential.

+ +]]>
+
+ <![CDATA[0.22: Pandora, BT Home Hub 5 and local file camera.]]> @@ -1002,63 +1099,6 @@ For example, my wife works next door - and I couldn’t detect whether she’s a -]]> - - - - <![CDATA[0.15: Unforked Open Z-Wave, templated service calls, extended scene support and PEP257 compliance.]]> - - 2016-03-12T18:55:00+00:00 - https://home-assistant.io/blog/2016/03/12/z-wave-pep257-templated-service-calls - Two weeks has past so here is 0.15! We have been focussing a lot on quality. Making sure the system is more stable and reliable. I usually try to highlight one cool thing in the release notes but this release has 4 exciting announcements!

- -
    -
  • @fabaff has upgraded the codebase to follow the PEP257 documentation standard.
  • -
  • @partofthething has migrated us to use the main Python Open Z-Wave library instead of our forked version.
  • -
  • To make our automations more powerful, @persandstrom added the option to use templates to dynamically create service calls. This works for automation, Alexa, universal media player, template switch. Learn more.
  • -
  • @MartinHjelmare has upgraded our scene support to now support all built-in services and components.
  • -
- -

Besides bug fixes, this release also brings:

- -

- - - -
-
# Example using templates for service and data in service call.
-# Works for automation, Alexa, universal media player, template switch.
-automation:
-  - trigger:
-      - platform: state
-        entity_id: switch.bathroom
-    action:
-      service_template: >
-        {% if is_state('switch.bathroom', 'on') %}
-          switch.turn_on
-        {% else %}
-          switch.turn_off
-        {% endif %}
-      data_template:
-        entity_id: switch.{{ states('input_select.is') }}
-
-
-
- -

Breaking Changes

- -
    -
  • Media Player: Attributes to call service play_media has been renamed to
    -media_content_type and media_content_id, to match the corresponding media
    -player state attributes. This change affects automations, scripts and scenes.
  • -
- ]]>
diff --git a/blog/2014/12/18/website-launched/index.html b/blog/2014/12/18/website-launched/index.html index 5bedb963f1..2dfebb60d2 100644 --- a/blog/2014/12/18/website-launched/index.html +++ b/blog/2014/12/18/website-launched/index.html @@ -179,6 +179,12 @@ diff --git a/blog/2014/12/26/home-control-home-automation-and-the-smart-home/index.html b/blog/2014/12/26/home-control-home-automation-and-the-smart-home/index.html index f7d3ebf2d6..256b18e37a 100644 --- a/blog/2014/12/26/home-control-home-automation-and-the-smart-home/index.html +++ b/blog/2014/12/26/home-control-home-automation-and-the-smart-home/index.html @@ -234,6 +234,12 @@ This article will try to explain how they all relate.

diff --git a/blog/2015/01/04/hey-pushbullet-nice-talking-to-you/index.html b/blog/2015/01/04/hey-pushbullet-nice-talking-to-you/index.html index 9b0f9b5a6c..3354bd781a 100644 --- a/blog/2015/01/04/hey-pushbullet-nice-talking-to-you/index.html +++ b/blog/2015/01/04/hey-pushbullet-nice-talking-to-you/index.html @@ -218,6 +218,12 @@ api_key=ABCDEFGHJKLMNOPQRSTUVXYZ diff --git a/blog/2015/01/11/bootstrapping-your-setup-with-discovery/index.html b/blog/2015/01/11/bootstrapping-your-setup-with-discovery/index.html index 21c093ece8..bb14f1a680 100644 --- a/blog/2015/01/11/bootstrapping-your-setup-with-discovery/index.html +++ b/blog/2015/01/11/bootstrapping-your-setup-with-discovery/index.html @@ -193,6 +193,12 @@ diff --git a/blog/2015/01/13/nest-in-da-house/index.html b/blog/2015/01/13/nest-in-da-house/index.html index 2bc53f2066..9e3d43b623 100644 --- a/blog/2015/01/13/nest-in-da-house/index.html +++ b/blog/2015/01/13/nest-in-da-house/index.html @@ -196,6 +196,12 @@ password=YOUR_PASSWORD diff --git a/blog/2015/01/24/release-notes/index.html b/blog/2015/01/24/release-notes/index.html index 19a853cd6c..7363d99a7d 100644 --- a/blog/2015/01/24/release-notes/index.html +++ b/blog/2015/01/24/release-notes/index.html @@ -202,6 +202,12 @@ Home Assistant now supports --open-ui and --demo-mode diff --git a/blog/2015/02/08/looking-at-the-past/index.html b/blog/2015/02/08/looking-at-the-past/index.html index cdd0cffee3..cb0dc8d441 100644 --- a/blog/2015/02/08/looking-at-the-past/index.html +++ b/blog/2015/02/08/looking-at-the-past/index.html @@ -210,6 +210,12 @@ Events are saved in a local database. Google Graphs is used to draw the graph. D diff --git a/blog/2015/02/24/streaming-updates/index.html b/blog/2015/02/24/streaming-updates/index.html index 661f53a1c8..75fb288635 100644 --- a/blog/2015/02/24/streaming-updates/index.html +++ b/blog/2015/02/24/streaming-updates/index.html @@ -195,6 +195,12 @@ diff --git a/blog/2015/03/01/home-assistant-migrating-to-yaml/index.html b/blog/2015/03/01/home-assistant-migrating-to-yaml/index.html index 670f282542..d05da86ce5 100644 --- a/blog/2015/03/01/home-assistant-migrating-to-yaml/index.html +++ b/blog/2015/03/01/home-assistant-migrating-to-yaml/index.html @@ -185,6 +185,12 @@ diff --git a/blog/2015/03/08/new-logo/index.html b/blog/2015/03/08/new-logo/index.html index 463fe19e9d..4f8b089073 100644 --- a/blog/2015/03/08/new-logo/index.html +++ b/blog/2015/03/08/new-logo/index.html @@ -186,6 +186,12 @@ The old logo, the new detailed logo and the new simple logo. diff --git a/blog/2015/03/11/release-notes/index.html b/blog/2015/03/11/release-notes/index.html index e8dcfc8279..5e7487286b 100644 --- a/blog/2015/03/11/release-notes/index.html +++ b/blog/2015/03/11/release-notes/index.html @@ -225,6 +225,12 @@ An initial version of voice control for Home Assistant has landed. The current i diff --git a/blog/2015/03/22/release-notes/index.html b/blog/2015/03/22/release-notes/index.html index 7eb35f2e2e..042d131116 100644 --- a/blog/2015/03/22/release-notes/index.html +++ b/blog/2015/03/22/release-notes/index.html @@ -262,6 +262,12 @@ I (Paulus) have contributed a scene component. A user can create scenes that cap diff --git a/blog/2015/04/25/release-notes/index.html b/blog/2015/04/25/release-notes/index.html index 3a3746485d..88b5861cfb 100644 --- a/blog/2015/04/25/release-notes/index.html +++ b/blog/2015/04/25/release-notes/index.html @@ -273,6 +273,12 @@ diff --git a/blog/2015/05/09/utc-time-zone-awareness/index.html b/blog/2015/05/09/utc-time-zone-awareness/index.html index 0faa74bbf7..759c1b6a3a 100644 --- a/blog/2015/05/09/utc-time-zone-awareness/index.html +++ b/blog/2015/05/09/utc-time-zone-awareness/index.html @@ -208,6 +208,12 @@ diff --git a/blog/2015/05/14/release-notes/index.html b/blog/2015/05/14/release-notes/index.html index 3f3cf99f0a..7810439e09 100644 --- a/blog/2015/05/14/release-notes/index.html +++ b/blog/2015/05/14/release-notes/index.html @@ -300,6 +300,12 @@ Before diving into the newly supported devices and services, I want to highlight diff --git a/blog/2015/06/10/release-notes/index.html b/blog/2015/06/10/release-notes/index.html index f4aabc5dd4..93fa31d9f3 100644 --- a/blog/2015/06/10/release-notes/index.html +++ b/blog/2015/06/10/release-notes/index.html @@ -353,6 +353,12 @@ This switch platform allows you to control your motion detection setting on your diff --git a/blog/2015/07/11/ip-cameras-arduino-kodi-efergy-support/index.html b/blog/2015/07/11/ip-cameras-arduino-kodi-efergy-support/index.html index 474ba204c8..12669bb201 100644 --- a/blog/2015/07/11/ip-cameras-arduino-kodi-efergy-support/index.html +++ b/blog/2015/07/11/ip-cameras-arduino-kodi-efergy-support/index.html @@ -305,6 +305,12 @@ Fabian has added support for Forecast.io to g diff --git a/blog/2015/08/09/mqtt-raspberry-pi-squeezebox-asuswrt-support/index.html b/blog/2015/08/09/mqtt-raspberry-pi-squeezebox-asuswrt-support/index.html index 43654b367b..24889a5e08 100644 --- a/blog/2015/08/09/mqtt-raspberry-pi-squeezebox-asuswrt-support/index.html +++ b/blog/2015/08/09/mqtt-raspberry-pi-squeezebox-asuswrt-support/index.html @@ -294,6 +294,12 @@ Support for Temper temperature sensors has been contributed by +
  • + Using USB webcams with Home Assistant +
  • + + +
  • 0.22: Pandora, BT Home Hub 5 and local file camera.
  • @@ -317,12 +323,6 @@ Support for Temper temperature sensors has been contributed by - iBeacons: How to track things that can’t track themselves (part II) - - - diff --git a/blog/2015/08/17/verisure-and-modern-tp-link-router-support/index.html b/blog/2015/08/17/verisure-and-modern-tp-link-router-support/index.html index 8a939faca6..071b0f000a 100644 --- a/blog/2015/08/17/verisure-and-modern-tp-link-router-support/index.html +++ b/blog/2015/08/17/verisure-and-modern-tp-link-router-support/index.html @@ -204,6 +204,12 @@ diff --git a/blog/2015/08/26/laundry-automation-with-moteino-mqtt-and-home-assistant/index.html b/blog/2015/08/26/laundry-automation-with-moteino-mqtt-and-home-assistant/index.html index 3cee40c257..72247824b2 100644 --- a/blog/2015/08/26/laundry-automation-with-moteino-mqtt-and-home-assistant/index.html +++ b/blog/2015/08/26/laundry-automation-with-moteino-mqtt-and-home-assistant/index.html @@ -317,6 +317,12 @@ The automation and script syntax here is using a deprecated and no longer suppor diff --git a/blog/2015/08/31/version-7-revamped-ui-and-improved-distribution/index.html b/blog/2015/08/31/version-7-revamped-ui-and-improved-distribution/index.html index c9a7e6857e..810edcfe9e 100644 --- a/blog/2015/08/31/version-7-revamped-ui-and-improved-distribution/index.html +++ b/blog/2015/08/31/version-7-revamped-ui-and-improved-distribution/index.html @@ -291,6 +291,12 @@ diff --git a/blog/2015/09/11/different-ways-to-use-mqtt-with-home-assistant/index.html b/blog/2015/09/11/different-ways-to-use-mqtt-with-home-assistant/index.html index 22405f9001..7222dfd9df 100644 --- a/blog/2015/09/11/different-ways-to-use-mqtt-with-home-assistant/index.html +++ b/blog/2015/09/11/different-ways-to-use-mqtt-with-home-assistant/index.html @@ -494,6 +494,12 @@ PubSubClient client(ethClient); diff --git a/blog/2015/09/13/home-assistant-meets-ifttt/index.html b/blog/2015/09/13/home-assistant-meets-ifttt/index.html index a828d152f2..3b2fa91d45 100644 --- a/blog/2015/09/13/home-assistant-meets-ifttt/index.html +++ b/blog/2015/09/13/home-assistant-meets-ifttt/index.html @@ -353,6 +353,12 @@ diff --git a/blog/2015/09/18/monitoring-with-glances-and-home-assistant/index.html b/blog/2015/09/18/monitoring-with-glances-and-home-assistant/index.html index a3582fdaee..32e42e06ff 100644 --- a/blog/2015/09/18/monitoring-with-glances-and-home-assistant/index.html +++ b/blog/2015/09/18/monitoring-with-glances-and-home-assistant/index.html @@ -254,6 +254,12 @@ Glances web server started on http://0.0.0.0:61208/ diff --git a/blog/2015/09/19/alarm-sonos-and-itunes-support/index.html b/blog/2015/09/19/alarm-sonos-and-itunes-support/index.html index 65060b7926..a232a65de8 100644 --- a/blog/2015/09/19/alarm-sonos-and-itunes-support/index.html +++ b/blog/2015/09/19/alarm-sonos-and-itunes-support/index.html @@ -233,6 +233,12 @@ Automation has gotten a lot of love. It now supports conditions, multiple trigge diff --git a/blog/2015/10/05/home-assistant-goes-geo-with-owntracks/index.html b/blog/2015/10/05/home-assistant-goes-geo-with-owntracks/index.html index b061d773cc..dd35405a36 100644 --- a/blog/2015/10/05/home-assistant-goes-geo-with-owntracks/index.html +++ b/blog/2015/10/05/home-assistant-goes-geo-with-owntracks/index.html @@ -209,6 +209,12 @@ Map in Home Assistant showing two people and three zones (home, school, work) diff --git a/blog/2015/10/11/measure-temperature-with-esp8266-and-report-to-mqtt/index.html b/blog/2015/10/11/measure-temperature-with-esp8266-and-report-to-mqtt/index.html index 768173f0cc..35586c752b 100644 --- a/blog/2015/10/11/measure-temperature-with-esp8266-and-report-to-mqtt/index.html +++ b/blog/2015/10/11/measure-temperature-with-esp8266-and-report-to-mqtt/index.html @@ -553,6 +553,12 @@ Adafruit_HDC1000 hdc = Adafruit_HDC1000(); diff --git a/blog/2015/10/11/rfxtrx-blinkstick-and-snmp-support/index.html b/blog/2015/10/11/rfxtrx-blinkstick-and-snmp-support/index.html index 8a19bdf151..5661020af1 100644 --- a/blog/2015/10/11/rfxtrx-blinkstick-and-snmp-support/index.html +++ b/blog/2015/10/11/rfxtrx-blinkstick-and-snmp-support/index.html @@ -198,6 +198,12 @@ diff --git a/blog/2015/10/26/firetv-and-radiotherm-now-supported/index.html b/blog/2015/10/26/firetv-and-radiotherm-now-supported/index.html index d77b4ee92d..7f4a004934 100644 --- a/blog/2015/10/26/firetv-and-radiotherm-now-supported/index.html +++ b/blog/2015/10/26/firetv-and-radiotherm-now-supported/index.html @@ -220,6 +220,12 @@ This makes more sense as most people run Home Assistant as a daemon

    diff --git a/blog/2015/11/16/zwave-switches-lights-and-honeywell-thermostats-now-supported/index.html b/blog/2015/11/16/zwave-switches-lights-and-honeywell-thermostats-now-supported/index.html index e311875c35..21959bf16e 100644 --- a/blog/2015/11/16/zwave-switches-lights-and-honeywell-thermostats-now-supported/index.html +++ b/blog/2015/11/16/zwave-switches-lights-and-honeywell-thermostats-now-supported/index.html @@ -216,6 +216,12 @@ diff --git a/blog/2015/11/22/survey-november-2015/index.html b/blog/2015/11/22/survey-november-2015/index.html index 4a6fa095c0..ee8aa042fc 100644 --- a/blog/2015/11/22/survey-november-2015/index.html +++ b/blog/2015/11/22/survey-november-2015/index.html @@ -256,6 +256,12 @@ diff --git a/blog/2015/12/05/community-highlights/index.html b/blog/2015/12/05/community-highlights/index.html index 541799b08f..7c4fb86fa4 100644 --- a/blog/2015/12/05/community-highlights/index.html +++ b/blog/2015/12/05/community-highlights/index.html @@ -191,6 +191,12 @@ diff --git a/blog/2015/12/06/locks-rollershutters-binary-sensors-and-influxdb-support/index.html b/blog/2015/12/06/locks-rollershutters-binary-sensors-and-influxdb-support/index.html index 000913fa95..aa1d051b74 100644 --- a/blog/2015/12/06/locks-rollershutters-binary-sensors-and-influxdb-support/index.html +++ b/blog/2015/12/06/locks-rollershutters-binary-sensors-and-influxdb-support/index.html @@ -198,6 +198,12 @@ diff --git a/blog/2015/12/07/influxdb-and-grafana/index.html b/blog/2015/12/07/influxdb-and-grafana/index.html index c191124c64..bf9d23f94e 100644 --- a/blog/2015/12/07/influxdb-and-grafana/index.html +++ b/blog/2015/12/07/influxdb-and-grafana/index.html @@ -289,6 +289,12 @@ $ sudo systemctl status grafana-server diff --git a/blog/2015/12/10/activating-tasker-tasks-from-home-assistant-using-command-line-switches/index.html b/blog/2015/12/10/activating-tasker-tasks-from-home-assistant-using-command-line-switches/index.html index 7172d96c1a..f28b711715 100644 --- a/blog/2015/12/10/activating-tasker-tasks-from-home-assistant-using-command-line-switches/index.html +++ b/blog/2015/12/10/activating-tasker-tasks-from-home-assistant-using-command-line-switches/index.html @@ -239,6 +239,12 @@ requests.get(' +
  • + Using USB webcams with Home Assistant +
  • + + +
  • 0.22: Pandora, BT Home Hub 5 and local file camera.
  • @@ -262,12 +268,6 @@ requests.get(' - iBeacons: How to track things that can’t track themselves (part II) - - - diff --git a/blog/2015/12/12/philips-hue-blocks-3rd-party-bulbs/index.html b/blog/2015/12/12/philips-hue-blocks-3rd-party-bulbs/index.html index 4b6acbbc94..8faad97f5f 100644 --- a/blog/2015/12/12/philips-hue-blocks-3rd-party-bulbs/index.html +++ b/blog/2015/12/12/philips-hue-blocks-3rd-party-bulbs/index.html @@ -211,6 +211,12 @@ Philips Hue FAQ entries regarding 3rd party light bulbs. diff --git a/blog/2015/12/13/setup-encryption-using-lets-encrypt/index.html b/blog/2015/12/13/setup-encryption-using-lets-encrypt/index.html index e4c4afae07..245e5e5437 100644 --- a/blog/2015/12/13/setup-encryption-using-lets-encrypt/index.html +++ b/blog/2015/12/13/setup-encryption-using-lets-encrypt/index.html @@ -278,6 +278,12 @@ sudo docker run -it --rm -p 80:80 --name certbot \ diff --git a/blog/2015/12/22/amazon-echo-icloud-and-templates/index.html b/blog/2015/12/22/amazon-echo-icloud-and-templates/index.html index 111168bfef..fe3d0d69cd 100644 --- a/blog/2015/12/22/amazon-echo-icloud-and-templates/index.html +++ b/blog/2015/12/22/amazon-echo-icloud-and-templates/index.html @@ -232,6 +232,12 @@ diff --git a/blog/2016/01/17/extended-support-for-diy-solutions/index.html b/blog/2016/01/17/extended-support-for-diy-solutions/index.html index 09d57e71be..1cef9e6477 100644 --- a/blog/2016/01/17/extended-support-for-diy-solutions/index.html +++ b/blog/2016/01/17/extended-support-for-diy-solutions/index.html @@ -212,6 +212,12 @@ diff --git a/blog/2016/01/19/perfect-home-automation/index.html b/blog/2016/01/19/perfect-home-automation/index.html index 95eec3bf80..ae693fa4cc 100644 --- a/blog/2016/01/19/perfect-home-automation/index.html +++ b/blog/2016/01/19/perfect-home-automation/index.html @@ -216,6 +216,12 @@ diff --git a/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/index.html b/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/index.html index bfc024cb26..21781b8b95 100644 --- a/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/index.html +++ b/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/index.html @@ -218,6 +218,12 @@ Example of the new views in the frontend. Learn mor diff --git a/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/index.html b/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/index.html index 445ac97650..7e9eebc1e8 100644 --- a/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/index.html +++ b/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/index.html @@ -405,6 +405,12 @@ Z-Wave light bulb | diff --git a/blog/2016/02/12/classifying-the-internet-of-things/index.html b/blog/2016/02/12/classifying-the-internet-of-things/index.html index ec798e43ae..42822e08e6 100644 --- a/blog/2016/02/12/classifying-the-internet-of-things/index.html +++ b/blog/2016/02/12/classifying-the-internet-of-things/index.html @@ -355,6 +355,12 @@ diff --git a/blog/2016/02/13/speedtest-bloomsky-splunk-and-garage-doors/index.html b/blog/2016/02/13/speedtest-bloomsky-splunk-and-garage-doors/index.html index 20e9062dab..99fca38695 100644 --- a/blog/2016/02/13/speedtest-bloomsky-splunk-and-garage-doors/index.html +++ b/blog/2016/02/13/speedtest-bloomsky-splunk-and-garage-doors/index.html @@ -221,6 +221,12 @@ diff --git a/blog/2016/02/18/multi-room-audio-with-snapcast/index.html b/blog/2016/02/18/multi-room-audio-with-snapcast/index.html index 036cadd4a4..afebfc3314 100644 --- a/blog/2016/02/18/multi-room-audio-with-snapcast/index.html +++ b/blog/2016/02/18/multi-room-audio-with-snapcast/index.html @@ -323,6 +323,12 @@ output = audioresample ! audio/x-raw,rate=48000,channels=2,format=S16LE ! audioc diff --git a/blog/2016/02/20/community-highlights/index.html b/blog/2016/02/20/community-highlights/index.html index c01b8833f3..c62664ef3b 100644 --- a/blog/2016/02/20/community-highlights/index.html +++ b/blog/2016/02/20/community-highlights/index.html @@ -231,6 +231,12 @@ Hold your NFC tag against the belly of Garfield to unlock the alarm. diff --git a/blog/2016/02/27/steam-d-link-smart-plugs-and-neurio-energy-sensors/index.html b/blog/2016/02/27/steam-d-link-smart-plugs-and-neurio-energy-sensors/index.html index e990d88e78..55115166a8 100644 --- a/blog/2016/02/27/steam-d-link-smart-plugs-and-neurio-energy-sensors/index.html +++ b/blog/2016/02/27/steam-d-link-smart-plugs-and-neurio-energy-sensors/index.html @@ -220,6 +220,12 @@ diff --git a/blog/2016/03/12/z-wave-pep257-templated-service-calls/index.html b/blog/2016/03/12/z-wave-pep257-templated-service-calls/index.html index ecfd0f8dac..9c4e190a7a 100644 --- a/blog/2016/03/12/z-wave-pep257-templated-service-calls/index.html +++ b/blog/2016/03/12/z-wave-pep257-templated-service-calls/index.html @@ -226,6 +226,12 @@ player state attributes. This change affects automations, scripts and scenes. +
  • + Using USB webcams with Home Assistant +
  • + + +
  • 0.22: Pandora, BT Home Hub 5 and local file camera.
  • @@ -249,12 +255,6 @@ player state attributes. This change affects automations, scripts and scenes. - -
  • - iBeacons: How to track things that can’t track themselves (part II) -
  • - - diff --git a/blog/2016/03/26/embedded-mqtt-broker-uber-yamaha-growl/index.html b/blog/2016/03/26/embedded-mqtt-broker-uber-yamaha-growl/index.html index eb98416fab..a542d3ae2e 100644 --- a/blog/2016/03/26/embedded-mqtt-broker-uber-yamaha-growl/index.html +++ b/blog/2016/03/26/embedded-mqtt-broker-uber-yamaha-growl/index.html @@ -237,6 +237,12 @@ diff --git a/blog/2016/04/05/your-hub-should-be-local-and-open/index.html b/blog/2016/04/05/your-hub-should-be-local-and-open/index.html index a6c4c22d0f..1322824f10 100644 --- a/blog/2016/04/05/your-hub-should-be-local-and-open/index.html +++ b/blog/2016/04/05/your-hub-should-be-local-and-open/index.html @@ -189,6 +189,12 @@ diff --git a/blog/2016/04/07/static-website/index.html b/blog/2016/04/07/static-website/index.html index 69962da440..85454f41d3 100644 --- a/blog/2016/04/07/static-website/index.html +++ b/blog/2016/04/07/static-website/index.html @@ -195,6 +195,12 @@ diff --git a/blog/2016/04/09/onkyo-panasonic-gtfs-and-config-validation/index.html b/blog/2016/04/09/onkyo-panasonic-gtfs-and-config-validation/index.html index cf85f9bc7b..8d0c3bfff6 100644 --- a/blog/2016/04/09/onkyo-panasonic-gtfs-and-config-validation/index.html +++ b/blog/2016/04/09/onkyo-panasonic-gtfs-and-config-validation/index.html @@ -203,6 +203,12 @@ diff --git a/blog/2016/04/17/updated-documentation/index.html b/blog/2016/04/17/updated-documentation/index.html index f6a6e9150a..8ce130b845 100644 --- a/blog/2016/04/17/updated-documentation/index.html +++ b/blog/2016/04/17/updated-documentation/index.html @@ -187,6 +187,12 @@ diff --git a/blog/2016/04/19/to-infinity-and-beyond/index.html b/blog/2016/04/19/to-infinity-and-beyond/index.html index b0de68c94d..24cc426dc7 100644 --- a/blog/2016/04/19/to-infinity-and-beyond/index.html +++ b/blog/2016/04/19/to-infinity-and-beyond/index.html @@ -204,6 +204,12 @@ diff --git a/blog/2016/04/20/bluetooth-lg-webos-tvs-and-roombas/index.html b/blog/2016/04/20/bluetooth-lg-webos-tvs-and-roombas/index.html index 7403b1f483..9247f3a31a 100644 --- a/blog/2016/04/20/bluetooth-lg-webos-tvs-and-roombas/index.html +++ b/blog/2016/04/20/bluetooth-lg-webos-tvs-and-roombas/index.html @@ -222,6 +222,12 @@ diff --git a/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better/index.html b/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better/index.html index bffbd24cb2..a4ae3bfac0 100644 --- a/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better/index.html +++ b/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better/index.html @@ -313,6 +313,12 @@ For example, my wife works next door - and I couldn’t detect whether she’s a diff --git a/blog/2016/05/06/open-iot-summit-talk/index.html b/blog/2016/05/06/open-iot-summit-talk/index.html index 4b9c078598..e68c445db0 100644 --- a/blog/2016/05/06/open-iot-summit-talk/index.html +++ b/blog/2016/05/06/open-iot-summit-talk/index.html @@ -185,6 +185,12 @@ diff --git a/blog/2016/05/07/empowering-scripts-and-alexa/index.html b/blog/2016/05/07/empowering-scripts-and-alexa/index.html index a4efb43f2f..879319e925 100644 --- a/blog/2016/05/07/empowering-scripts-and-alexa/index.html +++ b/blog/2016/05/07/empowering-scripts-and-alexa/index.html @@ -275,6 +275,12 @@ diff --git a/blog/2016/05/12/video-configuring-home-assistant/index.html b/blog/2016/05/12/video-configuring-home-assistant/index.html index 641abdeccd..eb4e93ed0f 100644 --- a/blog/2016/05/12/video-configuring-home-assistant/index.html +++ b/blog/2016/05/12/video-configuring-home-assistant/index.html @@ -185,6 +185,12 @@ diff --git a/blog/2016/05/18/why-we-use-polymer/index.html b/blog/2016/05/18/why-we-use-polymer/index.html index 13d491b591..825e253ce7 100644 --- a/blog/2016/05/18/why-we-use-polymer/index.html +++ b/blog/2016/05/18/why-we-use-polymer/index.html @@ -199,6 +199,12 @@ diff --git a/blog/2016/05/21/release-020/index.html b/blog/2016/05/21/release-020/index.html index 62e5ecd1a1..9634541bfe 100644 --- a/blog/2016/05/21/release-020/index.html +++ b/blog/2016/05/21/release-020/index.html @@ -220,6 +220,12 @@ diff --git a/blog/2016/05/22/get-started-with-all-in-one-installer/index.html b/blog/2016/05/22/get-started-with-all-in-one-installer/index.html index e268c1cf18..a0c73ab7c3 100644 --- a/blog/2016/05/22/get-started-with-all-in-one-installer/index.html +++ b/blog/2016/05/22/get-started-with-all-in-one-installer/index.html @@ -191,6 +191,12 @@ diff --git a/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/index.html b/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/index.html index d60983b990..c57bd89cbf 100644 --- a/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/index.html +++ b/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/index.html @@ -329,6 +329,12 @@ diff --git a/blog/2016/06/01/community-highlights/index.html b/blog/2016/06/01/community-highlights/index.html index c59eb1b70f..02a2ee76e0 100644 --- a/blog/2016/06/01/community-highlights/index.html +++ b/blog/2016/06/01/community-highlights/index.html @@ -205,6 +205,12 @@ diff --git a/blog/2016/06/08/super-fast-web-enocean-lirc/index.html b/blog/2016/06/08/super-fast-web-enocean-lirc/index.html index e32cef853a..e8fc232f1e 100644 --- a/blog/2016/06/08/super-fast-web-enocean-lirc/index.html +++ b/blog/2016/06/08/super-fast-web-enocean-lirc/index.html @@ -239,6 +239,12 @@ diff --git a/blog/2016/06/13/home-assistant-at-pycon-2016/index.html b/blog/2016/06/13/home-assistant-at-pycon-2016/index.html index 20b0fb9534..6df4f2d7f7 100644 --- a/blog/2016/06/13/home-assistant-at-pycon-2016/index.html +++ b/blog/2016/06/13/home-assistant-at-pycon-2016/index.html @@ -210,6 +210,12 @@ diff --git a/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/index.html b/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/index.html index ddaaea3ce2..c01caaf146 100644 --- a/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/index.html +++ b/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/index.html @@ -234,6 +234,12 @@ diff --git a/blog/2016/06/23/usb-webcams-and-home-assistant/index.html b/blog/2016/06/23/usb-webcams-and-home-assistant/index.html new file mode 100644 index 0000000000..aab9afd5cf --- /dev/null +++ b/blog/2016/06/23/usb-webcams-and-home-assistant/index.html @@ -0,0 +1,345 @@ + + + + + + + + + + Using USB webcams with Home Assistant - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    + +
    + + +
    + +
    + +

    Using USB webcams with Home Assistant

    + + + +
    + + + three minutes reading time + + + + + + Comments + +
    + +
    + + +


    +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 pygame or SimpleCV but I never finished something. With the Local File camera platform by Landrash and motion you could integrate a local USB webcam with a few very easy steps.

    + +

    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 Logitech QuickCam Orbit AF and a Logitech HD Webcam C270. As a start only the Quickcam is used. No multi-camera setup for now.

    + + + +

    Check first if the your operating system lists your cameras.

    + +
    +
    $ lsusb
    +[...]
    +Bus 002 Device 016: ID 046d:08cc Logitech, Inc. Mic (PTZ)
    +[...]
    +
    +
    +
    + +

    The camera we are going to use is available at /dev/video1. The C270 is the one on /dev/video0.

    + +
    +
    $ 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
    +
    +
    +
    + +

    We need an additional software part to handle the cameras. motion 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.

    + +
    +
    $ sudo dnf -y install motion
    +
    +
    +
    + +

    For your setup we need to modify the file /etc/motion/motion.conf. For now the most important parameters are videodevice, snapshot_interval, and target_dir. We are going to use the device /dev/video1, use a 30 seconds interval, and set the path to /tmp. Edit /etc/motion/motion.conf or use sed.

    + +
    +
    $ 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
    +
    +
    +
    + +

    It’s suggested that you adjust at least width and height to get a bigger image from your camera. Now fire up motion.

    + +
    +
    $ sudo motion
    +[0] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motion/motion.conf
    +[0] [ALR] [ALL] conf_cmdparse: Unknown config option "sdl_threadnr"
    +[0] [NTC] [ALL] motion_startup: Motion 3.3.0 Started
    +[0] [NTC] [ALL] motion_startup: Logging to file (/var/log/motion.log)
    +
    +
    +
    + +

    Your target_dir will start filling up with images from your camera. motion will create a symlink called lastsnap.jpg which always point to the latest snapshot. We will setup the Local File camera platform to use this file.

    + +
    +
    camera:
    +  - platform: local_file
    +    name: Cranberry cam
    +    file_path: /tmp/lastsnap.jpg
    +
    +
    +
    + +

    + + The “Cranberry cam” in action +

    + +

    The machine with the attached USB camera will become a webcam server as well because motion’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 motion there, adjust your firewall rules, and use Home Assistant to display the videos. Just check http://[IP of your webcam host]:8081/ to see the stream. This required more powerful hardware than using snapshots, of course.

    + +

    In a scenario like this needs a Generic MJPEG IP Camera in your configuration.yaml file.

    + +
    +
    camera:
    +  - platform: mjpeg
    +    mjpeg_url: http://[IP of your webcam host]:8081
    +    name: Cranberry Live cam
    +
    +
    +
    + +

    motion is a powerful tool and this blog post only showed two very simple use cases. Take a look at the documentation of motion to unleash its potential.

    +
    + + +
    +

    Comments

    +
    +
    + + +
    + + + + +
    +
    + + + + + + + \ No newline at end of file diff --git a/blog/archives/index.html b/blog/archives/index.html index 8103c0761b..82168afd37 100644 --- a/blog/archives/index.html +++ b/blog/archives/index.html @@ -98,6 +98,38 @@

    2016

    + + + +
    @@ -2339,6 +2371,12 @@ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index 27d6ded356..408d6218b2 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/index.html b/blog/categories/community/index.html index 1c01021681..b519202663 100644 --- a/blog/categories/community/index.html +++ b/blog/categories/community/index.html @@ -268,6 +268,12 @@ diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml index 399a57566d..551c94f0fa 100644 --- a/blog/categories/device-tracking/atom.xml +++ b/blog/categories/device-tracking/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Device-Tracking | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ diff --git a/blog/categories/device-tracking/index.html b/blog/categories/device-tracking/index.html index bb653f3474..9b1bf78687 100644 --- a/blog/categories/device-tracking/index.html +++ b/blog/categories/device-tracking/index.html @@ -199,6 +199,12 @@ diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index c9250ff3ca..e1d470be48 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/index.html b/blog/categories/esp8266/index.html index 333bf7c78c..14756016ca 100644 --- a/blog/categories/esp8266/index.html +++ b/blog/categories/esp8266/index.html @@ -199,6 +199,12 @@ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index e9728d3a9c..b26d31aff8 100644 --- a/blog/categories/how-to/atom.xml +++ b/blog/categories/how-to/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: How-To | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ @@ -13,6 +13,103 @@ Octopress + + <![CDATA[Using USB webcams with Home Assistant]]> + + 2016-06-23T06:00:00+00:00 + https://home-assistant.io/blog/2016/06/23/usb-webcams-and-home-assistant +
    +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 pygame or SimpleCV but I never finished something. With the Local File camera platform by Landrash and motion you could integrate a local USB webcam with a few very easy steps.

    + +

    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 Logitech QuickCam Orbit AF and a Logitech HD Webcam C270. As a start only the Quickcam is used. No multi-camera setup for now.

    + + + +

    Check first if the your operating system lists your cameras.

    + +
    +
    $ lsusb
    +[...]
    +Bus 002 Device 016: ID 046d:08cc Logitech, Inc. Mic (PTZ)
    +[...]
    +
    +
    +
    + +

    The camera we are going to use is available at /dev/video1. The C270 is the one on /dev/video0.

    + +
    +
    $ 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
    +
    +
    +
    + +

    We need an additional software part to handle the cameras. motion 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.

    + +
    +
    $ sudo dnf -y install motion
    +
    +
    +
    + +

    For your setup we need to modify the file /etc/motion/motion.conf. For now the most important parameters are videodevice, snapshot_interval, and target_dir. We are going to use the device /dev/video1, use a 30 seconds interval, and set the path to /tmp. Edit /etc/motion/motion.conf or use sed.

    + +
    +
    $ 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
    +
    +
    +
    + +

    It’s suggested that you adjust at least width and height to get a bigger image from your camera. Now fire up motion.

    + +
    +
    $ sudo motion
    +[0] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motion/motion.conf
    +[0] [ALR] [ALL] conf_cmdparse: Unknown config option "sdl_threadnr"
    +[0] [NTC] [ALL] motion_startup: Motion 3.3.0 Started
    +[0] [NTC] [ALL] motion_startup: Logging to file (/var/log/motion.log)
    +
    +
    +
    + +

    Your target_dir will start filling up with images from your camera. motion will create a symlink called lastsnap.jpg which always point to the latest snapshot. We will setup the Local File camera platform to use this file.

    + +
    +
    camera:
    +  - platform: local_file
    +    name: Cranberry cam
    +    file_path: /tmp/lastsnap.jpg
    +
    +
    +
    + +

    + + The “Cranberry cam” in action +

    + +

    The machine with the attached USB camera will become a webcam server as well because motion’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 motion there, adjust your firewall rules, and use Home Assistant to display the videos. Just check http://[IP of your webcam host]:8081/ to see the stream. This required more powerful hardware than using snapshots, of course.

    + +

    In a scenario like this needs a Generic MJPEG IP Camera in your configuration.yaml file.

    + +
    +
    camera:
    +  - platform: mjpeg
    +    mjpeg_url: http://[IP of your webcam host]:8081
    +    name: Cranberry Live cam
    +
    +
    +
    + +

    motion is a powerful tool and this blog post only showed two very simple use cases. Take a look at the documentation of motion to unleash its potential.

    + +]]>
    +
    + <![CDATA[Static website]]> @@ -533,75 +630,6 @@ sudo docker run -it --rm -p 80:80 --name certbot \

    Big thanks to Fabian Affolter for his help and feedback on this article.

    -]]> -
    - - - <![CDATA[Activating Tasker tasks from Home Assistant using command line switches]]> - - 2015-12-10T10:39:41+00:00 - https://home-assistant.io/blog/2015/12/10/activating-tasker-tasks-from-home-assistant-using-command-line-switches -
    -In this tutorial I will explain how you can activate Tasker tasks from Home Assistant command line switches. We are going to set up a switch that when toggled will make your Android device say either “On” or “Off”.

    - -

    You could also do this with the automation component instead so whenever you put your house to sleep mode for example your Android device will open up Google Play Books or the Kindle app ready for you to read as well as dimming your lights, but this tutorial is all about the switches.

    - - - -

    AutoRemote URL

    - -

    First things first you should install Tasker and AutoRemote onto your Android device and launch AutoRemote. You should see a URL above the QR code, visit it in your browser and it should bring up a page a bit like this.

    - -

    - -

    - -

    Now type in SayOn in the Message box and you should see a box appear on the right with a URL in it, this is what we will be using in the Python script later on so save that for later. Do the same thing again but this time replace SayOn with SayOff. Now just click the Send message now! button to test that your commands will get sent to your Android device, if they do you will see a toast message at the bottom of your screen like this one.

    - -

    - -

    - -

    Tasker Setup

    - -

    Open up Tasker and make sure you’re in the PROFILES tab, then select the plus icon to create a new profile. Select Event -> Plugin -> AutoRemote -> AutoRemote and then the pencil icon to configure the AutoRemote event. Select Message Filter and enter in SayOn then go back until it asks you for a task. Select New task then just leave the next field blank and select the tick icon.
    -This is where we’ll configure our task, so select the plus icon to select an action. Select Alert -> Say to add a Say action. Enter On in the text field and go back to test your task, make sure your media volume is up then select the play icon, you should hear your device say “On”.

    - -

    - -

    - -

    Now you can go back to the main Tasker screen and create another profile but this time replace SayOn with SayOff and On with Off. After you’ve done that go to the main screen again and select the menu button at the top then Exit and Save first to make sure everything is saved properly.

    - -

    Python Script

    - -

    Now it’s time to set it up the script, so create a new Python script and name it On.py then enter this code:

    - -
    -
    import requests
    -requests.get('[URL]')
    -
    -
    -
    - -

    Enter in your “On” URL then save it. Create another script but this time call it Off.py and enter your “off” URL instead.

    - -

    Home Assistant Configuration

    - -

    Add a command line switch to your Home Assistant configuration:

    - -
    -
    switch:
    -  platform: command_switch
    -  switches:
    -    tasker_say:
    -      oncmd: python "[LocationOfOnScript]"
    -      offcmd: python "[LocationOfOffScript]"
    -
    -
    -
    - -

    Now load up Home Assistant and whenever you toggle the switch you created your Android device will respond with either “On” or “Off”. :-)

    ]]>
    diff --git a/blog/categories/how-to/index.html b/blog/categories/how-to/index.html index 4a6fa2199f..c6e4d3ce1d 100644 --- a/blog/categories/how-to/index.html +++ b/blog/categories/how-to/index.html @@ -98,6 +98,38 @@

    2016

    + + + +
    @@ -496,6 +528,12 @@ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index f390222784..a998338ca3 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ diff --git a/blog/categories/ibeacons/index.html b/blog/categories/ibeacons/index.html index 8dd3c872db..3c8bb3ef56 100644 --- a/blog/categories/ibeacons/index.html +++ b/blog/categories/ibeacons/index.html @@ -235,6 +235,12 @@ diff --git a/blog/categories/internet-of-things/atom.xml b/blog/categories/internet-of-things/atom.xml index a54009219a..9370e8b53b 100644 --- a/blog/categories/internet-of-things/atom.xml +++ b/blog/categories/internet-of-things/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Internet-of-Things | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ diff --git a/blog/categories/internet-of-things/index.html b/blog/categories/internet-of-things/index.html index c73bc13eaf..5adfafd267 100644 --- a/blog/categories/internet-of-things/index.html +++ b/blog/categories/internet-of-things/index.html @@ -294,6 +294,12 @@ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index 723e0c166c..aaa104e033 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/index.html b/blog/categories/mqtt/index.html index 96ef5607e0..8da81c86c0 100644 --- a/blog/categories/mqtt/index.html +++ b/blog/categories/mqtt/index.html @@ -270,6 +270,12 @@ diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml index 3f3ad77edd..576e0aa17e 100644 --- a/blog/categories/organisation/atom.xml +++ b/blog/categories/organisation/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organisation | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ diff --git a/blog/categories/organisation/index.html b/blog/categories/organisation/index.html index 258517a6be..47f008f32e 100644 --- a/blog/categories/organisation/index.html +++ b/blog/categories/organisation/index.html @@ -230,6 +230,12 @@ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index 692ee3fa58..6490b37732 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ diff --git a/blog/categories/owntracks/index.html b/blog/categories/owntracks/index.html index 1c89aff5a0..b398390142 100644 --- a/blog/categories/owntracks/index.html +++ b/blog/categories/owntracks/index.html @@ -235,6 +235,12 @@ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index 7f1759693c..c71a07a036 100644 --- a/blog/categories/presence-detection/atom.xml +++ b/blog/categories/presence-detection/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Presence-Detection | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/index.html b/blog/categories/presence-detection/index.html index eeefad2e2b..c3d2fe6550 100644 --- a/blog/categories/presence-detection/index.html +++ b/blog/categories/presence-detection/index.html @@ -199,6 +199,12 @@ diff --git a/blog/categories/public-service-announcement/atom.xml b/blog/categories/public-service-announcement/atom.xml index 33b1e08fd5..4786420b9f 100644 --- a/blog/categories/public-service-announcement/atom.xml +++ b/blog/categories/public-service-announcement/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Public-Service-Announcement | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ diff --git a/blog/categories/public-service-announcement/index.html b/blog/categories/public-service-announcement/index.html index 018ec6430c..e0494452cc 100644 --- a/blog/categories/public-service-announcement/index.html +++ b/blog/categories/public-service-announcement/index.html @@ -195,6 +195,12 @@ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index 1554efe80f..d2c5c655b0 100644 --- a/blog/categories/release-notes/atom.xml +++ b/blog/categories/release-notes/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Release-Notes | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/index.html b/blog/categories/release-notes/index.html index 7b088712d1..b779061034 100644 --- a/blog/categories/release-notes/index.html +++ b/blog/categories/release-notes/index.html @@ -1352,6 +1352,12 @@ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index 776136213a..3d191851bd 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/index.html b/blog/categories/survey/index.html index e5f3ec7d9d..32e1fa7746 100644 --- a/blog/categories/survey/index.html +++ b/blog/categories/survey/index.html @@ -195,6 +195,12 @@ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index 0966218d8f..9dd538fb18 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/index.html b/blog/categories/talks/index.html index e0fe542bec..0afc655147 100644 --- a/blog/categories/talks/index.html +++ b/blog/categories/talks/index.html @@ -197,6 +197,12 @@ diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml index 342d25a441..98a6671e73 100644 --- a/blog/categories/technology/atom.xml +++ b/blog/categories/technology/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Technology | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ diff --git a/blog/categories/technology/index.html b/blog/categories/technology/index.html index 4e3b6b1b56..3d039bef3c 100644 --- a/blog/categories/technology/index.html +++ b/blog/categories/technology/index.html @@ -195,6 +195,12 @@ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index ad0dc2e861..672786f42f 100644 --- a/blog/categories/user-stories/atom.xml +++ b/blog/categories/user-stories/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: User-Stories | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/index.html b/blog/categories/user-stories/index.html index f986db8a15..0d39cda7e7 100644 --- a/blog/categories/user-stories/index.html +++ b/blog/categories/user-stories/index.html @@ -195,6 +195,12 @@ diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml index 3a3e943c2f..754cb1e7c3 100644 --- a/blog/categories/video/atom.xml +++ b/blog/categories/video/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Video | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ diff --git a/blog/categories/video/index.html b/blog/categories/video/index.html index 874bbc290c..0473a2945a 100644 --- a/blog/categories/video/index.html +++ b/blog/categories/video/index.html @@ -398,6 +398,12 @@ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index 7443ace7de..1f9a60d481 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2016-06-22T08:00:15+00:00 + 2016-06-23T09:16:08+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/index.html b/blog/categories/website/index.html index f4e7462f1c..cc9bf62800 100644 --- a/blog/categories/website/index.html +++ b/blog/categories/website/index.html @@ -230,6 +230,12 @@ diff --git a/blog/index.html b/blog/index.html index 0bbdd5d073..4338b04802 100644 --- a/blog/index.html +++ b/blog/index.html @@ -78,6 +78,53 @@ +
    +
    + +

    + Using USB webcams with Home Assistant +

    + + + +
    + + + three minutes reading time + + + + + + Comments + +
    + +
    + + +
    +


    +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 pygame or SimpleCV but I never finished something. With the Local File camera platform by Landrash and motion you could integrate a local USB webcam with a few very easy steps.

    + +

    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 Logitech QuickCam Orbit AF and a Logitech HD Webcam C270. As a start only the Quickcam is used. No multi-camera setup for now.

    + + + + Read on → + +
    +
    +
    +
    @@ -698,143 +745,6 @@
    -
    -
    -
    - -
    -
    - -

    - 0.19: Empowering scripts and Alexa -

    - - - -
    - - - three minutes reading time - - - - - - Comments - -
    - -
    - - -
    -

    This release is big. Until now, our automations and scripts have been very static. Starting today it should all be a bit more dynamic.

    - -

    Scripts are now available in automations and when responding to Alexa/Amazon Echo. Both of these components will now expose data to be used in script templates (including from_state !). Passing data to script entities is available by passing the data to the script services.

    - -
    -
    automation:
    -  trigger:
    -    platform: mqtt
    -    topic: some/notify/topic
    -  action:
    -    service: notify.notify
    -    data_template:
    -      message: 
    -
    -automation 2:
    -  trigger:
    -    platform: state
    -    entity_id: light.hue
    -  action:
    -    service: notify.notify
    -    data_template:
    -      message:  is now 
    -
    -
    -
    - -

    Entity Namespaces allow you to influence the entity ids for a specific platform. For example you can turn light.living_room into light.holiday_home_living_room with the following config:

    - -
    -
    light:
    -  platform: hue
    -  entity_namespace: holiday_home
    -
    -
    -
    - - - -

    Deprecations

    -
      -
    • Conditions in automations should now specify which condition to use with condition: instead of platform:. For example condition: state.
    • -
    • RFXtrx has a new config format.
    • -
    - -

    Old RFXtrx config format:

    - -
    -
      devices:
    -    123efab1:
    -      name: My DI.0 light device
    -      packetid: 1b2200000890efab1213f60
    -
    -
    -
    - -

    New RFXtrx config format:

    - -
    -
      devices:
    -    1b2200000890efab1213f60:
    -      name: My DI.0 light device
    -
    -
    -
    - -

    diff --git a/blog/posts/2/index.html b/blog/posts/2/index.html index 09bc8fc612..c4c3b7f7a1 100644 --- a/blog/posts/2/index.html +++ b/blog/posts/2/index.html @@ -78,6 +78,143 @@ +
    +
    + +

    + 0.19: Empowering scripts and Alexa +

    + + + +
    + + + three minutes reading time + + + + + + Comments + +
    + +
    + + +
    +

    This release is big. Until now, our automations and scripts have been very static. Starting today it should all be a bit more dynamic.

    + +

    Scripts are now available in automations and when responding to Alexa/Amazon Echo. Both of these components will now expose data to be used in script templates (including from_state !). Passing data to script entities is available by passing the data to the script services.

    + +
    +
    automation:
    +  trigger:
    +    platform: mqtt
    +    topic: some/notify/topic
    +  action:
    +    service: notify.notify
    +    data_template:
    +      message: 
    +
    +automation 2:
    +  trigger:
    +    platform: state
    +    entity_id: light.hue
    +  action:
    +    service: notify.notify
    +    data_template:
    +      message:  is now 
    +
    +
    +
    + +

    Entity Namespaces allow you to influence the entity ids for a specific platform. For example you can turn light.living_room into light.holiday_home_living_room with the following config:

    + +
    +
    light:
    +  platform: hue
    +  entity_namespace: holiday_home
    +
    +
    +
    + + + +

    Deprecations

    +
      +
    • Conditions in automations should now specify which condition to use with condition: instead of platform:. For example condition: state.
    • +
    • RFXtrx has a new config format.
    • +
    + +

    Old RFXtrx config format:

    + +
    +
      devices:
    +    123efab1:
    +      name: My DI.0 light device
    +      packetid: 1b2200000890efab1213f60
    +
    +
    +
    + +

    New RFXtrx config format:

    + +
    +
      devices:
    +    1b2200000890efab1213f60:
    +      name: My DI.0 light device
    +
    +
    +
    + + +
    +
    +
    +
    @@ -646,95 +783,6 @@ - -
    -
    - -
    -
    - -

    - 0.15: Unforked Open Z-Wave, templated service calls, extended scene support and PEP257 compliance. -

    - - - -
    - - - 1 minute reading time - - - - - - Comments - -
    - -
    - - -
    -

    Two weeks has past so here is 0.15! We have been focussing a lot on quality. Making sure the system is more stable and reliable. I usually try to highlight one cool thing in the release notes but this release has 4 exciting announcements!

    - -
      -
    • @fabaff has upgraded the codebase to follow the PEP257 documentation standard.
    • -
    • @partofthething has migrated us to use the main Python Open Z-Wave library instead of our forked version.
    • -
    • To make our automations more powerful, @persandstrom added the option to use templates to dynamically create service calls. This works for automation, Alexa, universal media player, template switch. Learn more.
    • -
    • @MartinHjelmare has upgraded our scene support to now support all built-in services and components.
    • -
    - -

    Besides bug fixes, this release also brings:

    - -

    - - - -
    -
    # Example using templates for service and data in service call.
    -# Works for automation, Alexa, universal media player, template switch.
    -automation:
    -  - trigger:
    -      - platform: state
    -        entity_id: switch.bathroom
    -    action:
    -      service_template: >
    -        {% if is_state('switch.bathroom', 'on') %}
    -          switch.turn_on
    -        {% else %}
    -          switch.turn_off
    -        {% endif %}
    -      data_template:
    -        entity_id: switch.{{ states('input_select.is') }}
    -
    -
    -
    - -

    Breaking Changes

    - -
      -
    • Media Player: Attributes to call service play_media has been renamed to
      -media_content_type and media_content_id, to match the corresponding media
      -player state attributes. This change affects automations, scripts and scenes.
    • -
    - - -

    diff --git a/blog/posts/3/index.html b/blog/posts/3/index.html index 7874b33df2..66848d8f1f 100644 --- a/blog/posts/3/index.html +++ b/blog/posts/3/index.html @@ -78,6 +78,95 @@ +
    +
    + +

    + 0.15: Unforked Open Z-Wave, templated service calls, extended scene support and PEP257 compliance. +

    + + + +
    + + + 1 minute reading time + + + + + + Comments + +
    + +
    + + +
    +

    Two weeks has past so here is 0.15! We have been focussing a lot on quality. Making sure the system is more stable and reliable. I usually try to highlight one cool thing in the release notes but this release has 4 exciting announcements!

    + +
      +
    • @fabaff has upgraded the codebase to follow the PEP257 documentation standard.
    • +
    • @partofthething has migrated us to use the main Python Open Z-Wave library instead of our forked version.
    • +
    • To make our automations more powerful, @persandstrom added the option to use templates to dynamically create service calls. This works for automation, Alexa, universal media player, template switch. Learn more.
    • +
    • @MartinHjelmare has upgraded our scene support to now support all built-in services and components.
    • +
    + +

    Besides bug fixes, this release also brings:

    + +

    + + + +
    +
    # Example using templates for service and data in service call.
    +# Works for automation, Alexa, universal media player, template switch.
    +automation:
    +  - trigger:
    +      - platform: state
    +        entity_id: switch.bathroom
    +    action:
    +      service_template: >
    +        {% if is_state('switch.bathroom', 'on') %}
    +          switch.turn_on
    +        {% else %}
    +          switch.turn_off
    +        {% endif %}
    +      data_template:
    +        entity_id: switch.{{ states('input_select.is') }}
    +
    +
    +
    + +

    Breaking Changes

    + +
      +
    • Media Player: Attributes to call service play_media has been renamed to
      +media_content_type and media_content_id, to match the corresponding media
      +player state attributes. This change affects automations, scripts and scenes.
    • +
    + + + +
    +
    +
    +
    @@ -756,71 +845,6 @@ Example of the new views in the frontend. Learn mor - -
    -
    - -
    -
    - -

    - 0.10: Amazon Echo, iCloud, Dweet.io, Twitch and templating support! -

    - - - -
    - - - two minutes reading time - - - - - - Comments - -
    - -
    - - -
    -

    Alrighty, it’s time for Home Assistant 0.10. A lot amazing things have changed and sadly we also had to introduce a bunch of backwards incompatible changes. I would like to give a big shoutout to Philip Lundrigan (@philipbl) who put a lot in effort in helping the migration to move towards using templates for a wide variety of platforms.

    - -
    - -
    - -

    - - - - - - Read on → -

    diff --git a/blog/posts/4/index.html b/blog/posts/4/index.html index da296627d8..6dc532fa3e 100644 --- a/blog/posts/4/index.html +++ b/blog/posts/4/index.html @@ -78,6 +78,71 @@ +
    +
    + +

    + 0.10: Amazon Echo, iCloud, Dweet.io, Twitch and templating support! +

    + + + +
    + + + two minutes reading time + + + + + + Comments + +
    + +
    + + +
    +

    Alrighty, it’s time for Home Assistant 0.10. A lot amazing things have changed and sadly we also had to introduce a bunch of backwards incompatible changes. I would like to give a big shoutout to Philip Lundrigan (@philipbl) who put a lot in effort in helping the migration to move towards using templates for a wide variety of platforms.

    + +
    + +
    + +

    + + + + + + Read on → + +
    +
    +
    +
    @@ -579,67 +644,6 @@ The InfluxDB database is a so-called time se

    -
    -
    - -

    - Report the temperature with ESP8266 to MQTT -

    - - - -
    - - - eight minutes reading time - - - - - - Comments - -
    - -
    - - -
    - -

    I recently learned about the ESP8266, a $5 chip that includes WiFi and is Arduino compatible. This means that all your DIY projects can now be done for a fraction of the price.

    - -

    For this tutorial, I’ll walk through how to get going with ESP8266, get the temperature and humidity and report it to MQTT where Home Asssistant can pick it up.

    - -

    - -Picture of the final setup (+ 2 LED for decoration) -

    - -

    - -Home Assistant will keep track of historical values and allow you to integrate it into automation. -

    - - - - Read on → - -
    -
    -
    -