HomeAssistant: Skirtumas tarp puslapio versijų

Iš Žinynas.
Jump to navigation Jump to search
(Naujas puslapis: == Docker == Dockeris ant paprasto networkingo (be host) su nginx proxy. <syntaxhighlight lang="bash"> docker run \ -d \ --name homeassistant \ --restart unless-stopped \...)
 
 
69 eilutė: 69 eilutė:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 +
== mDNS reflector ==
 +
 +
Host'e kur hostinami dockeriai reikalingas avahi daemono konfigas kuris veiktų reflector mode.
 +
cat /etc/avahi/avahi-daemon.conf
 +
  [reflector]
 +
  enable-reflector=yes
 +
  #reflect-ipv=no
  
  

Dabartinė 06:40, 10 rugsėjo 2021 versija

Docker[keisti]

Dockeris ant paprasto networkingo (be host) su nginx proxy.

docker run \
 -d \
 --name homeassistant \
 --restart unless-stopped \
 -p 127.0.0.1:8123:8123 \
 -p 21065:21065 \
 -v /etc/localtime:/etc/localtime:ro \
 -v /path/to/config:/config \
 homeassistant/home-assistant:stable

Nginx proxy[keisti]

server {
  listen 80;
  server_name homeassistant.lan;
  client_max_body_size 1024M;

  location / {
           proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
           proxy_set_header        Accept-Encoding   "";
	       proxy_set_header        Host            $host;
	       proxy_set_header        X-Real-IP       $remote_addr;
 	       proxy_set_header        X-Forwarded-Proto $scheme;
           proxy_http_version 1.1;
           proxy_set_header        Upgrade $http_upgrade;
           proxy_set_header        Connection "upgrade"; 
           proxy_pass  http://127.0.0.1:8123;
	       proxy_redirect     off;
	}

   location /api/websocket {
       proxy_pass http://127.0.0.1:8123/api/websocket;
       proxy_set_header        Accept-Encoding   "";
	   proxy_set_header        Host            $host;
	   proxy_set_header        X-Real-IP       $remote_addr;
       proxy_set_header        Host $host;
	   proxy_set_header        X-Forwarded-Proto $scheme;
       proxy_http_version 1.1;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "upgrade";	      
       proxy_redirect     off;
      }


}

HomeKit integracija[keisti]

home assistant konfiguracija:

# zero conf
zeroconf:
    default_interface: true

# homekit
homekit:
    ip_address: 0.0.0.0
    advertise_ip: host_ip # lokalus ip adresas serverio kuriame yra dockeriai
    port: 21065

mDNS reflector[keisti]

Host'e kur hostinami dockeriai reikalingas avahi daemono konfigas kuris veiktų reflector mode.

cat /etc/avahi/avahi-daemon.conf
 [reflector]
 enable-reflector=yes
 #reflect-ipv=no