Home Assistant

Aus TippvomTibb
Zur Navigation springen Zur Suche springen

Allgemeines

Neben FHEM, welches sehr stabil laeuft, wollte ich mal was neues ausprobieren. iobroker und openHAB konnten mich bisher nicht von FHEM weglocken.

Eigentlich stellt sich die Frage 'Welches System ist das Beste' fuer mich gar nicht, da ich keine der Software als zentrale Instanz sehe.

Und da kaemen wir auch schon mal zum ersten Tipp:

Kabel vor Funk!

Bei mir laeuft jetzt schon seit ueber 20 Jahren EIB/KNX. Hier musste ich noch nie einen Gedanken an Stabilitaet verschwenden. Das System ( ca. 80 Devices) laeuft einfach, ohne Zicken, stabil vor sich hin.

Alles was ich in KNX irgendwie integriert bekomme wird in KNX ergaenzt. Und erst wenn wenn es technisch oder finanziell eine zu große Herausforderung darstellt folgen die Alternativen.

Nachfolgend meine Notizen waehrend des Einstiegs in Home Assitant (HA).

Installation

HA laeuft bei mir in einer VirtualBox auf meinen HomeLAB-Server (OpenSuSE, 16 Kerne, 48 GB, 10T-RAID).

Zugriff ueber HA-Konsole (ha kann weg gelassen werden):

  • ha core restart
  • ha core check

Hier kann man sonst wenig eingreifen. Das meiste laesst sich ueber die REST-API (siehe unten) realisieren.

Terminal & ssh App

Diese App ist fuer mich essenziell.

Die Konsole ist damit ueber Terminal in HA (Seitenleiste) und ueber ssh erreichbar.

Um Inhalte aus dem Terminal heraus zu kopieren 'linke Shift-Taste' festhalten und mit der Maus (LMT gedrueckt halten) Inhalt selektieren.

[core-ssh ~]$ ha --help

The Home Assistant CLI is a small and simple command line utility that allows
you to control and configure different aspects of Home Assistant

Usage:
  ha [command]

Available Commands:
  apps              Install, update, remove and configure Home Assistant apps
  audio             Audio device handling.
  authentication    Authentication for Home Assistant users.
  available-updates Provides information about current pending updates
  backups           Create, restore and remove backups
  banner            Prints the CLI Home Assistant banner along with some useful information
  cli               Get information, update or configure the Home Assistant cli backend
  completion        Generate the autocompletion script for the specified shell
  core              Provides control of the Home Assistant Core
  dns               Get information, update or configure the Home Assistant DNS server
  docker            Docker backend specific for info and OCI configuration
  hardware          Provides hardware information about your system
  help              Help about any command
  host              Control the host/system that Home Assistant is running on
  info              Provides a general Home Assistant information overview
  jobs              Get information and manage running jobs
  mounts            Get information, update or configure mounts in Supervisor
  multicast         Get information, update or configure the Home Assistant Multicast
  network           Network specific for updating, info and configuration imports
  observer          Get information, update or configure the Home Assistant observer
  os                Operating System specific for updating, info and configuration imports
  refresh-updates   Reload stores and version information
  resolution        Resolution center of Supervisor, show issues and suggest solutions
  security          Get information and manage security functionality
  store             Install and update Home Assistant apps and manage stores
  supervisor        Monitor, control and configure the Home Assistant Supervisor

Flags:
      --api-token string   Home Assistant Supervisor API token
      --config string      Optional config file (default is $HOME/.homeassistant.yaml)
      --endpoint string    Endpoint for Home Assistant Supervisor (default is 'supervisor')
  -h, --help               help for ha
      --log-level string   Log level (defaults to Warn)
      --no-progress        Disable the progress spinner
      --raw-json           Output raw JSON from the API

Use "ha [command] --help" for more information about a command.

Als erstes dient mit der ssh-Zugriff um mir einen Ueberblick zu verschaffen. Ich bin halt nicht so der KlickiKlicki.

Die meisten (.yaml) Dateien von Interesse liegen im Verzeichnis /homeassistant.

Fuer KNX werde ich eine eigene yaml-Datei ertsellen und in configuration.yaml einbinden.

nmap

server:~ # nmap -v -A 192.168.178.214 Starting Nmap 7.94 ( https://nmap.org ) at 2026-03-15 09:01 CET NSE: Loaded 156 scripts for scanning. NSE: Script Pre-scanning. Initiating NSE at 09:01 Completed NSE at 09:01, 0.00s elapsed Initiating NSE at 09:01 Completed NSE at 09:01, 0.00s elapsed Initiating NSE at 09:01 Completed NSE at 09:01, 0.00s elapsed Initiating ARP Ping Scan at 09:01 Scanning 192.168.178.214 [1 port] Completed ARP Ping Scan at 09:01, 0.06s elapsed (1 total hosts) Initiating Parallel DNS resolution of 1 host. at 09:01 Completed Parallel DNS resolution of 1 host. at 09:01, 11.03s elapsed Initiating SYN Stealth Scan at 09:01 Scanning 192.168.178.214 [1000 ports] Discovered open port 445/tcp on 192.168.178.214 Discovered open port 111/tcp on 192.168.178.214 Discovered open port 8080/tcp on 192.168.178.214 Discovered open port 139/tcp on 192.168.178.214 Discovered open port 8443/tcp on 192.168.178.214 Discovered open port 6789/tcp on 192.168.178.214 Completed SYN Stealth Scan at 09:01, 0.06s elapsed (1000 total ports) Initiating Service scan at 09:01 Scanning 6 services on 192.168.178.214 Completed Service scan at 09:04, 156.12s elapsed (6 services on 1 host) Initiating OS detection (try #1) against 192.168.178.214 NSE: Script scanning 192.168.178.214. Initiating NSE at 09:04 Completed NSE at 09:04, 14.12s elapsed Initiating NSE at 09:04 Completed NSE at 09:04, 1.37s elapsed Initiating NSE at 09:04 Completed NSE at 09:04, 0.00s elapsed Nmap scan report for 192.168.178.214 Host is up (0.00049s latency). Not shown: 994 closed tcp ports (reset) PORT STATE SERVICE VERSION 111/tcp open rpcbind 2-4 (RPC #100000) | rpcinfo: | program version port/proto service | 100000 2,3,4 111/tcp rpcbind | 100000 2,3,4 111/udp rpcbind | 100000 3,4 111/tcp6 rpcbind |_ 100000 3,4 111/udp6 rpcbind 139/tcp open netbios-ssn Samba smbd 4.6.2 445/tcp open netbios-ssn Samba smbd 4.6.2 6789/tcp open ibm-db2-admin? 8080/tcp open http-proxy |_http-title: Did not follow redirect to https://192.168.178.214:8443/ |_http-open-proxy: Proxy might be redirecting requests | fingerprint-strings: | FourOhFourRequest: | HTTP/1.1 404 | Content-Type: text/html;charset=utf-8 | Content-Language: en | Content-Length: 431 | Date: Sun, 15 Mar 2026 08:01:51 GMT | Connection: close | <!doctype html><html lang="en"><head><title>HTTP Status 404

| Found</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body>

HTTP Status 404 | Found

</body></html>

| GetRequest, HTTPOptions: | HTTP/1.1 302 | Location: https://localhost:8443/ | Content-Length: 0 | Date: Sun, 15 Mar 2026 08:01:51 GMT | Connection: close | RTSPRequest, Socks5: | HTTP/1.1 400 | Content-Type: text/html;charset=utf-8 | Content-Language: en | Content-Length: 435 | Date: Sun, 15 Mar 2026 08:01:51 GMT | Connection: close | <!doctype html><html lang="en"><head><title>HTTP Status 400

| Request</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body>

HTTP Status 400 |_ Request

</body></html>

| http-methods: |_ Supported Methods: GET HEAD POST OPTIONS 8443/tcp open ssl/https-alt | http-title: Site doesn't have a title (text/html). |_Requested resource was /setup/ |_ssl-date: TLS randomness does not represent time | ssl-cert: Subject: commonName=UniFi/organizationName=Ubiquiti Inc./stateOrProvinceName=New York/countryName=US | Subject Alternative Name: DNS:UniFi | Issuer: commonName=UniFi/organizationName=Ubiquiti Inc./stateOrProvinceName=New York/countryName=US | Public Key type: rsa | Public Key bits: 2048 | Signature Algorithm: sha256WithRSAEncryption | Not valid before: 2026-02-21T19:58:46 | Not valid after: 2028-05-26T19:58:46 | MD5: 5319:39aa:eb41:39e1:bd90:8ccf:18c1:f5de |_SHA-1: 438d:0117:d340:0eb2:958e:71a1:9bab:a327:869b:4065 | fingerprint-strings: | FourOhFourRequest: | HTTP/1.1 404 | Content-Type: text/html;charset=utf-8 | Content-Language: en | Content-Length: 431 | Date: Sun, 15 Mar 2026 08:01:58 GMT | Connection: close | <!doctype html><html lang="en"><head><title>HTTP Status 404

