Tip |
---|
|
Home Assistant is an alternative to openHAB. Home Assistant is python/yaml based and quite nerdy to setup. Also, several devices support are quite wierd and not well-fuctioning in my opinion. After a short test, I left Home Assistant in favor of openHAB |
Screenshots
Type
Home Assistant can be executed on several types of hardware (Laptop, NAS', Reapbeery PIs) and methods (Native, Docker, HASS Image), I do prefer Docker:
Upgrade the Home Assistant installation
On my Ubuntu (See https://www.home-assistant.io/docs/installation/virtualenv/)
Kodeblok |
---|
sudo su -s /bin/bash homeassistant
source /srv/homeassistant/bin/activate
pip3 install --upgrade homeassistant |
Update pyatv
Kodeblok |
---|
sudo su -s /bin/bash homeassistant
source /srv/homeassistant/bin/activate
pip3 install --upgrade pyatv |
Renaming Devices etc
As stupid as it is, You cant rename via the GUI - this will give:
Image Removed
The trick is to edit the file core.entity_registry
Kodeblok |
---|
cd .storage
vi core.entity_registry |
Change:
Kodeblok |
---|
{
"config_entry_id": null,
"device_id": null,
"disabled_by": null,
"entity_id": "remote.sovevrelse",
"name": "null,
"platform": "apple_tv",
"unique_id": "9465bb10bf1214d769bd2aca8377aaa5203e09ae3ea4a353a02d80e3e71e149c"
} |
to
Kodeblok |
---|
{
"config_entry_id": null,
"device_id": null,
"disabled_by": null,
"entity_id": "remote.sovevrelse",
"name": "Apple TV Soveværelse Remote",
"platform": "apple_tv",
"unique_id": "9465bb10bf1214d769bd2aca8377aaa5203e09ae3ea4a353a02d80e3e71e149c"
} |
And restart Home Assistant
ZenseHome Office Light
See more at ZenseHome API interfacing
Kodeblok |
---|
switch:
platform: command_line
switches:
office_light:
command_on: /var/turnon-office.exp
command_off: /var/turnoff-office.exp
friendly_name: Office Lights
kitchen_light:
command_on: /var/turnon-kitchen.exp
command_off: /var/turnoff-kitchen.exp
friendly_name: Kitchen Lights |
Adding HIK/Trendnet Cams
Tip |
---|
Some discussion on Reddit here |
Install ffmpeg on Linux
Kodeblok |
---|
apt-get install ffmpeg |
Add som config (see https://www.home-assistant.io/components/ffmpeg/):
Kodeblok |
---|
|
ffmpeg:
ffmpeg_bin: /usr/bin/ffmpeg
camera 41:
- platform: generic
still_image_url: http://admin:******@10.0.0.140:80/PSIA/Streaming/channels/1/picture
name: Bag hus
- platform: generic
still_image_url: http://admin:******@10.0.0.130:80/PSIA/Streaming/channels/1/picture
name: Fordør
|
Kodeblok |
---|
|
ffmpeg:
ffmpeg_bin: /usr/bin/ffmpeg
camera:
- platform: ffmpeg
input: rtsp://admin:******@10.0.0.140:554/Streaming/Channels/1
name: Bag hus (stream)
- platform: ffmpeg
input: rtsp://admin:******@10.0.0.130:554/Streaming/Channels/1
name: Fordør (stream) |
NMap
Kodeblok |
---|
apt-get install nmap
sudo setcap cap_net_raw,cap_net_admin,cap_net_bind_service+eip
sudo setcap cap_net_raw,cap_net_admin,cap_net_bind_service+eip /usr/bin/nmap |
Kodeblok |
---|
device_tracker:
- platform: nmap_tracker
hosts: 10.0.0.0/24
|
Links
https://diyfuturism.com/index.php/2017/11/26/presence-detection-with-home-assistant-bayesian-probability/
...