Skip to content

0.48 #2909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 52 commits into from
Jul 2, 2017
Merged

0.48 #2909

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
200f9cb
Add docs for new entity_id generation (#2815)
emlove Jun 16, 2017
5a666ae
Add latitude and longitude as config options (#2829)
jshore1296 Jun 17, 2017
a89804f
Minimize configuration sample
fabaff Jun 17, 2017
2153c80
Add Shiftr.io docs (#2827)
fabaff Jun 17, 2017
038dc31
Add language option to openweathermap sensor config (#2819)
azogue Jun 17, 2017
806b740
Merge branch 'current' into next
balloob Jun 17, 2017
078c37b
Update sensor.buienradar.markdown (#2837)
mjj4791 Jun 19, 2017
a94e001
Add new conf options (#2843)
fabaff Jun 19, 2017
069c17c
Update to UPnP documentation (#2832)
dgomes Jun 19, 2017
9d41c1f
Add UPNP sensor docs (#2846)
fabaff Jun 19, 2017
a439fac
Add buienradar logo (#2851)
mjj4791 Jun 20, 2017
47dd6d2
Add initial docs for KNX cover (#2845)
fabaff Jun 20, 2017
97d4c32
Add new configuration variable (#2856)
fabaff Jun 20, 2017
dee0602
Add current balance to hydroquebec sensor (#2861)
titilambert Jun 21, 2017
d24d1be
Added glances CPU temperature doc. (#2838)
jjmontesl Jun 21, 2017
ed3de4b
Merge remote-tracking branch 'origin/current' into next
balloob Jun 22, 2017
504b48d
Limitless led fade documentation for PR #7369 (#2865)
SmilyOrg Jun 22, 2017
937a282
add BME280 sensor platform doc (#2797)
azogue Jun 22, 2017
3881bff
add HTU21D sensor platform doc (#2820)
azogue Jun 22, 2017
2094220
add BH1750 light sensor platform doc (#2821)
azogue Jun 22, 2017
ad242d6
Update 'ha_release' and formatting updates
fabaff Jun 22, 2017
ed28d46
Fix tag
fabaff Jun 22, 2017
ce30b5b
Fix binary_sensor.template example (#2877)
sdague Jun 23, 2017
00a24f1
Add ClickSend notify service page. (#2868)
oozman Jun 23, 2017
7276ad2
add telegram_bot/delete_message doc for #8153 (#2869)
azogue Jun 23, 2017
6e346cd
Add note in decora light (#2862)
titilambert Jun 23, 2017
d058832
Added documentation for the buienradar precipitation forecast average…
basschipper Jun 24, 2017
2189bbd
Update binary_sensor.template.markdown
balloob Jun 24, 2017
55bec87
Mqtt discovery optional nodeid (#2840)
AlexMekkering Jun 24, 2017
d91d3c4
Add documentation for sensor.gtfs offset option (#2883)
Kernald Jun 24, 2017
65d3633
Switch to new zwave entity ids by default (#2885)
emlove Jun 24, 2017
a293361
Documentation for the linksys_smart device tracker (#2872)
mortenlj Jun 24, 2017
ddfe8de
add content_type option to generic camera (#2887)
azogue Jun 25, 2017
f8cdc5d
Add sample for 'content_type:'
fabaff Jun 25, 2017
da593dc
Replace sensor with camera
fabaff Jun 25, 2017
2260938
Fix bad link to react.html example (#2889)
PhracturedBlue Jun 26, 2017
857e8be
Open Hardware Monitor component page and logo added. (#2824)
Jun 26, 2017
7d90ea2
doc change: percentage (DPT_Scaling) KNX sensors #8168 (#2876)
tiktok7 Jun 27, 2017
faa3fc6
Optional OpenCV Camera example custom component (#2894)
Teagan42 Jun 27, 2017
284e4d7
Updated pygments.rb to latest to make it build under ruby 2.4 (#2644)
auduny Jun 27, 2017
cfbea69
telegram_bot platform to only send messages (#8186) (#2882)
azogue Jun 27, 2017
39d3e6c
Update for new nest.set_mode service (#2645)
mattsch Jun 28, 2017
10daaa7
ComfoConnect climate platform documentation. (#2483)
michaelarnauts Jun 29, 2017
61e9abb
Grammar fix ups in image processing dlib (#2904)
Br3nda Jun 30, 2017
53021cf
Initial documentation for cover templates (#2842)
PhracturedBlue Jun 30, 2017
4ba3e3e
Merge branch 'current' into next
fabaff Jun 30, 2017
a7ef65a
Update for 0.48
fabaff Jun 30, 2017
f439ef6
Version bump to 0.48
balloob Jul 1, 2017
46e4f5a
Documentation for Snips components (#2892)
michaelfester Jul 1, 2017
cef1681
Insteon local fan (#2390)
jawilson Jul 2, 2017
be9debf
rfxtrx binary sensor component documentation (#2336)
ypollart Jul 2, 2017
940e2b1
Release 0.48 blog post
balloob Jul 2, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source "https://rubygems.org"
group :development do
gem 'rake', '~> 10.0'
gem 'jekyll', '~> 3.0'
gem 'pygments.rb', '~> 0.6.3'
gem 'pygments.rb', '~> 1.1.2'
gem 'rdiscount', '~> 2.0'
gem 'RedCloth', '~> 4.2'
gem 'haml', '~> 4.0'
Expand Down
12 changes: 5 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ GEM
rb-inotify (~> 0.9, >= 0.9.7)
mercenary (0.3.6)
method_source (0.8.2)
multi_json (1.12.1)
octopress (3.0.11)
jekyll (>= 2.0)
mercenary (~> 0.3.2)
Expand All @@ -71,14 +72,12 @@ GEM
jekyll (>= 2.0)
pathutil (0.14.0)
forwardable-extended (~> 2.6)
posix-spawn (0.3.11)
pry (0.10.4)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pygments.rb (0.6.3)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.2.0)
pygments.rb (1.1.2)
multi_json (>= 1.0.0)
rack (1.6.4)
rack-protection (1.5.3)
rack
Expand Down Expand Up @@ -107,7 +106,6 @@ GEM
ref
tilt (2.0.5)
titlecase (0.1.1)
yajl-ruby (1.2.1)

PLATFORMS
ruby
Expand All @@ -127,7 +125,7 @@ DEPENDENCIES
octopress-filters
octopress-include-tag
pry
pygments.rb (~> 0.6.3)
pygments.rb (~> 1.1.2)
rake (~> 10.0)
rb-fsevent (~> 0.9)
rdiscount (~> 2.0)
Expand All @@ -138,4 +136,4 @@ DEPENDENCIES
therubyracer

BUNDLED WITH
1.10.6
1.14.6
8 changes: 4 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ social:

# Home Assistant release details
current_major_version: 0
current_minor_version: 47
current_patch_version: 1
date_released: 2017-06-21
current_minor_version: 48
current_patch_version: 0
date_released: 2017-07-02

# Either # or the anchor link to latest release notes in the blog post.
# Must be prefixed with a # and have double quotes around it.
# Major release:
patch_version_notes: "#release-0471---june-21"
patch_version_notes: "#"
# Minor release (Example #release-0431---april-25):

136 changes: 136 additions & 0 deletions source/_components/binary_sensor.rfxtrx.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
---
layout: page
title: "RFXtrx Binary Sensor"
description: "Instructions how to integrate RFXtrx binary sensors into Home Assistant."
date: 2017-03-26 12:45
sidebar: true
comments: false
sharing: true
footer: true
logo: rfxtrx.png
ha_category: Binary Sensor
---

The `rfxtrx` platform support binary sensors that communicate in the frequency range of 433.92 MHz. The rfxtrx binary sensor component provides support for them.

Many cheap sensors available on the web today are based on a particular RF chip called *PT-2262*. Depending on the running firmware on the RFXcom box, some of them may be recognized under the X10 protocol but most of them are recognized under the *Lighting4* protocol. The rfxtrx binary sensor component provides some special options for them, while other rfxtrx protocols should work too.

# Setting up your devices
Once you have set up your [rfxtrx hub](/components/rfxtrx/), the easiest way to find your binary sensors is to add this to your `configuration.yaml`:

```yaml
# Example configuration.yaml entry
binary_sensor:
platform: rfxtrx
automatic_add: True
```

Open your local home-assistant web UI and go to the "states" page. Then make sure to trigger your sensor. You should see a new entity appear in the *Current entites* list, starting with "binary_sensor." and some hexadecimal digits. Those hexadecimal digits are your device id.

For example: "binary_sensor.0913000022670e013b70". Here your device id is `0913000022670e013b70`. Then you should update your configuration to:

```yaml
# Example configuration.yaml entry
binary_sensor:
platform: rfxtrx
devices:
0913000022670e013b70:
name: device_name
```

Do not forget to tweak the configuration variables:

- **automatic_add** (*Optional*): To enable the automatic addition of new binary sensors.
- **device_class** (*Optional*): The [type or class of the sensor](/components/binary_sensor/) to set the icon in the frontend.
- **off_delay** (*Optional*): For sensors that only sends 'On' state updates, this variable sets a delay after which the sensor state will be updated back to 'Off'.


Binary sensors have only two states - "on" and "off". Many door or window opening sensors will send a signal each time the door/window is open or closed. However, depending on their hardware or on their purpose, some sensors are only able to signal their "on" state:

- Most motion sensors send a signal each time they detect motion. They stay "on" for a few seconds and go back to sleep, ready to signal other motion events. Usually, they do not send a signal when they go back to sleep.
- Some doorbells may also only send "on" signals when their toggle switch is pressed, but no "off" signal when the switch is released.

For those devices, use the *off_delay* parameter. It defines a delay after which a device will go back to an "Off" state. That "Off" state will be fired internally by Home Assistant, just as if the device fired it by itself. If a motion sensor can only send signals once every 5 seconds, sets the *off_delay* parameter to *seconds: 5*.


Example configuration:

```yaml
# Example configuration.yaml entry
binary_sensor:
platform: rfxtrx
automatic_add: True
devices:
091300006ca2c6001080:
name: motion_hall
device_class: motion
off_delay:
seconds: 5
```

## Options for PT-2262 devices under the Lighting4 protocol

When a data packet is transmitted by a PT-2262 device using the Lighting4 protocol, there is no way to automatically extract the device identifier and the command from the packet. Each device has its own id/command length combination and the fields lengths are not included in the data. One device that sends 2 different commands will be seen as 2 devices on Home Assistant. For sur cases, the following options are available in order to circumvent the problem:

- **data_bits** (*Optional*): Defines how many bits are used for commands inside the data packets sent by the device.
- **command_on** (*Optional*): Defines the data bits value that is sent by the device upon an 'On' command.
- **command_off** (*Optional*): Defines the data bits value that is sent by the device upon an 'Off' command.

Let's try to add a new PT-2262 sensor using the "automatic_add" option and have a look at Home Assistant system log.

Have your sensor trigger the "On" state for the first time. Some messages will appear:

```
INFO (Thread-6) [homeassistant.components.binary_sensor.rfxtrx] Added binary sensor 0913000022670e013970 (Device_id: 22670e Class: LightingDevice Sub: 0)
```

Here the sensor has the id *22670e*.

Now have your sensor trigger the "Off" state and look for the following message in the Home Assistant log. You should see that your device has been detected as a *new* device when triggering its "Off" state:

```
INFO (Thread-6) [homeassistant.components.binary_sensor.rfxtrx] Added binary sensor 09130000226707013d70 (Device_id: 226707 Class: LightingDevice Sub: 0)
```

Here the device id is *226707*, which is almost similar to the *22670e* we had on the "On" event a few seconds ago.

From those two values, you can guess that the actual id of your device is *22670*, and that *e* and *7* are commands for "On" and "Off" states respectively. As one hexadecimal digit uses 4 bits, we can conclude that the device is using 4 data bits.

So here is the actual configuration section for the binary sensor:

```yaml
platform: rfxtrx
automatic_add: True
devices:
0913000022670e013b70:
name: window_room2
device_class: opening
data_bits: 4
command_on: 0xe
command_off: 0x7
```

The *automatic_add* option makes the rfxtrx binary sensor component calculate and display the configuration options for you in the Home Assistant logs:

```
INFO (Thread-6) [homeassistant.components.rfxtrx] rfxtrx: found possible device 226707 for 22670e with the following configuration:
data_bits=4
command_on=0xe
command_off=0x7
INFO (Thread-6) [homeassistant.components.binary_sensor.rfxtrx] Found possible matching deviceid 22670e.
```

This automatic guess should work most of the time but there is no guarantee on that. You should activate it only when you want
to configure your new devices and leave it off otherwise.

## Known working devices

The following devices are known to work with the rfxtrx binary sensor component. There are too many other to list.

- Motion detectors:
- Kerui P817 and P829.
- Chuango PIR-700.

- Door / window sensors:
- Kerui D026 door / window sensor: can trigger on "open" and "close". Has a temper switch.
- Nexa LMST-606 Magnetic contact switch.
60 changes: 50 additions & 10 deletions source/_components/binary_sensor.template.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -56,36 +56,40 @@ sensor:
Some movement sensors and door/window sensors will appear as a switch. By using a template binary sensor, the switch can be displayed as a binary sensors. The original switch can then be hidden by [customizing.](/getting-started/customizing-devices/)

```yaml
binary_sensor:
- platform: template
binary_sensor:
- platform: template
sensors:
movement:
value_template: {% raw %}"{{ states.switch.movement.state == 'on' }}"{% endraw %}
device_class: motion
door:
value_template: {% raw %}"{{ states.switch.door.state == 'on' }}"{% endraw %}
value_template: {% raw %}"{{ states.switch.door.state == 'on' }}"{% endraw %}
device_class: opening
```


### {% linkable_title Combining multiple sensors, and using entity_id: %}

This example combines multiple CO sensors into a single overall status. It also shows how to use `entity_id`
This example combines multiple CO sensors into a single overall
status. When using templates with binary sensors, you need to return
`True` or `False` explicitly. `entity_id` is used to limit which
sensors are being monitored to update the state, making computing this
sensor far more efficient.

```yaml
binary_sensor:
- platform: template
binary_sensor:
- platform: template
sensors:
co:
friendly_name: 'CO'
device_class: 'gas'
value_template: {% raw %}>-
{%- if is_state("sensor.bedroom_co_status", "Ok")
{%- if is_state("sensor.bedroom_co_status", "Ok")
and is_state("sensor.kitchen_co_status", "Ok")
and is_state("sensor.wardrobe_co_status", "Ok") -%}
Off
False
{%- else -%}
On
True
{%- endif %}{% endraw %}
entity_id:
- sensor.bedroom_co_status
Expand All @@ -104,5 +108,41 @@ sensor:
friendly_name: 'Day/Night'
value_template: {% raw %}'{% if is_state("sun.sun", "above_horizon") %}Day{% else %}Night{% endif %}'{% endraw %}
icon_template: {% raw %}'{% if is_state("sun.sun", "above_horizon") %}mdi:weather-sunny{% else %}mdi:weather-night{% endif %}'{% endraw %}

```

### {% linkable_title Is anyone home? %}

This example is determining if anyone is home based on the combination
of device tracking and motion sensors. It's extremely useful if you
have kids / baby sitter / grand parrents who might still be in your
house that aren't represented by a trackable device in home
assistant. This is providing a composite of wifi based device tracking
and z-wave multisensor presence sensors.

```yaml
binary_sensor:
- platform: template
sensors:
people_home:
value_template: {% raw %}>-
{%- if is_state("device_tracker.sean", "home")
or is_state("device_tracker.susan", "home")
or is_state("binary_sensor.office_124", "on")
or is_state("binary_sensor.hallway_134", "on")
or is_state("binary_sensor.living_room_139", "on")
or is_state("binary_sensor.porch_ms6_1_129", "on")
or is_state("binary_sensor.family_room_144", "on")
-%}
True
{%- else -%}
False
{%- endif %}{% endraw %}
entity_id:
- device_tracker.sean
- device_tracker.susan
- binary_sensor.office_124
- binary_sensor.hallway_134
- binary_sensor.living_room_139
- binary_sensor.porch_ms6_1_129
- binary_sensor.family_room_144
```
15 changes: 15 additions & 0 deletions source/_components/binary_sensor.verisure.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
layout: page
title: "Verisure Binary Sensor"
description: "Instructions how to integrate Verisure binary sensors into Home Assistant."
date: 2016-02-23 21:31 +0100
sidebar: true
comments: false
sharing: true
footer: true
logo: verisure.png
ha_category: Binary Sensor
ha_iot_class: "Cloud Polling"
---

Integrates Verisure binary sensors into Home Assistant. See the [main component](/components/verisure/) for configuration instructions.
14 changes: 14 additions & 0 deletions source/_components/camera.generic.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Configuration variables:
- **password** (*Optional*): The password for accessing your camera.
- **authentication** (*Optional*): Type for authenticating the requests `basic` (default) or `digest`.
- **limit_refetch_to_url_change** (*Optional*): True/false value (default: false). Limits refetching of the remote image to when the url changes. Only relevant if using a template to fetch the remote image.
- **content_type** (*Optional*): Set the content type for the IP camera if it is not a jpg file (default: `image/jpeg`). Use `image/svg+xml` to add a dynamic svg file.

<p class='img'>
<a href='/cookbook/google_maps_card/'>
Expand All @@ -43,3 +44,16 @@ Configuration variables:
</a>
</p>

## {% linkable_title Examples %}

In this section you find some real life examples of how to use this camera platform.

### {% linkable_title Weather graph from yr.no %}

```yaml
camera:
- platform: generic
name: Weather
still_image_url: https://www.yr.no/place/Norway/Oslo/Oslo/Oslo/meteogram.svg
content_type: 'image/svg+xml'
```
Loading