Commit 5b6b345f authored by Thomas Eimers's avatar Thomas Eimers

fix diagramms

parent 18686229
Pipeline #96314001 failed with stages
in 16 minutes and 33 seconds
......@@ -2,74 +2,28 @@
## home-assistant Software
[Read Setup](https://www.home-assistant.io/docs/installation/raspberry-pi/)
[Read Setup](https://www.home-assistant.io/hassio/installation/)
Setupverlauf bei mir (bitte den Link oben als Referenz nehmen)
```bash
sudo apt-get install python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev
sudo useradd -rm homeassistant -G dialout,gpio,i2c
cd /srv
sudo mkdir homeassistant
sudo chown homeassistant:homeassistant homeassistant
sudo -i
apt-get install software-properties-common -y
apt-get update
apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat
curl -fsSL get.docker.com | sh
curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s -- -m raspberrypi3
systemctl restart hassio-supervisor.service
```
Kleine Hilfscript `gotoHomeassistant.sh` um in die Home Assistant Umgebung zu wechseln.
sudo mcedit /usr/local/bin/gotoHomeassistant.sh
sudo chmod +x /usr/local/bin/gotoHomeassistant.sh
```text
#!/bin/sh
sudo -u homeassistant -H -s -- bash -c "cd /srv/homeassistant && python3 -m venv . && source bin/activate && bash"
```
```bash
gotoHomeassistant.sh
python3 -m pip install wheel
pip3 install --upgrade homeassistant~=0.100.3
#pip3 install homeassistant => https://github.com/home-assistant/home-assistant/issues/28361
hass
```
Der Start dauert beim ersten mal ~ 2 Minuten
## autostart (optional)
[Enable Autostart](https://www.home-assistant.io/docs/autostart/systemd/)
sudo nano -w /etc/systemd/system/home-assistant@homeassistant.service
```
[Unit]
Description=Home Assistant
Requires=docker.service
After=docker.service
[Service]
Restart=always
RestartSec=3
ExecStart=/usr/bin/docker run --name=home-assistant-%i -v /home/%i/.homeassistant/:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant
ExecStop=/usr/bin/docker stop -t 2 home-assistant-%i
ExecStopPost=/usr/bin/docker rm -f home-assistant-%i
[Install]
WantedBy=multi-user.target
```
```bash
sudo systemctl --system daemon-reload
sudo systemctl enable home-assistant@homeassistant
sudo systemctl start home-assistant@homeassistant
sudo systemctl status home-assistant@homeassistant
```
## Add Mqqt Message Queue to home-assistant
Damit hass die Sensoren uns Schalter automatisch erkennt, muss hass mit der Queue verbunden
werden wo die Heizungsdaten landen, dazu wird die `configure.yaml` angepasst.
mcedit ~/.homeassistant/configuration.yaml
mcedit /usr/share/hassio/homeassistant/configuration.yaml
```yaml
mqtt:
......@@ -85,6 +39,7 @@ mqtt:
https://www.home-assistant.io/docs/configuration/customizing-devices/
# Example complete config
/usr/share/hassio/homeassistant/configuration.yaml
```yaml
# Configure a default setup of Home Assistant (frontend, api, etc)
......@@ -110,13 +65,17 @@ vacuum:
- platform: roomba
host: 192.168.178.35
username: 69B8860C82323530
password: ":1:1573226762:Cx3IotVdiWHrHuI"
password: ":1:1573226762:Cx3IotVdiWHrHuIt"
mqtt:
broker: localhost
discovery: true
discovery_prefix: homeassistant
media_player:
- platform: kodi
host: libreelec
homeassistant:
customize: !include customize.yaml
```
......@@ -146,40 +105,104 @@ device_tracker.t_eimers_pc:
hidden: true
binary_sensor.updater:
hidden: true
device_tracker.pc_9635_aff_fec7_e831:
hidden: true
device_tracker.samsung_galaxy_s7_2:
hidden: true
```
## automations.yaml
```yaml
cat automations.yaml
- id: '1573603852664'
alias: Kellerlicht automatisch aus (in der Nacht)
description: nach 23-07 Uhr
trigger:
- entity_id: switch.flurKeller
- device_id: 7ab800ce05574d24a9bd1332f7072e60
domain: light
entity_id: light.kellerflur
for:
hours: 0
minutes: 1
seconds: 0
from: 'Off'
platform: state
to: 'On'
platform: device
type: turned_on
condition:
- after: '23:00'
- after: '21:00'
before: 07:00
condition: time
action:
- alias: ''
data:
entity_id: switch.flurKeller
service: switch.turn_off
entity_id: light.kellerflur
service: light.turn_off
```
## Switch in home assistant environment
```bash
sudo -u homeassistant -H -s
cd /srv/homeassistant
python3 -m venv .
source bin/activate
hass
```yaml
title: Berkenberg
views:
- path: default_view
title: Home
badges:
- entity: binary_sensor.burner
- entity: binary_sensor.pump
- entity: person.petra
- entity: person.thomas
- entity: sensor.aussen
- entity: sun.sun
cards:
- entity: weather.berkenberg
type: weather-forecast
- entities:
- switch.eco_mode
title: Schalter
type: entities
- entities:
- vacuum.roomba
title: Staubsauger
type: entities
- entity: sensor.aussen
graph: line
name: Außen
theme: default
type: sensor
- path: heizung
title: Heizung
badges:
- entity: binary_sensor.burner
- entity: binary_sensor.pump
- entity: sensor.aussen
- entity: sensor.fussboden_vorlauf
- entity: sensor.heizkorper
- entity: sensor.heizschlange_boiler
- entity: sensor.warmwasser_boiler
- entity: sensor.warmwasser_gebrauch
- entity: sun.sun
cards:
- entity: sensor.aussen
graph: line
name: Außen
theme: default
type: sensor
panel: false
- path: temperatur
title: Temperaturverlauf
cards:
- entities:
- entity: sensor.aussen
- entity: sensor.warmwasser_gebrauch
- entity: sensor.warmwasser_boiler
- entity: sensor.heizkorper
- entity: sensor.fussboden_vorlauf
- entity: sensor.aussen
hours_to_show: 24
refresh_interval: 0
title: Temperaturverlauf
type: history-graph
panel: true
- path: switches
title: schalter
cards:
- type: light
entity: light.kellerflur
name: Kellerflur
```
# conbee II Setup
Der USB Stick wird automatisch erkannt /dev/ttyACM0
## deconz
Ist ein Tool über das man über eine Weboberfläche die Zigbee Geräte konfigurieren
kann. Diese kann man _danach_ in hass verwenden.
deconz muss nicht auf dem raspi installiert werden, dass macht man über hass.io Oberfläche.
Im Plugin gibts den link zur deconz oberfläche
```
Hass.io -> System -> Host system -> Hardware page.
Enable in integrations
Link with deCONZ
Unlock your deCONZ gateway to register with Home Assistant.
Go to deCONZ Settings -> Gateway -> Advanced
Press "Authenticate app" button
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment