Chris - Home Assistant | ||
| Riki und Rudi Chris Michi Doris | ||
|
HintsHome Assistant / AppDaemon / Dashboardappdaemon.readthedocs.io/en/stable/INSTALL.html
python3 -m venv venv cd venv/ . bin/activate pip3 install appdaemon
über home-assistant -> profil seite einen "longlived access token anlegen" in die appdaemon.yaml eintragen appdaemon -c ~/.appdaemon/
Tasklist - anschauen:ws2812b RGB led ring quinled.info/2019/05/19/quinled-dig-uno-esphome-home-assistant-sample-configuration/ - vielleicht eine uhr mit addessable_lambda: esphome.io/components/light/index.html
Home-Assistant Floorplan:github.com/pkozul/ha-floorplan Home AssistantHabs zum testen ohne docker unter Linux installiert. hass.io mit docker hat sowohl unter opensuse als auch auf einem odroid-xu4 nicht brauchbar funktioniert. Installation Linux:https://www.home-assistant.io/docs/installation/virtualenv systemd service:
Installation odroid-xu4:eMMC Kartehat man eine komplett leere eMMC Karte muss man den bootloader draufkrigen. 1. https://dn.odroid.com/5422/ODROID-XU4/Android/4.4.4_Alpha_6.8_Aug-21-2019/ sd2emmc image downloaden und auf die SD Karte flashen 2. dietpi runterladen und auf die eMMC kopieren 3. von der sd karte booten (switch auf sdcard) 4. warten. dauert 1min 5. sdcard raus, switch auf eMMC reset
dietpi-config
cpu auf 1000MHz max stellen
*** BUG 2020 **** lxml kompiliert nicht mit Fehlermeldung: src/lxml/etree.c:411:11: error: too many arguments to function ‘PyCode_New’ Grund: fritzconnection hat als dependency lxml==4.3.4 und die funktioniert nicht mit python 3.8.0 -- braucht man lxml==4.3.5 oder python 3.7.4 vi /DietPi/dietpi-software und dort python verion auf 3.7.4 setzen
dietpi-software
optimized software ganz unten "home-assistant"
apt-get install vim less
vi /etc/vim/vimrc
set mouse=
getty abdrehen: S0, S1, S2
systemctl stop serial-getty@ttyS0.service
Verwendete HA Plugins:
miflora xiaomi flower care( https://www.home-assistant.io/components/miflora/ ) und Bluetooth aktivieren:
dietpi-config
Pflanzensensor direkt abfrag
hcitool lescan
gatttool --device=C4:7C:8D:64:46:A6 --char-read -a 0x35
fürs zeroconf
apt-get install avahi-utils
HACS Plugin:https://hacs.netlify.com/installation/manual/ hacs installation "using the terminal"
sudo -u homeassistant bash
cd
git clone https://github.com/hacs/integration.git
cd ~/.homeassistant
mkdir custom_components ; cd custom_components
ln -s /home/homeassistant/integration/custom_components/hacs/
make sure the development packages of libxml2 and libxslt are installed => apt-get install python3-lxml reicht nicht (https://stackoverflow.com/questions/5178416/libxml-install-error-using-pip)
apt-get install libxml2-dev libxslt-dev
Starten + enablen
systemctl start home-assistant
!!!! es müssen python plugins kompiliert werden das kann auch eine Stunde dauern !!! in der zwischenzeit weiter bei let's encrypt / apache setup GOOGLE Calendar Plugin:- installation über HACS https://github.com/ljmerza/calendar-card resources: in die raw-Konfigurationseditor gui config übers Web Interface LET'S ENCRYPt.
apt-get install python3-certbot python3-certbot-apache
apache vhost anlegen (im sites-available, ServerName anpassen, softlink ins sites-enabled) certbot einrichten: ( https://certbot.eff.org/lets-encrypt/debianstretch-apache )
certbot --apache
apache https vhost einrichten https://www.home-assistant.io/blog/2015/12/13/setup-encryption-using-lets-encrypt/ https://www.home-assistant.io/docs/ecosystem/apache/
a2enmod proxy_http
a2enmod rewrite
a2enmod proxy_wstunnel
apache2ctl graceful
apache2ctl restart
device tracker-nicht so toll- OpenWRT luci plugin: https://www.home-assistant.io/components/openwrt/ funktioniert: fritz!box: www.home-assistant.io/components/fritz/ Home Assistant Packagesyaml config (configuration.yaml und automation.yaml) kann man rausziehen:
homeassistant: packages: !include_dir_named packages python_script: z.b. Ikea Tradfri - Button + Zigbee led config: https://www.zigbee2mqtt.io/integration/home_assistant
Logging Konfigurierenroot@home-assistant:/home/homeassistant/.homeassistant# cat /etc/tmpfiles.d/home-assistant.conf Logging konfigurieren in /home/homeassistant/homeassistant-start.sh
root@home-assistant:/home/homeassistant# cat homeassistant-start.sh Update Installierendietpi-software reinstall 157 wenn rust spinnt: root@home-assistant:/tmp/DietPi-Software# rm -rf /home/homeassistant/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/
HA User - Passwort zurücksetzen/home/homeassistant/.homeassistant/.storage/ auth_provider.homeassistant dort kann man das passwort händisch ändern (ha stop vorher) $ source bin/activate (homeassistant) $ python Python 3.6.3 (default, Mar 20 2018, 13:50:41) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import bcrypt >>> import base64 >>> password="hello" >>> hashed = bcrypt.hashpw(password.encode(), bcrypt.gensalt(rounds=12)) >>> hashed = base64.b64encode(hashed) >>> print(hashed) Commits / TOX Tests# TOX tests: (pyenv > 2 kann python 3.7.4 installieren) # python 3.7.4 binaries installieren # virtualenv mit neuen binaries anlegen: | /* */ |