{"id":373,"date":"2018-11-21T21:28:05","date_gmt":"2018-11-21T20:28:05","guid":{"rendered":"http:\/\/chrigi.me\/wordpress\/?p=373"},"modified":"2019-01-12T17:23:01","modified_gmt":"2019-01-12T16:23:01","slug":"autostart-aller-home-assistant-dienste","status":"publish","type":"post","link":"https:\/\/chrigi.me\/wordpress\/autostart-aller-home-assistant-dienste\/","title":{"rendered":"Autostart aller Home Assistant Dienste"},"content":{"rendered":"<h2>Home Assistant (Kurz Zusammenfassung)<\/h2>\n<p><a href=\"https:\/\/www.home-assistant.io\/docs\/autostart\/systemd\/\">https:\/\/www.home-assistant.io\/docs\/autostart\/systemd\/<\/a><\/p>\n<p>Datei anlegen (sudo nano \/etc\/systemd\/system\/[service_name]@[your user].service)<\/p>\n<pre class=\"lang:sh decode:true\">sudo nano \/etc\/systemd\/system\/home-assistant@homeassistant.service<\/pre>\n<p>Folgenden Inhalt in Datei kopieren (Shift + Insert)<\/p>\n<pre class=\"lang:default decode:true\">[Unit]\nDescription=Home Assistant\nAfter=network-online.target\n\n[Service]\nType=simple\nUser=%i\nExecStart=\/srv\/homeassistant\/bin\/hass -c \"\/home\/homeassistant\/.homeassistant\"\n\n[Install]\nWantedBy=multi-user.target\n<\/pre>\n<p>Aktivieren und starten<\/p>\n<pre class=\"lang:default decode:true\">sudo systemctl --system daemon-reload\nsudo systemctl enable home-assistant@homeassistant\nsudo systemctl start home-assistant@homeassistant\n<\/pre>\n<p>Restart<\/p>\n<pre class=\"lang:default decode:true\">sudo systemctl restart home-assistant@homeassistant\n<\/pre>\n<h2><\/h2>\n<h2>Configurator (Kurz Zusammenfassung)<\/h2>\n<pre class=\"lang:sh decode:true crayon-selected\">sudo nano \/etc\/systemd\/system\/hassconfigurator.service<\/pre>\n<p>Folgenden Inhalt in Datei kopieren (Shift + Insert)<\/p>\n<pre class=\"lang:default decode:true\">[Unit]\nDescription=HASS-PoC-Configurator\nAfter=network.target\n\n[Service]\nType=simple\n#Set the path to your configurator.py location\nExecStart=\/usr\/bin\/python3 \/home\/homeassistant\/.homeassistant\/configurator.py\n\n[Install]\nWantedBy=multi-user.target\n<\/pre>\n<p>Aktivieren und starten<\/p>\n<pre class=\"lang:default decode:true\">sudo systemctl --system daemon-reload\nsudo systemctl enable hassconfigurator.service\nsudo systemctl start hassconfigurator.service<\/pre>\n<h2>Wichtige systemd Befehle<\/h2>\n<h3>Deamons neu laden<\/h3>\n<pre class=\"lang:sh decode:true\">sudo systemctl --system daemon-reload<\/pre>\n<h2>Service aktivieren\/deaktivieren<\/h2>\n<pre class=\"lang:sh decode:true\">sudo systemctl enable [service_name]@[your user]\n\nsudo systemctl disable [service_name]@[your user]\n<\/pre>\n<h2>Service starten \/ stoppen \/ neu starten \/ status<\/h2>\n<pre class=\"lang:sh decode:true\">sudo systemctl start[service_name]@[your user]\n\nsudo systemctl stop[service_name]@[your user]\n\nsudo systemctl restart[service_name]@[your user]\n\nsudo systemctl status[service_name]@[your user]\n<\/pre>\n<h3><\/h3>\n<h3>Service output loggen<\/h3>\n<h4>Alles ausgeben<\/h4>\n<pre class=\"lang:default decode:true \">sudo journalctl -f -u [service_name]@[your user]<\/pre>\n<h4>Nur Fehler ausgeben<\/h4>\n<pre class=\"lang:sh decode:true \">sudo journalctl -f -u home-assistant@[your user] | grep -i 'error'<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Home Assistant (Kurz Zusammenfassung) https:\/\/www.home-assistant.io\/docs\/autostart\/systemd\/ Datei anlegen (sudo nano \/etc\/systemd\/system\/[service_name]@[your user].service) sudo nano \/etc\/systemd\/system\/home-assistant@homeassistant.service Folgenden Inhalt in Datei kopieren (Shift + Insert) [Unit] Description=Home Assistant After=network-online.target [Service] Type=simple User=%i ExecStart=\/srv\/homeassistant\/bin\/hass -c &#8222;\/home\/homeassistant\/.homeassistant&#8220; [Install] WantedBy=multi-user.target Aktivieren und starten sudo systemctl &#8211;system daemon-reload sudo systemctl enable home-assistant@homeassistant sudo systemctl start home-assistant@homeassistant Restart&#8230; <a href=\"https:\/\/chrigi.me\/wordpress\/autostart-aller-home-assistant-dienste\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","footnotes":""},"categories":[1,10,128],"tags":[],"class_list":["post-373","post","type-post","status-publish","format-standard","hentry","category-linux","category-raspberry-pi","category-smart-home"],"_links":{"self":[{"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/posts\/373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/comments?post=373"}],"version-history":[{"count":6,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/posts\/373\/revisions"}],"predecessor-version":[{"id":508,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/posts\/373\/revisions\/508"}],"wp:attachment":[{"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/media?parent=373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/categories?post=373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/tags?post=373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}