Inhaltsverzeichnis
HomeAssistant
- HW: Raspberry Pi 4 (4GB)
- 7„ Touchscreen
- RaspBee (ZigBee)
- Z-Wave.Me USB-Stick
- OS: Arch Linux ARM
Einrichtung
SD-Karte vorbereiten, wie hier beschrieben, den Raspberry mit der SD-Karte starten und Login per ssh mit dem Benutzer alarm,
Passwort alarm
$ su # passwd # passwd alarm # pacman-key --init # pacman-key --populate archlinuxarm # pacman -Syu # nano /etc/hostname # nano /etc/motd
/etc/motd
_ _ _ _ _ | | | | /\ (_) | | | | | |__| | ___ _ __ ___ ___ / \ ___ ___ _ ___| |_ __ _ _ __ | |_ | __ |/ _ \| '_ ` _ \ / _ \ / /\ \ / __/ __| / __| __/ _` | '_ \| __| | | | | (_) | | | | | | __// ____ \\__ \__ \ \__ \ || (_| | | | | |_ |_| |_|\___/|_| |_| |_|\___/_/ \_\___/___/_|___/\__\__,_|_| |_|\__|
# ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime # echo KEYMAP=de-latin1 > /etc/vconsole # echo FONT=lat9w-16 >> /etc/vconsole # nano /etc/locale.gen # locale-gen # echo LANG=de_DE.UTF8 > /etc/locale.conf # pacman -S htop lsof wget bash-completion # sync # reboot
HomeAssistant installieren
$ su # pacman -S docker jq avahi networkmanager apparmor # systemctl start avahi-daemon # systemctl enable avahi-daemon # systemctl start docker # systemctl enable docker # systemctl start NetworkManager # systemctl enable NetworkManager # cd /tmp # curl -Lo installer.sh https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh # bash installer.sh --machine raspberrypi4
RaspBee
$ su # nano /boot/config.txt
/boot/config.txt
gpu_mem=256 initramfs initramfs-linux.img followkernel lcd_rotate=2 dtparam=audio=on dtparam=krnbt=on # raspbee enable_uart=1 dtoverlay=miniuart-bt # disable wifi dtoverlay=disable-wifi
# nano /boot/cmdline.txt
/boot/cmdline.txt
root=/dev/mmcblk0p2 rw rootwait console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 elevator=noop
Autologin
$ su # pacman -S firefox-i18n-de accountsservice lightdm openbox feh # nano /etc/lightdm/lightdm.conf
/etc/lightdm/lightdm.conf
[LightDM] run-directory=/run/lightdm [Seat:*] xserver-command=X -nocursor autologin-user=alarm autologin-session=openbox
# systemctl enable lightdm # systemctl start lightdm # nano /home/alarm/.config/openbox/autostart
/home/alarm/.config/openbox/autostart
#!/bin/bash feh --bg-scale hass.png & while true; do ncat -z localhost 8123 result=$? if [ "$result" != 0 ]; then sleep 1 else break fi done xset -display :0 dpms 60 60 60 firefox --kiosk http://localhost:8123 &hass.png
# systemctl restart lightdm