Zigbee2mqtt web ui not loading devices

Hi,

I have a HomeAssistant setup running on a RPi with zigbee2mqtt add-on configured, and everything was working fine.

Recently I added a reverse-proxy (Nginx Proxy Manager) to my network (running in a docker container on a separate machine) and configured so that I can access my HA instance through my domain name. Seemed to be working fine, but I just noticed, that when I open the Web UI for Zigbee2Mqtt add-on, the list of devices, map, setting, etc are empty. Note that the integration itself is till working, so I can control the devices that I already added to HA.

I assume that adding the reverse-proxy to the mix broke something in the UI, but I’m not sure if I need to configure something in the Zigbee2Mqtt integration, or on the Nginx Proxy Manager to get the UI working again fine.

Does someone has similar setup and made it work, or know what is the issue and how to fix it?

Here’s some more info about my configurations:
Zigbee2Mqtt add-on configuration:

data_path: /config/zigbee2mqtt
socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: "-d -d"
  log: false
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://core-mosquitto:1883
  user: <user>
  password: <password>
serial:
  disable_led: true
  port: /dev/ttyUSB0
external_converters: []
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: true
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
  port: 8099
experimental: {}
availability: false

Nginx Proxy Manager settings:

## Proxy Host:
### Details
 - Domain names: hass.mydomain.com
 - Scheme: HTTP
 - Forward Hostname / IP: local.ip.to.pi
 - Forward Port: 8443
 - Block Common Exploits: Enabled
 - Websocket support: Emabled
### Custom Locations
 - Location: \
 - Scheme: HTTP
 - Forward Hostname / IP: local.ip.to.pi
 - Forward Port: 8443
 - Additional options:
   - proxy_set_header Upgrade $http_upgrade;
   - proxy_set_header Connection “upgrade”;
### SSL
 - Force SSL: Enabled
 - HTTP/2 Support: Enabled

Hi, not sure why do you need a custom port on Z2M config. Mine works with a standart 8080 and I had the same problem as you described. It resolved by doing 2 things on nginx side of things - enabling Webkit support and removing custom locaiton from config.

As far as I understood it doesn’t matter which url you have on Z2M side for your frontend.

Hope it helps.

1 Like

Hello here !
I know this is an old topic but I have exactly the same behavior (home assistant + mqtt + z2m in docker containers on one machine, nginx reverse proxy on another one) and I still can’t figure it out.

On my side, what I can add to the topic is that when I open the developer console on my browser, I see plenty of errors like the following when I try to display the z2m home page in a Ingress menu on Home Assistant:
WebSocket connection to 'wss://myurl.com/api/ingress/zigbee2mqtt/api' failed: Invalid frame header

@klevin you said you did two things, but I can’t understand or found enough information to make it work…
How can I know if webkit is enabled on my nginx install?
What is the custom location and where to remove it?

Thanks
Brice