r/homeassistant: Proxy for Zigbee2MQTT frontend

Zigbee2MQTT now has a web GUI, which makes it *way* easier to manage the
Zigbee network.  Now that I've got all the Philips Hue bulbs controlled
by Zigbee2MQTT instead of the Hue Hub, having access to the GUI is
awesome.
btop
Dustin 2022-12-12 17:47:05 -06:00
parent bdd0310cf6
commit a670e34e90
2 changed files with 12 additions and 0 deletions

View File

@ -4,3 +4,4 @@ homeassistant_ssl_certificate: >-
homeassistant_ssl_certificate_key: >- homeassistant_ssl_certificate_key: >-
{{ apache_ssl_certificate_key }} {{ apache_ssl_certificate_key }}
homeassistant_proxy_zwavejs2mqtt: true homeassistant_proxy_zwavejs2mqtt: true
homeassistant_proxy_zigbee2mqtt: true

View File

@ -26,6 +26,17 @@ RewriteRule /.* https://%{SERVER_NAME}$0 [R=301,L]
</Location> </Location>
ProxyPassReverse /zwave/ http://localhost:8091/ ProxyPassReverse /zwave/ http://localhost:8091/
{% endif %} {% endif %}
{% if homeassistant_proxy_zigbee2mqtt %}
RewriteRule ^/zigbee$ /zigbee/ [R=301,L]
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /zigbee/(.*) ws://localhost:8080/$1 [P,L]
RewriteRule /zigbee/(.*) http://localhost:8080/$1 [P,L]
<Location /zigbee>
RequestHeader set X-External-Path /zigbee
</Location>
ProxyPassReverse /zigbee/ http://localhost:8080/
{% endif %}
RewriteCond %{HTTP:Upgrade} =websocket [NC] RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://localhost:8123/$1 [P,L] RewriteRule /(.*) ws://localhost:8123/$1 [P,L]