Site updated at 2017-02-04 09:16:52 UTC
This commit is contained in:
parent
eeb57b8e5f
commit
7149e2d48a
37 changed files with 88 additions and 540 deletions
|
@ -1,156 +0,0 @@
|
|||
<?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">< 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>
|
|
@ -1,271 +0,0 @@
|
|||
<!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>
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,7 +18,7 @@
|
|||
<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">< server for playing over speakers integrated with Home Assistant (eg. 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:
|
||||
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
|
||||
|
@ -43,6 +44,7 @@ $ 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>
|
||||
|
@ -53,23 +55,23 @@ We setup a icecast mount point for our babyphone and update `/etc/icecast2/iceca
|
|||
</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.
|
||||
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.
|
||||
We can optimize the audio stream for human voice by using a highpass filter with 300 Hz and a lowpass filter with 2500 Hz. 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
|
||||
- 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.
|
||||
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:
|
||||
|
|
|
@ -116,8 +116,6 @@
|
|||
<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>
|
||||
|
||||
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -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-04T09:07:32+00:00</updated>
|
||||
<updated>2017-02-04T09:14:18+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue