Prochaine révision | Révision précédente |
raspberry:homeassistant [2019/08/13 12:16] – modification externe 127.0.0.1 | raspberry:homeassistant [2024/12/23 14:49] (Version actuelle) – modification externe 127.0.0.1 |
---|
====== Installation de Home assistant ====== | ====== Installation de Home assistant ====== |
| C'est en deux partie:\\ |
| * Ancienne install en dur. |
| * Nouvelle install MAJ 2020 sur un docker. |
| |
| ====== MAJ 2020 ====== |
| Pour installer sur un docker, il y a la doc officiel :\\ |
| [[https://www.home-assistant.io/docs/installation/docker]] \\ |
| J'ai suivi celle ci :\\ |
| [[https://forum.hardware.fr/hfr/electroniquedomotiquediy/domotique_maisonconnectee/domotique-assistant-hass-sujet_1692_1.htm]] |
| |
| ===== Installation ===== |
| On par sur la dernière distrib de rapsbian (buster).\\ |
| On configure comme on veut (raspi-config) \\ |
| Ne pas oublier l'update/upgrade \\ |
| Mettre l'heure à jour. |
| |
| Ensuite on suit la doc officielle :\\ |
| <code bash> |
| sudo -i |
| apt update |
| apt install -y software-properties-common apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat |
| # Installer docker |
| curl -fsSL get.docker.com | sh |
| </code> |
| |
| INSTALLER COCKPIT \\ |
| perso je ne connaissais pas mais ça a l'air bien pour administrer ses docker.\\ |
| CITATION : "installe cockpit pour pouvoir avoir un accès et un monitoring extérieur à Hassio, en backup au cas où quelque chose tournerait mal (et j'ai bien fait, ça m'a sauvé). |
| EDIT : il semble y avoir webmin comme alternative : http://www.webmin.com/, qui a l'air de proposer au moins autant de fonctions ! |
| <code bash> |
| sudo -i |
| apt install cockpit |
| apt install cockpit-docker |
| </code> |
| Ensuite on peu accéder à cockpit par http://ip rapsberry:9090 |
| |
| Si vous avez installer votre OS avec une interface graphique, il faut désactiver la mise en veille.\\ |
| Vous pouvez faire (pas testé) :\\ |
| <code bash> |
| systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target |
| </code> |
| |
| Ensuite si on suit la doc, il n'y a plus qu'a :\\ |
| il ne reste plus qu'à lancer le script d'installation : |
| <code bash> |
| curl -sL "https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh" | bash -s |
| </code> |
| |
| SAUF que ça ne marche pas !\\ |
| Déjà il manque apparmor et jq, pas grave un apt install et hop. \\ |
| Par contre le script plante ! |
| |
| En le décortiquant, je me suis rendu compte qu'il y a des options.\\ |
| Du coup j'ai téléchargé le script et l'ai éxécuté :\\ |
| <code bash> |
| curl -sL "https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh" >> hass-install.sh |
| mkdir /home/pi/hass |
| |
| root@hass:~# bash hass-install.sh -m raspberrypi3 -d /home/pi/hass |
| [warn] |
| [warn] If you want more control over your own system, run |
| [warn] Home Assistant as a VM or run Home Assistant Core |
| [warn] via a Docker container. |
| [warn] |
| [warn] If you want to abort, hit ctrl+c within 10 seconds... |
| [warn] |
| [warn] ModemManager service is enabled. This might cause issue when using serial devices. |
| [info] Creating NetworkManager configuration |
| [warn] Changes are needed to the /etc/network/interfaces file |
| [info] If you have modified the network on the host manualy, those can now be overwritten |
| [info] If you do not overwrite this now you need to manually adjust it later |
| [info] Do you want to proceed with that? [N/y] |
| |
| [info] Restarting NetworkManager |
| [info] Install supervisor Docker container |
| [info] Install supervisor startup scripts |
| [info] Install AppArmor scripts |
| [info] Start Home Assistant Supervised |
| [info] Installing the 'ha' cli |
| [info] |
| [info] Home Assistant supervised is now installed |
| [info] First setup will take some time, when it's ready you can reach it here: |
| [info] http://192.168.1.80:8123 |
| [info] |
| |
| </code> |
| |
| Voilà, il faut attendre un peu et on peu utiliser home assistant AVEC supervisor :-) \\ |
| On peu ajouter les add-ons que l'on veut. |
| |
| On peu vérifier que tous les docker soient en route :\\ |
| <code bash> |
| docker ps |
| CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
| 790043ac002e homeassistant/raspberrypi4-homeassistant:landingpage "/init" 52 seconds ago Up 49 seconds homeassistant |
| d144d3cfb7a8 homeassistant/armv7-hassio-multicast:3 "/init" 58 seconds ago Up 56 seconds hassio_multicast |
| f5f956e1bc78 homeassistant/armv7-hassio-observer:2020.10.1 "/init" About a minute ago Up About a minute 0.0.0.0:4357->80/tcp hassio_observer |
| 006733db8ca4 homeassistant/armv7-hassio-cli:2020.11.1 "/init /bin/bash -c …" About a minute ago Up About a minute hassio_cli |
| 199a97c55a65 homeassistant/armv7-hassio-audio:17 "/init" About a minute ago Up About a minute hassio_audio |
| fe3b08fd8d13 homeassistant/armv7-hassio-dns:2020.11.0 "/init" About a minute ago Up About a minute hassio_dns |
| 228b8d9d24b8 homeassistant/armv7-hassio-supervisor "/init" 2 minutes ago Up 2 minutes hassio_supervisor |
| </code> |
| |
| |
| ====== Ancienne installation ====== |
| |
Je vais suivre cette page :\\ | Je vais suivre cette page :\\ |
https://www.home-assistant.io/docs/installation/virtualenv/ | [[https://www.home-assistant.io/docs/installation/virtualenv/]] \\ |
| on peu aussi utiliser la doc offcielle :\\ |
| [[https://www.home-assistant.io/docs/installation/raspberry-pi/]] |
| |
===== Installer ===== | ===== Installer ===== |