Merge branch 'current' into next

This commit is contained in:
Franck Nijhof 2021-02-15 13:29:02 +01:00
commit 14d360ef22
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
950 changed files with 5354 additions and 1871 deletions

View File

@ -5,7 +5,7 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
chunky_png (1.4.0)
colorator (1.1.0)
commonmarker (0.21.1)
commonmarker (0.21.2)
ruby-enum (~> 0.5)
compass (1.0.3)
chunky_png (~> 1.2)
@ -29,7 +29,7 @@ GEM
ffi (1.14.2-x64-mingw32)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (1.8.8)
i18n (1.8.9)
concurrent-ruby (~> 1.0)
jekyll (4.2.0)
addressable (~> 2.4)

View File

@ -81,6 +81,10 @@ collections:
# 3rd Party Settings #
# ----------------------- #
#Search
algolia:
api_key: "ae96d94b201c5444c8a443093edf3efb"
# Twitter
twitter_user: balloob
twitter_tweet_button: true
@ -133,7 +137,7 @@ defaults:
footer: true
sharing: true
sidebar: true
# Enable table of contents for integrations
# Enable table of contents for integrations and installations
#
# To set toc as a default value, we need to set the scope with an empty path
# and the collection as type
@ -144,6 +148,20 @@ defaults:
type: integrations
values:
toc: true
- scope:
path: "installation/*"
values:
toc: true
no_toc: true
- scope:
path: "common-tasks/*"
values:
toc: true
- scope:
path: "hassio/*"
values:
toc: true
# Support for files Jekyll will normally exclude
include:
@ -156,3 +174,45 @@ include:
toc:
min_level: 2 # default: 1
max_level: 3 # default: 6
# Configuration for installation pages
installation:
versions:
os: "5.11"
python: "3.8"
types:
odroid:
board: ODROID
installation_media: "eMMC module/SD card"
variants:
- name: "ODROID-N2"
key: "odroid-n2"
- name: "ODROID-N2+"
key: "odroid-n2"
- name: "ODROID-C2"
key: "odroid-c2"
- name: "ODROID-C4"
key: "odroid-c4"
- name: "ODROID-XU4"
key: "odroid-xu4"
raspberrypi:
board: Raspberry Pi
installation_media: "SD card"
variants:
- name: "Raspberry Pi 4 64-bit"
key: "rpi4-64"
- name: "Raspberry Pi 4 32-bit"
key: "rpi4"
- name: "Raspberry Pi 3 64-bit"
key: "rpi3-64"
- name: "Raspberry Pi 3 32-bit"
key: "rpi3"
tinkerboard:
board: ASUS Tinkerboard
installation_media: "eMMC module/SD card"
variants:
- name: "ASUS Tinkerboard"
key: "tinker"

63
plugins/tabbed_block.rb Normal file
View File

@ -0,0 +1,63 @@
require 'securerandom'
module Jekyll
class TabbedBlock < Liquid::Block
def slug(key)
key.downcase.strip.gsub(' ', '-').gsub(/[^\w\-]/, '')
end
def render_tabbed_block(vars:, converter:, classes: nil, parent_type: nil)
block = Array.new
tabs = Array.new
tabContent = Array.new
uuid = "id" + SecureRandom.hex(10)
tabs << "<div class='tabbed-content-block-tabs'>"
vars.map do |entry|
tabs << "<label onclick='openTab(this)'><input type='radio' name='#{uuid}'><div id='#{uuid}-#{slug(entry['title'])}'>#{entry['title']}</div></label>"
tabContent << "<div id='#{uuid}-#{slug(entry['title'])}' class='tabbed-content-block-content'>#{converter.convert(entry['content'].to_s)}</div>"
end
tabs << "</div>"
block << tabs.join
block << tabContent.join
block.join
end
def render(context)
contents = super(context)
vars = SafeYAML.load(contents)
site = context.registers[:site]
converter = site.find_converter_instance(::Jekyll::Converters::Markdown)
<<~MARKUP
<script>
function openTab(tab){
const tabKey = tab.querySelector("div").id;
const targetTabContent = tab.parentElement.parentElement.querySelector(`#${tabKey}.tabbed-content-block-content`);
const tabContents = tab.parentElement.parentElement.querySelectorAll(".tabbed-content-block-content")
tabContents.forEach((content) => {
content.style.display = "none"
});
targetTabContent.style.display = "block";
}
window.addEventListener('DOMContentLoaded', (event) => {
const tabbedBlocks = document.querySelectorAll(".tabbed-content-block");
tabbedBlocks.forEach((block) => {
block.querySelector("input").checked = true;
block.querySelector(".tabbed-content-block-content").style.display = "block";
});
});
</script>
<div class="tabbed-content-block">
#{render_tabbed_block(vars: vars, converter: converter)}
</div>
MARKUP
end
end
end
Liquid::Template.register_tag('tabbed_block', Jekyll::TabbedBlock)

View File

@ -0,0 +1,150 @@
#getting_started {
.intro {
padding-bottom: 16px;
}
.installations {
h2 {
font-size: 0;
margin: 0;
}
.installations-card {
text-decoration: none !important;
color: black !important;
.material-card {
display: flex;
flex-direction: row;
justify-content: space-between;
margin: 8px 0;
.content-container {
display: flex;
div:first-of-type {
margin-right: 24px;
img, svg {
max-width: 170px;
max-height: 170px;
min-width: 170px;
min-height: 170px;
padding: 32px;
border-radius: 3px;
box-shadow: rgba(0,0,0,0.06) 0 0 10px;
vertical-align: middle;
border: 5px solid #fff;
}
}
div:last-of-type {
b {
font-size: 28px;
}
p {
font-size: 0.8em;
margin: 0;
}
ul {
font-size: 0.8em;
margin-left: 24px;
margin-top: 1rem;
li {
margin: 0;
}
}
}
}
svg {
height: 42px;
max-width: 42px;
min-width: 42px;
align-self: center;
}
}
}
}
.compare-installations td,.compare-installations th {
text-align: center;
}
table.compare-installations {
background-color: #ffffff !important;
border-radius: 2px !important;
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),
0 1px 5px 0 rgba(0,0,0,0.12),
0 3px 1px -2px rgba(0,0,0,0.2) !important;
td, th {
text-align: center;
}
tr {
td:first-of-type {
text-align: left;
}
}
tr:nth-child(even) {
background-color: #fafafa;
}
}
}
.link-card {
text-decoration: none !important;
color: black !important;
div {
margin: 32px 0;
height: 64px;
display: flex;
justify-content: space-between;
svg {
height: 32px;
width: 32px;
max-width: 32px;
}
p {
margin: 0;
align-self: center;
}
}
}
.next-step {
p {
text-transform: uppercase;
}
}
@media only screen and (max-width: $palm-end) {
#getting_started {
.installations {
.installations-card {
.material-card {
.content-container {
flex-flow: wrap;
svg {
display: block;
}
div:first-of-type {
width: 100%;
display: flex;
justify-content: center;
margin-bottom: 16px;
}
}
svg {
display: none;
}
}
}
}
}
}

View File

@ -634,3 +634,39 @@ code {
border-radius: 0.4em;
padding: 0.1em 0.4em;
}
@media only screen and (max-width: $menu-collapse) {
#not_found {
.page {
text-align: center;
.search404-container {
margin-bottom: 32px;
}
}
}
}
@media only screen and (min-width: $menu-collapse) {
#not_found {
.page {
text-align: center;
margin-bottom: 300px;
.search404-container {
margin-bottom: 32px;
#search404 {
width: 420px;
}
}
}
footer {
position: absolute;
bottom: 0;
width: 100%;
}
}
}

View File

@ -0,0 +1,48 @@
.tabbed-content-block {
background-color: #FAFAFA;
margin: 16px 0;
overflow: hidden;
border-radius: 10px;
box-shadow: -1px 0px 0px 0px #dfdfdf, 0px 0px 0px 1px #dfdfdf;
box-sizing: border-box;
.tabbed-content-block-tabs {
overflow: hidden;
padding: 0 8px;
label {
input{
display:none;
}
input:checked + div{
opacity: 1;
border-bottom: 2px solid $primary-color;
}
div{
float:left;
padding: 8px;
cursor: pointer;
opacity: 0.7;
transition: 0.3s;
border-bottom: 2px solid transparent;
font-size: 0.8em;
}
div:hover {
opacity: 1;
}
}
}
.tabbed-content-block-content {
padding: 8px 16px 0;
display: none;
animation: fadeEffect .5s;
}
@keyframes fadeEffect{
0%{opacity:0}
100%{opacity:1}
}
}

View File

