Metainformationen zur Seite
Home Assistant
SSH-Zugriff auf Home Assistant
Home Assistant Konfiguration automatisch nach GitHub sichern
Share Your Home Assistant Configs on GitHub Automatically. (YouTube)
Im HA Terminal-Addon
ssh-keygen -t rsa -b 4096 -C „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:gatonero/MyHomeAssistantConfig.git
ssh-add /config/.ssh/id_rsa
ssh -T 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.
Home Assistant mit vscode(lokal) auf Samba-Share zugreifen
Eintrag lokal in /etc/fstab
//192.168.178.55/config /home/cs/homeassistant cifs _netdev,nofail,username=cs,password=19cs12 0 0
Home Assistant mit Docker
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“
Installation
++++ Installation |
How to Install Home Assistant Supervised (KIril Peyanski)
sudo mkdir /etc/NetworkManager
erledigt
sudo mkdir /etc/NetworkManager/conf.d
erledigt
sudo nano /etc/NetworkManager/conf.d/100-disable-wifi-mac-randomization.conf
erledigt
[connection] wifi.mac-address-randomization=1 [device] wifi.scan-rand-mac-address=no
erledigt
sudo apt-get update && sudo apt-get upgrade -y
erledigt
sudo apt-get install jq wget curl avahi-daemon udisks2 libglib2.0-bin network-manager dbus apparmor -y
erledigt
sudo reboot
erledigt
curl -fsSL https://get.docker.com -o get-docker.sh
erledigt
sudo sh get-docker.sh
erledigt
sudo usermod -aG docker cs
erledigt
docker version
erledigt
wget https://github.com/home-assistant/os-agent/releases/download/1.2.2/os-agent_1.2.2_linux_armv7.deb
erledigt
sudo dpkg -i os-agent_1.2.2_linux_armv7.deb
erledigt
gdbus introspect -–system –-dest io.hass.os -–object-path /io/hass/os
erledigt
wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
erledigt
sudo dpkg -i homeassistant-supervised.deb
erledigt
dann warten und http://homeassistant:8123 aufrufen.
laaange warten…
Wenn dieser Screen auftaucht dann sichern! Siehe: http://192.168.178.200/dokuwiki/!mywiki/doku.php?id=elektronik:raspberry#sichern_und_wieder_herstellen|
++++
Einrichtung
++++ Einrichtung |
- File editor
- samba + samba backup
https://peyanski.com/home-assistant-backup-on-google-drive-samba-share/ - NODE-RED (nacharbeiten)
https://community.home-assistant.io/t/home-assistant-community-add-on-node-red/55023 - ESPHome
- Terminal & SSH
- OctoPrint
Samba Backup
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}'
Samba Backup manuell oder Dashboard auslösen
service: hassio.addon_stdin data: addon: 15d21743_samba_backup input: trigger
Wartung
- siehe: 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- edit your mistake
- esc +
:wq
to save and exit exit
thenlogin
to get back to hassio CLIhass check
to make sure the conf is right this time
hass restart
- siehe auch // Common Tasks - Container
++++
Statistik
Nginx Proxy Manager
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.
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
Create the notify service (Called by the script). In your configuration.yaml under default_config:
default_config: notify: - name: print_export platform: file filename: /config/www/export.txt timestamp: false
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.