id101010 / rpiHass

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Raspberry Pi & HASS

Raspberry Prerequisites

HASS Setup

  • Updates:
    $ sudo apt-get update
    $ sudo apt-get upgrade -y

  • Python 3
    $ sudo apt-get install python3 python3-venv python3-pip

  • User für HASS erstellen
    $ sudo useradd -rm homeassistant

  • Virtuelles Verzeichnis erstellen und User berechtigen
    $ cd /srv
    $ sudo mkdir homeassistant
    $ sudo chown homeassistant:homeassistant homeassistant

  • Installation Ausführen
    (homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ pip3 install homeassistant

  • HASS Starten
    (homeassistant) $ hass
    Home assistant ist nun via http://[IP]:8123 erreichbar.

Samba Setup

  • Install Samba
    $ sudo apt-get install samba

  • Konfiguration anpassen
    $ sudo nano /etc/samba/smb.conf >> See smb.conf

  • Samba dienst neustarten
    $ sudo service smbd restart

Konfiguration

configuration.yaml

  • Meistverwendete befehle während der Konfiguration

  • reboot hass service:
    $ sudo systemctl restart home-assistant@homeassistant.service

  • raspi-config: $ sudo raspi-config

  • update hass:
    $ sudo systemctl stop home-assistant@homeassistant.service
    $ sudo su -s /bin/bash homeassistant
    $ source /srv/homeassistant/bin/activate
    $ pip3 install --upgrade homeassistant
    $ exit $ sudo systemctl start home-assistant@homeassistant.service

  • hass logfile:
    $ sudo su -s /bin/bash homeassistant
    $ cd /home/homeassistant/.homeassistant
    $ nano homeassistant.log

  • config datei prüfen lassen:
    $ sudo su -s /bin/bash homeassistant
    $ source /srv/homeassistant/bin/activate
    $ hass --script check_config

  • restart smb: $ sudo service smbd restart

  • reboot rpi: $ sudo shutdown -r now or $ sudo reboot or $ sudo init6

About