Merge branch 'current' into next

This commit is contained in:
Franck Nijhof 2020-09-16 08:49:57 +02:00
commit 192fcb2018
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
26 changed files with 531 additions and 49 deletions

View File

@ -214,7 +214,8 @@ dt:hover a.title-link {
position: absolute;
top: 5px;
left: -25px;
padding-right: 40px;
padding-right: 5px;
padding-left: 5px;
font-family: "FontAwesome";
font-size: 15px;
color: #999;

View File

@ -67,6 +67,6 @@
- topic: Trigger
description: "A [trigger](/docs/automation/trigger/) is a set of values or conditions of a platform that are defined to cause an automation to run."
- topic: TTS
description: "TTS ([text to speech](/integrations/tts) allows Home Assistant to talk to you."
description: "TTS ([text to speech](/integrations/tts)) allows Home Assistant to talk to you."
- topic: Zone
description: "[Zones](/integrations/zone/) are areas that can be used for presence detection."

View File

@ -85,7 +85,7 @@ OK, let's go. You first need sign in your [AWS console](https://console.aws.amaz
First thing you need to do after sing in [AWS console](https://console.aws.amazon.com/) is to create an IAM Role for Lambda execution. AWS has very strict access control, you have to specific define and assign the permissions.
- Click `Service` in top navigation bar, expand the menu to display all AWS services, click `IAM` under `Security, Identity, & Compliance` section to navigate to IAM console. Or you may use this [link](https://console.aws.amazon.com/iam/home)
- Click `Services` in top navigation bar, expand the menu to display all AWS services, click `IAM` under `Security, Identity, & Compliance` section to navigate to IAM console. Or you may use this [link](https://console.aws.amazon.com/iam/home)
- Click `Roles` in the left panel, then click `Create role`, select `AWS Service` -> `Lambda` in the first page of the wizard, then click `Next: Permissions`
- Select `AWSLambdaBasicExecutionRole` policy, then click `Next: Tags`. (Tips: you can use the search box to filter the policy)
@ -100,45 +100,50 @@ First thing you need to do after sing in [AWS console](https://console.aws.amazo
Next you need create a Lambda function.
- Click `Service` in top navigation bar, expand the menu to display all AWS services, click `Lambda` under `Compute` section to navigate to Lambda console. Or you may use this [link](https://console.aws.amazon.com/lambda/home)
- **IMPORTANT** Your current region will be displayed on the top right corner, make sure you select right region base on your Amazon account's country:
- Click `Services` in top navigation bar, expand the menu to display all AWS services, click `Lambda` under `Compute` section to navigate to Lambda console. Or you may use this [link](https://console.aws.amazon.com/lambda/home)
- **IMPORTANT - Alexa Skills are only supported in certain AWS reigons** Your current server location will be displayed on the top right corner (for example, Ohio), make sure you select the server closest to your location / region based on your Amazon account's country, whilst also ensuring that it is within one of the supported reigons for Alexa Skills otherwise this will not work!
- **US East (N.Virginia)** region for English (US) or English (CA) skills
- **EU (Ireland)** region for English (UK), English (IN), German (DE), Spanish (ES) or French (FR) skills
- **US West (Oregon)** region for Japanese and English (AU) skills.
- Click `Functions` in the left navigation bar, display list of your Lambda functions.
- Click `Create function`, select `Author from scratch`, then input a `Function name`.
- Select *Python 3.6* or *Python 3.7* as `Runtime`.
- Make sure select *Use an existing role* as `Execution role`, then select the role you just created from `Existing role` list.
- Click `Create function`, then you can configuration detail of Lambda function.
- Under `Configuration` tab, expand `Designer`, then click `Alexa Smart Home` in the left part of the panel to add a Alexa Smart Home trigger to your Lambda function.
- Scroll down little bit, you need input the `Skill ID` from the skill you created in previous step. (tips: you may need switch back to Alexa Developer Console to copy the `Skill ID`.
- Click your Lambda function icon in the middle of the diagram, scroll down you will see a `Function code` window.
- Under `Configuration` tab, expand `Designer` (if it isn't already expanded), then click `+ Add trigger` in the left part of the panel, then click `Alexa Smart Home` from the drop down list to add a Alexa Smart Home trigger to your Lambda function.
- You will then be prompted to input the `Skill ID` from the skill you created in previous step. (Tips: you may need switch back to Alexa Developer Console to copy the `Skill ID`.) Then click `Add`.
- Click your Lambda function icon in the middle of the diagram (above Layers), scroll down you will see a `Function code` window.
- Clear the example code, copy the Python script from: [https://gist.github.com/matt2005/744b5ef548cc13d88d0569eea65f5e5b](https://gist.github.com/matt2005/744b5ef548cc13d88d0569eea65f5e5b) (modified code to support Alexa's proactive mode, see details below)
- Scroll down a little bit, you will find `Environment variables`, you need add 4 environment variables:
- BASE_URL *(required)*: your Home Assistant instance's Internet accessible URL with port if needed. *Do not include the trailing `/`*.
- NOT_VERIFY_SSL *(optional)*: you can set it to *True* to ignore the SSL issue, if you don't have a valid SSL certificate or you are using self-signed certificate.
- DEBUG *(optional)*: set to *True* to log the debug message
- LONG_LIVED_ACCESS_TOKEN *(optional, not recommend)*: you will connect your Alexa Smart Home skill with your Home Assistant user account in the later steps, so that you don't need to use long-lived access token here. However, the access token you got from login flow is only valid for 30 minutes. It will be hard for you to test lambda function with the access token in test data. So for your convinces, you can remove the access token from the test data, [generate a long-lived access token][generate-long-lived-access-token] put here, then the function will fall back to read token from environment variables. (tips: You did not enable the security storage for your environment variables, so your token saved here is not that safe. You should only use it for debugging and testing purpose. You should remove and delete the long-lived access token after you finish the debugging.)
- Scroll down a little bit, you will find `Environment variables`, you need add 1 environment variable and, if required, 3 optional variables. This is done by selecting `Manage environment variables` then adding the following:
- *(required)* Key = BASE_URL, Value = your Home Assistant instance's Internet accessible URL with port if needed. *Do not include the trailing `/`*.
- *(optional)* Key = NOT_VERIFY_SSL, Value = *True*. You can set this to *True* to ignore SSL issues, for example if you don't have a valid SSL certificate or you are using a self-signed certificate.
- *(optional)* Key = DEBUG, Value = *True*. Set this variable to log the debug message.
- *(optional, not recommend)* Key = LONG_LIVED_ACCESS_TOKEN, Value = your Home Assistant Long-Lived Access Token. To avoid the use of a long-lived access token you will connect your Alexa Smart Home skill with your Home Assistant user account in the later steps, meaning you don't need to add it here. However, the access token you got from login flow is only valid for 30 minutes. It will be hard for you to test lambda function with the access token in test data. So for your convenience, you can remove the access token from the test data, [generate a long-lived access token][generate-long-lived-access-token] put here, then the function will fall back to read token from environment variables. (tips: You did not enable the security storage for your environment variables, so your token saved here is not that safe. You should only use it for debugging and testing purpose. You should remove and delete the long-lived access token after you finish the debugging.)
<p class='img'>
<img src='/images/integrations/alexa/lambda_function_env_var.png' alt='Screenshot: Environment variables in Lambda function'>
</p>
- Now scroll up to the top, click `Save` button.
- You need copy the ARN displayed in the top of the page, which is the identify of this Lambda function. You will need this ARN to continue Alexa Smart Home skill configuration later.
- Now click the `Save` button in the bottom right hand corner.
- You will then be brought back to your function configuration. From here you need to select `Save` in the top right hand corner of the screen.
- You also need to copy the ARN displayed in the top of the page, which is the identity of this Lambda function. You will need this ARN to continue Alexa Smart Home skill configuration later.
### Test the Lambda Function
Now, you have created the Lambda function, before you can test it, you have to set up your Home Assistant. Put following minimal configuration to your configuration.yaml, it will exposures all of your supported device and automation to Alexa. Check the [configuration section](#alexa-smart-home-component-configuration) if you want more control of the exposure.
Now, you have created the Lambda function, before you can test it, you have to set up the necessary aspects of your Home Assistant configuration. Put the following minimal configuration into your `configuration.yaml` file. It will expose all of your supported devices and automations to Alexa. Check the [configuration section](#alexa-smart-home-component-configuration) if you want more control of the exposure.
```yaml
alexa:
smart_home:
```
After your Home Assistant restarted, back to `AWS Lambda Console`, you are going to do some tests.
After your Home Assistant has restarted, go back to `AWS Lambda Console`, you are going to do some tests.
On the top of your Lambda function configuration page, there is a `Test` button, click the drop down button at left of `Test` button, click `Configure test events`, you can `Create new test event` using following data:
- On the top of your Lambda function configuration page, there is a `Test` button, to the left of this button is a drop down button - click this and select `Configure test events`
- Select `Create new test event`
- Name your event, for example `Discovery`
- Enter the following data into the code box below `Event name`:
```json
{
@ -157,10 +162,11 @@ On the top of your Lambda function configuration page, there is a `Test` button,
}
}
```
- Click `Create` in the bottom right hand corner.
This test event is a `Discovery` directive, Home Assistant will response with a list of your devices Alexa can interact with. This test data is lack of `token` in `payload.scope`, your Lambda function will read the `LONG_LIVED_ACCESS_TOKEN` from environment variable.
This test event is a `Discovery` directive, your Home Assistant instance will respond with a list of devices Alexa can interact with. This test data is lack of `token` in `payload.scope`, your Lambda function will read the `LONG_LIVED_ACCESS_TOKEN` from environment variable.
Click `Test` button. If you don't have `LONG_LIVED_ACCESS_TOKEN`, you will get a `INVALID_AUTHORIZATION_CREDENTIAL` response as the execution result.
Click the `Test` button. If you don't have `LONG_LIVED_ACCESS_TOKEN`, you will get a `INVALID_AUTHORIZATION_CREDENTIAL` response as the execution result.
Now, you can login to your Home Assistant and [generate a long-lived access token][generate-long-lived-access-token]. After you put your long-lived access token to the `Environment variable`, do not forget click `Save` button before you `Test` again.
@ -168,7 +174,7 @@ This time, you will get a list of your devices in the response. 🎉
## Configure the Smart Home Service Endpoint
Now removed the long-lived access token if you want, copied the ARN of your Lambda function, then back to [Alexa Developer Console][alexa-dev-console]. You will finish the configuration of the Smart Home skill.
Now remove the long-lived access token (if you want), copy the ARN of your Lambda function, then navigate back to [Alexa Developer Console][alexa-dev-console]. You will finish the configuration of the Smart Home skill.
- Sign in [Alexa Developer Console][alexa-dev-console], go to `Alexa Skills` page if you are not.
- Find the skill you just created, click `Edit` link in the `Actions` column.
@ -195,8 +201,8 @@ Alexa can link your Amazon account to your Home Assistant account. Therefore Hom
The trailing slash is important here.
- `Client Secret`: input anything you like, Home Assistant does not check this field
- `Client Authentication Scheme`: make sure you selected *Credentials in request body*. Home Assistant does not support *HTTP Basic*.
- `Scope`: input `smart_home`, Home Assistant is not using it yet, we may use it in the future when we allow more fine-grained access control.
- `Your Authentication Scheme`: make sure you selected *Credentials in request body*. Home Assistant does not support *HTTP Basic*.
- `Scope`: Click `+ Add scope` and input `smart_home`, Home Assistant is not using it yet, we may use it in the future when we allow more fine-grained access control.
- You can leave `Domain List` and `Default Access Token Expiration Time` as empty.
<p class='img'>
@ -205,12 +211,12 @@ Alexa can link your Amazon account to your Home Assistant account. Therefore Hom
- Click `Save` button in the top right corner.
- Next, you will use Alexa Mobile App or [Alexa web-based app](#alexa-web-based-app) to link your account.
- Open the Alexa app, navigate to `Skills` -> `Your Skills` -> `Dev Skills`
- Open the Alexa app, navigate to `Skills & Games` -> `Your Skills` -> `Dev`
- Click the Smart Home skill you just created.
- Click `Enable`.
- Click `Enable to use`.
- A new window will open to direct you to your Home Assistant's login screen.
- After you success login, you will be redirected back to Alexa app.
- You can discovery your devices now.
- After you successfully login, you will be redirected back to Alexa app.
- You can discover your devices now!
- Now, you can ask your Echo or in Alexa App, _"Alexa, turn on bedroom"_ 🎉
## Alexa Smart Home Component Configuration

View File

@ -301,7 +301,7 @@ The `entity_id` names will be `light.device_name`, where `device_name` is define
- IKEA Trådfri bulb E27 WS & RGB Opal 600lm
- IKEA Trådfri bulb GU10 W 400lm
- IKEA Trådfri FLOALT LED light panel
- Innr BY-265, BY-245
- Innr BY-265, BY-245, RB-265
- OSRAM Classic A60 W clear - LIGHTIFY
- OSRAM Flex RGBW
- OSRAM Gardenpole RGBW

View File

@ -23,9 +23,9 @@ There is currently support for the following platforms within Home Assistant:
- Presence detection - device tracker for connected devices
- Notifications - via SMS
- Sensors - device, signal, and traffic information; number of unread SMS
- Sensors - device, network, signal, SMS count, and traffic information
- Switch - mobile data on/off
- Binary sensor - mobile connection status
- Binary sensor - mobile and Wi-Fi connection status
## Configuration

View File

@ -275,3 +275,138 @@ x10_devices:
default: 22
type: integer
{% endconfiguration %}
### Autodiscovery
The first time autodiscovery runs, the duration may require up to 60 seconds per device. Subsequent startups will occur much quicker using cached device information. If a device is not recognized during autodiscovery, trigger the device, such as toggling a button, to force the device to send a message to the modem. The device will then be discovered. You may need to trigger the device a few times. If for any reason this approach does not work, you can add the device to the **device_override** configuration.
In order for a device to be discovered, it must be linked to the INSTEON Modem as either a responder or a controller.
### Linking Devices to the INSTEON Modem
In order for any two Insteon devices to talk with one another, they must be linked. For an overview of device linking, please read the Insteon page on [understanding linking]. The Insteon Modem module supports All-Linking through [Development Tools] service calls. The following services are available:
- **insteon.add_all_link**: Puts the Insteon Modem (IM) into All-Linking mode. The IM can be set as a controller or a responder. If the IM is a controller, put the IM into linking mode then press the SET button on the device. If the IM is a responder, press the SET button on the device then put the IM into linking mode.
- **insteon.delete_all_link**: Tells the Insteon Modem (IM) to remove an All-Link record from the All-Link Database of the IM and a device. Once the IM is set to delete the link, press the SET button on the corresponding device to complete the process.
- **insteon.load_all_link_database**: Load the All-Link Database for a device. WARNING - Loading a device All-Link database may take a LONG time and may need to be repeated to obtain all records.
- **insteon.print_all_link_database**: Print the All-Link Database for a device. Requires that the All-Link Database is loaded first.
- **insteon.print_im_all_link_database**: Print the All-Link Database for the INSTEON Modem (IM).
If you are looking for more advanced options, you can use the [insteon_tools] command line tool that is distributed with the [pyinsteon] Python module. Please see the documentation on the [pyinsteon] GitHub site. Alternatively, you can download [HouseLinc] which runs on any Windows PC, or you can use [Insteon Terminal] which is open source and runs on most platforms. SmartHome no longer supports HouseLinc, but it still works. Insteon Terminal is a very useful tool but please read the disclaimers carefully, they are important.
[understanding linking]: https://www.insteon.com/support-knowledgebase/2015/1/28/understanding-linking
[Development Tools]: /docs/tools/dev-tools/
[HouseLinc]: https://www.smarthome.com/houselinc.html
[Insteon Terminal]: https://github.com/pfrommerd/insteon-terminal
[insteon_tools]: https://github.com/pyinsteon/pyinsteon
### Customization
The only configuration item that is necessary is the PLM port or Hub IP address, username and password so that Home Assistant can connect to the INSTEON Modem. This will expose all the supported INSTEON devices which exist in the modems ALL-Link database. However, devices will only be shown by their INSTEON hex address (e.g., “1A.2B.3C”) which can be a bit unwieldy. As you link and unlink devices using the Set buttons, theyll be added and removed from Home Assistant automatically.
You can use the normal Home Assistant [device customization] section of your configuration to assign friendly names and special icons to your devices. This is especially useful for setting device_class on your binary_sensor INSTEON devices.
[device customization]: /getting-started/customizing-devices/
### Device Overrides
INSTEON devices are added to Home Assistant using the platform(s) that make the most sense given the model and features of the hardware. The features of the INSTEON devices are built into the Home Assistant platform. Changing the platform is not recommended.
There are two primary uses for the **device_override** feature:
- Devices that do not respond during autodiscovery. This is common for battery operated devices. Before using a device override, please trigger the device a few times and it will likely be discovered by Home Assistant.
- Devices that have not been fully developed. This allows an unknown device to be mapped to a device that operates similarly to another device.
### Example Configuration with Options
```yaml
# Full example of Insteon configuration with a device override
insteon:
port: /dev/ttyUSB0
device_override:
- address: a1b2c3 # Hidden Door Sensor [2845-222]
cat: 0x10
subcat: 0x11
```
### What NOT to do
Insteon Modem is a top-level integration and device discovery will identify the Home Assistant platform the device belongs in. As such, do not declare Insteon devices in other platforms. For example, this configuration will NOT work:
```yaml
light:
- platform: insteon
address: 1a2b3c
```
### INSTEON Scenes
Trigger an INSTEON scene on or off is done via automations. Two services are provided to support this feature:
- **insteon.scene_on**
- **group**: (required) The INSTEON scene number to trigger.
- **insteon.scene_off**
- **group**: (required) The INSTEON scene to turn off
```yaml
automation:
# Trigger an INSTEON scene 25
- id: trigger_scene_25_on
alias: Turn on scene 25
trigger:
- ...
action:
- service: insteon.scene_on
data:
group: 25
```
### Events and Mini-Remotes
Mini-Remote devices do not appear as Home Assistant entities, they generate events. The following events are available:
- **insteon.button_on**
- **address**: (required) The Insteon device address in lower case without dots (e.g., 1a2b3c)
- **button**: (Optional) The button id in lower case. For a 4-button remote the values are `a` to `d`. For an 8 button remote the values are `a` to `h`. For a one-button remote this field is not used.
- **insteon.button_off**
- **address**: (required) The Insteon device address in lower case without dots (e.g., 1a2b3c)
- **button**: (Optional) The button id in lower case. For a 4-button remote the values are a to d. For an 8 button remote the values are `a` to `h`. For a one-button remote this field is not used.
This allows the mini-remotes to be configured as triggers for automations. Here is an example of how to use these events for automations:
```yaml
automation:
# 4 or 8 button remote with button c pressed
- id: light_on
alias: Turn a light on
trigger:
- platform: event
event_type: insteon.button_on
event_data:
address: 1a2b3c
button: c
condition:
- condition: state
entity_id: light.some_light
state: 'off'
action:
- service: light.turn_on
entity_id: light.some_light
# single button remote
- id: light_off
alias: Turn a light off
trigger:
- platform: event
event_type: insteon.button_on
event_data:
address: 1a2b3c
condition:
- condition: state
entity_id: light.some_light
state: 'off'
action:
- service: light.turn_on
entity_id: light.some_light
```

View File

@ -38,7 +38,7 @@ cloud_id:
required: true
type: string
install_code:
description: The Install Code that is printed on the bottom of the Eagle
description: "The Install Code that is printed on the bottom of the Eagle. Use the full Install Code with no spaces (e.g., `1a2b3c4d5a6b7c8d`)"
required: true
type: string
{% endconfiguration %}

View File

@ -22,6 +22,8 @@ All information about how the seasons work was taken from Wikipedia:
- [https://en.wikipedia.org/wiki/Equinox](https://en.wikipedia.org/wiki/Equinox)
- [https://en.wikipedia.org/wiki/Solstice](https://en.wikipedia.org/wiki/Solstice)
To cut a long read short, `astronomical` gives seasons based on the shortest/longest day and equinoxes. So in the Northern Hemisphere spring starts on 20 March). `meteorological` gives seasons based on months (so in the Northern Hemisphere spring starts on 1 March).
## Configuration
To enable the sensor, add the following lines to your `configuration.yaml` file:

View File

@ -1,6 +1,6 @@
---
title: Tag
description: Instructions on how to integrate the Tag integration into Home Assistant.
title: Tags
description: Instructions on how to get started with tags in Home Assistant
ha_category:
- Automation
ha_release: 0.115
@ -10,4 +10,105 @@ ha_codeowners:
ha_domain: tag
---
The `tag` integration manages tags that can be scanned by various integrations that can be used as triggers for automations.
<p class='img'>
<img src="/images/blog/2020-09-15-home-assistant-tags/tag-reader.jpg" alt="Tag Reader for Home Assistant">
<a href="https://github.com/adonno/tagreader">Tag Reader for Home Assistant</a>
</p>
Home Assistant allows using tags to automate anything. Home Assistant is compatible with any type of tag. Our mobile apps work out of the box with NFC tags, but anything that can read IDs from something can be used.
To make tags accessible to anyone in your house hold, there is also a [standalone tag reader](https://github.com/adonno/tagreader) available that works with Home Assistant.
## Writing your first tag
The easiest way to get started with tags is to use NFC tags ([stickers](https://amzn.to/3bQU0nN), [cards](https://amzn.to/2RlqPzM)) with the official Home Assistant mobile apps. Once you have scanned a card, hover it with your phone to scan it.
<div class="videoWrapper">
<iframe width="853" height="480" src="https://www.youtube-nocookie.com/embed/Xc120lClUgA" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<div class='note' data-title='for iPhone users'>
Only iPhone XS, XR and iPhone 11 or later support background NFC tag reading.
</div>
<div class="videoWrapper">
<iframe width="853" height="480" src="https://www.youtube-nocookie.com/embed/xE7wm1bxRLs" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
## Managing tags
Home Assistant has a dedicated panel that allows you to manage your tags. You can add names, automate or delete them. If you open the tag dashboard from the mobile app, you can also write them directly to a tag.
![Tag user interface in Home Assistant](/images/blog/2020-09-15-home-assistant-tags/tag-ui.gif)
## Building an RFID jukebox
One of the most fun applications of tags is to pick music in your living room. To make this super easy, you can use the below automation:
{% raw %}
```yaml
automation:
- id: handle_tag_scan
alias: Handle Tag Scan
mode: single
# Hide warnings when triggered while in delay.
max_exceeded: silent
variables:
# Map scanner device ID to media player entity ID
media_players:
0e19cd3cf2b311ea88f469a7512c307d: media_player.spotify_balloob
# Map tag ID to content
tags:
A7-6B-90-5F:
media_content_id: spotify:album:0h2knr6qpiAq0tV5ri5JMF
media_content_type: album
04-B1-C6-62-2F-64-80:
media_content_id: spotify:playlist:0OtWh3u6fZrBJTQtVBQWge
media_content_type: playlist
trigger:
platform: event
event_type: tag_scanned
condition:
# Test that we support this device and tag
- "{{ trigger.event.data.tag_id in tags }}"
- "{{ trigger.event.data.device_id in media_players }}"
action:
- variables:
media_player_entity_id: "{{ media_players[trigger.event.data.device_id] }}"
media_content_id: "{{ tags[trigger.event.data.tag_id].media_content_id }}"
media_content_type: "{{ tags[trigger.event.data.tag_id].media_content_type }}"
- service: media_player.play_media
data:
entity_id: "{{ media_player_entity_id }}"
media_content_id: "{{ media_content_id }}"
media_content_type: "{{ media_content_type }}"
- delay: 2 # timeout before we allow processing next scan
```
{% endraw %}
## Printing tags
NFC tags come in many different shapes and formats. [NFC Stickers](https://amzn.to/3bQU0nN) are great to make existing objects scannable, like books or photos. But another fun use case is to get printable NFC cards. The great thing about these cards is that they are very accessible. Kids as young as 1 year old will be able to use it.
To get started with printing cards, you need the following hardware:
- [Inktjet Printer](https://amzn.to/3khMrts)
- [Compatible card printing tray](https://amzn.to/3hq59x2)
- [Printable NFC cards](https://amzn.to/3iqHpKx)
The seller of above tray + cards also made a [layout tool](https://brainstormidsupply.com/id-card-printing-layout-tool.html/) available to prepare printable PDFs. It runs fully in your browser and no data is sent to their server. If you've used above equipment, pick Canon MP tray as what you're printing on.
Happy printing!
![NFC Cards](/images/blog/2020-09-15-home-assistant-tags/cards.jpg)
## Tag Scanned events
When a tag is scanned, the `tag_scanned` event is fired. This event contains the values:
| Value | Description |
| - | - |
| `tag_id` | Identifier of the tag. Use this to decide what to do.
| `device_id` | Device registry identifier of the device that scanned the tag. Use this to decide where to do it.

View File

@ -56,9 +56,9 @@ ZHA integration uses a hardware independent Zigbee stack implementation with mod
- [RaspBee Raspberry Pi Shield from dresden elektronik](https://phoscon.de/raspbee)
- Silicon Labs EmberZNet based radios using the EZSP protocol (via the [bellows](https://github.com/zigpy/bellows) library for zigpy)
- [ITEAD Sonoff ZBBridge](https://www.itead.cc/smart-home/sonoff-zbbridge.html) (Note! This first have to be flashed with [Tasmota firmware and Silabs EmberZNet NCP EZSP UART Host firmware](https://www.digiblur.com/2020/07/how-to-use-sonoff-zigbee-bridge-with.html))
- [Nortek GoControl QuickStick Combo Model HUSBZB-1 (Z-Wave & Zigbee USB Adapter)](https://www.nortekcontrol.com/products/2gig/husbzb-1-gocontrol-quickstick-combo/)
- [Elelabs Zigbee USB Adapter](https://elelabs.com/products/elelabs_usb_adapter.html)
- [Elelabs Zigbee Raspberry Pi Shield](https://elelabs.com/products/elelabs_zigbee_shield.html)
- [Nortek GoControl QuickStick Combo Model HUSBZB-1 (Z-Wave & Zigbee Ember 3581 USB Adapter)](https://www.nortekcontrol.com/products/2gig/husbzb-1-gocontrol-quickstick-combo/) (Note! Not a must but recommend [upgrade the EmberZNet NCP application firmware](https://github.com/walthowd/husbzb-firmware))
- [Elelabs Zigbee USB Adapter](https://elelabs.com/products/elelabs_usb_adapter.html) (Note! Not a must but recommend [upgrade the EmberZNet NCP application firmware](https://github.com/Elelabs/elelabs-zigbee-ezsp-utility))
- [Elelabs Zigbee Raspberry Pi Shield](https://elelabs.com/products/elelabs_zigbee_shield.html) (Note! Not a must but recommend [upgrade the EmberZNet NCP application firmware](https://github.com/Elelabs/elelabs-zigbee-ezsp-utility))
- Bitron Video/Smabit BV AV2010/10 USB-Stick with Silicon Labs Ember 3587
- Telegesis ETRX357USB (Note! This first have to be flashed with other EmberZNet firmware)
- Telegesis ETRX357USB-LRS (Note! This first have to be flashed with other EmberZNet firmware)

View File

@ -0,0 +1,70 @@
---
title: "Home Assistant Companion Android App Release 2.4.0"
description: "What's new with the Home Assistant Companion Android App in 2.4.0"
date: 2020-09-12 00:00:00
date_formatted: "September 12, 2020"
comments: true
author: Daniel Shokouhi
categories: Release-Notes
og_image: /images/blog/2020-09-12-android-240-release/Companion.png
---
Hey there, I hope everyone has been enjoying the last release of the Android app. We have another update coming up where we felt its time to give everyone a heads up before release. There are several new changes done that you will immediately notice after installing the update to 2.4.0, so we wanted to cover what's new. You can expect this release to be available in the Google Play Store tomorrow.
## Current and Future Breaking Changes
Sometimes when we move really fast, we may move a bit too fast. While we had fun adding all the new sensors, we didn't stop to think about the new user experience and how we are making a burden on them by having non-static attributes for some of the sensors. In reality, these attributes are a state and we need to treat them as such. If we don't, there will be a need to use templates that are not user-friendly. We wanted to fix this issue and be courteous to our current users, so we have made a few changes. Some of which take place in this release and some in the following release after 2.4.0.
The first major change in this release is that the app will no longer send needless updates to your Home Assistant server when there is nothing new to report state-wise. This helps cut down on the amount of data that gets sent out. Some attributes attached to some sensors update outside of the state, to combat this change, we have split those attributes to become their own sensor. For example, the audio sensor had an attribute to tell if headphones were currently plugged into the device. This, by itself, is a state change and thus now a binary sensor.
We have opted to keep the existing attributes where they are for this release, this way they do not break existing templates. However, they may trigger slower until you move to the new sensor. All of the new sensors are also disabled by default (with the exception of battery), so you may want to enable the ones you care for. The following sensors have had their attributes split up:
- Audio Sensor - All attributes. The sensor name for new users is changed to `Ringer Mode` to better align with what the state represents.
- Battery State Sensor - All attributes.
- Bluetooth Connection - Only `is_bt_on` now has its own binary sensor. The other attributes update with the state.
- Storage Sensor - External storage attributes. The new sensor will behave the same as the current storage sensor, which is now labeled as Internal Storage.
- WiFi Connection - All attributes with the exception of `is_hidden`.
These attributes mentioned above will be removed in the next release. Please make your switch to the new sensors now to avoid the breaking change then.
Attributes have also had a slight breaking change as we are now sending the correct data type for the attribute. Previously they were all sent as a string, which meant binary values needed to be wrapped in quotes.
The Geocoded location sensor also had its attribute of `Location` split into the attributes they reflect as `latitude` and `longitude`.
## Foreground Service Worker
We have seen issues where some of the sensors do not update reliably; There were times when the sensor worker could not run. We have gone ahead and converted this to become a foreground service, which means from time to time, you will see a low priority notification when the sensors are updating. This low priority notification does not make a sound and just appears briefly in the status bar. We felt this to be a good compromise instead of having to use a persistent notification.
If you are on Android Oreo or later you can minimize or turn off the channel completely. Please keep in mind that doing that, may affect the update reliability. Google's recommendation was to make it low priority and if you have seen recent updates to the Google Phone and Calendar apps you have already seen this described behavior.
<p class='img'>
<img src='/images/blog/2020-09-12-android-240-release/foreground_service.png' alt='Screenshot of Foreground Service'></a>
Screenshot of the Foreground Service.
</p>
## New Sensors
We have new sensors added this time around. All of the below sensors are disabled by default:
- Doze mode - Android 6.0+ only, a binary sensor to represent the state of doze mode.
<p class='img'>
<img src='/images/blog/2020-09-12-android-240-release/doze_state.png' alt='Screenshot of Doze Mode'></a>
Screenshot of Doze Mode.
</p>
- Interactive - A binary sensor that represents whether or not the device is being interacted with.
- Power Save mode - A binary sensor that turns on when the device reports it's in power-saving mode. Most manufacturers allow this to be user-configurable on the device.
- Public IP - A sensor that shows the public IP address of the device.
## Other Changes
We have also spent time making improvements in other areas of the application:
- Several more location improvements have been made.
- Sensors are hidden on devices that do not have them.
- General improvements to the app architecture to help developers understand the flow.
- More localization improvements.
- General improvements to the settings screen.
Special thanks to [JBassett](https://github.com/JBassett), [chriss158](https://github.com/chriss158), [anyuta1166](https://github.com/anyuta1166) and [skynetua](https://github.com/skynetua) for all of your contributions. So keep them bug reports and feature requests [coming](https://github.com/home-assistant/android/issues/new/choose), we'll chat again next time!

View File

@ -0,0 +1,28 @@
---
title: "Happy 7th birthday Home Assistant! 🎉"
description: "We're turning 7 this week and are celebrating this with a week of cool releases. Keep an eye on the blog for the latest."
date: 2020-09-14 00:00:00
date_formatted: "September 14, 2020"
comments: true
author: Paulus Schoutsen
categories: Announcements
og_image: /images/blog/2020-09-14-birthday-week/social.png
---
![Celebration graphic](/images/blog/2020-09-14-birthday-week/social.png)
This week Home Assistant turns seven years old, wild! It all started with me automating my Hue lights when the sun was setting and someone was home, and now were here. 😎
It's been a crazy busy year. We've seen our contributions increase since the pandemic started, and it hasn't lowered. To give some numbers, in the last 4 weeks, we have merged more than 1400 contributions! The core of Home Assistant has seen contributions from over 2100 different people at this point. And that doesn't include the work that is being done on our frontend, iOS app, Android app or any of the documentation websites.
All these people are working to make Home Assistant the best home automation software out there. For anyone to enjoy for free. With our focus on local control and privacy, we give people worldwide the ability to live their life. No fear that your smart home stops working when a manufacturer decides to pull the plug. No fear that your life is shared with third parties to improve the experience of a light bulb. Your home, your data, your life.
In the last year, we've seen Home Assistant get more user friendly, more powerful and receive significant performance improvements. We're continuing to be able to give everyone a great experience, regardless of expertise level.
Were going to celebrate it this year with not just one day, but with a whole week of daily announcements and various releases. 🎁 So check back each day this week to catch the latest!
Also, keep an eye out for the next episode of [the Home Assistant Podcast](https://hasspodcast.io/) this Thursday. Ill be joining Phil and Rohan to discuss literally everything. It will be a great episode.
Happy birthday!
Paulus

View File

@ -0,0 +1,128 @@
---
title: "Home Assistant Tags"
description: "Power your home and life with NFC tags, now a first-class citizen in Home Assistant."
date: 2020-09-15 00:01:00
date_formatted: "September 15, 2020"
comments: true
author: Paulus Schoutsen
categories: Announcements
og_image: /images/blog/2020-09-15-home-assistant-tags/social.png
---
![Photo of a Tag Reader](/images/blog/2020-09-15-home-assistant-tags/tag-reader.jpg)
RFID tags have been on my radar for home automation since [@hoveeman](https://github.com/hoveeman) published [this video](https://www.youtube.com/watch?v=AvCseOQidSw) two years ago of him using RFID cards to play music in his house.
It has been [my dream](https://twitter.com/balloob/status/1256728762680393728?s=12) ever since to get this easily accessible to every Home Assistant user. It already got a lot more accessible when [@maddox](https://github.com/maddox) released [Magic Cards](https://github.com/maddox/magic-cards). But this was still a separate application that you had to run besides Home Assistant, and it required a separate RFID reader.
Can we do better? Yes, we can. Today we are introducing <b>Home Assistant Tags</b>. A collaboration between our iOS, Android, frontend, core and hardware groups. With Home Assistant Tags, we're making scannable tags (NFC/RFID) a first-class citizen in Home Assistant. Easy to read, write and automate!
## The Apps
The official Home Assistant apps have been updated with NFC support. This dramatically lowers the bar for starting to automate your house with NFC tags. All you need now is tags!
From the apps you can now write a special Home Assistant URL to tags. Once you hover over one of these tags with your phone, they will trigger the Home Assistant app and send the identifier to your Home Assistant instance for processing. Tags are not bound to the phone that wrote them, any phone can scan them.
Thanks to [@David-Development](https://github.com/david-development) for the NFC support in the Android app and thanks to [@zacwest](https://github.com/zacwest) for the NFC support in the iOS app.
<div class="videoWrapper">
<iframe width="853" height="480" src="https://www.youtube-nocookie.com/embed/Xc120lClUgA" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<div class='note' data-title='for iPhone users'>
Only iPhone XS, XR and iPhone 11 or later support background NFC tag reading.
</div>
## Standalone Tag Reader
Having mobile tag readers is great, but there is more! The original RFID jukebox that peaked my interest worked with a dedicated RFID reader. This RFID reader was connected to a Raspberry Pi that was running a script to read the tags and send them to Home Assistant.
<p class="img">
<img src="/images/blog/2020-09-15-home-assistant-tags/old-system.jpg" alt="Photo of the old system">
Photo of the old system.
</p>
These solutions work great but were bulky and required hardware skills and technical skills to set up. The hardware cost for building a single reader could be around $30 (RFID reader + Raspberry Pi 0), but that's just for 1 room. What if you want more rooms? That adds up quickly.
[@adonno](https://github.com/adonno), with the help of [@MagnusO](https://github.com/magnusoverli), has been working on a smaller tag reader based on [ESPHome](https://www.esphome.io). It's powered by an ESP8266 chip and a PN532 NFC module. The case is 3D printed.
Because it's powered by ESPHome, setting up is a breeze. Once powered on, it will create an access point that allows you to add your WiFi configuration. After that Home Assistant will pick it up and you can start scanning tags.
![Photo of a tag reader with orange accents](/images/blog/2020-09-15-home-assistant-tags/orange-reader.jpg)
The nice thing about standalone tag readers is that they are dedicated to a room. This means automations know in which room to act when a music card is scanned and can pick the right media player. This makes it easy to have cards that can work in every room.
The tag reader is open-source and [available on GitHub](https://github.com/adonno/tagreader). You can make one yourself or buy one of the pre-built ones or DIY kits that Adonno is [selling](https://adonno.com/product/tag-reader/).
## Managing Tags in Home Assistant 0.115
Home Assistant 0.115 will contain a brand new tag manager, thanks to [@bramkragten](https://github.com/bramkragten) and [@dmulcahey](https://github.com/dmulcahey). On this screen you can create new tags, see the tags that have been scanned and can easily create automations for each tag. The new UI tightly integrates with the mobile apps, allowing you to write existing IDs to new tags with the tap of a button.
![Tag user interface in Home Assistant](/images/blog/2020-09-15-home-assistant-tags/tag-ui.gif)
## Building the RFID jukebox
All previous things put the pieces in place for us to be able to build our own jukebox. We can do this with just a few lines of YAML using some of the cool new features coming in Home Assistant 0.115:
{% raw %}
```yaml
# Note, this is using new automation features introduced in Home Assistant 0.115
automation:
- id: handle_tag_scan
alias: Handle Tag Scan
mode: single
# Hide warnings when triggered while in delay.
max_exceeded: silent
variables:
# Map scanner device ID to media player entity ID
media_players:
0e19cd3cf2b311ea88f469a7512c307d: media_player.spotify_balloob
# Map tag ID to content
tags:
A7-6B-90-5F:
media_content_id: spotify:album:0h2knr6qpiAq0tV5ri5JMF
media_content_type: album
04-B1-C6-62-2F-64-80:
media_content_id: spotify:playlist:0OtWh3u6fZrBJTQtVBQWge
media_content_type: playlist
trigger:
platform: event
event_type: tag_scanned
condition:
# Test that we support this device and tag
- "{{ trigger.event.data.tag_id in tags }}"
- "{{ trigger.event.data.device_id in media_players }}"
action:
- variables:
media_player_entity_id: "{{ media_players[trigger.event.data.device_id] }}"
media_content_id: "{{ tags[trigger.event.data.tag_id].media_content_id }}"
media_content_type: "{{ tags[trigger.event.data.tag_id].media_content_type }}"
- service: media_player.play_media
data:
entity_id: "{{ media_player_entity_id }}"
media_content_id: "{{ media_content_id }}"
media_content_type: "{{ media_content_type }}"
- delay: 2 # timeout before we allow processing next scan
```
{% endraw %}
<p class='img'>
<img src='/images/blog/2020-09-15-home-assistant-tags/cards.jpg' alt='Photo of printed NFC cards'>
Printed NFC cards. <a href="/integrations/tag/#printing-tags">Learn how to make them</a>
</p>
## Time to get scanning!
With these new features, you will be able to do a lot of cool things. Get yourself some [NFC tags](https://amzn.to/3bQU0nN) or [NFC cards](https://amzn.to/2RlqPzM) to get going. Here is some inspiration:
- NFC cards to play music
- NFC stickers on books that play grandparents reading the book
- NFC tags to activate scenes in the room
- NFC cards to open recipes on screens in the kitchen
- NFC tags to allow access to your home
<div class="videoWrapper">
<iframe width="853" height="480" src="https://www.youtube-nocookie.com/embed/sF83ZK9kFL4" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>

View File

@ -31,8 +31,8 @@ The following will take you through the steps required to install Home Assistant
2. Install Home Assistant:
- Flash the downloaded image to an SD card using [balenaEtcher][balenaEtcher]. If using a Pi, we recommend at least a 32 GB SD card to avoid running out of space.
- Load the appliance image into your virtual machine software. (Note: You are free to assign as much resources as you wish to the VM, please assign enough based on your add-on needs)
- **For the device images:** Flash the downloaded image to an SD card using [balenaEtcher][balenaEtcher]. If using a Pi, we recommend at least a 32 GB SD card to avoid running out of space.
- **For the virtual appliance images:** Load the appliance image into your virtual machine software. (Note: You are free to assign as much resources as you wish to the VM, please assign enough based on your add-on needs)
- For VirtualBox create a new virtual machine, select "Other Linux (64Bit), assign it at least 2 GB of memory and "Use an existing virtual hard disk file", select the VDI file from above, afterwards edit the "Settings" of the VM and go "System" then Motherboard and Enable EFI, then "Network" "Adapter 1" Bridged and your adapter.
- For Hyper-V create a new virtual machine, select "Generation 2", assign it at least 2 GB of memory and select "Connection -> "Your Virtual Switch that is bridged", then "Use an existing virtual hard disk" and select the VHDX file from above, after creation go to "Settings" -> "Security" and deselect "Enable Secure Boot".
- For KVM create a new virtual machine in `virt-manager`, select "Import existing disk image", provide the path to the QCOW2 image above, choose "Generic Default" for the operating system, assign at least 2 GB memory and 1 vCPU, check the box for "Customize configuration before install" and select your bridge under "Network Selection", then under customization select "Overview" -> "Firmware" -> "UEFI x86_64: ...".

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -62,8 +62,8 @@ description: Open source home automation that puts local control and privacy fir
<a
class="material-card picture-promo"
href="https://www.home-assistant.io/blog/2019/08/06/home-assistant-cast/"
style="background-image: url(/images/frontpage/cast-frontpage.png);"
href="/blog/2019/08/06/home-assistant-cast/"
style="background-image: url(/images/frontpage/cast-frontpage.png)"
>
<div class="caption">
<div class="title">Take over all the screens</div>
@ -95,9 +95,7 @@ description: Open source home automation that puts local control and privacy fir
"
>
<div class="caption">
<div class="title">
State of the Union 2019
</div>
<div class="title">State of the Union 2019</div>
<div class="subtitle">
Learn why we do what we do and what is next.
</div>
@ -108,19 +106,32 @@ description: Open source home automation that puts local control and privacy fir
class="material-card highlight-blog-post large"
href="/blog/2017/07/25/introducing-hassio/"
>
Learn how Hass.io can turn your Raspberry Pi into the ultimate home
Learn how our OS can turn your Raspberry Pi into the ultimate home
automation hub <i class="icon-arrow-right"></i>
</a>
<a
class="material-card picture-promo"
href="https://teespring.com/stores/home-assistant-store"
style="background-image: url(/images/merchandise/shirt-frontpage.png);"
href="/blog/2020/09/15/home-assistant-tags/"
style="
background-image: url(/images/blog/2020-09-15-home-assistant-tags/tag-reader.jpg);
"
>
<div class="caption">
<div class="title">
Join the Home Assistant t-shirt revolution!
<div class="title">Home Assistant Tags</div>
<div class="subtitle">
Use NFC to bring music to your life or automate the mundane.
</div>
</div>
</a>
<a
class="material-card picture-promo"
href="https://teespring.com/stores/home-assistant-store"
style="background-image: url(/images/merchandise/shirt-frontpage.png)"
>
<div class="caption">
<div class="title">Join the Home Assistant t-shirt revolution!</div>
<div class="subtitle">
Look sharp in blue, black or gray. Wearing a HA t-shirt is okay.
</div>