| Found</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body>

HTTP Status 404 | Found

</body></html>

| GetRequest: | HTTP/1.1 302 | Set-Cookie: unifises=olLi4hEX2hlNRAZtqjjxyKZJ9jBmDnaU; Path=/; Secure; HttpOnly | Set-Cookie: csrf_token=3WbK2lCEuezYGb0IRC9RJWlPV2Ikc1oG; Path=/; Secure | Location: https://localhost:8443/setup/ | Content-Length: 0 | Date: Sun, 15 Mar 2026 08:01:58 GMT | Connection: close | HTTPOptions: | HTTP/1.1 302 | Set-Cookie: unifises=fNlzz9IXNmVbTEfWNUwEhIrqJvQx0Ymg; Path=/; Secure; HttpOnly | Set-Cookie: csrf_token=hFNitw6GfIU1ThUiBvYVl42d1FWdd7D9; Path=/; Secure | Location: https://localhost:8443/setup/ | Content-Length: 0 | Date: Sun, 15 Mar 2026 08:01:58 GMT | Connection: close | RTSPRequest: | HTTP/1.1 400 | Content-Type: text/html;charset=utf-8 | Content-Language: en | Content-Length: 435 | Date: Sun, 15 Mar 2026 08:02:03 GMT | Connection: close | <!doctype html><html lang="en"><head><title>HTTP Status 400

| Request</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body>

HTTP Status 400 |_ Request

</body></html>

| http-methods: |_ Supported Methods: GET HEAD POST OPTIONS 2 services unrecognized despite returning data. If you know the service/version, please submit the following fingerprints at https://nmap.org/cgi-bin/submit.cgi?new-service :

========NEXT SERVICE FINGERPRINT (SUBMIT INDIVIDUALLY)========

SF-Port8080-TCP:V=7.94%I=7%D=3/15%Time=69B6676F%P=x86_64-suse-linux-gnu%r( SF:GetRequest,7F,"HTTP/1\.1\x20302\x20\r\nLocation:\x20https://localhost:8 SF:443/\r\nContent-Length:\x200\r\nDate:\x20Sun,\x2015\x20Mar\x202026\x200 SF:8:01:51\x20GMT\r\nConnection:\x20close\r\n\r\n")%r(HTTPOptions,7F,"HTTP SF:/1\.1\x20302\x20\r\nLocation:\x20https://localhost:8443/\r\nContent-Len SF:gth:\x200\r\nDate:\x20Sun,\x2015\x20Mar\x202026\x2008:01:51\x20GMT\r\nC SF:onnection:\x20close\r\n\r\n")%r(RTSPRequest,24E,"HTTP/1\.1\x20400\x20\r SF:\nContent-Type:\x20text/html;charset=utf-8\r\nContent-Language:\x20en\r SF:\nContent-Length:\x20435\r\nDate:\x20Sun,\x2015\x20Mar\x202026\x2008:01 SF::51\x20GMT\r\nConnection:\x20close\r\n\r\n<!doctype\x20html><html\x20la SF:ng=\"en\"><head><title>HTTP\x20Status\x20400\x20\xe2\x80\x93\x20Bad\x20 SF:Request</title><style\x20type=\"text/css\">body\x20{font-family:Tahoma, SF:Arial,sans-serif;}\x20h1,\x20h2,\x20h3,\x20b\x20{color:white;background SF:-color:#525D76;}\x20h1\x20{font-size:22px;}\x20h2\x20{font-size:16px;}\ SF:x20h3\x20{font-size:14px;}\x20p\x20{font-size:12px;}\x20a\x20{color:bla

SF:ck;}\x20\.line\x20{height:1px;background-color:#525D76;border:none;}</head><body>

HTTP\x20Status\x20400\x20\xe2\x80\x93\x20Bad\x20R SF:equest

</body></html>")%r(FourOhFourRequest,24A,"HTTP/1\.1\x20404\x

SF:20\r\nContent-Type:\x20text/html;charset=utf-8\r\nContent-Language:\x20 SF:en\r\nContent-Length:\x20431\r\nDate:\x20Sun,\x2015\x20Mar\x202026\x200 SF:8:01:51\x20GMT\r\nConnection:\x20close\r\n\r\n<!doctype\x20html><html\x SF:20lang=\"en\"><head><title>HTTP\x20Status\x20404\x20\xe2\x80\x93\x20Not SF:\x20Found</title><style\x20type=\"text/css\">body\x20{font-family:Tahom SF:a,Arial,sans-serif;}\x20h1,\x20h2,\x20h3,\x20b\x20{color:white;backgrou SF:nd-color:#525D76;}\x20h1\x20{font-size:22px;}\x20h2\x20{font-size:16px; SF:}\x20h3\x20{font-size:14px;}\x20p\x20{font-size:12px;}\x20a\x20{color:b SF:lack;}\x20\.line\x20{height:1px;background-color:#525D76;border:none;}<

SF:/style></head><body>

HTTP\x20Status\x20404\x20\xe2\x80\x93\x20Not\x2 SF:0Found

</body></html>")%r(Socks5,24E,"HTTP/1\.1\x20400\x20\r\nConte

SF:nt-Type:\x20text/html;charset=utf-8\r\nContent-Language:\x20en\r\nConte SF:nt-Length:\x20435\r\nDate:\x20Sun,\x2015\x20Mar\x202026\x2008:01:51\x20 SF:GMT\r\nConnection:\x20close\r\n\r\n<!doctype\x20html><html\x20lang=\"en SF:\"><head><title>HTTP\x20Status\x20400\x20\xe2\x80\x93\x20Bad\x20Request SF:</title><style\x20type=\"text/css\">body\x20{font-family:Tahoma,Arial,s SF:ans-serif;}\x20h1,\x20h2,\x20h3,\x20b\x20{color:white;background-color: SF:#525D76;}\x20h1\x20{font-size:22px;}\x20h2\x20{font-size:16px;}\x20h3\x SF:20{font-size:14px;}\x20p\x20{font-size:12px;}\x20a\x20{color:black;}\x2 SF:0\.line\x20{height:1px;background-color:#525D76;border:none;}</style></

SF:head><body>

HTTP\x20Status\x20400\x20\xe2\x80\x93\x20Bad\x20Request< SF:/h1></body></html>");

========NEXT SERVICE FINGERPRINT (SUBMIT INDIVIDUALLY)========

SF-Port8443-TCP:V=7.94%T=SSL%I=7%D=3/15%Time=69B66776%P=x86_64-suse-linux- SF:gnu%r(GetRequest,11F,"HTTP/1\.1\x20302\x20\r\nSet-Cookie:\x20unifises=o SF:lLi4hEX2hlNRAZtqjjxyKZJ9jBmDnaU;\x20Path=/;\x20Secure;\x20HttpOnly\r\nS SF:et-Cookie:\x20csrf_token=3WbK2lCEuezYGb0IRC9RJWlPV2Ikc1oG;\x20Path=/;\x SF:20Secure\r\nLocation:\x20https://localhost:8443/setup/\r\nContent-Lengt SF:h:\x200\r\nDate:\x20Sun,\x2015\x20Mar\x202026\x2008:01:58\x20GMT\r\nCon SF:nection:\x20close\r\n\r\n")%r(HTTPOptions,11F,"HTTP/1\.1\x20302\x20\r\n SF:Set-Cookie:\x20unifises=fNlzz9IXNmVbTEfWNUwEhIrqJvQx0Ymg;\x20Path=/;\x2 SF:0Secure;\x20HttpOnly\r\nSet-Cookie:\x20csrf_token=hFNitw6GfIU1ThUiBvYVl SF:42d1FWdd7D9;\x20Path=/;\x20Secure\r\nLocation:\x20https://localhost:844 SF:3/setup/\r\nContent-Length:\x200\r\nDate:\x20Sun,\x2015\x20Mar\x202026\ SF:x2008:01:58\x20GMT\r\nConnection:\x20close\r\n\r\n")%r(FourOhFourReques SF:t,24A,"HTTP/1\.1\x20404\x20\r\nContent-Type:\x20text/html;charset=utf-8 SF:\r\nContent-Language:\x20en\r\nContent-Length:\x20431\r\nDate:\x20Sun,\ SF:x2015\x20Mar\x202026\x2008:01:58\x20GMT\r\nConnection:\x20close\r\n\r\n SF:<!doctype\x20html><html\x20lang=\"en\"><head><title>HTTP\x20Status\x204 SF:04\x20\xe2\x80\x93\x20Not\x20Found</title><style\x20type=\"text/css\">b SF:ody\x20{font-family:Tahoma,Arial,sans-serif;}\x20h1,\x20h2,\x20h3,\x20b SF:\x20{color:white;background-color:#525D76;}\x20h1\x20{font-size:22px;}\ SF:x20h2\x20{font-size:16px;}\x20h3\x20{font-size:14px;}\x20p\x20{font-siz SF:e:12px;}\x20a\x20{color:black;}\x20\.line\x20{height:1px;background-col

SF:or:#525D76;border:none;}</style></head><body>

HTTP\x20Status\x20404\ SF:x20\xe2\x80\x93\x20Not\x20Found

</body></html>")%r(RTSPRequest,24E,

SF:"HTTP/1\.1\x20400\x20\r\nContent-Type:\x20text/html;charset=utf-8\r\nCo SF:ntent-Language:\x20en\r\nContent-Length:\x20435\r\nDate:\x20Sun,\x2015\ SF:x20Mar\x202026\x2008:02:03\x20GMT\r\nConnection:\x20close\r\n\r\n<!doct SF:ype\x20html><html\x20lang=\"en\"><head><title>HTTP\x20Status\x20400\x20 SF:\xe2\x80\x93\x20Bad\x20Request</title><style\x20type=\"text/css\">body\ SF:x20{font-family:Tahoma,Arial,sans-serif;}\x20h1,\x20h2,\x20h3,\x20b\x20 SF:{color:white;background-color:#525D76;}\x20h1\x20{font-size:22px;}\x20h SF:2\x20{font-size:16px;}\x20h3\x20{font-size:14px;}\x20p\x20{font-size:12 SF:px;}\x20a\x20{color:black;}\x20\.line\x20{height:1px;background-color:#

SF:525D76;border:none;}</style></head><body>

HTTP\x20Status\x20400\x20\ SF:xe2\x80\x93\x20Bad\x20Request

</body></html>");

MAC Address: 08:00:27:A9:67:A4 (Oracle VirtualBox virtual NIC) Device type: general purpose Running: Linux 4.X|5.X OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 OS details: Linux 4.15 - 5.8 Uptime guess: 38.459 days (since Wed Feb 4 22:04:15 2026) Network Distance: 1 hop TCP Sequence Prediction: Difficulty=263 (Good luck!) IP ID Sequence Generation: All zeros

Host script results: | smb2-time: | date: 2026-03-15T08:04:24 |_ start_date: N/A | smb2-security-mode: | 3:1:1: |_ Message signing enabled but not required | nbstat: NetBIOS name: HOMEASSISTANT, NetBIOS user: <unknown>, NetBIOS MAC: <unknown> (unknown) | Names: | HOMEASSISTANT<00> Flags: <unique><active> | HOMEASSISTANT<03> Flags: <unique><active> | HOMEASSISTANT<20> Flags: <unique><active> | CLXHA<00> Flags: <group><active> |_ CLXHA<1e> Flags: <group><active>

TRACEROUTE HOP RTT ADDRESS 1 0.49 ms 192.168.178.214

NSE: Script Post-scanning. Initiating NSE at 09:04 Completed NSE at 09:04, 0.00s elapsed Initiating NSE at 09:04 Completed NSE at 09:04, 0.00s elapsed Initiating NSE at 09:04 Completed NSE at 09:04, 0.00s elapsed Read data files from: /usr/bin/../share/nmap OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 184.76 seconds

          Raw packets sent: 1023 (45.806KB) | Rcvd: 1016 (41.354KB)

server:~ #