@ -7,23 +7,70 @@
Functional Styles (Required)
---------------------------------*/
/* Tim Pietrusky advanced checkbox hack (Android <= 4.1.2) */
body{ -webkit-animation: bugfix infinite 1s; }
@-webkit-keyframes bugfix { from {padding:0;} to {padding:0;} }
body {
-webkit-animation: bugfix infinite 1s;
}
@-webkit-keyframes bugfix {
from {
padding: 0;
}
to {
padding: 0;
}
}
.header { position: relative; }
#toggle, .toggle { display: none; }
.menu li { list-style: none; float:left; }
.header {
position: relative;
}
#toggle,
.toggle {
display: none;
}
.menu li {
list-style: none;
float: left;
}
$menu-collapse: 944px;
// @media only screen and (max-width: $lap-end){
@media only screen and (max-width: $menu-collapse){
.menu { display: none; opacity: 0; width: 100%; position: absolute; right: 0; }
.menu li { display: block; width: 100%; margin: 0; }
.menu li a { display: block; width: 100%; text-decoration: none; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
.menu li a .icon { display: none; }
.toggle { display: block; position: relative; cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
#toggle:checked ~ .menu { display: block; opacity: 1; z-index: 999; }
@media only screen and (max-width: $menu-collapse) {
.menu {
display: none;
opacity: 0;
width: 100%;
position: absolute;
right: 0;
}
.menu li {
display: block;
width: 100%;
margin: 0;
}
.menu li a {
display: block;
width: 100%;
text-decoration: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.menu li a .icon {
display: none;
}
.toggle {
display: block;
position: relative;
cursor: pointer;
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
}
#toggle:checked ~ .menu {
display: block;
opacity: 1;
z-index: 999;
}
}
/* support for submenus */
@ -51,8 +98,10 @@ ul.menu li {
a {
display: block;
padding: 20px 10px;
min-width: 150px;
&:hover, &:focus {
&:hover,
&:focus {
background: $grayLighter;
}
}
@ -72,7 +121,7 @@ header .grid {
top: 138px;
}
.menu li a{
.menu li a {
@include box-sizing(border-box);
@include transition(all 0.25s linear);
display: block;
@ -83,7 +132,8 @@ header .grid {
line-height: 1;
}
.menu > li > a:hover, .menu > li > a:focus{
.menu > li > a:hover,
.menu > li > a:focus {
background: $site-background;
box-shadow: inset 0px 5px $navigation-color;
color: $navigation-color;
@ -91,26 +141,29 @@ header .grid {
padding-bottom: 24px;
}
.toggle{
.toggle {
z-index: 20;
}
@media only screen and (max-width: $menu-collapse){
.menu{
@media only screen and (max-width: $menu-collapse) {
.menu {
background: $white;
border-top: 1px solid $navigation-color;
border-top: 1px solid $navigation-color;
border-bottom: 4px solid $navigation-color;
}
.menu, .menu li, .menu li a{
.menu,
.menu li,
.menu li a {
height: auto;
}
.menu li a{
.menu li a {
padding: 15px 15px !important;
}
.menu li a:hover, .menu li a:focus{
.menu li a:hover,
.menu li a:focus {
background: $grayLighter;
box-shadow: inset 5px 0px $navigation-color;
padding: 15px 15px 15px 25px;
@ -146,11 +199,11 @@ header .grid {
white-space: nowrap;
}
.toggle:hover::after{
.toggle:hover::after {
background: darken($navigation-color, 7%);
}
#toggle:checked + .toggle::after{
#toggle:checked + .toggle::after {
content: attr(data-close);
}

View File

@ -7,3 +7,5 @@
@import 'custom/details';
@import 'custom/print';
@import 'custom/layout';
@import 'custom/getting_started';
@import 'custom/tabbed_block';

31
source/404.html Normal file
View File

@ -0,0 +1,31 @@
---
layout: page
permalink: /404.html
sidebar: false
feedback: false
body_id: not_found
---
<h2>Oh no! This page does not exist 😞</h2>
<div class='search404-container'>
<div class='search404'>
<i class="icon-search"></i>
<input id='search404' placeholder='Search the documentation …'>
<a href='#' class='search404-close'><i class="icon-remove-sign"></i></a>
</div>
</div>
<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
<script type="text/javascript">
docsearch({
apiKey: '{{ site.algolia.api_key }}',
indexName: 'home-assistant',
inputSelector: '#search404',
debug: false // Set debug to true if you want to inspect the dropdown
});
document.querySelector('.search404-close').addEventListener('click', function(ev) {
ev.preventDefault();
document.querySelector('#search404').value = "";
});
</script>

View File

@ -24,7 +24,7 @@ binary_sensor:
name: living_room_switch
automation:
- alias: Turn on living room light
- alias: "Turn on living room light"
trigger:
platform: event
event_type: button_pressed
@ -33,9 +33,10 @@ automation:
devname: living_room_switch
action:
service: light.turn_on
entity_id: light.hue_color_lamp_3
target:
entity_id: light.hue_color_lamp_3
- alias: Turn off living room light
- alias: "Turn off living room light"
trigger:
platform: event
event_type: button_pressed
@ -44,5 +45,6 @@ automation:
devname: living_room_switch
action:
service: light.turn_off
entity_id: light.hue_color_lamp_3
target:
entity_id: light.hue_color_lamp_3
```

View File

@ -23,29 +23,31 @@ input_boolean:
automation:
#turns it on at 5am
- alias: Enable First Morning Trigger
- alias: "Enable First Morning Trigger"
trigger:
- platform: time
at: "05:00:00"
action:
service: homeassistant.turn_on
entity_id: input_boolean.trigger_first_morning
target:
entity_id: input_boolean.trigger_first_morning
# turns it off an hour after sunrise
- alias: Disable First Morning Trigger
- alias: "Disable First Morning Trigger"
trigger:
- platform: sun
event: sunrise
offset: "01:00:00"
action:
service: homeassistant.turn_off
entity_id: input_boolean.trigger_first_morning
target:
entity_id: input_boolean.trigger_first_morning
# This is the main automation. It triggers when my motion sensor is triggered
# (in this case, a motion sensor from a security system attached to my Vera)
- alias: First Morning Motion
- alias: "First Morning Motion"
trigger:
platform: state
entity_id: binary_sensor.livingroom_motion
@ -60,7 +62,8 @@ automation:
# turn off the "waiting" boolean regardless of whether lights will turn on
# so that this happens only once
- service: homeassistant.turn_off
entity_id: input_boolean.trigger_first_morning
target:
entity_id: input_boolean.trigger_first_morning
# But only turn on lights if the living room and kitchen lights are off or dimmed
# If a condition tests false, the automation will end
@ -84,7 +87,8 @@ automation:
# Trigger a scene
# You could add as many services or scenes as you'd like
- service: scene.turn_on
entity_id: scene.morning_first_motion
target:
entity_id: scene.morning_first_motion
```
{% endraw %}

View File

@ -29,7 +29,8 @@ automation:
# start alarm on movement if alarm activated
# and the alarm is not triggered
service: script.turn_on
entity_id: script.alarm_room1
target:
entity_id: script.alarm_room1
- alias: "flash_room1_start"
trigger:
@ -38,7 +39,8 @@ automation:
to: "on"
action:
service: script.turn_on
entity_id: script.flash_room1
target:
entity_id: script.flash_room1
- alias: "flash_room1_stop"
trigger:
@ -51,60 +53,61 @@ automation:
state: "off"
action:
service: script.turn_off
entity_id: script.flash_room1
target:
entity_id: script.flash_room1
script:
alarm_room1:
alias: Alarm room1
alias: "Alarm room1"
sequence:
- alias: Alarm Room1 Start
- alias: "Alarm Room1 Start"
service: homeassistant.turn_on
data:
target:
entity_id: switch.AlmSnd1
- alias: Set Ack Room1
- alias: "Set Ack Room1"
service: homeassistant.turn_on
data:
target:
entity_id: input_boolean.ack1
- alias: email_Room1
- alias: "email_Room1"
service: notify.email
data:
message: "Movement alarm in Room1"
- delay:
# time interval for alarm sound and light flashing
seconds: 60
- alias: Alarm Room1 Stop
- alias: "Alarm Room1 Stop"
service: homeassistant.turn_off
data:
target:
entity_id: switch.AlmSnd1
flash_room1:
alias: Flash Room1 On
alias: "Flash Room1 On"
sequence:
- alias: Light Room1 On
- alias: "Light Room1 On"
service: homeassistant.turn_on
data:
target:
entity_id: switch.REL1
- delay:
# time for flash light on
seconds: 1
- alias: Light Room1 Off
- alias: "Light Room1 Off"
service: homeassistant.turn_off
data:
target:
entity_id: switch.REL1
- alias: loop_room1
- alias: "loop_room1"
service: script.turn_on
data:
target:
entity_id: script.flash_loop
flash_loop:
alias: Flash loop
alias: "Flash loop"
sequence:
- delay:
# time for flash light off
seconds: 1
- alias: loop_room1
- alias: "loop_room1"
service: script.turn_on
data:
target:
entity_id: script.flash_room1
```

View File

@ -24,7 +24,8 @@ automation:
before: "23:00"
action:
service: light.turn_on
entity_id: light.couch_lamp
target:
entity_id: light.couch_lamp
```
And then of course turn off the lamp when it stops raining but only if it's within an hour before sunset.
@ -41,6 +42,7 @@ And then of course turn off the lamp when it stops raining but only if it's with
after_offset: "-01:00:00"
action:
service: light.turn_off
entity_id: light.couch_lamp
target:
entity_id: light.couch_lamp
```

View File

@ -18,7 +18,8 @@ automation:
state: home
action:
service: light.turn_on
entity_id: group.living_room_lights
target:
entity_id: group.living_room_lights
```
#### Natural wake up light
@ -32,7 +33,8 @@ automation:
at: "07:15:00"
action:
service: light.turn_on
entity_id: light.bedroom
target:
entity_id: light.bedroom
data:
# 900 seconds = 15 minutes
transition: 900
@ -79,7 +81,8 @@ Solar elevation automations can cope with offsets from sunset / sunrise as the s
below: 3.5
action:
service: scene.turn_on
entity_id: scene.background_lights
target:
entity_id: scene.background_lights
- alias: "Turn more lights on as the sun gets dimmer"
trigger:
@ -89,7 +92,8 @@ Solar elevation automations can cope with offsets from sunset / sunrise as the s
below: 1.5
action:
service: scene.turn_on
entity_id: scene.more_lights
target:
entity_id: scene.more_lights
- alias: "Close blind at dusk"
trigger:
@ -99,7 +103,8 @@ Solar elevation automations can cope with offsets from sunset / sunrise as the s
below: -2.5
action:
service: switch.turn_off
entity_id: switch.blind
target:
entity_id: switch.blind
```
{% endraw %}

View File

@ -27,7 +27,8 @@ automation:
state: "on"
action:
service: light.turn_on
entity_id: light.woonkamer_livingcolors
target:
entity_id: light.woonkamer_livingcolors
data:
effect: random
transition: 5

View File

@ -23,7 +23,8 @@ automation:
entity_id: zwave.YOUR_REMOTE
action:
- service: script.turn_on
entity_id: script.ramp_light
target:
entity_id: script.ramp_light
data:
variables:
direction: up
@ -39,7 +40,8 @@ automation:
entity_id: zwave.YOUR_REMOTE
action:
- service: script.turn_on
entity_id: script.ramp_light
target:
entity_id: script.ramp_light
data:
variables:
direction: down
@ -60,7 +62,8 @@ automation:
entity_id: zwave.YOUR_REMOTE
action:
- service: script.turn_off
entity_id: script.ramp_light
target:
entity_id: script.ramp_light
```
There are two variables that control the speed of the change for the script below. The first is the step -- small steps create a smooth transition. The second is the delay -- larger delays will create a slower transition.
@ -107,7 +110,7 @@ Now the script.
```yaml
script:
ramp_light:
alias: Ramp Light Brightness
alias: "Ramp Light Brightness"
description: Ramp light brightness up or down
fields:
direction:
@ -129,8 +132,9 @@ script:
direction == 'down' and br > mn }}
sequence:
- service: light.turn_on
data:
target:
entity_id: "{{ light }}"
data:
brightness: >
{% set br = state_attr(light, 'brightness')|int(0) %}
{% set mn = states('input_number.light_minimum')|int %}

View File

@ -53,7 +53,8 @@ automation:
state: "below_horizon"
action:
service: scene.turn_on
entity_id: scene.livingroom_normal
target:
entity_id: scene.livingroom_normal
- alias: "Media player playing"
trigger:
@ -67,6 +68,7 @@ automation:
state: "below_horizon"
action:
service: scene.turn_on
entity_id: scene.livingroom_dim
target:
entity_id: scene.livingroom_dim
```

View File

@ -46,17 +46,17 @@ script:
foscam_off:
sequence:
- service: switch.turn_off
data:
target:
entity_id: switch.foscam_motion
- service: shell_command.foscam_turn_off
foscam_on:
sequence:
- service: switch.turn_off
data:
target:
entity_id: switch.foscam_motion
- service: shell_command.foscam_turn_on
- service: switch.turn_on
data:
target:
entity_id: switch.foscam_motion
```
@ -64,14 +64,14 @@ To automate Foscam being set to "on" (facing the correct way with motion sensor
```yaml
automation:
- alias: Set Foscam to Away Mode when I leave home
- alias: "Set Foscam to Away Mode when I leave home"
trigger:
platform: state
entity_id: group.family
from: "home"
action:
service: script.foscam_on
- alias: Set Foscam to Home Mode when I arrive Home
- alias: "Set Foscam to Home Mode when I arrive Home"
trigger:
platform: state
entity_id: group.family

View File

@ -46,7 +46,7 @@ Use as [`script`](/integrations/script/) in automations.
{% raw %}
```yaml
automation:
alias: Send me a message when I get home
alias: "Send me a message when I get home"
trigger:
platform: state
entity_id: device_tracker.me

View File

@ -15,7 +15,7 @@ notify:
recipient: recipient@jabber.org
automation:
- alias: Update notification
- alias: "Update notification"
trigger:
- platform: state
entity_id: binary_sensor.updater
@ -38,7 +38,7 @@ notify:
name: pushbullet
automation:
- alias: Update notification
- alias: "Update notification"
trigger:
- platform: state
entity_id: binary_sensor.updater

View File

@ -15,7 +15,7 @@ notify me:
name: mypushbullet
automation:
- alias: FanOn
- alias: "FanOn"
trigger:
platform: numeric_state
entity_id: sensor.furnace
@ -34,7 +34,7 @@ If you also want a notification when it drops back down below that limit, you co
{% raw %}
```yaml
- alias: FanOff
- alias: "FanOff"
trigger:
platform: numeric_state
entity_id: sensor.furnace

View File

@ -26,7 +26,7 @@ media_player:
automation:
# If you select "Rain", play the "rain.mp3" file
- alias: Play Rain Lullaby
- alias: "Play Rain Lullaby"
trigger:
platform: state
@ -35,14 +35,15 @@ automation:
action:
service: media_player.play_media
data:
target:
entity_id: media_player.nursery
data:
media_content_id: http://fileserver/rain.mp3
media_content_type: music
# If you select "Babbling Brook", play the "babbling_brook.mp3" file
- alias: Play Babbling Brook Lullaby
- alias: "Play Babbling Brook Lullaby"
trigger:
platform: state
@ -51,13 +52,14 @@ automation:
action:
service: media_player.play_media
data:
target:
entity_id: media_player.nursery
data:
media_content_id: http://fileserver/babbling_brook.mp3
media_content_type: music
# If you select "None, turn the Chromecast off
- alias: Stop the Lullaby
- alias: "Stop the Lullaby"
trigger:
platform: state
@ -66,7 +68,7 @@ automation:
action:
service: media_player.turn_off
data:
target:
entity_id: media_player.nursery
```
A little bit more complex example that uses [`input_select`](/integrations/input_select/) and template to decide what to play, and which [Chromecast](/integrations/cast/) to play on.
@ -100,7 +102,7 @@ input_select:
icon: mdi:airplay
automation:
- alias: Stop Streaming Radio
- alias: "Stop Streaming Radio"
trigger:
- platform: state
entity_id: input_select.radio_station
@ -125,7 +127,7 @@ automation:
none
{% endif %}
- alias: Stream Radio - Template
- alias: "Stream Radio - Template"
trigger:
- platform: state
entity_id: input_select.radio_station

View File

@ -55,7 +55,7 @@ script:
data:
message: "WeMo not found, restarting HA"
- service: switch.turn_on
data:
target:
entity_id: switch.killhass
automation:
@ -73,7 +73,8 @@ automation:
state: "off"
action:
service: homeassistant.turn_on
entity_id: script.restarthawemo
target:
entity_id: script.restarthawemo
- alias: "Stop HA"
trigger:
- platform: state
@ -91,7 +92,8 @@ automation:
state: "on"
action:
service: homeassistant.turn_off
entity_id: script.restarthawemo
target:
entity_id: script.restarthawemo
```
{% endraw %}

View File

@ -21,7 +21,7 @@ and automation part to your `configuration.yaml` file.
```yaml
automation:
- alias: Send message at a given time
- alias: "Send message at a given time"
trigger:
platform: time
at: "12:15:00"

View File

@ -16,22 +16,22 @@ script:
alias: "Sonos TTS script"
sequence:
- service: sonos.snapshot
data:
target:
entity_id: "{{ sonos_entity }}"
- service: sonos.unjoin
data:
target:
entity_id: "{{ sonos_entity }}"
- service: media_player.volume_set
data:
target:
entity_id: "{{ sonos_entity }}"
volume_level: "{{ volume }}"
- service: tts.voicerss_say
data:
target:
entity_id: "{{ sonos_entity }}"
message: "{{ message }}"
- delay: "{{ delay }}"
- service: sonos.restore
data:
target:
entity_id: "{{ sonos_entity }}"
```

View File

@ -10,16 +10,17 @@ This recipe will turn on a light when there is motion and turn off the light whe
```yaml
automation:
- alias: Turn on kitchen light when there is movement
- alias: "Turn on kitchen light when there is movement"
trigger:
platform: state
entity_id: sensor.motion_sensor
to: "on"
action:
service: light.turn_on
entity_id: light.kitchen_light
target:
entity_id: light.kitchen_light
- alias: Turn off kitchen light 10 minutes after last movement
- alias: "Turn off kitchen light 10 minutes after last movement"
trigger:
platform: state
entity_id: sensor.motion_sensor
@ -28,29 +29,30 @@ automation:
minutes: 10
action:
service: light.turn_off
entity_id: light.kitchen_light
target:
entity_id: light.kitchen_light
```
Or in the case of multiple sensors/triggers:
```yaml
automation:
- alias: Turn on hallway lights when the doorbell rings, the front door opens or if there is movement
- alias: "Turn on hallway lights when the doorbell rings, the front door opens or if there is movement"
trigger:
- platform: state
entity_id: sensor.motion_sensor, binary_sensor.front_door, binary_sensor.doorbell
to: "on"
action:
- service: light.turn_on
data:
target:
entity_id:
- light.hallway_0
- light.hallway_1
- service: timer.start
data:
target:
entity_id: timer.hallway
- alias: Turn off hallway lights 10 minutes after trigger
- alias: "Turn off hallway lights 10 minutes after trigger"
trigger:
platform: event
event_type: timer.finished
@ -58,7 +60,7 @@ automation:
entity_id: timer.hallway
action:
service: light.turn_off
data:
target:
entity_id:
- light.hallway_0
- light.hallway_1
@ -71,7 +73,7 @@ timer:
You can also restrict lights from turning on based on time of day and implement transitions for fading lights on and off.
```yaml
- alias: Motion Sensor Lights On
- alias: "Motion Sensor Lights On"
trigger:
platform: state
entity_id: binary_sensor.ecolink_pir_motion_sensor_sensor
@ -82,12 +84,13 @@ You can also restrict lights from turning on based on time of day and implement
before: "23:30"
action:
service: homeassistant.turn_on
entity_id: group.office_lights
target:
entity_id: group.office_lights
data:
transition: 15
- alias: Motion Sensor Lights Off
- alias: "Motion Sensor Lights Off"
trigger:
- platform: state
entity_id: binary_sensor.ecolink_pir_motion_sensor_sensor
@ -96,7 +99,8 @@ You can also restrict lights from turning on based on time of day and implement
minutes: 15
action:
- service: homeassistant.turn_off
entity_id: group.office_lights
target:
entity_id: group.office_lights
data:
transition: 160
```

View File

@ -334,7 +334,8 @@ automation:
seconds: "{{ states('input_number.lock_sec')|int }}"
action:
service: lock.lock
entity_id: lock.my_place
target:
entity_id: lock.my_place
```
{% endraw %}
@ -390,7 +391,8 @@ automation:
below: -4.0
action:
service: switch.turn_on
entity_id: switch.exterior_lighting
target:
entity_id: switch.exterior_lighting
```
{% endraw %}
@ -519,9 +521,11 @@ automation:
to: "on"
action:
- service: climate.turn_on
entity_id: climate.office
target:
entity_id: climate.office
- service: input_datetime.set_datetime
entity_id: input_datetime.turn_off_ac
target:
entity_id: input_datetime.turn_off_ac
data:
datetime: >
{{ (now().timestamp() + 2*60*60)
@ -532,7 +536,8 @@ automation:
at: input_datetime.turn_off_ac
action:
service: climate.turn_off
entity_id: climate.office
target:
entity_id: climate.office
```
{% endraw %}
@ -548,7 +553,8 @@ automation:
at: sensor.phone_next_alarm
action:
service: light.turn_on
entity_id: light.bedroom
target:
entity_id: light.bedroom
```
#### Multiple Times

View File

@ -111,7 +111,7 @@ At startup, automations by default restore their last state of when Home Assista
```yaml
automation:
- alias: Automation Name
- alias: "Automation Name"
initial_state: false
trigger:
- platform: ...
@ -126,7 +126,7 @@ If you want to migrate your manual automations to use the editor, you'll have to
```yaml
# Example automations.yaml entry. Note, automations.yaml is always a list!
- id: my_unique_id # <-- Required for editor to work, for automations created with the editor the id will be automatically generated.
alias: Hello world
alias: "Hello world"
trigger:
- platform: state
entity_id: sun.sun

View File

@ -24,7 +24,7 @@ If you run into trouble while configuring Home Assistant, have a look at the [co
<div class='note tip'>
Test any changes to your configuration files from the command line with `hass --script check_config`. This script allows you to test changes without the need to restart Home Assistant. Remember to run this as the user you run Home Assistant as.
Test any changes to your configuration files from the command line with `hass --script check_config`. This script allows you to test changes without the need to restart Home Assistant. Remember to run this as the user you run Home Assistant as. Configuration changes can also be tested using the UI by navigating to Configuration, Server Controls and clicking "Check Configuration".
</div>
@ -34,14 +34,16 @@ There are many ways you can edit `configuration.yaml`. Here are three options to
The simplest is to use the "File Editor" add-on. This will allow you to edit your configuration from within Home Assistant itself.
You can also use Samba (you may need to install the "Samba" add-on) and your favorite file editor.
Perhaps the most robust option is to load the Visual Studio Code add-on. VS Code offers live syntax checking and auto-fill of various Home Assistant entities.
You can use Samba file share (you need to install the "Samba" add-on) and your favorite file editor.
The most basic is to use SSH to connect to the system (you may need to install the SSH add-on) and then use `nano` (or `vim`) to edit the file.
## Reloading changes
You will have to restart Home Assistant for most changes to `configuration.yaml` to take effect.
You can load changes to [automations](/docs/automation/), [core (customize)](/docs/configuration/customizing-devices/), [groups](/integrations/group/), [history stats](/integrations/history_stats/), [HomeKit](/integrations/homekit/), [input_booleans](/integrations/input_boolean/), [input_datetimes](/integrations/input_datetime/), [input_numbers](/integrations/input_number/), [input_selects](/integrations/input_select/), [input_texts](/integrations/input_text/), [MQTT](/integrations/mqtt/), [persons](/integrations/person/), [scenes](/integrations/scene/), [scripts](/integrations/script/), [statistics](/integrations/statistics/), [template sensors](/integrations/template/), [timers](/integrations/timer/), [zones](/integrations/zone/), and more without restarting.
You can load changes to the following components without restarting, by using the UI. Navigate to Configuration, Server Controls and scrolling down to the YAML configuration reloading: [automations](/docs/automation/), [core (customize)](/docs/configuration/customizing-devices/), [groups](/integrations/group/), [history stats](/integrations/history_stats/), [HomeKit](/integrations/homekit/), [input_booleans](/integrations/input_boolean/), [input_datetimes](/integrations/input_datetime/), [input_numbers](/integrations/input_number/), [input_selects](/integrations/input_select/), [input_texts](/integrations/input_text/), [MQTT](/integrations/mqtt/), [persons](/integrations/person/), [scenes](/integrations/scene/), [scripts](/integrations/script/), [statistics](/integrations/statistics/), [template sensors](/integrations/template/), [timers](/integrations/timer/), [zones](/integrations/zone/), and more without restarting.
<div class='note warning'>

View File

@ -231,22 +231,24 @@ These work recursively. As an example using `!include_dir_* automation`, will in
```yaml
automation:
- alias: Automation 1
- alias: "Automation 1"
trigger:
platform: state
entity_id: device_tracker.iphone
to: "home"
action:
service: light.turn_on
entity_id: light.entryway
- alias: Automation 2
target:
entity_id: light.entryway
- alias: "Automation 2"
trigger:
platform: state
entity_id: device_tracker.iphone
from: "home"
action:
service: light.turn_off
entity_id: light.entryway
target:
entity_id: light.entryway
```
can be turned into:
@ -260,27 +262,29 @@ automation: !include_dir_list automation/presence/
`automation/presence/automation1.yaml`
```yaml
alias: Automation 1
alias: "Automation 1"
trigger:
platform: state
entity_id: device_tracker.iphone
to: "home"
action:
service: light.turn_on
entity_id: light.entryway
target:
entity_id: light.entryway
```
`automation/presence/automation2.yaml`
```yaml
alias: Automation 2
alias: "Automation 2"
trigger:
platform: state
entity_id: device_tracker.iphone
from: "home"
action:
service: light.turn_off
entity_id: light.entryway
target:
entity_id: light.entryway
```
It is important to note that each file must contain only **one** entry when using `!include_dir_list`.
@ -370,22 +374,24 @@ speech:
```yaml
automation:
- alias: Automation 1
- alias: "Automation 1"
trigger:
platform: state
entity_id: device_tracker.iphone
to: "home"
action:
service: light.turn_on
entity_id: light.entryway
- alias: Automation 2
target:
entity_id: light.entryway
- alias: "Automation 2"
trigger:
platform: state
entity_id: device_tracker.iphone
from: "home"
action:
service: light.turn_off
entity_id: light.entryway
target:
entity_id: light.entryway
```
can be turned into:
@ -399,22 +405,24 @@ automation: !include_dir_merge_list automation/
`automation/presence.yaml`
```yaml
- alias: Automation 1
- alias: "Automation 1"
trigger:
platform: state
entity_id: device_tracker.iphone
to: "home"
action:
service: light.turn_on
entity_id: light.entryway
- alias: Automation 2
target:
entity_id: light.entryway
- alias: "Automation 2"
trigger:
platform: state
entity_id: device_tracker.iphone
from: "home"
action:
service: light.turn_off
entity_id: light.entryway
target:
entity_id: light.entryway
```
It is important to note that when using `!include_dir_merge_list`, you must include a list in each file (each list item is denoted with a hyphen [-]). Each file may contain one or more entries.

View File

@ -5,7 +5,7 @@ description: "Details about YAML to configure Home Assistant."
Home Assistant uses the [YAML](https://yaml.org/) syntax for configuration. YAML might take a while to get used to but is really powerful in allowing you to express complex configurations.
For integrations that you want to use in Home Assistant, you add code in your `configuration.yaml` file to specify its settings. This especially applies to integrations that are not yet available to configure through the UI.
While more and more integrations are configured through the UI, for some, you will add code in your `configuration.yaml` file to specify its settings.
The following example entry assumes that you would like to set up the [notify integration](/integrations/notify) with the [pushbullet platform](/integrations/pushbullet).

View File

@ -1,72 +0,0 @@
---
title: "Installation of Home Assistant"
description: "Instructions on how to install Home Assistant to launch on start."
---
<div class='note'>
Beginners should check our [Getting started guide](/getting-started/) first.
</div>
Home Assistant provides multiple ways to be installed. The first start may take up to 20 minutes because the required packages will be downloaded and installed. The web interface will be served on `http://ip.add.re.ss:8123/`. Replace `ip.add.re.ss` with the IP of the computer you installed it on.
<div class='note warning'>
Please remember to [secure your installation](/docs/configuration/securing/) once you've finished with the installation process.
</div>
## Hardware
Below is a list of **minimum** requirements
Type | Minimum
-- | --
Storage | 32 GB
Memory | 1 GB
Network | 100 Mb/s wired
Power (if Pi) | At least 2.5A
### Performance expectations
This is a list of popular platforms and what to expect from them.
Platform | Notes
-- | --
Raspberry Pi Zero/Pi 2 | **Only** use these for testing
Raspberry Pi 3/3+/4 | This is a good starting point, and depending on the amount of devices you integrate this can be enough - use an [A2 class SD](https://amzn.to/2X0Z2di) card if possible.
NUC i3 | This is if you need a little more power over a Pi
NUC i5 | This will allow you to run multiple services without any issues, perfect for a homelab
NUC i7/i9 | Pure power, you should not have *any* performance issues
## Recommended
These install options are fully supported by Home Assistant's documentation. For example, if an integration requires that you install something to make it work on one of these methods then the integration page will document the steps required.
<div class='note'>
The only installation methods that allow you to use Home Assistant Add-ons is using the Home Assistant image. All other methods only install the base Home Assistant packages, however the software from the add-ons may still usually be installed manually like any other program.
</div>
**Method**|**You have**|**Recommended for**
:-----|:-----|:-----
[Home Assistant OS](/hassio/installation/)|[A supported platform](/hassio/installation/)|Anybody
[Home Assistant Container](/docs/installation/docker/)|Docker|Anybody already running Docker
## Alternative installs
If you use these install methods, we assume that you know how to manage and administer the operating system you're using. Due to the range of platforms on which these install methods can be used, integration documentation may only tell you what you have to install, not how to install it.
**Method**|**You have**|**Recommended for**
:-----|:-----|:-----
[Home Assistant Core](/docs/installation/raspberry-pi/)|Any Linux, Python 3.8 or later|Those familiar with their operating system
[Home Assistant Supervised](https://github.com/home-assistant/supervised-installer) | [Requirements](https://github.com/home-assistant/architecture/blob/master/adr/0014-home-assistant-supervised.md#supported-operating-system-system-dependencies-and-versions) | Those very familiar with their operating system
[venv<BR>(as your user)](/docs/installation/virtualenv/)|Any Python 3.8 or later|**Developers**
## Community provided guides
Additional installation guides can be found on our [Community Forum](https://community.home-assistant.io/tags/c/community-guides/51/installation).
These Community Guides are provided as-is. Some of these install methods are more limited than the methods above. Some integrations may not work due to limitations of the platform.

View File

@ -1,317 +0,0 @@
---
title: "Installation on Docker"
description: "Instructions to install Home Assistant on a Docker."
---
<div class='note warning'>
These below instructions are for an installation of Home Assistant Core running in your own Docker environment, which you manage yourself.
Note that Docker command line option `--net=host` or the compose file equivalent `network_mode: host` must be used to put Home Assistant on the host's network, otherwise certain functionality - including mDNS and UPnP - will break. The `-p` command line option or the compose file equivalent `ports:` is not compatible with host networking mode and must not be used.
</div>
## Platform Installation
Installation with Docker is straightforward. Adjust the following command so that `/PATH_TO_YOUR_CONFIG` points at the folder where you want to store your configuration and run it:
## Autostart using Docker
<div class='note warning'>
Do not try to combine Docker `restart` policies with host-level process managers (such as `systemd`), because this creates conflicts.
</div>
Add `--restart=always` to your `docker run` command before homeassistant/home-assistant:stable. See [the Docker autostart documentation](https://docs.docker.com/config/containers/start-containers-automatically/) for details and more options.
### Linux
```bash
docker run -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant:stable
```
Updating:
```bash
docker pull homeassistant/home-assistant:stable # if this returns "Image is up to date" then you can stop here
docker stop home-assistant # stop the running container
docker rm home-assistant # remove it from Docker's list of containers
docker run -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant:stable # finally, start a new one
```
### Raspberry Pi 3/4 (Raspberry Pi OS)
Raspberry Pi 3:
```bash
docker run --init -d --name="home-assistant" -e "TZ=America/New_York" -v /PATH_TO_YOUR_CONFIG:/config --net=host homeassistant/raspberrypi3-homeassistant:stable
```
Raspberry Pi 4:
```bash
docker run --init -d --name="home-assistant" -e "TZ=America/New_York" -v /PATH_TO_YOUR_CONFIG:/config --net=host homeassistant/raspberrypi4-homeassistant:stable
```
You need to replace `/PATH_TO_YOUR_CONFIG` with your path to the configuration. For example, if you choose your configuration path to be `/home/pi/homeassistant`, the command for **Raspberry Pi 3** would be:
```bash
docker run --init -d --name="home-assistant" -e "TZ=America/New_York" -v /home/pi/homeassistant:/config --net=host homeassistant/raspberrypi3-homeassistant:stable
```
### macOS
When using `docker-ce` (or `boot2docker`) on macOS, you are unable to map the local timezone to your Docker container ([Docker issue](https://github.com/docker/for-mac/issues/44)). Instead of `-v /etc/localtime:/etc/localtime:ro`, just pass in the timezone environment variable when you launch the container, e.g, `-e "TZ=America/Los_Angeles"`. Replace "America/Los_Angeles" with [your timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
```bash
docker run --init -d --name="home-assistant" -e "TZ=America/Los_Angeles" -v /PATH_TO_YOUR_CONFIG:/config -p 8123:8123 homeassistant/home-assistant:stable
```
Alternatively, `docker-compose` works with any recent release of Docker CE on macOS. Note the `/dev/tty*` device name used by your Arduino etc. devices will differ from the Linux example, so the compose `mount:` may require updates.
### Windows
Docker containers are completely isolated from its Windows host system. So when you delete a container, all the changes you made to that container are also removed. If you want to have configuration files or other assets remain persistent, try mounting Windows folders on containers.
Before proceeding, make sure you have shared out a drive for Docker to mount to. This will allow the saving of configuration files to persist on the local machine rather than in the Docker container (which may be destroyed when upgraded).
<https://docs.docker.com/docker-for-windows/#shared-drives>
<https://docs.docker.com/docker-for-windows/troubleshoot/#verify-domain-user-has-permissions-for-shared-drives-volumes>
```powershell
docker run --init -d --name="home-assistant" -e "TZ=America/Los_Angeles" -v /PATH_TO_YOUR_CONFIG:/config -p 8123:8123 homeassistant/home-assistant:stable
```
Its easier to understand the trick when put into practice. Here we would like to mount a current working directory (something like `C:\Users\<your login name>\homeassistant` make sure this exists first) into the `homeassistant/home-assistant:stable` image at the `/config` location in the container. We would do that as so:
```powershell
docker run --init -d --name="home-assistant" -e "TZ=America/Los_Angeles" -v //c/Users/<your login name>/homeassistant:/config -p 8123:8123 homeassistant/home-assistant:stable
```
Host networking is not supported on Windows so we have to forward the port 8123. This will let you access your Home Assistant portal from `http://localhost:8123`, and if you forward port 8123 on your router to your machine IP, the traffic will be forwarded on through to the Docker container.
### Synology NAS
As Synology within DSM now supports Docker (with a neat UI), you can simply install Home Assistant using Docker without the need for command-line. For details about the package (including compatibility-information, if your NAS is supported), see <https://www.synology.com/en-us/dsm/packages/Docker>
The steps would be:
- Install "Docker" package on your Synology NAS
- Launch Docker-app and move to "Registry"-section
- Find "homeassistant/home-assistant" within registry and click on "Download". Choose the "stable" tag.
- Wait for some time until your NAS has pulled the image
- Move to the "Image"-section of the Docker-app
- Click on "Launch"
- Choose a container-name you want (e.g., "homeassistant")
- Click on "Advanced Settings"
- Set "Enable auto-restart" if you like
- Within "Volume" click on "Add Folder" and choose either an existing folder or add a new folder. The "mount path" has to be "/config", so that Home Assistant will use it for the configs and logs. It is therefore recommended that the folder you choose should be named "config" or "homeassistant/config" to avoid confusion when referencing it within service calls.
- Within "Network" select "Use same network as Docker Host"
- To ensure that Home Assistant displays the correct timezone go to the "Environment" tab and click the plus sign then add `variable` = `TZ` & `value` = `Europe/London` choosing [your correct timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
- Confirm the "Advanced Settings"
- Click on "Next" and then "Apply"
- Your Home Assistant within Docker should now run and will serve the web interface from port 8123 on your Docker host (this will be your Synology NAS IP address - for example `http://192.168.1.10:8123`)
If you are using the built-in firewall, you must also add the port 8123 to allowed list. This can be found in "Control Panel -> Security" and then the Firewall tab. Click "Edit Rules" besides the Firewall Profile dropdown box. Create a new rule and select "Custom" for Ports and add 8123. Edit Source IP if you like or leave it at default "All". Action should stay at "Allow".
To use a Z-Wave USB stick for Z-Wave control, the HA Docker container needs extra configuration to access to the USB stick. While there are multiple ways to do this, the least privileged way of granting access can only be performed via the Terminal, at the time of writing. See this page for configuring Terminal acces to your Synology NAS:
<https://www.synology.com/en-global/knowledgebase/DSM/help/DSM/AdminCenter/system_terminal>
See this page for accessing the Terminal via SSH:
<https://www.synology.com/en-global/knowledgebase/DSM/tutorial/General_Setup/How_to_login_to_DSM_with_root_permission_via_SSH_Telnet>
Adjust the following Terminal command as follows :
- Replace `/PATH_TO_YOUR_CONFIG` points at the folder where you want to store your configuration
- Replace `/PATH_TO_YOUR_USB_STICK` matches the path for your USB stick (e.g., `/dev/ttyACM0` for most Synology users)
- Replace "Australia/Melbourne" with [your timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
Run it in Terminal.
```bash
sudo docker run --restart always -d --name="homeassistant" -v /PATH_TO_YOUR_CONFIG:/config --device=/PATH_TO_YOUR_USB_STICK -e TZ=Australia/Melbourne --net=host homeassistant/home-assistant:stable
```
Complete the remainder of the Z-Wave configuration by [following the instructions here.](/docs/z-wave/installation)
Remark: to update your Home Assistant on your Docker within Synology NAS, you just have to do the following:
- Go to the Docker-app and move to "Registry"-section
- Find "homeassistant/home-assistant" within registry and click on "Download". Choose the "stable" tag.
- Wait until the system-message/-notification comes up, that the download is finished (there is no progress bar)
- Move to "Container"-section
- Stop your container if it's running
- Right-click on it and select "Action"->"Clear". You won't lose any data, as all files are stored in your configuration-directory
- Start the container again - it will then boot up with the new Home Assistant image
Remark: to restart your Home Assistant within Synology NAS, you just have to do the following:
- Go to the Docker-app and move to "Container"-section
- Right-click on it and select "Action"->"Restart".
<div class='note'>
If you want to use a USB Bluetooth adapter or Z-Wave USB Stick with Home Assistant on Synology Docker these instructions do not correctly configure the container to access the USB devices. To configure these devices on your Synology Docker Home Assistant you can follow the instructions provided [here](https://philhawthorne.com/installing-home-assistant-io-on-a-synology-diskstation-nas/) by Phil Hawthorne.
</div>
### QNAP NAS
As QNAP within QTS now supports Docker (with a neat UI), you can simply install Home Assistant using Docker without the need for command-line. For details about the package (including compatibility-information, if your NAS is supported), see <https://www.qnap.com/solution/container_station/en/index.php>
The steps would be:
- Install "Container Station" package on your Qnap NAS
- Launch Container Station and move to "Create Container"-section
- Search image "homeassistant/home-assistant" with Docker Hub and click on "Install"
Make attention to CPU architecture of your NAS. For ARM CPU types the correct image is "homeassistant/armhf-homeassistant"
- Choose "stable" version and click next
- Choose a container-name you want (e.g., "homeassistant")
- Click on "Advanced Settings"
- Within "Shared Folders" click on "Volume from host" > "Add" and choose either an existing folder or add a new folder. The "mount point has to be `/config`, so that Home Assistant will use it for the configuration and logs.
- Within "Network" and select Network Mode to "Host"
- To ensure that Home Assistant displays the correct timezone go to the "Environment" tab and click the plus sign then add `variable` = `TZ` & `value` = `Europe/London` choosing [your correct timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
- Click on "Create"
- Wait for some time until your NAS has created the container
- Your Home Assistant within Docker should now run and will serve the web interface from port 8123 on your Docker host (this will be your Qnap NAS IP address - for example `http://192.xxx.xxx.xxx:8123`)
Remark: To update your Home Assistant on your Docker within Qnap NAS, you just remove container and image and do steps again (Don't remove "config" folder).
If you want to use a USB Bluetooth adapter or Z-Wave USB stick with Home Assistant on Qnap Docker, follow those steps:
#### Z-Wave
- Connect to your NAS over SSH
- Load cdc-acm kernel module(when NAS restart need to run this command)
`insmod /usr/local/modules/cdc-acm.ko`
- Find USB devices attached. Type command:
`ls /dev/tty*`
The above command should show you any USB devices plugged into your NAS. If you have more than one, you may get multiple items returned. Like : `ttyACM0`
- Run Docker command:
```bash
docker run --init --name home-assistant --net=host --privileged -itd -v /share/CACHEDEV1_DATA/Public/homeassistant/config:/config -e TZ=Europe/London --device /dev/ttyACM0 homeassistant/home-assistant:stable
```
`-v` is your configuration path
`-e` is set timezone
- Edit `configuration.yaml`
```yaml
zwave:
usb_path: /dev/ttyACM0
```
That will tell Home Assistant where to look for our Z-Wave radio.
#### Bluetooth
- Connect to your NAS over SSH
- Run Docker command:
```bash
docker run --init --name home-assistant --net=host --privileged -itd -v /share/CACHEDEV1_DATA/Public/homeassistant/config:/config -e TZ=Europe/London -v /dev/bus/usb:/dev/bus/usb -v /var/run/dbus:/var/run/dbus homeassistant/home-assistant:stable
```
First `-v` is your configuration path
`-e` is set timezone
- Edit the `configuration.yaml` file
```yaml
device_tracker:
- platform: bluetooth_tracker
```
## Restart
If you change the configuration you have to restart the server. To do that you have 2 options.
1. You can go to the **Developer Tools** -> **Services**, select the service `homeassistant.restart` and click "Call Service".
2. Or you can restart it from a terminal by running `docker restart home-assistant`
## Docker Compose
As the Docker command becomes more complex, switching to `docker-compose` can be preferable and support automatically restarting on failure or system restart. Create a `docker-compose.yml` file:
```yaml
version: "3"
services:
homeassistant:
container_name: home-assistant
image: homeassistant/home-assistant:stable
volumes:
- /PATH_TO_YOUR_CONFIG:/config
environment:
- TZ=America/New_York
restart: always
network_mode: host
```
Then start the container with:
```bash
docker-compose up -d
```
To restart Home Assistant when you have changed configuration:
```bash
docker-compose restart
```
To update your docker-compose image to the latest version and restart:
```bash
docker-compose pull homeassistant
docker-compose up -d
```
Note: the above will fetch the latest matching image for the `homeassistant` service only. To fetch all matching images for all services defined in the same `docker-compose.yaml` file, omit the service name from the first command.
## Exposing Devices
In order to use Z-Wave, Zigbee or other integrations that require access to devices, you need to map the appropriate device into the container. Ensure the user that is running the container has the correct privileges to access the `/dev/tty*` file, then add the device mapping to your Docker command:
```bash
$ docker run --init -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config \
-e "TZ=Australia/Melbourne" --device /dev/ttyUSB0:/dev/ttyUSB0 \
--net=host homeassistant/home-assistant:stable
```
or in a `docker-compose.yml` file:
```yaml
version: "3"
services:
homeassistant:
container_name: home-assistant
image: homeassistant/home-assistant:stable
volumes:
- /PATH_TO_YOUR_CONFIG:/config
devices:
- /dev/ttyUSB0:/dev/ttyUSB0
- /dev/ttyUSB1:/dev/ttyUSB1
- /dev/ttyACM0:/dev/ttyACM0
environment:
- TZ=America/New_York
restart: always
network_mode: host
```
<div class='note'>
On Mac, USB devices are [not passed through](https://github.com/docker/for-mac/issues/900) by default. Follow the instructions in [Using USB with Docker for Mac](https://dev.to/rubberduck/using-usb-with-docker-for-mac-3fdd) by Christopher McClellan if your device is not showing up.
</div>
## Optimizations
The Home Assistant Container is using an alternative memory allocation library [jemalloc](http://jemalloc.net/) for better memory management and Python runtime speedup.
As jemalloc can cause issues on certain hardware, it can be disabled by passing the environment variable `DISABLE_JEMALLOC` with any value, for example: `-e "DISABLE_JEMALLOC=true"`.
The error message `<jemalloc>: Unsupported system page size` is one known indicator.

View File

@ -1,151 +0,0 @@
---
title: "Manual installation on a Raspberry Pi"
description: "Instructions to install Home Assistant Core on a Raspberry Pi running Raspberry Pi OS Lite."
---
This installation of Home Assistant Core requires the Raspberry Pi to run [Raspberry Pi OS Lite](https://www.raspberrypi.org/downloads/raspberry-pi-os/). The installation will be installed in a [Virtual Environment](/docs/installation/virtualenv) with minimal overhead. Instructions assume this is a new installation of Raspberry Pi OS Lite.
You must have Python 3.8 or later installed (including the package `python3-dev`) which is *not* the case for Raspberry Pi OS and you will need to install Python manually.
<div class='note'>
Although these installation steps specifically mention a Raspberry Pi, you can go ahead and proceed on any Linux install as well. This guide is also referred to as the "Advanced Guide" for a virtual environment install.
</div>
<div class='note warning'>
Please remember to ensure you're using an [appropriate power supply](https://www.raspberrypi.org/documentation/faqs/#pi-power) with your Pi. Mobile chargers may not be suitable, since some are designed to only provide the full power with that manufacturer's handsets. USB ports on your computer also will not supply enough power and must not be used.
</div>
Connect to the Raspberry Pi over SSH. Default password is `raspberry`.
You will need to enable SSH access. The Raspberry Pi website has instructions [here](https://www.raspberrypi.org/documentation/remote-access/ssh/).
```bash
ssh pi@ipaddress
```
Changing the default password is encouraged.
```bash
passwd
```
Update the system.
```bash
sudo apt-get update
sudo apt-get upgrade -y
```
Install the dependencies.
```bash
sudo apt-get install python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5
```
Add an account for Home Assistant Core called `homeassistant`.
Since this account is only for running Home Assistant Core the extra arguments of `-rm` is added to create a system account and create a home directory. The arguments `-G dialout,gpio,i2c` adds the user to the `dialout`, `gpio` and the `i2c` group. The first is required for using Z-Wave and Zigbee controllers, while the second is required to communicate with Raspberry's GPIO.
```bash
sudo useradd -rm homeassistant -G dialout,gpio,i2c
```
Next we will create a directory for the installation of Home Assistant Core and change the owner to the `homeassistant` account.
```bash
cd /srv
sudo mkdir homeassistant
sudo chown homeassistant:homeassistant homeassistant
```
Next up is to create and change to a virtual environment for Home Assistant Core. This will be done as the `homeassistant` account.
```bash
sudo -u homeassistant -H -s
cd /srv/homeassistant
python3.8 -m venv .
source bin/activate
```
Once you have activated the virtual environment (notice the prompt change to `(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $`) you will need to run the following command to install a required Python package.
```bash
python3 -m pip install wheel
```
Once you have installed the required Python package it is now time to install Home Assistant Core!
```bash
pip3 install homeassistant
```
Start Home Assistant Core for the first time. This will complete the installation for you, automatically creating the `.homeassistant` configuration directory in the `/home/homeassistant` directory, and installing any basic dependencies.
```bash
hass
```
You can now reach your installation on your Raspberry Pi over the web interface on `http://ipaddress:8123`.
<div class='note'>
When you run the `hass` command for the first time, it will download, install and cache the necessary libraries/dependencies. This procedure may take anywhere between 5 to 10 minutes. During that time, you may get "site cannot be reached" error when accessing the web interface. This will only happen for the first time, and subsequent restarts will be much faster.
</div>
## Updating
To update to the latest version of Home Assistant Core follow these simple steps:
```bash
sudo -u homeassistant -H -s
source /srv/homeassistant/bin/activate
pip3 install --upgrade homeassistant
```
Once the last command executes, restart the Home Assistant Core service to apply the latest updates. Please keep in mind that some updates may take longer to start up than others. If Home Assistant Core fails to start, make sure you check the **Breaking Changes** from the [Release Notes](https://www.home-assistant.io/latest-release-notes/).
## Run a specific version
In the event that a Home Assistant Core version doesn't play well with your hardware setup, you can downgrade to a previous release. For example:
```bash
sudo -u homeassistant -H -s
source /srv/homeassistant/bin/activate
pip3 install homeassistant==0.XX.X
```
## Run the beta version
If you would like to test next release before anyone else, you can install the beta version released every two weeks, for example:
```bash
sudo -u homeassistant -H -s
source /srv/homeassistant/bin/activate
pip3 install --pre --upgrade homeassistant
```
## Run the development version
If you want to stay on the bleeding-edge Home Assistant Core development branch, you can upgrade to `dev`.
<div class='note warning'>
The "dev" branch is likely to be unstable. Potential consequences include loss of data and instance corruption.
</div>
For example:
```bash
sudo -u homeassistant -H -s
source /srv/homeassistant/bin/activate
pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev
```
## Activating the virtual environment
When instructions tell you to activate the virtual environment, the following commands will do this:
```bash
sudo -u homeassistant -H -s
source /srv/homeassistant/bin/activate
```

View File

@ -1,79 +0,0 @@
---
title: "Updating Home Assistant"
description: "Step to update Home Assistant."
---
<div class='note warning'>
The upgrade process differs depending on the installation you have, so please review the documentation that is specific to your install: [Home Assistant](/hassio/) or [Home Assistant Core](/docs/installation/virtualenv/#upgrade).
</div>
Check what's new in the latest version and potentially impacts your system in the [Home Assistant release notes](https://github.com/home-assistant/home-assistant/releases). It is good practice to review these release notes and pay close attention to the **Breaking Changes** that are listed there. If you haven't done an update for a while, you should also check previous release notes as they can also contain relevant **Breaking Changes**. These **Breaking Changes** may require configuration updates for your components. If you missed this and Home Assistant refuses to start, check the log file in the [configuration](/docs/configuration/) directory, e.g., `.homeassistant/home-assistant.log`, for details about broken components.
<div class='note'>
To avoid permission errors, the upgrade must be run as the same user as was used during the initial installation, again review the documentation specific to your install [Home Assistant](/hassio/) or [Home Assistant Core](/docs/installation/virtualenv).
</div>
The default way to update Home Assistant to the latest release, when available, is:
```bash
pip3 install --upgrade homeassistant
```
For a Docker container, simply pull the latest stable one:
```bash
sudo docker pull homeassistant/home-assistant:stable
```
For a Raspberry Pi Docker container, simply pull the latest stable one:
```bash
sudo docker pull homeassistant/raspberrypi3-homeassistant:stable
```
After updating, you must start/restart Home Assistant for the changes to take effect. This means that you will have to restart `hass` itself.
Startup can take a considerable amount of time (i.e., minutes) depending on your device. This is because all requirements are updated as well.
[BRUH automation](https://www.bruhautomation.io/) has created [a tutorial video](https://www.youtube.com/watch?v=tuG2rs1Cl2Y) explaining how to upgrade Home Assistant.
## Run a specific version
In the event that a Home Assistant version doesn't play well with your hardware setup, you can downgrade to a previous release:
```bash
pip3 install homeassistant==0.XX.X
```
## Run the beta version
If you would like to test the next release before anyone else, you can install the beta version released every two weeks:
```bash
pip3 install --pre --upgrade homeassistant
```
## Run the development version
If you want to stay on the bleeding-edge Home Assistant development branch, you can upgrade to `dev`.
<div class='note warning'>
The "dev" branch is likely to be unstable. Potential consequences include loss of data and instance corruption.
</div>
```bash
pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev
```
## Update Home Assistant installation
Best practice for updating a Home Assistant installation:
1. Backup your installation, using the snapshot functionality Home Assistant offers.
2. Check the release notes for breaking changes on [Home Assistant release notes](https://github.com/home-assistant/home-assistant/releases). Be sure to check all release notes between the version you are running and the one you are upgrading to. Use the search function in your browser (`CTRL + f`) and search for **Breaking Changes**.
3. Check your configuration using the [Check Home Assistant configuration](/addons/check_config/) add-on.
4. If the check passes, you can safely update. If not, update your configuration accordingly.
5. Update Home Assistant.

View File

@ -1,115 +0,0 @@
---
title: "Installation in Python virtual environment"
description: "How to install Home Assistant in a Python virtual environment."
---
If you already have Python 3.8 or later installed, you can easily give Home Assistant a spin.
It's recommended when installing Python packages that you use a [virtual environment](https://docs.python.org/3.8/library/venv.html#module-venv). This will make sure that your Python installation and Home Assistant installation won't impact one another. The following steps will work on most UNIX like systems.
<div class='note'>
This is a generic guide for running Home Assistant under Python. We recommend to use [our recommended installation guides](/docs/installation/#recommended). The steps below may be shorter but some users find difficulty when applying updates and may run into issues.
Before you begin the guide below, ensure that you have a *so-called standard* build environment that includes things like `make`, `gcc`, `python3`, including Python 3 `setuptools` and `pip` modules. Less obvious is the need to install `libssl-dev` (for opensslv.h), `libffi-dev` (for cffi.h) for things to build later on, `libjpeg-dev`, `zlib1g-dev`, `libopenjp2-7` and `libtiff5` needed for the frontend.
</div>
{% comment %}
This page describes installation instructions for a pure Python installation.
It should not contain any OS specific instructions.
{% endcomment %}
### Install
1. Create a virtual environment in your current directory:
```bash
python3.8 -m venv homeassistant
```
2. Open the virtual environment:
```bash
cd homeassistant
```
3. Activate the virtual environment:
```bash
source bin/activate
```
4. Install Home Assistant:
```bash
python3 -m pip install homeassistant
```
5. Run Home Assistant:
```bash
hass --open-ui
```
6. You can now reach the web interface on `http://ipaddress:8123/` - the first start may take a couple of minutes before the web interface is available. This can take longer if you're using lower-end hardware like a Raspberry Pi Zero.
### Upgrade
1. Stop Home Assistant
2. Open the directory where the virtual environment is located, activate the virtual environment, then upgrade Home Assistant:
```bash
cd homeassistant
source bin/activate
python3 -m pip install --upgrade homeassistant
```
3. Start Home Assistant
4. You can now reach the web interface on `http://ipaddress:8123/` - the first start may take some time before the web interface is available, depending on how many integrations need to be upgraded.
### Run a specific version
In the event that a Home Assistant version doesn't play well with your hardware setup, you can downgrade to a previous release. For example:
```bash
cd homeassistant
source bin/activate
pip3 install homeassistant==0.XX.X
```
#### Run the beta version
If you would like to test next release before anyone else, you can install the beta version, for example:
```bash
cd homeassistant
source bin/activate
pip3 install --pre --upgrade homeassistant
```
#### Run the development version
If you want to stay on the bleeding-edge Home Assistant development branch, you can upgrade to `dev`.
<div class='note warning'>
The "dev" branch is likely to be unstable. Potential consequences include loss of data and instance corruption.
</div>
For example:
```bash
cd homeassistant
source bin/activate
pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev
```
### Notes
- In the future, if you want to start Home Assistant manually again, follow step 2, 3 and 5.
- It's recommended to run Home Assistant as a dedicated user.
<div class='info'>
Looking for more advanced guides? Check our [Raspberry Pi OS guide](/docs/installation/raspberry-pi/) or the [other installation guides](/docs/installation/).
</div>
### After upgrading Python
If you've upgraded Python (for example, you were running 3.8.1 and now you've installed 3.8.6) then you'll need to build a new virtual environment. Simply rename your existing virtual environment directory:
```bash
mv homeassistant homeassistant.old
```
Then follow the [Install](#install) steps again, being sure to use the newly installed version of Python.

View File

@ -55,7 +55,8 @@ automation:
to: "home"
action:
service: scene.turn_on
entity_id: scene.romantic
target:
entity_id: scene.romantic
```
## Applying a scene without defining it
@ -101,8 +102,9 @@ automation:
to: "home"
action:
service: scene.turn_on
data:
target:
entity_id: scene.romantic
data:
transition: 2.5
```

View File

@ -16,7 +16,7 @@ script:
sequence:
# This is written using the Script Syntax
- service: light.turn_on
data:
target:
entity_id: light.ceiling
- service: notify.notify
data:
@ -47,10 +47,11 @@ script:
The most important one is the action to call a service. This can be done in various ways. For all the different possibilities, have a look at the [service calls page].
```yaml
- alias: Bedroom lights on
- alias: "Bedroom lights on"
service: light.turn_on
data:
target:
entity_id: group.bedroom
data:
brightness: 100
```
@ -74,10 +75,11 @@ The variables action allows you to set/override variables that will be accessibl
- light.kitchen
- light.living_room
brightness: 100
- alias: Control lights
- alias: "Control lights"
service: light.turn_on
data:
target:
entity_id: "{{ entities }}"
data:
brightness: "{{ brightness }}"
```
@ -234,16 +236,18 @@ This can be used to take different actions based on whether or not the condition
- service: script.door_did_not_open
default:
- service: script.turn_on
entity_id:
- script.door_did_open
- script.play_fanfare
target:
entity_id:
- script.door_did_open
- script.play_fanfare
# Wait a total of 10 seconds.
- wait_template: "{{ is_state('binary_sensor.door_1', 'on') }}"
timeout: 10
continue_on_timeout: false
- service: switch.turn_on
entity_id: switch.some_light
target:
entity_id: switch.some_light
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.door_2
@ -252,7 +256,8 @@ This can be used to take different actions based on whether or not the condition
timeout: "{{ wait.remaining }}"
continue_on_timeout: false
- service: switch.turn_off
entity_id: switch.some_light
target:
entity_id: switch.some_light
```
{% endraw %}
@ -290,7 +295,7 @@ The `event_data` accepts templates.
The following automation example shows how to raise a custom event called `event_light_state_changed` with `entity_id` as the event data. The action part could be inside a script or an automation.
```yaml
- alias: Fire Event
- alias: "Fire Event"
trigger:
- platform: state
entity_id: switch.kitchen
@ -306,7 +311,7 @@ The following automation example shows how to capture the custom event `event_li
{% raw %}
```yaml
- alias: Capture Event
- alias: "Capture Event"
trigger:
- platform: event
event_type: event_light_state_changed
@ -336,14 +341,14 @@ script:
mode: restart
sequence:
- service: light.turn_on
data:
target:
entity_id: "light.{{ light }}"
- repeat:
count: "{{ count|int * 2 - 1 }}"
sequence:
- delay: 2
- service: light.toggle
data:
target:
entity_id: "light.{{ light }}"
flash_hallway_light:
sequence:
@ -367,7 +372,7 @@ script:
do_something:
sequence:
- service: script.get_ready_for_something
- alias: Repeat the sequence AS LONG AS the conditions are true
- alias: "Repeat the sequence AS LONG AS the conditions are true"
repeat:
while:
- condition: state
@ -415,7 +420,7 @@ automation:
state: "off"
mode: single
action:
- alias: Repeat the sequence UNTIL the conditions are true
- alias: "Repeat the sequence UNTIL the conditions are true"
repeat:
sequence:
# Run command that for some reason doesn't always work
@ -486,7 +491,8 @@ automation:
data:
duration: 60
- service: light.turn_on
entity_id: all
target:
entity_id: all
```
```yaml
@ -504,13 +510,15 @@ automation:
value_template: "{{ trigger.to_state.state == 'on' }}"
sequence:
- service: script.turn_on
entity_id:
- script.slowly_turn_on_front_lights
- script.announce_someone_at_door
target:
entity_id:
- script.slowly_turn_on_front_lights
- script.announce_someone_at_door
# ELSE (i.e., motion stopped)
default:
- service: light.turn_off
entity_id: light.front_lights
target:
entity_id: light.front_lights
```
```yaml
@ -535,16 +543,19 @@ automation:
value_template: "{{ now().hour < 18 }}"
sequence:
- service: light.turn_off
entity_id: light.living_room
target:
entity_id: light.living_room
- service: script.sim_day
# ELSE night
default:
- service: light.turn_off
entity_id: light.kitchen
target:
entity_id: light.kitchen
- delay:
minutes: "{{ range(1, 11)|random }}"
- service: light.turn_off
entity_id: all
target:
entity_id: all
```
{% endraw %}
@ -573,7 +584,8 @@ automation:
is_state('binary_sensor.all_clear', 'off') }}
sequence:
- service: script.turn_on
entity_id: script.flash_lights
target:
entity_id: script.flash_lights
- service: script.arrive_home
data:
ok: false

View File

@ -1,12 +0,0 @@
---
title: "benchmark"
description: "Script to perform benchmarking of Home Assistant"
---
For testing the performance of Home Assistant the Benchmark script runs until you exit using Control+C.
Firing and handling of a million events.
```bash
hass --script benchmark async_million_events
```

View File

@ -65,7 +65,7 @@ state: on
If there is an automation that handles that event, it will be automatically triggered. See below:
```yaml
- alias: Capture Event
- alias: "Capture Event"
trigger:
platform: event
event_type: event_light_state_changed

View File

@ -46,7 +46,7 @@ iptables-save > /etc/network/iptables.rules # your rules may be saved elsewhere
### System freezes
On small systems (such as a Pi2), not directly sypported by binaries (Python Wheels) you may run out of memory.
On small systems (such as a Pi2), not directly supported by binaries (Python Wheels) you may run out of memory.
Upon the first run or after an upgrade, Home Assistant uses a lot of resources to (re)compile all the integrations.
If you run out of memory and/or swap memory, your system will freeze.
Increasing swap memory can help:

View File

@ -214,7 +214,7 @@ For Inovelli LZW30-SN and LZW31-SN switches with a third button for configuratio
Once this is complete, `zwave.scene_activated` events will fire according to which button press you perform. For information on what button press corresponds to what scene_id and scene_data in the event, see [Inovelli Knowledge Base > How To: Setting Up Scenes In Home Assistant](https://support.inovelli.com/portal/en/kb/articles/how-to-setting-up-scenes-in-home-assistant).
### Zooz Scene Capable On/Off and Dimmer Wall Switches (Zen21v3 & Zen22v2 - Firmware 3.0+, Zen26 & Zen27 - Firmware 2.0+, Zen30 Double Switch)
### Zooz Scene Capable On/Off and Dimmer Wall Switches (Zen21v3 & Zen22v2 - Firmware 3.0+, Zen26 & Zen27 - Firmware 2.0+, Zen30 Double Switch, Zen34 Remote Switch)
Many Zooz switches that have been sold do not have the latest firmwares. Contact Zooz to obtain the over the air firmware update instructions and new user manual for the switches.
@ -746,7 +746,39 @@ Zen30 (Double Switch):
</Value>
</CommandClass>
```
Zen34 Remote Switch:
```xml
<CommandClass id="112">
<Value type="list" index="1" genre="config" label="LED indicator mode" units="" min="0" max="3" value="1" size="1">
<Help>Choose the LED indicator mode for your Remote Switch</Help>
<Item label="LED always off" value="0" />
<Item label="LED on when button is pressed to indicate scene activation or association command" value="1" />
<Item label="LED always on in color specific under parameter 2" value="2" />
<Item label="LED always on in color specific under parameter 3" value="3" />
</Value>
<Value type="list" index="2" genre="config" label="LED indicator color for upper paddle triggers" units="" min="0" max="6" value="0" size="1">
<Help>Choose the LED indicator color for the upper paddle remote controle triggers</Help>
<Item label="White" value="0" />
<Item label="Blue" value="1" />
<Item label="Green" value="2" />
<Item label="Red" value="3" />
<Item label="Magenta" value="4" />
<Item label="Yellow" value="5" />
<Item label="Cyan" value="6" />
</Value>
<Value type="list" index="3" genre="config" label="LED indicator color for lower paddle triggers" units="" min="0" max="6" value="0" size="1">
<Help>Choose the LED indicator color for the lower paddle remote control triggers</Help>
<Item label="White" value="0" />
<Item label="Blue" value="1" />
<Item label="Green" value="2" />
<Item label="Red" value="3" />
<Item label="Magenta" value="4" />
<Item label="Yellow" value="5" />
<Item label="Cyan" value="6" />
</Value>
</CommandClass>
```
For Zooz switches, you'll need to update (or possibly add) the `COMMAND_CLASS_CENTRAL_SCENE` for each node in your `zwcfg` file with the following:
```xml
@ -791,6 +823,46 @@ Held on|2|7800
Released off|1|7740
Released on|2|7740
The Zooz ZEN34 Remote Switch has shown inverted `scene_id` values compared to other Zooz switches as well as different `scene_data` values depending on production run:
Recent production runs have appeared with:
**Action**|**scene\_id**|**scene\_data**
:-----:|:-----:|:-----:
1x tap on|1|7680
1x tap off|2|7680
2x tap on|1|7860
2x tap off|2|7860
3x tap on|1|7920
3x tap off|2|7920
4x tap on|1|7980
4x tap off|2|7980
5x tap on|1|8040
5x tap off|2|8040
Held on|1|7800
Held off|2|7800
Released on|1|7740
Released off|2|7740
Early production runs have appeared with:
**Action**|**scene\_id**|**scene\_data**
:-----:|:-----:|:-----:
1x tap on|1|0
1x tap off|2|0
2x tap on|1|3
2x tap off|2|3
3x tap on|1|4
3x tap off|2|4
4x tap on|1|5
4x tap off|2|5
5x tap on|1|6
5x tap off|2|6
Held on|1|2
Held off|2|2
Released on|1|1
Released off|2|1
### HomeSeer Switches
For the HomeSeer devices specifically, you may need to update the `COMMAND_CLASS_CENTRAL_SCENE` for each node in your `zwcfg` file with the following:
@ -1081,7 +1153,7 @@ Let's see how this works in an automation for a Scene Master that's assigned as
```yaml
- id: "1234567890"
alias: Double-press Button 2 to toggle all lights
alias: "Double-press Button 2 to toggle all lights"
trigger:
- platform: event
event_type: zwave.scene_activated
@ -1093,7 +1165,8 @@ Let's see how this works in an automation for a Scene Master that's assigned as
action:
- data:
service: light.toggle
entity_id: group.all_lights
target:
entity_id: group.all_lights
```
### RFWDC Cooper 5-button Scene Control Keypad
@ -1130,7 +1203,7 @@ Here is an example configuration needed for the scene controller:
```yaml
automation:
- alias: Sync the indicator value on button events
- alias: "Sync the indicator value on button events"
trigger:
- platform: event
event_type: zwave.scene_activated
@ -1320,7 +1393,7 @@ Button four release|4|7740
Example Event:
```yaml
- alias: MatrixButton2
- alias: "MatrixButton2"
trigger:
- event_type: zwave.scene_activated
platform: event
@ -1330,7 +1403,8 @@ Example Event:
scene_data: 7680
action:
- service: switch.toggle
entity_id: switch.office_fan
target:
entity_id: switch.office_fan
```
### Zooz S2 MultiRelay (Zen16)
@ -1522,7 +1596,7 @@ Button two triple tap|2|4
Example Event:
```yaml
- alias: JascoButton1
- alias: "JascoButton1"
trigger:
- event_type: zwave.scene_activated
platform: event
@ -1532,7 +1606,8 @@ Example Event:
scene_data: 0
action:
- service: switch.toggle
entity_id: switch.office_fan
target:
entity_id: switch.office_fan
```
### EATON On/Off & Dimmer (RF9501/RF9540-N/RF9640-N/RF9601-N)

View File

@ -8,7 +8,7 @@ description: "Events generated by the Z-Wave component."
Home Assistant will trigger an event when the Z-Wave network is complete, meaning all of the nodes on the network have been queried. This can take quite some time, depending on wakeup intervals on the battery-powered devices on the network.
```yaml
- alias: Z-Wave network is complete
- alias: "Z-Wave network is complete"
trigger:
platform: event
event_type: zwave.network_complete
@ -19,7 +19,7 @@ Home Assistant will trigger an event when the Z-Wave network is complete, meanin
Home Assistant will trigger an event when the Z-Wave network is complete, but some nodes are marked dead, meaning all of the nodes on the network have been queried. This can take quite some time, depending on wakeup intervals on the battery-powered devices on the network.
```yaml
- alias: Z-Wave network is complete some dead
- alias: "Z-Wave network is complete some dead"
trigger:
platform: event
event_type: zwave.network_complete_some_dead
@ -30,7 +30,7 @@ Home Assistant will trigger an event when the Z-Wave network is complete, but so
Home Assistant will trigger an event when the Z-Wave network is ready for use. Between `zwave.network_start` and `zwave.network_ready` Home Assistant will feel sluggish when trying to send commands to Z-Wave nodes. This is because the controller is requesting information from all of the nodes on the network. When this is triggered, all awake nodes have been queried and sleeping nodes will be queried when they awake.
```yaml
- alias: Z-Wave network is ready
- alias: "Z-Wave network is ready"
trigger:
platform: event
event_type: zwave.network_ready
@ -41,7 +41,7 @@ Home Assistant will trigger an event when the Z-Wave network is ready for use. B
Home Assistant will trigger an event when the Z-Wave network is set up to be started.
```yaml
- alias: Z-Wave network is starting
- alias: "Z-Wave network is starting"
trigger:
platform: event
event_type: zwave.network_start
@ -52,7 +52,7 @@ Home Assistant will trigger an event when the Z-Wave network is set up to be sta
Home Assistant will trigger an event when the Z-Wave network is stopping.
```yaml
- alias: Z-Wave network is stopping
- alias: "Z-Wave network is stopping"
trigger:
platform: event
event_type: zwave.network_stop
@ -64,7 +64,7 @@ Home Assistant will trigger an event when command_class_basic changes value on a
Example:
```yaml
- alias: Minimote Button Pressed
- alias: "Minimote Button Pressed"
trigger:
platform: event
event_type: zwave.node_event
@ -82,7 +82,7 @@ Some devices can also trigger scene activation events, which can be used in auto
```yaml
# Example configuration.yaml automation entry
automation:
- alias: Turn on Desk light
- alias: "Turn on Desk light"
trigger:
platform: event
event_type: zwave.scene_activated

13
source/_faq/404.markdown Normal file
View File

@ -0,0 +1,13 @@
---
title: "404 Client Error: Not Found ('no such image: homeassistant/...)"
ha_category: Home Assistant
---
This error indicates the image, whether for updating to Home Assistant or installing or updating an add-on, was not able to be pulled to your system. This is usually a situation where there is not enough space for the image to be downloaded. The first thing to check for is the available space on your system.
Please note, if you are running the operating system as a virtual machine; the default VM image is only about 6GB. Many VM users run into this as they have not allocated enough storage. 32GB is the minimum recommended size.
You will need to explore your own system to determine where space has gone.
Using `df -h` in the SSH add-on console to you can quickly check to see if you have space available.
If there is plenty of space available then you might check to see if you are having network issues that are preventing images from being downloaded.

View File

@ -0,0 +1,8 @@
---
title: "Why does the start button for an add-on flash red when I click it?"
ha_category: Home Assistant
---
If you are looking for more information about add-ons, which won't start or install, navigate to Supervisor > System in the UI and check the logs.
The logs on this page are the same you would see using `ha logs` in the custom CLI.

View File

@ -0,0 +1,6 @@
---
title: "Is the Raspberry Pi 4 with 8GB RAM supported?"
ha_category: Home Assistant
---
The Raspberry Pi 4 with 8GB RAM is supported with Home Assistant OS 5.5 and later using the 32-bit and 64-bit image. The 64-bit is the better tested option at this point.

View File

@ -0,0 +1,9 @@
---
title: "I'm trying to find my files on the host or SD card. Where are they?"
ha_category: Home Assistant
---
On a Home Assistant OS install, your files are on the data partition within `/mnt/data/supervisor/`.
On the SD itself, this is an EXT4 partition labeled `hassos-data`.
On a Supervised install, they are in `/usr/share/hassio/`.

View File

@ -36,4 +36,4 @@ Typically, you'll see this when you create entities manually using YAML, but it
If your user profile has the "Advanced Mode" activated, you will also see the second paragraph in the popup with a link to the [customization user interface](/docs/configuration/customizing-devices/#customization-using-the-ui) for this specific entity, which offers some customization options.
In case you want to read more about unique IDs, head over to this [developer documentation page](/docs/entity_registry_index/).
In case you want to read more about unique IDs, head over to this [developer documentation page](https://developers.home-assistant.io/docs/entity_registry_index/).

View File

@ -0,0 +1,8 @@
---
title: "Is USB Boot for the Raspberry Pi 4 supported?"
ha_category: Home Assistant
---
Due to the complexity of USB and the USB mass storage device class booting from a USB device is brittle. Since booting from a USB drive this process has to be done multiple times (firmware/boot loader and the operating system), there is a high chance that this process doesn't complete in one of these stages. In general, the Linux USB stack is solid. Due to this, it is recommended to boot Home Assistant OS from an SD card and use a USB attached flash drive as data partition only. The `datactl` command, available on the OS shell, allows moving of the data partition.
That said, booting Home Assistant OS completely from a USB drive (SSD or any other USB mass storage device) works with *some* USB devices. USB Devices that are known to work with Raspberry Pi OS (check the Raspberry Pi Forum) are more likely to work with Home Assistant OS. However, because Home Assistant OS has also U-Boot in the boot chain, there are devices which are known to work with Raspberry Pi OS but do *not* work with Home Assistant OS.

View File

@ -0,0 +1,6 @@
---
title: "Do I need to leave the USB stick connected for Wi-Fi?"
ha_category: Home Assistant
---
No. The USB "CONFIG" stick is only used to import a network profile to `/etc/NetworkManager/system-connections/` and can be removed.

View File

@ -0,0 +1,11 @@
<section class="aside-module grid__item one-whole lap-one-half">
<div class='section'>
<h1 class="title delta">Common Tasks</h1>
<ul class='divided sidebar-menu'>
<li>{% active_link /common-tasks/os/ Home Assistant Operating System %}</li>
<li>{% active_link /common-tasks/container/ Home Assistant Container %}</li>
<li>{% active_link /common-tasks/core/ Home Assistant Core %}</li>
<li>{% active_link /common-tasks/supervised/ Home Assistant Supervised %}</li>
</ul>
</div>
</section>

View File

@ -67,11 +67,6 @@
</div>
{%- endif -%}
{%- unless page.no_toc -%}
<div class='section'>
<h1 class="title delta">On this page</h1>
{% toc %}
{%- endunless -%}
</section>
<script src="https://alerts.home-assistant.io/ce-alert-link.js"></script>

View File

@ -8,12 +8,12 @@
<b>{% active_link /docs/glossary/ Glossary %}</b>
</li>
<li>
<b>{% active_link /docs/installation/ Installation %}</b>
<b>{% active_link /getting-started Getting Started %}</b>
<ul>
<li>{% active_link /hassio/ Home Assistant %}</li>
<li>{% active_link /docs/installation/updating/ Updating %}</li>
<li>{% active_link /installation Installation %}</li>
<li>{% active_link /common-tasks/os/ Common Tasks %}</li>
<li>
{% active_link /docs/installation/troubleshooting/ Troubleshooting
{% active_link /docs/troubleshooting/ Troubleshooting
%}
</li>
</ul>
@ -145,7 +145,6 @@
<li>{% active_link /docs/tools/dev-tools/ Developer Tools %}</li>
<li>{% active_link /docs/tools/quick-bar/ Quick Bar %}</li>
<li>{% active_link /docs/tools/hass/ hass %}</li>
<li>{% active_link /docs/tools/benchmark/ benchmark %}</li>
<li>{% active_link /docs/tools/check_config/ check_config %}</li>
<li>{% active_link /docs/tools/credstash/ credstash %}</li>
<li>{% active_link /docs/tools/keyring/ keyring %}</li>

View File

@ -2,7 +2,7 @@
<div class="section">
<h1 class="title delta">Getting Started</h1>
<ul class="divided sidebar-menu">
<li>{% active_link /getting-started/ Installation %}</li>
<li>{% active_link /installation/ Installation %}</li>
<li>{% active_link /getting-started/onboarding/ Onboarding %}</li>
<li>{% active_link /getting-started/automation/ Automation %}</li>
<li>

View File

@ -0,0 +1,6 @@
<section class="aside-module grid__item one-whole lap-one-half">
<div class="section">
<h1 class="title delta">Installation</h1>
{{ content | toc_only }}
</div>
</section>

View File

@ -0,0 +1 @@
<svg viewBox="0 0 24 24"><path d="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z" /></svg>

After

Width:  |  Height:  |  Size: 103 B

View File

@ -0,0 +1,71 @@
## Run a beta version
If you would like to test next release before anyone else, you can install the beta version.
{% if page.installation == "os" or page.installation == "supervised" %}
{% tabbed_block %}
- title: From the UI
content: |
1. In your Home Assistant UI navigate to the Supervisor panel
2. Navigate to the System tab
3. Click the link that says "Join beta"
4. Navigate to the Dashboard tab
5. Install the update that is presented to you
- title: From the CLI
content: |
1. Join the beta channel
```bash
ha supervisor options --channel beta
```
2. Reload the supervisor
```bash
ha supervisor reload
```
3. Update Home Assistant core to the latest beta version
```bash
ha core update
```
{% endtabbed_block %}
{% elsif page.installation == "container" %}
```bash
ha os update --version {{current_version}}
```
{% elsif page.installation == "core" %}
1. Switch to the user that is running Home Assistant
```bash
sudo -u homeassistant -H -s
```
2. Activate the virtual environment that Home Assistant is running in
```bash
source /srv/homeassistant/bin/activate
```
3. Download and install the beta version
```bash
pip3 install --pre --upgrade homeassistant
```
4. When that is complete restart the service for it to use the new files.
{% endif %}

View File

@ -1,7 +1,4 @@
---
title: "Home Assistant via the command line"
description: "Command line utility to control Home Assistant."
---
## Home Assistant via the command line
<p class='img'>
<img src='/images/hassio/screenshots/ssh-upgrade.png'>
@ -10,7 +7,7 @@ Home Assistant upgrade process from the SSH command line
On the SSH command line, you can use the `ha` command to retrieve logs, check the details of connected hardware, and more.
## Home Assistant
### Home Assistant
```bash
ha core check
@ -25,7 +22,7 @@ ha core stop
ha core update
```
## Supervisor
### Supervisor
```bash
ha supervisor info
@ -34,7 +31,7 @@ ha supervisor reload
ha supervisor update
```
## Host
### Host
```bash
ha host reboot
@ -42,20 +39,22 @@ ha host shutdown
ha host update
```
## Hardware
### Hardware
```bash
ha hardware info
ha hardware audio
```
## Usage examples
### Usage examples
To update Home Assistant to a specific version, use the command:
```bash
ha core update --version=x.y.z
ha core update --version x.y.z
```
Replace x.y.z with the desired version like `--version=0.74.2`
Replace x.y.z with the desired version like `--version {{current_version}}`
You can get a better description of the CLI capabilities by typing `ha help`:
@ -91,6 +90,9 @@ Flags:
Use "ha [command] --help" for more information about a command.
```
## Console access
{% if page.installation == "os" %}
### Console access
You can also access the Home Assistant Operating System via a directly connected keyboard and monitor, the console. To log in to the physical console the username is `root`, with no password.
{% endif %}

View File

@ -0,0 +1,39 @@
## Configuration check
{% if page.installation == "os" or page.installation == "supervised" %}
```bash
ha core check
```
{% elsif page.installation == "container" %}
```bash
docker exec homeassistant python -m homeassistant --script check_config --config /config
```
_If your container name is something other than `homeassistant`, change that part._
{% elsif page.installation == "core" %}
1. Switch to the user that is running Home Assistant
```bash
sudo -u homeassistant -H -s
```
2. Activate the virtual environment that Home Assistant is running in
```bash
source /srv/homeassistant/bin/activate
```
3. Run the configuration check
```bash
hass --script check_config
```
4. When that is complete restart the service for it to use the new files.
{% endif %}

View File

@ -0,0 +1,59 @@
## Run a development version
If you want to stay on the bleeding-edge Home Assistant Core development branch, you can upgrade to `dev`.
<div class='note warning'>
The `dev` branch is likely to be unstable. Potential consequences include loss of data and instance corruption.
</div>
{% if page.installation == "os" or page.installation == "supervised" %}
1. Join the dev channel
```bash
ha supervisor options --channel dev
```
2. Reload the supervisor
```bash
ha supervisor reload
```
3. Update Home Assistant core to the latest dev version
```bash
ha core update
```
{% elsif page.installation == "container" %}
```bash
ha os update --version {{current_version}}
```
{% elsif page.installation == "core" %}
1. Switch to the user that is running Home Assistant
```bash
sudo -u homeassistant -H -s
```
2. Activate the virtual environment that Home Assistant is running in
```bash
source /srv/homeassistant/bin/activate
```
3. Download and install the version you want
```bash
pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev
```
4. When that is complete restart the service for it to use the new files.
{% endif %}

View File

@ -1,18 +1,15 @@
---
title: "Enable I2C on the Home Assistant Operating System"
description: "Instructions on how to enable I2C on a Raspberry Pi"
---
## Enable I2C
Home Assistant using the Home Assistant Operating System is a managed environment, which means you can't use existing methods to enable the I2C bus on a Raspberry Pi.
## Step by step instructions
### Step by step instructions
You will need:
- SD card reader
- SD card with Home Assistant Operating System flashed on it
### Step 1 - Access the Home Assistant Operating System boot partition
#### Step 1 - Access the Home Assistant Operating System boot partition
Shutdown/turn-off your Home Assistant installation and unplug the SD card.
Plug the SD card into an SD card reader and find a drive/file system named
@ -20,7 +17,7 @@ Plug the SD card into an SD card reader and find a drive/file system named
use your operating systems disk management utility to find the SD card reader
and make sure the first partition is available.
### Step 2 - Add files to enable I2C
#### Step 2 - Add files to enable I2C
- In the root of the `hassos-boot` partition, add a new folder called `CONFIG`.
- In the `CONFIG` folder, add another new folder called `modules`.
@ -35,7 +32,7 @@ and make sure the first partition is available.
dtparam=i2c_arm=on
```
### Step 3 - Start with the new configuration
#### Step 3 - Start with the new configuration
- Insert the SD card back into your Raspberry Pi.
- On startup, the `hassos-config.service` will automatically pickup the new
@ -45,7 +42,7 @@ and make sure the first partition is available.
The I2C devices should now be present under /dev.
## From Home Assistant Operating System Terminal
### From Home Assistant Operating System Terminal
Alternatively, by attaching a keyboard and screen to your device, you can access the physical terminal to the Home Assistant Operating System.

View File

@ -1,10 +1,3 @@
---
title: "Home Assistant OS Common Tasks"
description: "Guides for common tasks when using Home Assistant OS"
---
This section will provide guides to some common tasks and information which you will need in order to run, maintain, and edit your Home Assistant OS system. For further details on any particular subject, make sure to refer to the documentation for specific add-ons or topics listed here.
## Configuring access to files
Your Home Assistant Operating server includes two repositories by default: The official core add-on repository, and the community add-on repository. All of the add-ons mentioned here can be installed by navigating to the add-on store using Supervisor > Add-on Store in the UI.
@ -20,8 +13,6 @@ Using any of the add-ons listed below,the following directories are made availab
- `share`
- `ssl`
---
### Installing and using the Samba add-on
@ -67,74 +58,3 @@ There is no configuration required for editing files within your `/config` direc
A more basic and light weight alternative to Visual Studio Code, the File Editor add-on provides access through Hass-Configurator, which is a web-based filesystem-browser and text-editor. YAML files are automatically checked for syntax errors while editing. This add-on can be installed via the add-on store from the official add-on repository.
There is no configuration required for editing files within your `/config` directory. In order to enable access to further directories, editing the add-on configuration is required. See the add-on documentation for details.
---
## Home Assistant OS Snapshots
Snapshots are a backup of your Home Assistant and add-on data and configuration. They are stored in a compressed archive file (.tar). Snapshots are made from the Supervisor Snapshot panel. There is also a service available which allows you to trigger the creation of a snapshot from an automation. Backups are stored in the /backup directory.
A full snapshot includes the following directories:
* `config`
* `share`
* `addons` (only manually installed or created add-ons, not those installed from the store)
* `ssl`
* `media`
A partial snapshot consists of any number of the above default directories and installed add-ons.
### Making a Snapshot from the UI
1. Go to Supervisor > Snapshots in the UI
2. Provide a name for the snapshot.
3. Choose full or partial.
4. Choose to password protect or not. Password protected snapshots cannot easily be browsed outside of Home Assistant OS
5. Click "Create" to begin the snapshot.
### Restoring a Snapshot on a new install
You can make use of snapshots which you have copied off of a previous install to restore to a new installation during the onboarding process. Follow the link at the bottom of the account creation page to upload your snapshot from the previous installation.
For restoring a snapshot at any other time, vist the Supervisor Snapshot panel in your UI and use the following steps:
1. Select "Upload Snapshot" from the icon in the upper right of the page.
2. Click on the folder icon to navigate to your snapshot .tar file and select it.
When the upload is completed, you will be presented with the snapshot restore dialog for restoring it, and can then choose to restore in full or in part by manually selecting individual items.
If the snapshot you are uploading is more than 1GB in size, it can be faster and more efficient to make use of the Samba add-on in order to transfer files to the `/backup` directory.
The length of time it takes to create or restore snapshots will depend on how much you have to compress or decompress.
If you're looking to slim down your snapshots, check if your configuration directory contains a large database file (`home-assistant_v2.db`). See the [`recorder`](https://www.home-assistant.io/components/recorder/) integration page for options to keep your database data down to a size that won't cause issues. Note the keep days, purge interval, and include/exclude options.
When the restore is complete, Home Assistant will restart to apply the new settings. You will lose the connection to the UI and it will return once the restart is completed.
### Creating snapshots using the Home Assistant Command Line Interface
1. `ha sn list` - lists snapshots and their slugnames
2. `ha sn restore slugname` - restores a specific snapshot
3. `ha sn new --name nameofsnapshot` - create a snapshot
Use `ha help` to see more info.
### Copying your snapshots to another location
You often need a snapshot in case your system has crashed. If you only store them on the crashed device, you won't be able to access it easily. We recommend that you manually copy them from `/backup` to another machine on occasion. Or even better, create an automation to handle that, or make use of one of the following add-ons:
- [Google Drive Backup](https://github.com/sabeechen/hassio-google-drive-backup)
- [Dropbox Sync](https://github.com/danielwelch/hassio-dropbox-sync)
- [Nextcloud Backup](https://github.com/Sebclem/hassio-nextcloud-backup)
- [Samba backup](https://github.com/thomasmauerer/hassio-addons/tree/master/samba-backup)
- [Remote Backup (uses scp)](https://github.com/overkill32/hassio-remote-backup)
### Lost Password and password reset
Please refer to the [I'm locked out!](https://www.home-assistant.io/docs/locked_out/#home-assistant-including-supervised) documentation page.

View File

@ -1,13 +1,10 @@
---
title: "Flashing an ODROID-N2+"
description: "Using Petitboot and OTG-USB to flash the eMMC on your Odroid N2"
---
## Flashing an ODROID-N2+
Home Assistant can be flashed to an ODROID-N2+ by connecting the device directly to your computer via the USB-OTG connection on the front of the board. The device contains the Petitboot bootloader, which allows the ODROID-N2+ storage to show up as it were a USB drive.
_All these instructions work the same for the ODROID-N2 (non-plus version)._
## What you will need
#### What you will need
To flash your eMMC using Petitboot and OTG-USB, you will need the following items:
@ -15,7 +12,7 @@ To flash your eMMC using Petitboot and OTG-USB, you will need the following item
- USB keyboard
- USB 2.0 to micro-USB cable
### Enabling SPI boot mode
#### Enabling SPI boot mode
Remove the case of your ODROID-N2+
@ -27,7 +24,7 @@ Next, locate the toggle for boot mode and switch it from MMC to SPI.
Connect a USB keyboard and HDMI connected monitor to your ODROID-N2+, and then connect power.
### Enabling USB drive mode
#### Enabling USB drive mode
The ODROID-N2+ will now boot into a terminal. Select `Exit to shell` from the menu.
@ -46,7 +43,7 @@ This will configure the ODROID-N2+ and OTG to act as a memory card reader.
ums /dev/mmcblk0
```
### Flashing Home Assistant
#### Flashing Home Assistant
Connect the ODROID-N2+ to your PC via the micro-USB port at the front of the ODROID-N2+. When the ODROID-N2 is recognized as a USB connected storage device, you can flash the eMMC with [Etcher](https://www.balena.io/etcher/) using the latest stable version of Home Assistant OS for the [ODROID-N2+](https://github.com/home-assistant/operating-system/releases/latest) (hassos_odroid-n2-XXXX.img.gz).

View File

@ -0,0 +1,3 @@
## Lost Password and password reset
Please refer to the [I'm locked out!](https://www.home-assistant.io/docs/locked_out/#home-assistant-including-supervised) documentation page.

View File

@ -0,0 +1,63 @@
## Snapshots
Snapshots are a backup of your Home Assistant and add-on data and configuration. They are stored in a compressed archive file (.tar). Snapshots are made from the Supervisor Snapshot panel. There is also a service available which allows you to trigger the creation of a snapshot from an automation. Backups are stored in the /backup directory.
A full snapshot includes the following directories:
* `config`
* `share`
* `addons` (only manually installed or created add-ons, not those installed from the store)
* `ssl`
* `media`
A partial snapshot consists of any number of the above default directories and installed add-ons.
### Making a Snapshot from the UI
1. Go to Supervisor > Snapshots in the UI
2. Provide a name for the snapshot.
3. Choose full or partial.
4. Choose to password protect or not. Password protected snapshots cannot easily be browsed outside of Home Assistant OS
5. Click "Create" to begin the snapshot.
### Restoring a Snapshot on a new install
You can make use of snapshots which you have copied off of a previous install to restore to a new installation during the onboarding process. Follow the link at the bottom of the account creation page to upload your snapshot from the previous installation.
For restoring a snapshot at any other time, vist the Supervisor Snapshot panel in your UI and use the following steps:
1. Select "Upload Snapshot" from the icon in the upper right of the page.
2. Click on the folder icon to navigate to your snapshot .tar file and select it.
When the upload is completed, you will be presented with the snapshot restore dialog for restoring it, and can then choose to restore in full or in part by manually selecting individual items.
If the snapshot you are uploading is more than 1GB in size, it can be faster and more efficient to make use of the Samba add-on in order to transfer files to the `/backup` directory.
The length of time it takes to create or restore snapshots will depend on how much you have to compress or decompress.
If you're looking to slim down your snapshots, check if your configuration directory contains a large database file (`home-assistant_v2.db`). See the [`recorder`](https://www.home-assistant.io/components/recorder/) integration page for options to keep your database data down to a size that won't cause issues. Note the keep days, purge interval, and include/exclude options.
When the restore is complete, Home Assistant will restart to apply the new settings. You will lose the connection to the UI and it will return once the restart is completed.
### Creating snapshots using the Home Assistant Command Line Interface
1. `ha snapshot list` - lists snapshots and their slugnames
2. `ha snapshot restore slugname` - restores a specific snapshot
3. `ha snapshot new --name nameofsnapshot` - create a snapshot
Use `ha help` to see more info.
### Copying your snapshots to another location
You often need a snapshot in case your system has crashed. If you only store them on the crashed device, you won't be able to access it easily. We recommend that you manually copy them from `/backup` to another machine on occasion. Or even better, create an automation to handle that, or make use of one of the following add-ons:
- [Google Drive Backup](https://github.com/sabeechen/hassio-google-drive-backup)
- [Dropbox Sync](https://github.com/danielwelch/hassio-dropbox-sync)
- [Nextcloud Backup](https://github.com/Sebclem/hassio-nextcloud-backup)
- [Samba backup](https://github.com/thomasmauerer/hassio-addons/tree/master/samba-backup)
- [Remote Backup (uses scp)](https://github.com/overkill32/hassio-remote-backup)

View File

@ -0,0 +1,41 @@
## Run a specific version
{% assign current_version = site.current_major_version | append: "." | append: site.current_minor_version | append: "." | append: site.current_patch_version %}
In the event that a Home Assistant Core version doesn't play well with your hardware setup, you can downgrade to a previous release. In this example `{{current_version}}` is used as the target version but you can choose the version you desire to run.
{% if page.installation == "os" or page.installation == "supervised" %}
```bash
ha core update --version {{current_version}}
```
{% elsif page.installation == "container" %}
```bash
ha os update --version {{current_version}}
```
{% elsif page.installation == "core" %}
1. Switch to the user that is running Home Assistant
```bash
sudo -u homeassistant -H -s
```
2. Activate the virtual environment that Home Assistant is running in
```bash
source /srv/homeassistant/bin/activate
```
3. Download and install the version you want
```bash
pip3 install homeassistant=={{current_version}}
```
4. When that is complete restart the service for it to use the new files.
{% endif %}

View File

@ -1,7 +1,4 @@
---
title: "Installing third-party add-ons"
description: "Instructions on how to get started using third-party add-ons."
---
## Installing third-party add-ons
Home Assistant allows anyone to create add-on repositories to share their add-ons easily. To try this locally, you can use our example add-on repository at

View File

@ -0,0 +1,90 @@
## Update
Best practice for updating a Home Assistant installation:
1. Backup your installation, using the snapshot functionality Home Assistant offers.
1. Check the release notes for breaking changes on [Home Assistant release notes](https://github.com/home-assistant/home-assistant/releases). Be sure to check all release notes between the version you are running and the one you are upgrading to. Use the search function in your browser (`CTRL + f` / `CMD + f`) and search for **Breaking Changes**.
{% if page.installation == "os" or page.installation == "supervised" %}
1. Check your configuration using the [Check Home Assistant configuration](/addons/check_config/) add-on.
1. If the check passes, you can safely update. If not, update your configuration accordingly.
1. Update Home Assistant.
{% endif %}
{% if page.installation == "os" or page.installation == "supervised" %}
To update Home Assistant Core when you run Home Assistant {{ page.installation_name }} you have 2 options.
{% tabbed_block %}
- title: Using the UI
content: |
1. Open your Home Assistant UI
2. Navigate to the Supervisor panel
3. On the Dashboard tab you will be presented with an update notification
_If you do not see that notification you can navigate to the System tab. and click the "Reload Supervisor" button._
- title: Using the CLI
content: |
```bash
ha core update
```
{% endtabbed_block %}
{% elsif page.installation == "container" %}
{% tabbed_block %}
- title: Docker CLI
content: |
**First start with pulling the new container.**
```bash
docker pull homeassistant/home-assistant:stable
```
You can also use spesific containers for your hardware. Like Raspberry pi 4:
```bash
docker pull homeassistant/raspberrypi4-homeassistant:stable
```
**[You need to recreate the container with the new image.](/getting-started)**
- title: Docker Compose
content: |
```bash
docker-compose pull homeassistant
docker-compose up -d
```
{% endtabbed_block %}
{% elsif page.installation == "core" %}
1. Switch to the user that is running Home Assistant
```bash
sudo -u homeassistant -H -s
```
2. Activate the virtual environment that Home Assistant is running in
```bash
source /srv/homeassistant/bin/activate
```
3. Download and install the new version
```bash
pip3 install --upgrade homeassistant
```
4. When that is complete restart the service for it to use the new files.
{% endif %}

View File

@ -0,0 +1,7 @@
<a href="{{ include.link }}" class="link-card next-step">
<div class="material-card text">
<p>{{ include.step }}</p>
{% include assets/chevron_right.html %}
</div>
</a>

View File

@ -0,0 +1,141 @@
## Install Home Assistant Container
{% if page.installation_type != 'alternative' %}
These below instructions are for an installation of Home Assistant Container running in your own container environment, which you manage yourself. Any [OCI](https://opencontainers.org/) compatible runtime can be used, however this guide will focus on installing it with Docker.
<div class='note'>
<b>Prerequisites</b>
This guide assumes that you already have an operating system setup and a container runtime installed (like Docker).
</div>
### Platform Installation
Installation with Docker is straightforward. Adjust the following command so that `/PATH_TO_YOUR_CONFIG` points at the folder where you want to store your configuration and run it.
{% endif %}
{% if page.installation_type == 'raspberrypi' %}
#### Raspberry pi 3
{% include installation/container/cli.md image="homeassistant/raspberrypi3-homeassistant:stable" %}
#### Raspberry pi 4
{% include installation/container/cli.md image="homeassistant/raspberrypi4-homeassistant:stable" %}
{% elsif page.installation_type == 'alternative' %}
{% include installation/container/alternative.md %}
{% else %}
{% include installation/container/cli.md image="homeassistant/home-assistant:stable" %}
{% endif %}
Once the Home Assistant Container is running Home Assistant should be accessible using `http://<host>:8123` (replace <host> with the hostname or IP of the system). You can continue with onboarding.
{% include getting-started/next_step.html step="Onboarding" link="/getting-started/onboarding/" %}
### Restart Home Assistant
If you change the configuration you have to restart the server. To do that you have 3 options.
1. In your Home Assistant UI go to the **Configuration** panel -> **Server management** and click the "Restart" button.
2. You can go to the **Developer Tools** -> **Services**, select the service `homeassistant.restart` and click "Call Service".
3. Restart it from a terminal.
{% tabbed_block %}
- title: Docker CLI
content: |
```bash
docker restart homeassistant
```
- title: Docker Compose
content: |
```bash
docker-compose restart
```
{% endtabbed_block %}
### Docker Compose
As the Docker command becomes more complex, switching to `docker-compose` can be preferable and support automatically restarting on failure or system restart. Create a `docker-compose.yml` file:
{% if page.installation_type == 'raspberrypi' %}
#### Raspberry pi 3
{% include installation/container/compose.md image="homeassistant/raspberrypi3-homeassistant:stable" %}
#### Raspberry pi 4
{% include installation/container/compose.md image="homeassistant/raspberrypi4-homeassistant:stable" %}
{% else %}
{% include installation/container/compose.md image="homeassistant/home-assistant:stable" %}
{% endif %}
Start it by running:
```bash
docker-compose up -d
```
### Exposing Devices
In order to use Z-Wave, Zigbee or other integrations that require access to devices, you need to map the appropriate device into the container. Ensure the user that is running the container has the correct privileges to access the `/dev/tty*` file, then add the device mapping to your container instructions:
{% tabbed_block %}
- title: Docker CLI
content: |
```bash
docker run ... --device /dev/ttyUSB0:/dev/ttyUSB0 ...
```
- title: Docker Compose
content: |
```yaml
version: '3'
services:
homeassistant:
...
devices:
- /dev/ttyUSB0:/dev/ttyUSB0
```
{% endtabbed_block %}
### Optimizations
The Home Assistant Container is using an alternative memory allocation library [jemalloc](http://jemalloc.net/) for better memory management and Python runtime speedup.
As jemalloc can cause issues on certain hardware, it can be disabled by passing the environment variable `DISABLE_JEMALLOC` with any value, for example:
{% tabbed_block %}
- title: Docker CLI
content: |
```bash
docker run ... -e "DISABLE_JEMALLOC=true" ...
```
- title: Docker Compose
content: |
```yaml
version: '3'
services:
homeassistant:
...
environment:
DISABLE_JEMALLOC: true
```
{% endtabbed_block %}
The error message `<jemalloc>: Unsupported system page size` is one known indicator.

View File

@ -0,0 +1,139 @@
### Synology NAS
As Synology within DSM now supports Docker (with a neat UI), you can simply install Home Assistant using Docker without the need for command-line. For details about the package (including compatibility-information, if your NAS is supported), see <https://www.synology.com/en-us/dsm/packages/Docker>
The steps would be:
- Install "Docker" package on your Synology NAS
- Launch Docker-app and move to "Registry"-section
- Find "homeassistant/home-assistant" within registry and click on "Download". Choose the "stable" tag.
- Wait for some time until your NAS has pulled the image
- Move to the "Image"-section of the Docker-app
- Click on "Launch"
- Choose a container-name you want (e.g., "homeassistant")
- Click on "Advanced Settings"
- Set "Enable auto-restart" if you like
- Within "Volume" click on "Add Folder" and choose either an existing folder or add a new folder. The "mount path" has to be "/config", so that Home Assistant will use it for the configs and logs. It is therefore recommended that the folder you choose should be named "config" or "homeassistant/config" to avoid confusion when referencing it within service calls.
- Within "Network" select "Use same network as Docker Host"
- To ensure that Home Assistant displays the correct timezone go to the "Environment" tab and click the plus sign then add `variable` = `TZ` & `value` = `Europe/London` choosing [your correct timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
- Confirm the "Advanced Settings"
- Click on "Next" and then "Apply"
- Your Home Assistant within Docker should now run and will serve the web interface from port 8123 on your Docker host (this will be your Synology NAS IP address - for example `http://192.168.1.10:8123`)
If you are using the built-in firewall, you must also add the port 8123 to allowed list. This can be found in "Control Panel -> Security" and then the Firewall tab. Click "Edit Rules" besides the Firewall Profile dropdown box. Create a new rule and select "Custom" for Ports and add 8123. Edit Source IP if you like or leave it at default "All". Action should stay at "Allow".
To use a Z-Wave USB stick for Z-Wave control, the HA Docker container needs extra configuration to access to the USB stick. While there are multiple ways to do this, the least privileged way of granting access can only be performed via the Terminal, at the time of writing. See this page for configuring Terminal acces to your Synology NAS:
<https://www.synology.com/en-global/knowledgebase/DSM/help/DSM/AdminCenter/system_terminal>
<div class='note'>
[See this page for accessing the Terminal via SSH](https://www.synology.com/en-global/knowledgebase/DSM/tutorial/General_Setup/How_to_login_to_DSM_with_root_permission_via_SSH_Telnet)
</div>
Adjust the following Terminal command as follows :
- Replace `/PATH_TO_YOUR_CONFIG` points at the folder where you want to store your configuration
- Replace `/PATH_TO_YOUR_USB_STICK` matches the path for your USB stick (e.g., `/dev/ttyACM0` for most Synology users)
- Replace "Australia/Melbourne" with [your timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
Run it in Terminal.
```bash
sudo docker run --restart always -d --name homeassistant -v /PATH_TO_YOUR_CONFIG:/config --device=/PATH_TO_YOUR_USB_STICK -e TZ=Australia/Melbourne --net=host homeassistant/home-assistant:stable
```
Complete the remainder of the Z-Wave configuration by [following the instructions here.](/docs/z-wave/installation)
Remark: to update your Home Assistant on your Docker within Synology NAS, you just have to do the following:
- Go to the Docker-app and move to "Registry"-section
- Find "homeassistant/home-assistant" within registry and click on "Download". Choose the "stable" tag.
- Wait until the system-message/-notification comes up, that the download is finished (there is no progress bar)
- Move to "Container"-section
- Stop your container if it's running
- Right-click on it and select "Action"->"Clear". You won't lose any data, as all files are stored in your configuration-directory
- Start the container again - it will then boot up with the new Home Assistant image
Remark: to restart your Home Assistant within Synology NAS, you just have to do the following:
- Go to the Docker-app and move to "Container"-section
- Right-click on it and select "Action"->"Restart".
<div class='note'>
If you want to use a USB Bluetooth adapter or Z-Wave USB Stick with Home Assistant on Synology Docker these instructions do not correctly configure the container to access the USB devices. To configure these devices on your Synology Docker Home Assistant you can follow the instructions provided [here](https://philhawthorne.com/installing-home-assistant-io-on-a-synology-diskstation-nas/) by Phil Hawthorne.
</div>
### QNAP NAS
As QNAP within QTS now supports Docker (with a neat UI), you can simply install Home Assistant using Docker without the need for command-line. For details about the package (including compatibility-information, if your NAS is supported), see <https://www.qnap.com/solution/container_station/en/index.php>
The steps would be:
- Install "Container Station" package on your Qnap NAS
- Launch Container Station and move to "Create Container"-section
- Search image "homeassistant/home-assistant" with Docker Hub and click on "Install"
Make attention to CPU architecture of your NAS. For ARM CPU types the correct image is "homeassistant/armhf-homeassistant"
- Choose "stable" version and click next
- Choose a container-name you want (e.g., "homeassistant")
- Click on "Advanced Settings"
- Within "Shared Folders" click on "Volume from host" > "Add" and choose either an existing folder or add a new folder. The "mount point has to be `/config`, so that Home Assistant will use it for the configuration and logs.
- Within "Network" and select Network Mode to "Host"
- To ensure that Home Assistant displays the correct timezone go to the "Environment" tab and click the plus sign then add `variable` = `TZ` & `value` = `Europe/London` choosing [your correct timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
- Click on "Create"
- Wait for some time until your NAS has created the container
- Your Home Assistant within Docker should now run and will serve the web interface from port 8123 on your Docker host (this will be your Qnap NAS IP address - for example `http://192.xxx.xxx.xxx:8123`)
Remark: To update your Home Assistant on your Docker within Qnap NAS, you just remove container and image and do steps again (Don't remove "config" folder).
If you want to use a USB Bluetooth adapter or Z-Wave USB stick with Home Assistant on Qnap Docker, follow those steps:
#### Z-Wave
- Connect to your NAS over SSH
- Load cdc-acm kernel module(when NAS restart need to run this command)
`insmod /usr/local/modules/cdc-acm.ko`
- Find USB devices attached. Type command:
`ls /dev/tty*`
The above command should show you any USB devices plugged into your NAS. If you have more than one, you may get multiple items returned. Like : `ttyACM0`
- Run Docker command:
```bash
docker run --init --name homeassistant --net=host --privileged -itd -v /share/CACHEDEV1_DATA/Public/homeassistant/config:/config -e TZ=Europe/London --device /dev/ttyACM0 homeassistant/home-assistant:stable
```
`-v` is your configuration path
`-e` is set timezone
- Edit `configuration.yaml`
```yaml
zwave:
usb_path: /dev/ttyACM0
```
That will tell Home Assistant where to look for our Z-Wave radio.
#### Bluetooth
- Connect to your NAS over SSH
- Run Docker command:
```bash
docker run --init --name homeassistant --net=host --privileged -itd -v /share/CACHEDEV1_DATA/Public/homeassistant/config:/config -e TZ=Europe/London -v /dev/bus/usb:/dev/bus/usb -v /var/run/dbus:/var/run/dbus homeassistant/home-assistant:stable
```
First `-v` is your configuration path
`-e` is set timezone
- Edit the `configuration.yaml` file
```yaml
device_tracker:
- platform: bluetooth_tracker
```

View File

@ -0,0 +1,45 @@
{% tabbed_block %}
- title: Install
content: |
```bash
docker run --init -d \
--name homeassistant \
--restart=unless-stopped \
-v /etc/localtime:/etc/localtime:ro \
-v /PATH_TO_YOUR_CONFIG:/config \
--network=host \
{{ include.image }}
```
- title: Update
content: |
```bash
# if this returns "Image is up to date" then you can stop here
docker pull {{ include.image }}
```
```bash
# stop the running container
docker stop homeassistant
```
```bash
# remove it from Docker's list of containers
docker rm homeassistant
```
```bash
# finally, start a new one
docker run --init -d \
--name homeassistant \
--restart=unless-stopped \
-v /PATH_TO_YOUR_CONFIG:/config \
-v /etc/localtime:/etc/localtime:ro \
--network=host \
{{ include.image }}
```
{% endtabbed_block %}

View File

@ -0,0 +1,12 @@
```yaml
version: '3'
services:
homeassistant:
container_name: homeassistant
image: {{ include.image }}
volumes:
- /PATH_TO_YOUR_CONFIG:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
network_mode: host
```

View File

@ -0,0 +1,85 @@
## Install Home Assistant Core
<div class='note'>
<b>Prerequisites</b>
This guide assumes that you already have an operating system setup and have installed Python {{site.installation.versions.python}} (including the package `python3-dev`) or newer.
</div>
### Install dependencies
Before you start make sure your system is fully updated, all packages in this guide are installed with `apt`, if your OS does not have that, look for alternatives.
```bash
sudo apt-get update
sudo apt-get upgrade -y
```
Install the dependencies:
```bash
sudo apt-get install -y python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5
```
### Create an account
Add an account for Home Assistant Core called `homeassistant`.
Since this account is only for running Home Assistant Core the extra arguments of `-rm` is added to create a system account and create a home directory.
{%- if site.installation.types[page.installation_type].board %}
The arguments `-G dialout,gpio,i2c` adds the user to the `dialout`, `gpio` and the `i2c` group. The first is required for using Z-Wave and Zigbee controllers, while the second is required to communicate with GPIO.
```bash
sudo useradd -rm homeassistant -G dialout,gpio,i2c
```
{% else %}
```bash
sudo useradd -rm homeassistant
```
{% endif %}
### Create the virtual environment
First we will create a directory for the installation of Home Assistant Core and change the owner to the `homeassistant` account.
```bash
sudo mkdir /srv/homeassistant
sudo chown homeassistant:homeassistant /srv/homeassistant
```
Next up is to create and change to a virtual environment for Home Assistant Core. This will be done as the `homeassistant` account.
```bash
sudo -u homeassistant -H -s
cd /srv/homeassistant
python{{site.installation.versions.python}} -m venv .
source bin/activate
```
Once you have activated the virtual environment (notice the prompt change to `(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $`) you will need to run the following command to install a required Python package.
```bash
python3 -m pip install wheel
```
Once you have installed the required Python package it is now time to install Home Assistant Core!
```bash
pip3 install homeassistant
```
Start Home Assistant Core for the first time. This will complete the installation for you, automatically creating the `.homeassistant` configuration directory in the `/home/homeassistant` directory, and installing any basic dependencies.
```bash
hass
```
You can now reach your installation on your Raspberry Pi over the web interface on `http://homeassistant.local:8123`.
<div class='note'>
When you run the `hass` command for the first time, it will download, install and cache the necessary libraries/dependencies. This procedure may take anywhere between 5 to 10 minutes. During that time, you may get "site cannot be reached" error when accessing the web interface. This will only happen for the first time, and subsequent restarts will be much faster.
</div>

View File

@ -0,0 +1,195 @@
## Install Home Assistant Operating System
{% assign release_url = "https://github.com/home-assistant/operating-system/releases/download" %}
Follow this guide if you want to get started with Home Assistant easily or if you have little to no Linux experience
{% if site.installation.types[page.installation_type].board %}
{% if page.installation_type == 'raspberrypi' %}
### Suggested Hardware
We will need a few things to get started with installing Home Assistant. Links below lead to Amazon US. If youre not in the US, you should be able to find these items in web stores in your country.
- [Power Supply](https://www.raspberrypi.org/help/faqs/#powerReqs) (at least 3A)
- [Micro SD Card](https://amzn.to/2X0Z2di). Ideally get one that is [Application Class 2](https://www.sdcard.org/developers/overview/application/index.html) as they handle small I/O much more consistently than cards not optimized to host applications. A 32 GB or bigger card is recommended.
- SD Card reader. This is already part of most laptops, but you can purchase a [standalone USB adapter](https://amzn.to/2WWxntY) if you don't have one. The brand doesn't matter, just pick the cheapest.
- Ethernet cable. Home Assistant can work with Wi-Fi, but an Ethernet connection would be more reliable.
{% endif %}
### Write the image to your installation media
1. Attach the installation media ({{site.installation.types[page.installation_type].installation_media}}) to your computer
2. Download and start <a href="https://www.balena.io/etcher" target="_blank">Balena Etcher</a>
3. Select "Flash from URL"
![etcher_from_url](/images/installation/etcher1.png)
4. Get the URL for your {{site.installation.types[page.installation_type].board}}:
{% if site.installation.types[page.installation_type].variants.size > 1 %}
{% tabbed_block %}
{% for variant in site.installation.types[page.installation_type].variants %}
- title: {{ variant.name }}
content: |
```text
{{release_url}}/{{site.installation.versions.os}}/hassos_{{ variant.key }}-{{site.installation.versions.os}}.img.xz
```
{% if variant.key == "odroid-n2" %}
[Guide: Flashing Odroid-N2 using OTG-USB](/hassio/flashing_n2_otg/)
{% elsif variant.key == "rpi4" %}
_(To use the full 8GB of memory on the 8GB model 64-bit is **required**)_
{% elsif variant.key == "rpi4-64" or variant.key == "rpi3-64" %}
_(For GPIO and HAT 32-bit is **required**)_
{% endif %}
{% endfor %}
{% endtabbed_block %}
{% else %}
```text
{{release_url}}/{{site.installation.versions.os}}/hassos_{{ site.installation.types[page.installation_type].variants[0].key }}-{{site.installation.versions.os}}.img.xz
```
{% endif %}
_Select and copy the URL or use the "copy" button that appear when you hover it._
1. Paste the URL for your {{site.installation.types[page.installation_type].board}} into Balena Etcher and click "OK"
![etcher_from_url_paste](/images/installation/etcher2.png)
6. Balena Etcher will now download the image, when that is done click "Select target"
![etcher_select_target](/images/installation/etcher3.png)
7. Select the {{site.installation.types[page.installation_type].installation_media}} you want to use for your {{site.installation.types[page.installation_type].board}}
![etcher_select_target](/images/installation/etcher4.png)
8. Click on "Flash!" to start writing the image
![etcher_select_target](/images/installation/etcher5.png)
9. When Balena Etcher is finished writing the image you will get this confirmation
![etcher_select_target](/images/installation/etcher6.png)
### Start up your {{site.installation.types[page.installation_type].board}}
1. Insert the installation media ({{site.installation.types[page.installation_type].installation_media}}) you just created
2. Attach a ethernet cable for network.
3. Attach a cable for power
4. Within a few minutes you will be able to reach Home Assistant on <a href="http://homeassistant.local:8123" target="_blank">homeassistant.local:8123</a>. If you are running an older Windows version or have a stricter network configuration, you might need to access Home Assistant at <a href="http://homeassistant:8123" target="_blank">homeassistant:8123</a> or `http://X.X.X.X:8123` (replace X.X.X.X with your {{site.installation.types[page.installation_type].board}}s IP address).
{% else %}
### Download the appropriate image
{% if page.installation_type == 'nuc' %}
- [Intel NUC][intel-nuc]
{% else %}
- [VirtualBox][vdi] (.vdi)
{% if page.installation_type == 'macos' %}
- [KVM][qcow2] (.qcow2)
{% endif %}
{% if page.installation_type == 'windows' or page.installation_type == 'linux' %}
- [KVM][qcow2] (.qcow2)
- [Vmware Workstation][vmdk] (.vmdk)
{% elsif page.installation_type == 'alternative' %}
- [KVM/Proxmox][qcow2] (.qcow2)
- [VMware ESXi/vSphere][Virtual Appliance] (.ova)
{% elsif page.installation_type == 'windows' %}
- [Hyper-V][vhdx] (.vhdx)
{% endif %}
{% endif %}
{% if page.installation_type == "nuc" %}
1. Put the SD card in your card reader.
2. Open balenaEtcher, select the Home Assistant image and flash it to the SD card.
3. Unmount the SD card and remove it from your card reader.
{% else %}
### Create the Virtual Machine
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)
Minimum recommended assignments:
- 2GB RAM
- 32GB Storage
- 1vCPU
_All these can be extended if your usage calls for more resources._
### Hypervisor specific configuration
{% tabbed_block %}
- title: VirtualBox
content: |
1. Create a new virtual machine
2. Select “Other Linux (64Bit)
3. Select “Use an existing virtual hard disk file”, select the VDI file from above
4. Edit the “Settings” of the VM and go “System” then Motherboard and Enable EFI
5. Then “Network” “Adapter 1” Bridged and your adapter.
- title: KVM
content: |
1. Create a new virtual machine in `virt-manager`
2. Select “Import existing disk image”, provide the path to the QCOW2 image above
3. Choose “Generic Default” for the operating system
4. Check the box for “Customize configuration before install”
5. Select your bridge under “Network Selection”
6. Under customization select “Overview” -> “Firmware” -> “UEFI x86_64: …”.****
{% if page.installation_type == 'windows' or page.installation_type == 'linux' %}
- title: Vmware Workstation
content: |
1. Create a new virtual machine
2. Select “Custom”, make it compatible with the default of Workstation and ESX
3. Choose “I will install the operating system later”, select “Linux” -> “Other Linux 5.x or later kernel 64-bit”
4. Select “Use Bridged Networking”
5. Select “Use an existing virtual disk” and select the VMDK file above,
After creation of VM go to “Settings” and “Options” then “Advanced” and select “Firmware type” to “UEFI”.
{% elsif page.installation_type == 'alternative' %}
- title: VMware ESXi/vSphere
content: |
Use the “E1001” or “E1001E” virtual network adapater. There are confirmed mDNS/Multicast discovery issues when using VMwares “VMXnet3” virtual network adapter.
{% elsif page.installation_type == 'windows' %}
- title: Hyper-V
content: |
<div class='note warning'>
Hyper-V does not have USB support
</div>
1. Create a new virtual machine
2. Select “Generation 2”
3. Select “Connection -> “Your Virtual Switch that is bridged”
4. Select “Use an existing virtual hard disk” and select the VHDX file from above
After creation go to “Settings” -> “Security” and deselect “Enable Secure Boot”.
{% endif %}
{% endtabbed_block %}
### Start up your Virtual Machine
1. Start the Virtual Machine
2. Observe the boot process of Home Assistant Operating System
3. Once completed you will be able to reach Home Assistant on <a href="http://homeassistant.local:8123" target="_blank">homeassistant.local:8123</a>. If you are running an older Windows version or have a stricter network configuration, you might need to access Home Assistant at <a href="http://homeassistant:8123" target="_blank">homeassistant:8123</a> or `http://X.X.X.X:8123` (replace X.X.X.X with your {{site.installation.types[page.installation_type].board}}s IP address).
{% endif %}
{% endif %}
With the Home Assistant Operating System installed and accessible you can continue with onboarding.
{% include getting-started/next_step.html step="Onboarding" link="/getting-started/onboarding/" %}
[intel-nuc]: {{release_url}}/{{site.installation.versions.os}}/hassos_intel-nuc-{{site.installation.versions.os}}.img.xz
[vmdk]: {{release_url}}/{{site.installation.versions.os}}/hassos_ova-{{site.installation.versions.os}}.vmdk.xz
[vhdx]: {{release_url}}/{{site.installation.versions.os}}/hassos_ova-{{site.installation.versions.os}}.vhdx.xz
[vdi]: {{release_url}}/{{site.installation.versions.os}}/hassos_ova-{{site.installation.versions.os}}.vdi.xz
[qcow2]: {{release_url}}/{{site.installation.versions.os}}/hassos_ova-{{site.installation.versions.os}}.qcow2.xz
[Virtual Appliance]: {{release_url}}/{{site.installation.versions.os}}/hassos_ova-{{site.installation.versions.os}}.ova

View File

@ -0,0 +1,16 @@
## Install Home Assistant Supervised
<div class='note warning'>
This way of running Home Assistant will require the most of you. It also have strict requirements you need to follow.
Unless you really need this installation type, you should install Home Assistant OS (this can also be a [virtual machine](#install-home-assistant-operating-system)), or [Home Assistant Container](#install-home-assistant-container).
</div>
1. First make sure you understand the <a href="https://github.com/home-assistant/architecture/blob/master/adr/0014-home-assistant-supervised.md" target="_blank">requirements</a>.
2. Then head over to <a href="https://github.com/home-assistant/supervised-installer" target="_blank">home-assistant/supervised-installer</a> to set it up.
Once the Home Assistant Supervised installation is running and Home Assistant accessible you can continue with onboarding.
{% include getting-started/next_step.html step="Onboarding" link="/getting-started/onboarding/" %}

View File

@ -11,11 +11,12 @@ s.parentNode.insertBefore(g,s)}(document,'script'));
<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
<script type="text/javascript">
docsearch({
apiKey: 'ae96d94b201c5444c8a443093edf3efb',
apiKey: "{{ site.algolia.api_key }}",
indexName: 'home-assistant',
inputSelector: '#search',
debug: false // Set debug to true if you want to inspect the dropdown
});
document.querySelector('.search .close').addEventListener('click', function(ev) {
ev.preventDefault();
document.querySelector('.search-container').style.display = 'none';

View File

@ -2,41 +2,62 @@
<div class="grid">
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
<a href="/" class="site-title">
<img src="/images/home-assistant-logo.svg" width="36" height="36" alt="Home Assistant">
<img
src="/images/home-assistant-logo.svg"
width="36"
height="36"
alt="Home Assistant"
/>
<span>{{ site.title }}</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>
<input type="checkbox" id="toggle" />
<label
for="toggle"
class="toggle"
data-open="Main Menu"
data-close="Close Menu"
></label>
<ul class="menu pull-right">
{% comment %}
Example dropdown menu
<li><a href="/getting-started/">Getting started</a></li>
<li>
<a href="/docs/"
>Documentation <i class="icon icon-caret-down"></i
></a>
<ul>
<li><a href="/installation/">Installation</a></li>
<li>
<a>Getting started <i class="icon icon-caret-down"></i></a>
<ul>
<li><a href="/getting-started/">Installing Home Assistant</a></li>
<li><a href="/getting-started/configuration/">Configuration Basics</a></li>
</ul>
<a href="/docs/configuration/">Configuration</a>
</li>
{% endcomment %}
<li><a href="/getting-started/">Getting started</a></li>
<li><a href="/integrations/">Integrations</a></li>
<li><a href="/docs/">Documentation</a></li>
<li><a href="/cookbook/">Examples</a></li>
<li><a href="/blog/">Blog</a></li>
<li><a href="/help/">Need help?</a></li>
<li><a href='#' class='show-search'><i class="icon-search"></i></a></li>
<li>
<a href="/docs/automation/">Automation</a>
</li>
<li>
<a href="/docs/scripts/">Scripting</a>
</li>
<li>
<a href="/lovelace/">User Interface</a>
</li>
</ul>
</li>
<li><a href="/integrations/">Integrations</a></li>
<li><a href="/cookbook/">Examples</a></li>
<li><a href="/blog/">Blog</a></li>
<li><a href="/help/">Need help?</a></li>
<li>
<a href="#" class="show-search"><i class="icon-search"></i></a>
</li>
</ul>
</nav>
<div class='search-container' style='display: none'>
<div class='search'>
<div class="search-container" style="display: none">
<div class="search">
<i class="icon-search"></i>
<input id='search' placeholder='Search the documentation…'>
<a href='#' class='close'><i class="icon-remove-sign"></i></a>
<input id="search" placeholder="Search the documentation…" />
<a href="#" class="close"><i class="icon-remove-sign"></i></a>
</div>
</div>
</div>

View File

@ -3,6 +3,10 @@
{% assign root = url_parts[1] %}
{% if root == 'integrations' %}
{% include asides/component_navigation.html %}
{% elsif root == 'installation' %}
{% include asides/installation_navigation.html %}
{% elsif root == 'common-tasks' %}
{% include asides/common_tasks_navigation.html %}
{% elsif root == 'cookbook' %}
{% include asides/cookbook_navigation.html %}
{% elsif root == 'lovelace' %}
@ -31,6 +35,16 @@
{% include asides/recent_posts.html %}
{% endif %}
{% endif %}
{% if page.toc %}
{%- unless page.no_toc -%}
<section class="aside-module grid__item one-whole lap-one-half">
<div class='section'>
<h1 class="title delta">On this page</h1>
{{ content | toc_only }}
</div>
</section>
{%- endunless -%}
{% endif %}
</div>
<script type="text/javascript">
// Some sidebars are longer than the screen so they can't be locked.

View File

@ -17,6 +17,16 @@ ha_config_flow: true
ha_codeowners:
- '@shred86'
ha_domain: abode
ha_homekit: true
ha_platforms:
- alarm_control_panel
- binary_sensor
- camera
- cover
- light
- lock
- sensor
- switch
---
The `abode` integration will allow users to integrate their Abode Home Security systems into Home Assistant and use its alarm system and sensors to automate their homes.

View File

@ -10,6 +10,9 @@ ha_codeowners:
- '@bieniu'
ha_domain: accuweather
ha_quality_scale: platinum
ha_platforms:
- sensor
- weather
---
The `accuweather` integration uses the [AccuWeather](https://accuweather.com/) web service as a source for weather data for your location.

View File

@ -6,6 +6,8 @@ ha_category:
ha_iot_class: Local Polling
ha_release: 0.19
ha_domain: acer_projector
ha_platforms:
- switch
---
The `acer_projector` switch platform allows you to control the state of RS232 connected projectors from [Acer](https://www.acer.com/).

View File

@ -10,6 +10,9 @@ ha_config_flow: true
ha_codeowners:
- '@atmurray'
ha_domain: acmeda
ha_platforms:
- cover
- sensor
---
The Rollease Acmeda Automate integration allows you to control and monitor covers via your Rolelase Acmeda Automate hub. The integration uses an [API](https://pypi.org/project/aiopulse/) to directly communicate with hubs on the local network, rather than connecting via the cloud or via RS-485.

View File

@ -6,6 +6,8 @@ ha_category:
ha_iot_class: Local Polling
ha_release: 0.7
ha_domain: actiontec
ha_platforms:
- device_tracker
---
This platform allows you to detect presence by looking at connected devices to an [Actiontec](https://www.actiontec.com/) device.

View File

@ -11,6 +11,9 @@ ha_config_flow: true
ha_codeowners:
- '@frenck'
ha_domain: adguard
ha_platforms:
- sensor
- switch
---
AdGuard Home is a network-wide ad- and tracker-blocking DNS server with parental

View File

@ -11,6 +11,12 @@ ha_category:
ha_release: '0.60'
ha_iot_class: Local Push
ha_domain: ads
ha_platforms:
- binary_sensor
- cover
- light
- sensor
- switch
---
The ADS (automation device specification) describes a device-independent and fieldbus independent interface for communication between [Beckhoff](https://www.beckhoff.com/) automation devices running [TwinCAT](https://www.beckhoff.hu/english.asp?twincat/default.htm) and other devices implementing this interface.

View File

@ -9,6 +9,12 @@ ha_codeowners:
- '@Bre77'
ha_domain: advantage_air
ha_quality_scale: platinum
ha_platforms:
- binary_sensor
- climate
- cover
- sensor
- switch
---
The Advantage Air integration allows you to control [Advantage Air](https://www.advantageair.com.au/) Air Conditioning controllers into Home Assistant.

View File

@ -6,6 +6,8 @@ ha_category:
ha_release: 0.85
ha_iot_class: Cloud Polling
ha_domain: aftership
ha_platforms:
- sensor
---
The `aftership` platform allows one to track deliveries by [AfterShip](https://www.aftership.com), a service that supports 490+ couriers worldwide. To use the tracking API functionality, the Essentials plan is required. This plan includes 100 shipments per month. There are various paid-for tiers after that.

View File

@ -10,6 +10,9 @@ ha_iot_class: Local Polling
ha_codeowners:
- '@ispysoftware'
ha_domain: agent_dvr
ha_platforms:
- alarm_control_panel
- camera
---
[Agent DVR](https://www.ispyconnect.com/download.aspx/) is a free* software DVR solution for windows 10, Mac and Linux. Agent DVR runs as a service or console application and can access and control a huge range of third party cameras with advanced motion detection, including YOLO integration for object recognition. The iSpyConnect website provides secured (SSL) remote access without port forwarding needed.

View File

@ -10,6 +10,9 @@ ha_codeowners:
- '@bieniu'
ha_domain: airly
ha_quality_scale: platinum
ha_platforms:
- air_quality
- sensor
---
The `airly` integration uses the [Airly](https://airly.eu/) web service as a source for air quality data for your location.

View File

@ -9,6 +9,8 @@ ha_config_flow: true
ha_codeowners:
- '@asymworks'
ha_domain: airnow
ha_platforms:
- sensor
---
The `airnow` integration uses the [AirNow](https://www.airnow.gov/) web service

View File

@ -9,6 +9,9 @@ ha_codeowners:
- '@bachya'
ha_domain: airvisual
ha_config_flow: true
ha_platforms:
- air_quality
- sensor
---
The `airvisual` sensor platform queries the [AirVisual](https://www.iqair.com) cloud API for air quality data. Data can be collected via latitude/longitude, by city/state/country, or from an [AirVisual Node/Pro unit](https://www.iqair.com/air-quality-monitors/airvisual-pro).

View File

@ -6,6 +6,8 @@ ha_category:
ha_release: 0.75
ha_iot_class: Cloud Polling
ha_domain: aladdin_connect
ha_platforms:
- cover
---
The `aladdin_connect` cover platform lets you control Genie Aladdin Connect garage doors through Home Assistant.

View File

@ -36,21 +36,24 @@ alarm_control_panel:
value_template: "{{ states('alarm_control_panel.real_alarm') }}"
arm_away:
service: alarm_control_panel.alarm_arm_away
data:
target:
entity_id: alarm_control_panel.real_alarm
data:
code: !secret alarm_code
arm_home:
service: alarm_control_panel.alarm_arm_home
data:
target:
entity_id: alarm_control_panel.real_alarm
data:
code: !secret alarm_code
disarm:
- condition: state
entity_id: device_tracker.paulus
state: "home"
- service: alarm_control_panel.alarm_arm_home
data:
target:
entity_id: alarm_control_panel.real_alarm
data:
code: !secret alarm_code
```

View File

@ -11,6 +11,10 @@ ha_domain: alarmdecoder
ha_codeowners:
- '@ajschmidt8'
ha_config_flow: true
ha_platforms:
- alarm_control_panel
- binary_sensor
- sensor
---
The `alarmdecoder` integration will allow Home Assistant users who own either a DSC or Honeywell alarm panel to leverage their alarm system and its sensors to provide Home Assistant with rich information about their homes. Connectivity between Home Assistant and the alarm panel is accomplished through a device produced by Nu Tech Software Solutions, known as the AlarmDecoder. The AlarmDecoder devices provide a serial, TCP/IP socket or USB interface to the alarm panel, where it emulates an alarm keypad.

View File

@ -217,7 +217,7 @@ intent_script:
ActivateSceneIntent:
action:
service: scene.turn_on
data:
target:
entity_id: scene.{{ Scene | replace(" ", "_") }}
speech:
type: plain
@ -269,7 +269,7 @@ intent_script:
RunScriptIntent:
action:
service: script.turn_on
data:
target:
entity_id: script.{{ Script | replace(" ", "_") }}
speech:
type: plain
@ -299,7 +299,8 @@ intent_script:
amzn1.ask.skill.08888888-7777-6666-5555-444444444444:
action:
service: script.turn_on
entity_id: script.red_alert
target:
entity_id: script.red_alert
speech:
type: plain
text: OK

View File

@ -8,6 +8,8 @@ ha_release: '0.60'
ha_codeowners:
- '@fabaff'
ha_domain: alpha_vantage
ha_platforms:
- sensor
---
The `alpha_vantage` sensor platform uses [Alpha Vantage](https://www.alphavantage.co) to monitor the stock market. This platform also provides detail about exchange rates.

Some files were not shown because too many files have changed in this diff Show More