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 on 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 (eg. Sonos). We can also send notifications (with pictures) to avoid constant monitoring of the feed.
+
One of the hardest part of being a parent is keeping a constant eye on the baby to make sure that the 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 on 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 (eg. 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.
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 Home Assistant with ffmpeg -f alsa -i hw:1,0 -vn -f rtp rtp://236.0.0.1:2000 over multicast. We can set the input option on the 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 an icecast2 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.
+
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 Home Assistant with ffmpeg -f alsa -i hw:1,0 -vn -f rtp rtp://236.0.0.1:2000 over multicast. We can set the input option on the Home Assistant side to rtp://236.0.0.1:2000 in the 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 an icecast2 server for playing over speakers integrated with Home Assistant. 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.
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.
@@ -103,7 +103,7 @@ We change the platform name for binary sensor in 0.38 from 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 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 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.
binary_sensor:-platform:ffmpeg_noise
diff --git a/blog/categories/announcements/atom.xml b/blog/categories/announcements/atom.xml
index 427380aaa8..a4963476f5 100644
--- a/blog/categories/announcements/atom.xml
+++ b/blog/categories/announcements/atom.xml
@@ -4,7 +4,7 @@
- 2017-05-15T12:05:15+00:00
+ 2017-05-15T12:11:38+00:00https://home-assistant.io/
diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml
index ff5efb2545..36e1462d38 100644
--- a/blog/categories/community/atom.xml
+++ b/blog/categories/community/atom.xml
@@ -4,7 +4,7 @@
- 2017-05-15T12:05:15+00:00
+ 2017-05-15T12:11:38+00:00https://home-assistant.io/
diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml
index 0e4b194aa2..6ce3e4c798 100644
--- a/blog/categories/device-tracking/atom.xml
+++ b/blog/categories/device-tracking/atom.xml
@@ -4,7 +4,7 @@
- 2017-05-15T12:05:15+00:00
+ 2017-05-15T12:11:38+00:00https://home-assistant.io/
diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml
index ef5f4001fd..d51390c90d 100644
--- a/blog/categories/esp8266/atom.xml
+++ b/blog/categories/esp8266/atom.xml
@@ -4,7 +4,7 @@
- 2017-05-15T12:05:15+00:00
+ 2017-05-15T12:11:38+00:00https://home-assistant.io/
diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml
index a2bb2a51d3..e8d9a30f7b 100644
--- a/blog/categories/how-to/atom.xml
+++ b/blog/categories/how-to/atom.xml
@@ -4,7 +4,7 @@
- 2017-05-15T12:05:15+00:00
+ 2017-05-15T12:11:38+00:00https://home-assistant.io/
@@ -333,7 +333,7 @@ Special thanks to Ben from [BRUH Automation](https://www.youtube.com/channel/UCL
2017-02-03T23:00:00+00:00https://home-assistant.io/blog/2017/02/03/babyphone
- 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 Home Assistant with `ffmpeg -f alsa -i hw:1,0 -vn -f rtp rtp://236.0.0.1:2000` over multicast. We can set the `input` option on the Home Assistant side to `rtp://236.0.0.1:2000` in same network.
+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 Home Assistant with `ffmpeg -f alsa -i hw:1,0 -vn -f rtp rtp://236.0.0.1:2000` over multicast. We can set the `input` option on the Home Assistant side to `rtp://236.0.0.1:2000` in the 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 an [icecast2](http://icecast.org/) 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.
+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 an [icecast2](http://icecast.org/) server for playing over speakers integrated with Home Assistant. 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.
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`.
@@ -370,7 +370,7 @@ We setup a icecast mount point for our babyphone and update `/etc/icecast2/iceca
```
-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 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 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.
diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml
index 042bdc8ee5..7261548250 100644
--- a/blog/categories/ibeacons/atom.xml
+++ b/blog/categories/ibeacons/atom.xml
@@ -4,7 +4,7 @@
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 on 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 (eg. Sonos). We can also send notifications (with pictures) to avoid constant monitoring of the feed.
+
One of the hardest part of being a parent is keeping a constant eye on the baby to make sure that the 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 on 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 (eg. 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.
The ffmpeg platform allows you to use any video feed with FFmpeg for motion sensors in Home Assistant.
-If the ffmpeg process is broken, the sensor will be unavailable. To controll the ffmpeg process of sensor, use the service ffmpeg.start, ffmpeg.stop, ffmpeg.restart.
+If the ffmpeg process is broken, the sensor will be unavailable. To control the ffmpeg process of sensor, use the service ffmpeg.start, ffmpeg.stop, ffmpeg.restart.
Motion
FFmpeg doesn’t have a motion detection filter, but can use a scene filter to detect a new scene/motion. You can set how much needs to change in order to detect motion with the option ‘changes’, the percent value of change between frames. If you want a really small value for ‘changes’, you can also add a denoise filter.
The ffmpeg platform allows you to use any video or audio feed with FFmpeg for various sensors in Home Assistant.
-If the ffmpeg process is broken, the sensor will be unavailable. To controll the ffmpeg process of sensor, use the service ffmpeg.start, ffmpeg.stop, ffmpeg.restart.
+If the ffmpeg process is broken, the sensor will be unavailable. To control the ffmpeg process of sensor, use the service ffmpeg.start, ffmpeg.stop, ffmpeg.restart.
Noise
To add FFmpeg with noise detection to your installation, add the following to your configuration.yaml file:
diff --git a/components/ffmpeg/index.html b/components/ffmpeg/index.html
index f68e07b667..560c138898 100644
--- a/components/ffmpeg/index.html
+++ b/components/ffmpeg/index.html
@@ -76,7 +76,7 @@ You need the ffmpeg binary in your system
Configuration variables:
-
ffmpeg_bin (Optional): Default ‘ffmpeg’. The name or path to the ffmpeg binary.
+
ffmpeg_bin (Optional): Default ffmpeg. The name or path to the ffmpeg binary.
run_test (Optional): Default True. Check if input is usable by ffmpeg.
Raspbian Debian Jessie Lite Installations
@@ -97,11 +97,42 @@ You need the ffmpeg binary in your system
$ ffmpeg -i INPUT -an -f null -
-
Now you should be able to see what is going wrong. The following list contains some common problems and solutions:
+
Now you should be able to see what is going wrong. The following list contains some common problems and solutions:
[rtsp @ ...] UDP timeout, retrying with TCP: You need to set an RTSP transport in the configuration with: input: -rtsp_transport tcp -i INPUT
[rtsp @ ...] Could not find codec parameters for stream 0 (Video: ..., none): unspecified size: FFmpeg needs more data or time for autodetection (the default is 5 seconds). You can set the analyzeduration and/or probesize options to experiment with giving FFmpeg more leeway. If you find the needed value, you can set it with: input: -analyzeduration xy -probesize xy -i INPUT. More information about this can be found here.
+
USB cameras
+
For INPUT a valid source is needed. USB camera are an easy way to test your video setup. To get all available USB cameras connected to the system, eg. use the v4l2 tools on a Linux machine.
+
$ v4l2-ctl --list-devices
+UVC Camera (046d:0825)(usb-0000:00:14.0-1):
+ /dev/video1
+
+Integrated Camera (usb-0000:00:14.0-10):
+ /dev/video0
+
+
+
Record a test video with your USB device /dev/video1: