Tomas Lorinc
tomas.lorinc@gmail.com

IoT specialist
Programmer
Trainer
Rapid prototyper
if (!☕) cup.refill();

Role
Name
Motivation
HomeAssistant
HomeAssistant
Smart Home
Inteligent Home
uses computing power, machine learning and predictive technology to make complex decisions based on the data they gather
uses internet connected devices to control and monitor appliances and systems like security, heating and lighting. Smart home technology, can help to make our homes more secure, comfortable and energy efficient
Smart Home


Basket of remotes
Tens of apps

Hub for everything

Data security

Lack of support

Price
problems
Inteligent Home

Inteligent Home




Designed as IH
Everything connected
Different wirings
Local server
One App



Open Source Home Automation
Home Assistant
BlackBox
BlackBox
BlackBox
BlackBox




Home Assistant



...



45EF903DA8
192.168.1.23:443
Mobile App
Home Assistant

light.hue.living_room
state
color
brightness
saturation

10 bulbs + 1 bridge = 550 EUR

zigbee


45EF903DA8
192.168.1.23:443
Mobile App
Home Assistant

light.hue.living_room
state
color
brightness
saturation

10 bulbs + 1 bridge = 160 EUR



currently not possible
zigbee

45EF903DA8
Home Assistant

light.lidl.living_room
state
color
brightness
saturation

10 bulbs + 1 bridge = 170 EUR


Conbee II
zigbee

45EF903DA8
Home Assistant

light.lidl.living_room
10 bulbs + 1 bridge = 170 EUR 550EUR


Conbee II

Mobile App
EMULATED
light.hue.living_room
zigbee



Home Assistant

light.lidl.living_room


Conbee II

Mobile App
light.hue.living_room



light.hue.kitchen
light.hue.kitchen
zigbee
zigbee
EMULATED


https://www.home-assistant.io/integrations/#all

https://demo.home-assistant.io

HomeAssistant
Open source home automation that puts local control and privacy first.
Free
Open Source
Portable
Local
Python
Unified access
...
Companion App
HomeAssistant
Operating System
HomeAssistant
HomeAssistant
Core
- Raspberry Pi
- TinkerBoard
- Odroid
- Virtual appliance
- Docker
- venv (Python >3.8)
core is already built in OS
Installation
configuration.yaml
OS | Path |
---|---|
Home Assistant OS | /config |
Docker | /config |
OS X | ~/.homeassistant |
Linux | ~/.homeassistant |
Windows | %APPDATA%/.homeassistant |
The configuration.yaml file is the main YAML file used by Home Assistant to gather all of the information about the users desired configuration.
Visual Studio Code addon
HomeAssistant OS extensions are called addons
light:
- platform: mqtt
name: "Ziarovka 1"
command_topic: "namakana_domacnost/ziarovka_1"
- platform: mqtt
name: "Ziarovka 2"
command_topic: "namakana_domacnost/ziarovka_2"


ziarovka_1
ziarovka_2

HomeAssistant
configuration.yaml
Namakana Domacnost
MQTT








23°
23°
73%
73%
light:
- platform: mqtt
name: "Ziarovka 1"
command_topic: "namakana_domacnost/ziarovka_1"
- platform: mqtt
name: "Ziarovka 2"
command_topic: "namakana_domacnost/ziarovka_2"


ziarovka_1
ziarovka_2

HomeAssistant
configuration.yaml
Namakana Domacnost
light:
- platform: mqtt
name: "Ziarovka 1"
command_topic: "namakana_domacnost/ziarovka_1"
- platform: mqtt
name: "Ziarovka 2"
state_topic: "namakana_domacnost/ziarovka_2"
command_topic: "namakana_domacnost/ziarovka_2/set"
light:
- platform: mqtt
name: "Ziarovka 1"
command_topic: "namakana_domacnost/ziarovka_1"
- platform: mqtt
name: "Ziarovka 2"
state_topic: "namakana_domacnost/ziarovka_2"
command_topic: "namakana_domacnost/ziarovka_2/set"
qos: 2
payload_on: "zapni_sa"
payload_off: "vypni_sa"
configuration.yaml
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
light:
- platform: mqtt
name: "Master Bedroom Ceiling Light Spot"
command_topic: "namakany_den/home/bedroom/light/ceiling_light_spot/set"
state_topic: "namakany_den/home/bedroom/light/ceiling_light_spot"
- platform: mqtt
name: "Master Bedroom Ceiling Light 1"
command_topic: "namakany_den/home/bedroom/light/ceiling_light_1/set"
state_topic: "namakany_den/home/bedroom/light/ceiling_light_1"
brightness_command_topic: "namakany_den/home/bedroom/light/ceiling_light_1/brightness/set"
brightness_state_topic: "namakany_den/home/bedroom/light/ceiling_light_1/brightness"
- platform: mqtt
unique_id: "NEURON-1_3.07"
name: "Master Bedroom Ceiling Light 2"
command_topic: "namakany_den/home/bedroom/light/ceiling_light_2/set"
state_topic: "namakany_den/home/bedroom/light/ceiling_light_2"
payload_on: "1"
payload_off: "0"
qos: 2
- platform: group
name: All lights
entities:
- light.master_bedroom_ceiling_light_1
- light.master_bedroom_ceiling_light_2
- light.master_bedroom_ceiling_light_spot
binary_sensor:
- platform: mqtt
unique_id: NEURON-1_1.01_input"
name: Bedroom motion
state_topic: "namakany_den/home/bedroom/motion"
qos: 2
device_class: motion
Documentation
MQTT
integration
HomeAssistant Core extensions are called integrations
configuration.yaml
- don't be scared, many things will be done automatically
- USE ctrl+c and ctrl+v
- beware on syntax !!!
- check YAML before restarting core
- consider splitting


ziarovka_1
ziarovka_3

HomeAssistant
Namakana Domacnost

ziarovka_2

pir_1




Virtual House
HomeAssistant
test.mosquitto.org:1883
MQTT
3x light
1x motion sensor
3x light
1x light group
1x motion sensor
1x automation
[
{
"id": "f64da792.f41b08",
"type": "ui_switch",
"z": "f646ebb8.6f3998",
"name": "",
"label": "Ceiling light 2",
"tooltip": "",
"group": "4690d742.c49a28",
"order": 2,
"width": 0,
"height": 0,
"passthru": true,
"decouple": "false",
"topic": "",
"style": "",
"onvalue": "1",
"onvalueType": "str",
"onicon": "",
"oncolor": "",
"offvalue": "0",
"offvalueType": "str",
"officon": "",
"offcolor": "",
"x": 600,
"y": 140,
"wires": [
[
"638bafde.eb8ae8"
]
]
},
{
"id": "66342f6f.e37c28",
"type": "ui_switch",
"z": "f646ebb8.6f3998",
"name": "",
"label": "Spot Light",
"tooltip": "",
"group": "4690d742.c49a28",
"order": 1,
"width": 0,
"height": 0,
"passthru": true,
"decouple": "false",
"topic": "",
"style": "",
"onvalue": "ON",
"onvalueType": "str",
"onicon": "",
"oncolor": "",
"offvalue": "OFF",
"offvalueType": "str",
"officon": "",
"offcolor": "",
"x": 590,
"y": 180,
"wires": [
[
"b909abfe.03b0f8"
]
]
},
{
"id": "666f43ba.898a64",
"type": "ui_switch",
"z": "f646ebb8.6f3998",
"name": "",
"label": "Ceiling light 1",
"tooltip": "",
"group": "4690d742.c49a28",
"order": 5,
"width": 0,
"height": 0,
"passthru": true,
"decouple": "false",
"topic": "",
"style": "",
"onvalue": "ON",
"onvalueType": "str",
"onicon": "",
"oncolor": "",
"offvalue": "OFF",
"offvalueType": "str",
"officon": "",
"offcolor": "",
"x": 600,
"y": 100,
"wires": [
[
"37d63375.8386b4"
]
]
},
{
"id": "1a132084.6088d7",
"type": "mqtt in",
"z": "f646ebb8.6f3998",
"name": "",
"topic": "namakany_den/home/bedroom/light/ceiling_light_1/set",
"qos": "0",
"datatype": "auto",
"broker": "630b9a9e.ae7fdc",
"x": 240,
"y": 100,
"wires": [
[
"666f43ba.898a64"
]
]
},
{
"id": "4b1a4dde.3afd8c",
"type": "mqtt in",
"z": "f646ebb8.6f3998",
"name": "",
"topic": "namakany_den/home/bedroom/light/ceiling_light_2/set",
"qos": "0",
"datatype": "auto",
"broker": "630b9a9e.ae7fdc",
"x": 240,
"y": 140,
"wires": [
[
"f64da792.f41b08"
]
]
},
{
"id": "e17d4cbb.8c802",
"type": "mqtt in",
"z": "f646ebb8.6f3998",
"name": "",
"topic": "namakany_den/home/bedroom/light/ceiling_light_spot/set",
"qos": "0",
"datatype": "auto",
"broker": "630b9a9e.ae7fdc",
"x": 250,
"y": 180,
"wires": [
[
"66342f6f.e37c28"
]
]
},
{
"id": "37d63375.8386b4",
"type": "mqtt out",
"z": "f646ebb8.6f3998",
"name": "",
"topic": "namakany_den/home/bedroom/light/ceiling_light_1",
"qos": "0",
"retain": "",
"broker": "630b9a9e.ae7fdc",
"x": 1150,
"y": 100,
"wires": []
},
{
"id": "638bafde.eb8ae8",
"type": "mqtt out",
"z": "f646ebb8.6f3998",
"name": "",
"topic": "namakany_den/home/bedroom/light/ceiling_light_2",
"qos": "2",
"retain": "",
"broker": "630b9a9e.ae7fdc",
"x": 1150,
"y": 140,
"wires": []
},
{
"id": "b909abfe.03b0f8",
"type": "mqtt out",
"z": "f646ebb8.6f3998",
"name": "",
"topic": "namakany_den/home/bedroom/light/ceiling_light_spot",
"qos": "0",
"retain": "",
"broker": "630b9a9e.ae7fdc",
"x": 1160,
"y": 180,
"wires": []
},
{
"id": "88d35466.420068",
"type": "ui_button",
"z": "f646ebb8.6f3998",
"name": "",
"group": "4690d742.c49a28",
"order": 6,
"width": 0,
"height": 0,
"passthru": false,
"label": "Motion sensor",
"tooltip": "",
"color": "",
"bgcolor": "",
"icon": "directions_walk",
"payload": "",
"payloadType": "str",
"topic": "",
"x": 600,
"y": 240,
"wires": [
[
"d75e845f.259018"
]
]
},
{
"id": "866b8ec3.b5c53",
"type": "mqtt out",
"z": "f646ebb8.6f3998",
"name": "",
"topic": "namakany_den/home/bedroom/motion",
"qos": "2",
"retain": "",
"broker": "630b9a9e.ae7fdc",
"x": 1120,
"y": 240,
"wires": []
},
{
"id": "d75e845f.259018",
"type": "trigger",
"z": "f646ebb8.6f3998",
"name": "",
"op1": "ON",
"op2": "OFF",
"op1type": "str",
"op2type": "str",
"duration": "3",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 800,
"y": 240,
"wires": [
[
"866b8ec3.b5c53"
]
]
},
{
"id": "e0567db8.f116b",
"type": "ui_gauge",
"z": "f646ebb8.6f3998",
"name": "",
"group": "4690d742.c49a28",
"order": 3,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Brightness",
"label": "units",
"format": "{{value}}",
"min": 0,
"max": "255",
"colors": [
"#ffffff",
"#e6e600",
"#ffaa00"
],
"seg1": "",
"seg2": "",
"x": 970,
"y": 300,
"wires": []
},
{
"id": "a1c0dd65.c287e8",
"type": "mqtt in",
"z": "f646ebb8.6f3998",
"name": "",
"topic": "namakany_den/home/bedroom/light/ceiling_light_1/brightness/set",
"qos": "0",
"datatype": "auto",
"broker": "630b9a9e.ae7fdc",
"x": 280,
"y": 300,
"wires": [
[
"e37360da.c91918"
]
]
},
{
"id": "e37360da.c91918",
"type": "ui_slider",
"z": "f646ebb8.6f3998",
"name": "",
"label": "Ceiling 1 Light Brightness",
"tooltip": "",
"group": "4690d742.c49a28",
"order": 4,
"width": 0,
"height": 0,
"passthru": true,
"outs": "all",
"topic": "",
"min": 0,
"max": "255",
"step": "10",
"x": 710,
"y": 300,
"wires": [
[
"e0567db8.f116b",
"cd0f393b.ff9dd8"
]
]
},
{
"id": "cd0f393b.ff9dd8",
"type": "mqtt out",
"z": "f646ebb8.6f3998",
"name": "",
"topic": "namakany_den/home/bedroom/light/ceiling_light_1/brightness",
"qos": "",
"retain": "",
"broker": "630b9a9e.ae7fdc",
"x": 1130,
"y": 340,
"wires": []
},
{
"id": "4690d742.c49a28",
"type": "ui_group",
"name": "Virtual House",
"tab": "29d862c5.7c4876",
"order": 1,
"disp": true,
"width": "6",
"collapse": false
},
{
"id": "630b9a9e.ae7fdc",
"type": "mqtt-broker",
"name": "",
"broker": "test.mosquitto.org",
"port": "1883",
"clientid": "",
"usetls": false,
"compatmode": false,
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthRetain": "false",
"birthPayload": "",
"closeTopic": "",
"closeQos": "0",
"closeRetain": "false",
"closePayload": "",
"willTopic": "",
"willQos": "0",
"willRetain": "false",
"willPayload": ""
},
{
"id": "29d862c5.7c4876",
"type": "ui_tab",
"name": "Bedroom",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]
NodeRED
configuration.yaml
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
light:
- platform: mqtt
name: "Master Bedroom Ceiling Light Spot"
command_topic: "namakany_den/home/bedroom/light/ceiling_light_spot/set"
state_topic: "namakany_den/home/bedroom/light/ceiling_light_spot"
- platform: mqtt
name: "Master Bedroom Ceiling Light 1"
command_topic: "namakany_den/home/bedroom/light/ceiling_light_1/set"
state_topic: "namakany_den/home/bedroom/light/ceiling_light_1"
brightness_command_topic: "namakany_den/home/bedroom/light/ceiling_light_1/brightness/set"
brightness_state_topic: "namakany_den/home/bedroom/light/ceiling_light_1/brightness"
- platform: mqtt
unique_id: "NEURON-1_3.07"
name: "Master Bedroom Ceiling Light 2"
command_topic: "namakany_den/home/bedroom/light/ceiling_light_2/set"
state_topic: "namakany_den/home/bedroom/light/ceiling_light_2"
payload_on: "1"
payload_off: "0"
qos: 2
- platform: group
name: All lights
entities:
- light.master_bedroom_ceiling_light_1
- light.master_bedroom_ceiling_light_2
- light.master_bedroom_ceiling_light_spot
binary_sensor:
- platform: mqtt
unique_id: NEURON-1_1.01_input"
name: Bedroom motion
state_topic: "namakany_den/home/bedroom/motion"
qos: 2
device_class: motion
Entity
abstract representation of physical device
Component
pointer to the physical device
Thing
physical device
- light
- binary_sensor
- fan
- climate
- sensor
CookBook
- Enable advanced mode
- Check configuration.yaml
- Restart core
- wait :)
- Update dashboard
- Create automation

Different Dashboards
Let's not forget our Brothers




https://www.home-assistant.io
HomeAssistant Knowledge
10%
Thank
you

Home Assistant 2021
By tomaslorinc
Home Assistant 2021
- 1,186