Site updated at 2017-02-04 09:10:10 UTC

This commit is contained in:
Travis CI 2017-02-04 09:10:11 +00:00
parent 4b838f09a1
commit eeb57b8e5f
157 changed files with 2591 additions and 1440 deletions

View file

@ -0,0 +1,156 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[Category: Babyphone | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/babyphone/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>
</author>
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[Smart Baby Monitor]]></title>
<link href="https://home-assistant.io/blog/2017/02/03/babyphone/"/>
<updated>2017-02-03T23:00:00+00:00</updated>
<id>https://home-assistant.io/blog/2017/02/03/babyphone</id>
<content type="html"><![CDATA[One of the hardest part of being a parent is keeping a constant eye on the baby to make sure that baby is doing well. Thus, it is not surprising that baby monitors are one of the fastest growing baby product category. However, many of the baby monitors available in the market are rather dumb and expect the parents to keep looking at the video stream or listen to the audio. This how-to will help you create a smart baby monitor on a budget and integrate it with Home-Assitant. Instead of relying on the poor quality baby monitor speakers, we use our existing speakers (e.g., Sonos). We can also send notifications (with pictures) to avoid constant monitoring of the feed.
Obviously, you can use the setup as a general purpose surveillance system to monitor noise in the whole house.
<!--more-->
### <a class='title-link' name='setup' href='#setup'></a> Setup
We need an IP-camera that can capture sound in the baby's room. It is also possible to use a Raspberry Pi with a microphone and send the audio to our Home-Assistant with `ffmpeg -f alsa -i hw:1,0 -vn -f rtp rtp://236.0.0.1:2000` over multicast. We can set `input` option on Home-Assistant side to `rtp://236.0.0.1:2000` in same network.
Next, we attach a ffmpeg noise binary sensor to our IP-camera. The sensor has an output `option` that allows us to send the output to icecast2 server for playing over speakers integrated with Home-Assistant (e.g., Sonos). We can use the binary sensor in our automation. You can ignore the icecast2 setup if you don't want to play the audio after the noise sensor trigger.
<p class='note'>
We change the platform name for binary sensor in 0.38 from `ffmpeg` to `ffmpeg_noise`. Also all service going to component and was rename from `binary_sensor.ffmpeg_xy` to `ffmpeg.xy`.
</p>
On Raspbian Jessie, you can setup [ffmpeg](/components/ffmpeg) and install a [icecast2](http://icecast.org/) server using:
```bash
$ sudo echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
$ sudo apt-get update
$ sudo apt-get -t jessie-backports install ffmpeg
$ sudo apt-get install icecast2
```
We setup a icecast mount point for our babyphone and update `/etc/icecast2/icecast.xml`:
```
<mount>
<mount-name>/babyphone.mp3</mount-name>
<stream-name>Babyphone</stream-name>
<username>stream_user</username>
<password>stream_pw</password>
</mount>
```
Now we can add the noise sensor to Home-Assistant. We can lower the sensitivity of the sensor (so that you are not inundated with notifications for every cough of the baby) to 2 seconds using the `duration` option. The sensor should wait 60 seconds before restoring and it prevent us that a wine break will triggering a new alarm.
We can optimize the audio stream for human voice by using a highpass filter with 300Hz and a lowpass filter with 2500Hz. This filters out all non-human sounds such as background noise. We can even add a volume amplifier if the microphone volume is too low (you can remove it from `extra_arguments`). For icecast2 we convert the audio stream to mp3 with samplerate of 16000 (which is the minimum for Sonos speakers). We use `peak` to set the threshold for noise detection, where 0 dB is very loud and -100 dB is low.
```yaml
binary_sensor:
- platform: ffmpeg_noise
input: rtsp://user:pw@my_input/video
extra_arguments: -filter:a highpass=f=300,lowpass=f=2500,volume=volume=2 -codec:a libmp3lame -ar 16000
output: -f mp3 icecast://stream_user:stream_pw@127.0.0.1:8000/babyphone.mp3
initial_state: false
duration: 2
reset: 60
peak: -32
```
We use the option `initial_state` to prevent the ffmpeg process from starting with Home-Assistant and only start it when needed. We use an `input_boolean` to control the state of ffmpeg services using the following automation.
```yaml
input_boolean:
babyphone:
name: babyphone
initial: off
automation:
- alias: 'Babyphone on'
trigger:
platform: state
entity_id: input_boolean.babyphone
from: 'off'
to: 'on'
action:
service: ffmpeg.start
entity_id: binary_sensor.ffmpeg_noise
- alias: 'Babyphone off'
trigger:
platform: state
entity_id: input_boolean.babyphone
from: 'on'
to: 'off'
action:
service: ffmpeg.stop
entity_id: binary_sensor.ffmpeg_noise
```
### <a class='title-link' name='trigger-a-alarm' href='#trigger-a-alarm'></a> Trigger a alarm
Now we can make a lot stuff. Here is a simple example of an automation what should be possible with Sonos speakers.
```yaml
automation:
- alias: 'Babyphone alarm on'
trigger:
platform: state
entity_id: binary_sensor.ffmpeg_noise
from: 'off'
to: 'on'
action:
- service: media_player.sonos_snapshot
entity_id: media_player.bedroom
- service: media_player.sonos_unjoin
entity_id: media_player.bedroom
- service: media_player.volume_set
entity_id: media_player.bedroom
data:
volume_level: 0.4
- service: media_player.play_media
entity_id: media_player.bedroom
data:
media_content_type: 'music'
media_content_id: http://my_ip_icecast:8000/babyphone.mp3
- service: light.turn_on:
entity_id:
- light.floor
- light.bedroom
data:
brightness: 150
- alias: 'Babyphone alarm off'
trigger:
platform: state
entity_id: binary_sensor.ffmpeg_noise
from: 'on'
to: 'off'
action:
- service: media_player.sonos_restore
entity_id: media_player.bedroom
- service: light.turn_off:
entity_id:
- light.floor
- light.bedroom
```
### <a class='title-link' name='thanks' href='#thanks'></a> Thanks
Special thanks to [arsaboo](https://github.com/arsaboo) for assistance in writing this blogpost.
]]></content>
</entry>
</feed>

View file

@ -0,0 +1,271 @@
<!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>Category: Babyphone - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Category: Babyphone">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/blog/categories/babyphone/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Category: Babyphone">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/blog/categories/babyphone/">
<meta property="og:type" content="website">
<meta property="og:description" content="Category: Babyphone">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Category: Babyphone">
<meta name="twitter:description" content="Category: Babyphone">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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="/ecosystem/">Ecosystem</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="page">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.github.io/tree/current/source/blog/categories/babyphone/index.html'>Edit this page on GitHub</a></div>
<header>
<h1 class="title indent">
Category: Babyphone
</h1>
</header>
<hr class="divider">
<div id="archive-list">
<h2>2017</h2>
<article>
<div class="grid">
<div class="grid__item one-fifth palm-one-whole">
<time datetime="2017-02-03T23:00:00+00:00" pubdate>
<span class='month'>Feb</span> <span class='day'>03</span>
</time>
</div>
<div class="grid__item four-fifths palm-one-whole">
<h1 class="gamma"><a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a></h1>
<footer class="meta">
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/babyphone/'>Babyphone</a></li>
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
</ul>
</span>
</footer>
<hr class="divider">
</div>
</div>
</article>
</div>
</article>
</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>
<li><div class="fb-like" data-href="https://www.facebook.com/homeassistantio/" data-layout="standard" data-action="like" data-size="small" data-show-faces="true" data-share="false"></div></li>
</ul>
</section>
<div id="fb-root"></div>
<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>
<script>(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/all.js#appId=338291289691179&xfbml=1";fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));</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/categories/babyphone/"
data-counturl="https://home-assistant.io/blog/categories/babyphone/" >Tweet</a>
<div class="fb-share-button" style='top: -6px;'
data-href="https://home-assistant.io/blog/categories/babyphone/"
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>
<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/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
<li class="post">
<a href="/blog/2017/01/21/home-assistant-governance/">Home Assistant Governance [updated]</a>
</li>
<li class="post">
<a href="/blog/2017/01/18/numbers/">Numbers</a>
</li>
<li class="post">
<a href="/blog/2017/01/14/iss-usps-images-packages/">0.36: ISS, USPS, Image processing, Insteon</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://facebook.com/homeassistantio'><i class="icon-facebook"></i></a>
<a rel="me" href='https://plus.google.com/110560654828510104551'><i class="icon-google-plus"></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>
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">home-assistant.io</span> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
</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_script = 'count.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>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: community | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/community/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -186,6 +186,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -209,12 +215,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Device-Tracking | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/device-tracking/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -190,6 +190,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -213,12 +219,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: ESP8266 | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/esp8266/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -267,6 +267,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -290,12 +296,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: How-To | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/how-to/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>
@ -13,6 +13,146 @@
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[Smart Baby Monitor]]></title>
<link href="https://home-assistant.io/blog/2017/02/03/babyphone/"/>
<updated>2017-02-03T23:00:00+00:00</updated>
<id>https://home-assistant.io/blog/2017/02/03/babyphone</id>
<content type="html"><![CDATA[One of the hardest part of being a parent is keeping a constant eye on the baby to make sure that baby is doing well. Thus, it is not surprising that baby monitors are one of the fastest growing baby product category. However, many of the baby monitors available in the market are rather dumb and expect the parents to keep looking at the video stream or listen to the audio. This how-to will help you create a smart baby monitor on a budget and integrate it with Home-Assitant. Instead of relying on the poor quality baby monitor speakers, we use our existing speakers (e.g., Sonos). We can also send notifications (with pictures) to avoid constant monitoring of the feed.
Obviously, you can use the setup as a general purpose surveillance system to monitor noise in the whole house.
<!--more-->
### <a class='title-link' name='setup' href='#setup'></a> Setup
We need an IP-camera that can capture sound in the baby's room. It is also possible to use a Raspberry Pi with a microphone and send the audio to our Home-Assistant with `ffmpeg -f alsa -i hw:1,0 -vn -f rtp rtp://236.0.0.1:2000` over multicast. We can set `input` option on Home-Assistant side to `rtp://236.0.0.1:2000` in same network.
Next, we attach a ffmpeg noise binary sensor to our IP-camera. The sensor has an output `option` that allows us to send the output to icecast2 server for playing over speakers integrated with Home-Assistant (e.g., Sonos). We can use the binary sensor in our automation. You can ignore the icecast2 setup if you don't want to play the audio after the noise sensor trigger.
<p class='note'>
We change the platform name for binary sensor in 0.38 from `ffmpeg` to `ffmpeg_noise`. Also all service going to component and was rename from `binary_sensor.ffmpeg_xy` to `ffmpeg.xy`.
</p>
On Raspbian Jessie, you can setup [ffmpeg](/components/ffmpeg) and install a [icecast2](http://icecast.org/) server using:
```bash
$ sudo echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
$ sudo apt-get update
$ sudo apt-get -t jessie-backports install ffmpeg
$ sudo apt-get install icecast2
```
We setup a icecast mount point for our babyphone and update `/etc/icecast2/icecast.xml`:
```
<mount>
<mount-name>/babyphone.mp3</mount-name>
<stream-name>Babyphone</stream-name>
<username>stream_user</username>
<password>stream_pw</password>
</mount>
```
Now we can add the noise sensor to Home-Assistant. We can lower the sensitivity of the sensor (so that you are not inundated with notifications for every cough of the baby) to 2 seconds using the `duration` option. The sensor should wait 60 seconds before restoring and it prevent us that a wine break will triggering a new alarm.
We can optimize the audio stream for human voice by using a highpass filter with 300Hz and a lowpass filter with 2500Hz. This filters out all non-human sounds such as background noise. We can even add a volume amplifier if the microphone volume is too low (you can remove it from `extra_arguments`). For icecast2 we convert the audio stream to mp3 with samplerate of 16000 (which is the minimum for Sonos speakers). We use `peak` to set the threshold for noise detection, where 0 dB is very loud and -100 dB is low.
```yaml
binary_sensor:
- platform: ffmpeg_noise
input: rtsp://user:pw@my_input/video
extra_arguments: -filter:a highpass=f=300,lowpass=f=2500,volume=volume=2 -codec:a libmp3lame -ar 16000
output: -f mp3 icecast://stream_user:stream_pw@127.0.0.1:8000/babyphone.mp3
initial_state: false
duration: 2
reset: 60
peak: -32
```
We use the option `initial_state` to prevent the ffmpeg process from starting with Home-Assistant and only start it when needed. We use an `input_boolean` to control the state of ffmpeg services using the following automation.
```yaml
input_boolean:
babyphone:
name: babyphone
initial: off
automation:
- alias: 'Babyphone on'
trigger:
platform: state
entity_id: input_boolean.babyphone
from: 'off'
to: 'on'
action:
service: ffmpeg.start
entity_id: binary_sensor.ffmpeg_noise
- alias: 'Babyphone off'
trigger:
platform: state
entity_id: input_boolean.babyphone
from: 'on'
to: 'off'
action:
service: ffmpeg.stop
entity_id: binary_sensor.ffmpeg_noise
```
### <a class='title-link' name='trigger-a-alarm' href='#trigger-a-alarm'></a> Trigger a alarm
Now we can make a lot stuff. Here is a simple example of an automation what should be possible with Sonos speakers.
```yaml
automation:
- alias: 'Babyphone alarm on'
trigger:
platform: state
entity_id: binary_sensor.ffmpeg_noise
from: 'off'
to: 'on'
action:
- service: media_player.sonos_snapshot
entity_id: media_player.bedroom
- service: media_player.sonos_unjoin
entity_id: media_player.bedroom
- service: media_player.volume_set
entity_id: media_player.bedroom
data:
volume_level: 0.4
- service: media_player.play_media
entity_id: media_player.bedroom
data:
media_content_type: 'music'
media_content_id: http://my_ip_icecast:8000/babyphone.mp3
- service: light.turn_on:
entity_id:
- light.floor
- light.bedroom
data:
brightness: 150
- alias: 'Babyphone alarm off'
trigger:
platform: state
entity_id: binary_sensor.ffmpeg_noise
from: 'on'
to: 'off'
action:
- service: media_player.sonos_restore
entity_id: media_player.bedroom
- service: light.turn_off:
entity_id:
- light.floor
- light.bedroom
```
### <a class='title-link' name='thanks' href='#thanks'></a> Thanks
Special thanks to [arsaboo](https://github.com/arsaboo) for assistance in writing this blogpost.
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[ESP8266 and MicroPython - Part 2]]></title>
<link href="https://home-assistant.io/blog/2016/08/31/esp8266-and-micropython-part2/"/>
@ -416,82 +556,6 @@ Upload `main.py` the same way as `boot.py`. After a reboot (`>>> import machine`
If you run into trouble, press "Ctrl+c" in the REPL to stop the execution of the code, enter `>>> import webrepl` and `>>> webrepl.start()`, and upload your fixed file.
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[IoT Data Exploration with Jupyter Notebooks]]></title>
<link href="https://home-assistant.io/blog/2016/07/23/internet-of-things-data-exploration-with-jupyter-notebooks/"/>
<updated>2016-07-23T18:00:00+00:00</updated>
<id>https://home-assistant.io/blog/2016/07/23/internet-of-things-data-exploration-with-jupyter-notebooks</id>
<content type="html"><![CDATA[_This is the first blog post by Anton Kireyeu. A new contributor to Home Assistant who will focus on exploring and visualizing Home Assistant data._
As we learned in the recent [blog post by Fabian], all operational data of your Home Assistant application is stored locally and is available for exploration. Our first steps were querying data with the [DB Browser for SQLite], exporting the data extract as a CSV file and graphing in LibreOffice. But what else can be done with this data and what tools are there available?
This post will help you get set up using a few popular data scientist tools to allow you to locally process your data:
- &nbsp;[Pandas]: an open source tool for data analysis for Python
- &nbsp;[matplotlib]: a Python plotting library
- &nbsp;[Jupyter notebook]: application for creation and sharing of documents containing live code, visualizations and explanatory text
<p class='img'>
<img src='https://home-assistant.io/images/blog/2016-07-data-exploration/graph.png'>
One of the graphs created with this tutorial.
</p>
_TL; DR: Use [this Jupyter Notebook][nb-prev] to visualize of your data_
[blog post by Fabian]: https://home-assistant.io/blog/2016/07/19/visualizing-your-iot-data/
[DB Browser for SQLite]: http://sqlitebrowser.org/
[Pandas]: http://pandas.pydata.org/
[matplotlib]: http://matplotlib.org/
[Jupyter notebook]: https://jupyter.org/
[nb-prev]: http://nbviewer.jupyter.org/github/home-assistant/home-assistant-notebooks/blob/master/DataExploration-1/DataExploration-1.ipynb
<!--more-->
### <a class='title-link' name='dependencies' href='#dependencies'></a> Dependencies
In order to run the provided Jupyter notebook, please make sure you have the following applications/libraries installed on your computer:
- Pandas
- NumPy
- Matplotlib
- SQLAlchemy
- Jupyter
As a Windows user myself, I find the easiest, quickest and most hassle-free way of installing all of these dependencies is to use [WinPython]. This free open-source portable distribution includes all of the dependencies required for this notebook, as well as a few other essential Python libraries you may require for data exploration in the future.
[WinPython]: https://winpython.github.io/
#### <a class='title-link' name='why-jupyter' href='#why-jupyter'></a> Why Jupyter?
While all Home Assistant implementations can have varying setup, components and scripts, the underlying data structure is standardized and well-defined. This allows us to write Python code that is environmentally agnostic. Wrapping it in a Jupyter notebook ensures the code, visualizations and directions/explanations are kept digestible and neatly-packaged. One of the amazing features of Jupyter is the ability to change code as you go along, customizing all outputs and visualizations on the fly!
#### <a class='title-link' name='where-do-i-start' href='#where-do-i-start'></a> Where do I start?
This tutorial is based around a heavily commented Jupyter Notebook that we created. So to get started, you will have to open that:
- [download the tutorial Jupyter Notebook][nb-prev] (leads to preview page, from there click download top-right)
- launch the Jupyter Notebook App
- Click the 'upload' button to add the downloaded notebook to Jupyter
- Adjust the `DB_URL` at the beginning of the notebook to point at your Home Assistant database
- Select in top menu: Cell -> Run All
Thats it! The included code will walk you through importing the required libraries, show running raw SQL against your local database, plotting basic data from the states table, and in the end output a few plots of changes for every entity in your system as well as the mean daily value for the past 20 days.
After just those few steps, you will be greeted with beautiful formatted data like this:
<p class='img'>
<img src='https://home-assistant.io/images/blog/2016-07-data-exploration/graph.png'>
One of the graphs created with this tutorial.
</p>
#### <a class='title-link' name='whats-next' href='#whats-next'></a> Whats next?
Thanks to the magic of Jupyter, all of the code is customizable: want to selectively display your data, only covering a specific entity? Sure thing! Want to change the properties of the plots? No problem!
While you learn and explore your IoT data, we will be working on providing more ready-to-use Jupyter Notebooks. Feel free to ask questions or provide suggestions. Would you like to see a specific visualization? Is there a particular facet of data youre interested in? Lets talk about it, lets dive into the world of data together!
]]></content>
</entry>

View file

@ -97,6 +97,43 @@
<h2>2017</h2>
<article>
<div class="grid">
<div class="grid__item one-fifth palm-one-whole">
<time datetime="2017-02-03T23:00:00+00:00" pubdate>
<span class='month'>Feb</span> <span class='day'>03</span>
</time>
</div>
<div class="grid__item four-fifths palm-one-whole">
<h1 class="gamma"><a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a></h1>
<footer class="meta">
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/babyphone/'>Babyphone</a></li>
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
</ul>
</span>
</footer>
<hr class="divider">
</div>
</div>
</article>
<h2>2016</h2>
<article>
@ -759,6 +796,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -782,12 +825,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: iBeacons | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/ibeacons/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -226,6 +226,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -249,12 +255,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Internet-of-Things | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/internet-of-things/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -285,6 +285,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -308,12 +314,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: IoT-Data | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/iot-data/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -256,6 +256,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -279,12 +285,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Micropython | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/micropython/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -228,6 +228,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -251,12 +257,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: MQTT | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/mqtt/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -299,6 +299,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -322,12 +328,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Organisation | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/organisation/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -288,6 +288,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -311,12 +317,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: OwnTracks | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/owntracks/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -226,6 +226,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -249,12 +255,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Presence-Detection | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/presence-detection/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -190,6 +190,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -213,12 +219,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Public-Service-Announcement | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/public-service-announcement/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -186,6 +186,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -209,12 +215,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Release-Notes | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/release-notes/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -1826,6 +1826,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -1849,12 +1855,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Survey | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/survey/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -186,6 +186,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -209,12 +215,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Talks | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/talks/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -188,6 +188,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -211,12 +217,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Technology | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/technology/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -250,6 +250,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -273,12 +279,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: User-Stories | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/user-stories/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -221,6 +221,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -244,12 +250,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Video | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/video/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -389,6 +389,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -412,12 +418,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Website | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/website/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2017-02-04T08:59:48+00:00</updated>
<updated>2017-02-04T09:07:32+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -221,6 +221,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2017/02/03/babyphone/">Smart Baby Monitor</a>
</li>
<li class="post">
<a href="/blog/2017/01/28/face-coffee-wink/">0.37: Face detection, Coffee, Wink</a>
</li>
@ -244,12 +250,6 @@
</li>
<li class="post">
<a href="/blog/2017/01/03/control-my-christmas-tree-stats/">Control My Christmas Tree Stats</a>
</li>
</ul>
</section>