Metainformationen zur Seite
  •  

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
digitales:software:homeassistant:homeassistant [23.10.2023] – gelöscht - Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1digitales:software:homeassistant:homeassistant [24.04.2025] (aktuell) – ↷ Links angepasst, weil Seiten im Wiki verschoben wurden cs
Zeile 1: Zeile 1:
 +{{tag>Software Home_Assistant Nützliche_Links}}
 +
 +====== Home Assistant ======
 +
 +
 +===== SSH-Zugriff auf Home Assistant =====
 +
 +{{youtube>1Is7Breg690?t=142}}
 +
 +[[sprachassistent]]
 +
 +===== Home Assistant Konfiguration automatisch nach GitHub sichern =====
 +
 +[[https://youtu.be/hhv-WqGUy_o|Share Your Home Assistant Configs on GitHub Automatically. (YouTube)]]
 +
 +Im HA Terminal-Addon
 +
 +  - ''ssh-keygen -t rsa -b 4096 -C "[[christoph.schwaeppe@gmail.com|christoph.schwaeppe@gmail.com]]"''
 +  - ''git config core.sshCommand 'ssh -i UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa -F /dev/null'''
 +  - ''git config core.sshCommand "ssh -i /root/config/.ssh/id_rsa -F /dev/n''
 +  - ''git remote set-url origin [[git@github.com|git@github.com]]:gatonero/MyHomeAssistantConfig.git''
 +  - ''ssh-add /config/.ssh/id_rsa''
 +  - ''ssh -T [[git@github.com|git@github.com]]''
 +  - ''git config core.sshCommand 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa -F /dev/null'''
 +
 +
 +===== Common Tasks =====
 +
 +In diesem Abschnitt finden Sie Anleitungen zu einigen allgemeinen Aufgaben und Informationen, die Sie zum Ausführen, Warten und Bearbeiten Ihres Home Assistant-Betriebssystems benötigen. Weitere Informationen zu einem bestimmten Thema finden Sie in der Dokumentation zu den hier aufgeführten spezifischen Add-ons oder Themen.
 +
 +  * [[https://www.home-assistant.io/common-tasks/os/|Common Tasks - Operating System]]
 +  * [[https://www.home-assistant.io/more-info/free-space/|Clear up storage]]
 +
 +===== Home Assistant mit vscode(lokal) auf Samba-Share zugreifen =====
 +
 +  * [[https://community.home-assistant.io/t/how-to-edit-home-assistant-config-from-locally-installed-visual-studio-code/322571|How to edit Home Assistant config from locally installed Visual Studio Code]]
 +
 +Eintrag lokal in /etc/fstab
 +
 +<code ->
 +//192.168.178.55/config /home/cs/homeassistant cifs _netdev,nofail,username=cs,password=19cs12 0 0
 +</code>
 +
 +===== Home Assistant mit Docker =====
 +
 +  * [[https://sequr.be/blog/|https://sequr.be/blog/]]
 +  * [[https://sequr.be/blog/2022/09/home-assistant-container-part-2-home-assistant-container/|Home Assistant Container Part 2: Home Assistant Container]]
 +  * [[https://sequr.be/blog/2022/09/home-assistant-container-part-3-mariadb-and-influxdb/|Home Assistant Container Part 3: MariaDB and InfluxDB]]
 +  * [[https://sequr.be/blog/2022/09/home-assistant-container-part-4-mosquitto-docker-container/|Home Assistant Container Part 4: Mosquitto Docker Container]]
 +  * [[https://sequr.be/blog/2022/09/home-assistant-container-part-6-editing-configuration.yaml-from-within-home-assistant/|Home Assistant Container Part 6: Editing configuration.yaml from within Home Assistant]]
 +  * [[https://sequr.be/blog/2022/09/home-assistant-container-part-7-backing-up-home-assistant-container/|Home Assistant Container Part 7: Backing up Home Assistant Container]]
 +  * [[https://sequr.be/blog/2022/09/home-assistant-container-part-8-update-home-assistant-container/|Home Assistant Container Part 8: Update Home Assistant Container]]
 +  * [[https://sequr.be/blog/2022/09/home-assistant-container-part-9-esphome/|Home Assistant Container Part 9: ESPHome]]
 +  * [[https://sequr.be/blog/2022/10/home-assistant-container-part-10-zigbee2mqtt/|Home Assistant Container Part 10: Zigbee2MQTT]]
 +  * [[https://www.schreiners-it.de/proxmox/usb-geraet-in-lxc-container-unter-proxmox-7-1/|USB Gerät in LXC Container unter Proxmox 7.x]]
 +  * [[https://tteck.github.io/Proxmox/|Proxmox VE Helper Scripts]]
 +
 +Bus **003**  Device **010**: ID 1cf1:0030 Dresden Elektronik ZigBee gateway [ConBee II]
 +
 +crw-rw-r– 1 root root **189**, 265 Apr 28 20:24 /dev/bus/usb/003/010
 +
 +BUS-ID = 003
 +
 +DEVICE-ID = 010
 +
 +''sudo nano /etc/pve/lxc/300.conf''
 +
 +''lxc.cgroup2.devices.allow: c 189:* rwm lxc.mount.entry: /dev/bus/usb/003/010 dev/bus/usb/ none bind,optional,create=file''
 +
 +ATTRS{idVendor}=="1cf1"
 +
 +ATTRS{idProduct}=="0030"
 +
 +[[mqtt]]
 +
 +[[https://www.edvpfau.de/kurztipp-json-vergleichen/|Kurztipp: JSON vergleichen]]
 +
 +[[http://jsondiff.com|JSON Diff - The semantic JSON compare tool]]
 +
 +===== Installation =====
 +
 +++++ Installation |
 +
 +[[https://peyanski.com/how-to-install-home-assistant-supervised-official-way/#How_to_Install_Home_Assistant_Supervised|How to Install Home Assistant Supervised (KIril Peyanski)]]
 +
 +<code ->
 +sudo mkdir /etc/NetworkManager
 +</code>
 +
 +<todo>erledigt</todo>
 +
 +<code ->
 +sudo mkdir /etc/NetworkManager/conf.d
 +</code>
 +
 +<todo>erledigt</todo>
 +
 +<code ->
 +sudo nano /etc/NetworkManager/conf.d/100-disable-wifi-mac-randomization.conf
 +</code>
 +
 +<todo>erledigt</todo>
 +
 +<code ->
 +[connection]
 +wifi.mac-address-randomization=1
 +[device]
 +wifi.scan-rand-mac-address=no
 +</code>
 +
 +<todo>erledigt</todo>
 +
 +<code ->
 +sudo apt-get update && sudo apt-get upgrade -y
 +</code>
 +
 +<todo>erledigt</todo>
 +
 +<code ->
 +sudo apt-get install jq wget curl avahi-daemon udisks2 libglib2.0-bin network-manager dbus apparmor -y
 +</code>
 +
 +<todo>erledigt</todo>
 +
 +<code ->
 +sudo reboot
 +</code>
 +
 +<todo>erledigt</todo>
 +
 +<code ->
 +curl -fsSL https://get.docker.com -o get-docker.sh
 +</code>
 +
 +<todo>erledigt</todo>
 +
 +<code ->
 +sudo sh get-docker.sh
 +</code>
 +
 +<todo>erledigt</todo>
 +
 +<code ->
 +sudo usermod -aG docker cs
 +</code>
 +
 +<todo>erledigt</todo>
 +
 +<code ->
 +docker version
 +</code>
 +
 +<todo>erledigt</todo>
 +
 +<code ->
 +wget https://github.com/home-assistant/os-agent/releases/download/1.2.2/os-agent_1.2.2_linux_armv7.deb
 +</code>
 +
 +<todo>erledigt</todo>
 +
 +<code ->
 +sudo dpkg -i os-agent_1.2.2_linux_armv7.deb
 +</code>
 +
 +<todo>erledigt</todo>
 +
 +<code ->
 +gdbus introspect -–system –-dest io.hass.os -–object-path /io/hass/os
 +</code>
 +
 +<todo>erledigt</todo>
 +
 +<code ->
 +wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
 +</code>
 +
 +<todo>erledigt</todo>
 +
 +<code ->
 +sudo dpkg -i homeassistant-supervised.deb
 +</code>
 +
 +<todo>erledigt</todo>
 +
 +dann warten und [[http://homeassistant:8123|http://homeassistant:8123]] aufrufen. :-)
 +
 +{{ :images:first_screen.png?400&nolink }}
 +
 +laaange warten…
 +
 +{{ :images:first_screen.png?400&nolink }}
 +
 +**Wenn dieser Screen auftaucht dann sichern!**  Siehe: [[..:..:sdr:hardware:raspberry#sichern_und_wieder_herstellen|http://192.168.178.200/dokuwiki/!mywiki/doku.php?id=elektronik:raspberry#sichern_und_wieder_herstellen|]]
 +
 +++++
 +
 +===== Einrichtung =====
 +
 +++++ Einrichtung |
 +
 +  - **File editor**
 +  - **duckdns** \\ [[https://peyanski.com/home-assistant-remote-access/|https://peyanski.com/home-assistant-remote-access/]] \\ [[https://www.home-assistant.io/integrations/duckdns/|https://www.home-assistant.io/integrations/duckdns/]]
 +  - **samba + samba backup** \\ [[https://peyanski.com/home-assistant-backup-on-google-drive-samba-share/|https://peyanski.com/home-assistant-backup-on-google-drive-samba-share/]]
 +  - **MQTT + Shelly** \\ [[https://sequr.be/blog/2020/10/mqtt-templates-for-shelly-devices/#shelly-plug-s|Getting started with MQTT and Home Assistant (and Shelly) ]] \\ [[https://peyanski.com/mqtt-home-assistant-and-node-red-integration/|https://peyanski.com/mqtt-home-assistant-and-node-red-integration/]]
 +  - **NODE-RED**  (nacharbeiten) \\ [[https://community.home-assistant.io/t/home-assistant-community-add-on-node-red/55023|https://community.home-assistant.io/t/home-assistant-community-add-on-node-red/55023]]
 +  - **ESPHome**
 +  - Terminal & SSH
 +  - **HACS** \\ [[https://hacs.xyz/docs/setup/prerequisites|https://hacs.xyz/docs/setup/prerequisites]]
 +  - **Telegram** \\ [[https://peyanski.com/ultimate-home-assistant-notifications/#Home_Assistant_Notifications_-_Telegram|https://peyanski.com/ultimate-home-assistant-notifications/#Home_Assistant_Notifications_-_Telegram]]
 +  - **OctoPrint**
 +  - **OpenWeather** \\ [[http://api.openweathermap.org/data/2.5/weather?q=Aachen&APPID=312921f22273e8bcd777487de76f927a|http://api.openweathermap.org/data/2.5/weather?q=Aachen&APPID=312921f22273e8bcd777487de76f927a]]
 +
 +**Samba Backup**
 +
 +<code ->
 +host: 192.168.178.200
 +share: homes
 +target_dir: /cs/Drive/Dokumente/cloud/gdrive/HABackup
 +username: cs
 +password: uhpc49C5+#
 +keep_local: '5'
 +keep_remote: '20'
 +trigger_time: '04:00'
 +trigger_days:
 +  - Mon
 +  - Tue
 +  - Wed
 +  - Thu
 +  - Fri
 +  - Sat
 +  - Sun
 +exclude_addons: []
 +exclude_folders: []
 +backup_name: '{type} Backup {date}'
 +</code>
 +
 +**Samba Backup manuell oder Dashboard auslösen**
 +
 +<code ->
 +service: hassio.addon_stdin
 +data:
 +  addon: 15d21743_samba_backup
 +  input: trigger
 +</code>
 +
 +===== Wartung =====
 +
 +  - siehe: [[https://community.home-assistant.io/t/solved-restarting-home-assistant-from-the-command-line-without-restarting-container-other-cmds-works-with-docker/122246|Restarting Home Assistant from the command line (without restarting container) + other cmds (works with Docker)]] \\  ''login''  to get out of hassio cli and into bash
 +  - ''docker ps''  to get a list of containers
 +  - note the first 3 characters or so of the container for homeassistant - for me it was **cd0**
 +  - ''docker exec -it cd0 /bin/bash''
 +  - ''ls''  to make sure configuration.yaml is there
 +  - ''vi configuration.yaml''  to edit the file \\ [[https://coderwall.com/p/adv71w/basic-vim-commands-for-getting-started|Basic Vim commands - For getting started]]
 +  - edit your mistake
 +  - esc + '':wq''  to save and exit
 +  - ''exit''  then ''login''  to get back to hassio CLI
 +  - ''hass check''  to make sure the conf is right this time \\ ''hass restart''
 +  - siehe auch [[https://www.home-assistant.io/common-tasks/container/|// Common Tasks - Container]]
 +
 +++++
 +
 +===== Statistik =====
 +
 +[[https://cgomesu.com/blog/smarter-hass/|Getting started on the analytical tools]]
 +
 +===== Nginx Proxy Manager =====
 +
 +[[https://www.rogerfrost.com/using-nginx-proxy-manager-with-home-assistant-internal-error/|use nginx proxy manager with home assistant to access many network devices]]
 +
 +===== Export devices and entities =====
 +
 +Create a script to call the **//service//**  and link it to a button on your desktop for easy activation. Examining mine, you will see I use a **~**  for column separation.
 +
 +<code ->
 +alias: print_entity_attributes
 +sequence:
 +  - service: notify.print_export
 +    data_template:
 +      message: |
 +        {% for state in states %}{{ state.entity_id }}~{{ state.domain }}~{{ state.object_id }}~{{ state.name }}~~{{ state.attributes.icon, state.attributes.friendly_name }}~~{{ state.state }}
 +        {% endfor %}
 +mode: single
 +icon: mdi:cloud-print-outline
 +</code>
 +
 +Create the notify service (Called by the script). In your configuration.yaml under **default_config:**
 +
 +<code ->
 +default_config:
 +notify:
 +- name: print_export
 +  platform: file
 +  filename: /config/www/export.txt
 +  timestamp: false
 +</code>
 +
 +Notes: \\ **filename: /config/www/export.txt**  designates the destination and name of the file. If the file already exists and it is called again, it will append to the existing results. You could go directly to a **.CSV**  but as you will notice, the first two lines need deleting; additionally, if there are any **,**'s (commas) in the file, they need to be remedied before [Search and replace all ~ for ,] Finally you can save and rename the extension to .CSV and you should have everything you are looking for.
 +
 +===== Problembehandlung =====
 +
 +[[https://community.home-assistant.io/t/2022-12-color-states-are-broken-unusable/499890/165|2022.12 Color states are broken/unusable]]
 +
 +===== YAML =====
 +
 +[[..:yaml]]
 +
 +===== Nützliche Links =====
 +
 +  * [[https://companion.home-assistant.io/docs/notifications/notifications-basic/|HA Companion App]]
 +  * [[https://www.awesome-ha.com/|The Awesome List ]]
 +  * [[https://smarthome.university/automations/|Automation Ideas Bank]]
 +