zigbee2mqtt / hassio-zigbee2mqtt

Official Zigbee2MQTT Home Assistant add-on
https://www.zigbee2mqtt.io
Apache License 2.0
1.02k stars 362 forks source link

Frontend not starting #624

Open ov1d1u opened 5 days ago

ov1d1u commented 5 days ago

Description of the issue

Since upgrading to 1.39.0-1 I cannot access Zigbee2MQTT's frontend, getting "502: Bad Gateway" instead. Other addon frontends are accessible via ingress. There's nothing interesting in logs either:

[09:16:27] INFO: Preparing to start... [09:16:28] INFO: Socat not enabled [09:16:28] INFO: Enabled Zigbee2MQTT watchdog with value 'default' [09:16:28] INFO: Starting Zigbee2MQTT... Starting Zigbee2MQTT with watchdog (60000,300000,900000,1800000,3600000).

This is my configuration file:

external_converters:
  - external_converters/ZigUSB.js
devices:
  - devices.yaml
groups:
  - groups.yaml
homeassistant:
  status_topic: homeassistant/status
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://core-mosquitto:1883
  user: [redacted]
  password: [redacted]
  keepalive: 60
  reject_unauthorized: true
  version: 4
  force_disable_retain: false
  include_device_information: true
serial:
  port: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
advanced:
  log_level: error
  pan_id: 6754
  channel: 26
  network_key: [redacted]
  availability_blocklist: []
  availability_passlist: []
  report: true
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
  port: 8099
experimental: {}
availability: true
zigbee_herdsman_debug: false

And this is the add-on configuration:

data_path: /config/zigbee2mqtt
socat:
  enabled: false
  master: pty,raw,echo=0,link=/dev/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: "-d -d"
  log: false
mqtt: {}
serial:
  port: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
watchdog: default

I also tried uninstalling and reinstalling the addon. The addon itself is working, I can control Zigbee devices and I get sensor data into HomeAssistant. What can I do further to debug the issue?

edit: comparing with the logs from the edge version I already had installed, I see that in the logs there should be a line Started frontend on port 8099, so the frontend is clearly not starting. Any reason for that?

Thanks.

Addon version

1.39.0-1

Platform

Core 2024.6.4 Supervisor 2024.06.2 Operating System 12.4 Frontend 20240610.1

Logs of the issue (if applicable)

[09:26:07] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT with watchdog (60000,300000,900000,1800000,3600000).
[09:27:53] INFO: Preparing to start...
[09:27:54] INFO: Socat not enabled
[09:27:54] INFO: Enabled Zigbee2MQTT watchdog with value 'default'
[09:27:54] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT with watchdog (60000,300000,900000,1800000,3600000).
[2024-07-02 09:27:56] info:     z2m: Logging to console, file (filename: log.log)
[2024-07-02 09:27:57] info:     z2m: Starting Zigbee2MQTT version 1.39.0 (commit #unknown)
[2024-07-02 09:27:57] info:     z2m: Starting zigbee-herdsman (0.50.1)
[2024-07-02 09:27:57] info:     zh:zstack:znp: Opening SerialPort with {"path":"/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2024-07-02 09:27:57] info:     zh:zstack:znp: Serialport opened
[2024-07-02 09:27:57] info:     z2m: zigbee-herdsman started (resumed)
[2024-07-02 09:27:57] info:     z2m: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20221226,"transportrev":2},"type":"zStack3x0"}'
[2024-07-02 09:27:57] info:     z2m: Currently 75 devices are joined:
[2024-07-02 09:27:57] info:     z2m: living_sofa (0xa4c13894ade4c5dc): TS0203 - Tuya Door sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: tradfri_remote (0xbc33acfffe0f09a9): E1524/E1810 - IKEA TRADFRI remote control (EndDevice)
[2024-07-02 09:27:57] info:     z2m: zigbee_repeater (0x588e81fffe0167a1): E1746 - IKEA TRADFRI signal repeater (Router)
[2024-07-02 09:27:57] info:     z2m: cube_ovidiu (0x00158d00029ba400): MFKZQ01LM - Aqara Cube (EndDevice)
[2024-07-02 09:27:57] info:     z2m: cube_oana (0x00158d0002a66d07): MFKZQ01LM - Aqara Cube (EndDevice)
[2024-07-02 09:27:57] info:     z2m: balcony_door (0xbc33acfffe4f662d): HG06336 - Lidl Silvercrest smart window and door sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: hallway (0x00124b002174e9b9): TI0001 - Livolo Zigbee switch (1, 2, 3, 4 gang) (EndDevice)
[2024-07-02 09:27:57] info:     z2m: living_switch (0x00124b001832513d): TI0001 - Livolo Zigbee switch (1, 2, 3, 4 gang) (EndDevice)
[2024-07-02 09:27:57] info:     z2m: balcony (0x00124b001800d470): TI0001 - Livolo Zigbee switch (1, 2, 3, 4 gang) (EndDevice)
[2024-07-02 09:27:57] info:     z2m: bedroom (0x00124b002174e1e8): TI0001 - Livolo Zigbee switch (1, 2, 3, 4 gang) (EndDevice)
[2024-07-02 09:27:57] info:     z2m: bathroom (0x00124b001803b759): TI0001 - Livolo Zigbee switch (1, 2, 3, 4 gang) (EndDevice)
[2024-07-02 09:27:57] info:     z2m: leaksensor_kitchen (0x00158d00049bb672): SJCGQ11LM - Aqara Water leak sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: kitchen (0x00124b001802b8cd): TI0001 - Livolo Zigbee switch (1, 2, 3, 4 gang) (EndDevice)
[2024-07-02 09:27:57] info:     z2m: balcony_sensor (0x00158d0001d931a2): WSDCGQ11LM - Aqara Temperature and humidity sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: bathroom_window (0xbc33acfffe516051): HG06336 - Lidl Silvercrest smart window and door sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: bedroom_powerstrip (0xa4c13833b3ca0642): SM-0306E-2W - UseeLink 4 gang switch, with USB (Router)
[2024-07-02 09:27:57] info:     z2m: litter_sensor (0x842e14fffe4365da): E1525/E1745 - IKEA TRADFRI motion sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: living_lamp_1 (0x2c1165fffed484d8): LED1924G9 - IKEA TRADFRI bulb E26/E27, color/white spectrum, globe, opal, 800/806/810 lm (Router)
[2024-07-02 09:27:57] info:     z2m: leaksensor_bathroom (0x00158d00042d0c64): SJCGQ11LM - Aqara Water leak sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: outside_sensor_1 (0x00158d0005371607): WSDCGQ01LM - Xiaomi Mi temperature and humidity sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: wiswitch_oana (0x00158d00057ad98f): WXKG01LM - Xiaomi Mi wireless switch (EndDevice)
[2024-07-02 09:27:57] info:     z2m: wiswitch_ovidiu (0x00158d000548cf32): WXKG01LM - Xiaomi Mi wireless switch (EndDevice)
[2024-07-02 09:27:57] info:     z2m: outside_sensor_2 (0x00158d0005880d90): WSDCGQ01LM - Xiaomi Mi temperature and humidity sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: entrance_door_sensor (0xa4c138b45753ca4b): TS0203 - Tuya Door sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: danalock (0xd0cf5efffe0399c8): V3-BTZB/V3-BTZBE - Danalock BT/ZB smartlock (EndDevice)
[2024-07-02 09:27:57] info:     z2m: zigbee_repeater_2 (0x84fd27fffe76e6a4): E1746 - IKEA TRADFRI signal repeater (Router)
[2024-07-02 09:27:57] info:     z2m: kitchen_led_switch (0x588e81fffe4d59cb): E1743 - IKEA TRADFRI on/off switch (EndDevice)
[2024-07-02 09:27:57] info:     z2m: dorm_balcony_window_side (0xa4c138d79d4f0dc3): TS0203 - Tuya Door sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: 0xa4c138f0a38bbacd (0xa4c138f0a38bbacd): TS0001_fingerbot - Tuya Zigbee fingerbot plus (EndDevice)
[2024-07-02 09:27:57] info:     z2m: water_fountain_general (0x00124b001001ad2b): ZigUSB - xyzroe.cc [Configurable firmware](https://ptvo.info/zigbee-configurable-firmware-features/) (Router)
[2024-07-02 09:27:57] info:     z2m: gas_sensor (0x5c0272fffec3648f): TS0601_gas_sensor_1 - Tuya Gas sensor (Router)
[2024-07-02 09:27:57] info:     z2m: fluffy_heated_bed_button (0x2c1165fffe027f22): E1743 - IKEA TRADFRI on/off switch (EndDevice)
[2024-07-02 09:27:57] info:     z2m: desk_lamp_switch (0x2c1165fffe027ec5): E1743 - IKEA TRADFRI on/off switch (EndDevice)
[2024-07-02 09:27:57] info:     z2m: bathroom_thermostat (0x804b50fffee0f8ff): TS0601_thermostat - Tuya Radiator valve with thermostat (EndDevice)
[2024-07-02 09:27:57] info:     z2m: lightbar_bedroom (0xa4c138ea59863ae3): GL-LB-001P - Gledopto Zigbee USB LED bar RGB+CCT (pro) (Router)
[2024-07-02 09:27:57] info:     z2m: bathroom_spray_button (0x8cf681fffe2bc694): E1812 - IKEA TRADFRI shortcut button (EndDevice)
[2024-07-02 09:27:57] info:     z2m: living_lamp_2 (0x2c1165fffeb96125): LED1924G9 - IKEA TRADFRI bulb E26/E27, color/white spectrum, globe, opal, 800/806/810 lm (Router)
[2024-07-02 09:27:57] info:     z2m: dorm_lamp (0x187a3efffe60dd48): LED1924G9 - IKEA TRADFRI bulb E26/E27, color/white spectrum, globe, opal, 800/806/810 lm (Router)
[2024-07-02 09:27:57] info:     z2m: kitchen_temp (0xa4c1383ef0baa1f3): TS0601_temperature_humidity_sensor_1 - Tuya Temperature & humidity sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: living_systems_cabinet (0xa4c138c52630ab41): TS0503B - Tuya Zigbee RGB light (Router)
[2024-07-02 09:27:57] info:     z2m: living_smoke_alarm (0xa4c1389c6b2d506f): TS0601_smoke_6 - Tuya Smoke sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: hallway_light_sensor (0x54ef441000b8c979): GZCGQ11LM - Aqara Light sensor T1 (EndDevice)
[2024-07-02 09:27:57] info:     z2m: dorm_smoke_alarm (0xa4c138b0753fa5b3): TS0601_smoke_6 - Tuya Smoke sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: living_curtain_motor_left (0x54ef4410004eec00): ZNCLBL01LM - Aqara Curtain driver E1 (EndDevice)
[2024-07-02 09:27:57] info:     z2m: living_curtain_motor_right (0x54ef4410004eea6f): ZNCLBL01LM - Aqara Curtain driver E1 (EndDevice)
[2024-07-02 09:27:57] info:     z2m: living_curtains_button (0x04cd15fffe7fdff2): E1812 - IKEA TRADFRI shortcut button (EndDevice)
[2024-07-02 09:27:57] info:     z2m: fluffy_light (0x00124b0023a8bbe9): Not supported (EndDevice)
[2024-07-02 09:27:57] info:     z2m: bedroom_curtain_motor_left (0x54ef4410004ee9c4): ZNCLBL01LM - Aqara Curtain driver E1 (EndDevice)
[2024-07-02 09:27:57] info:     z2m: bedroom_curtain_motor_right (0x54ef4410004ee60f): ZNCLBL01LM - Aqara Curtain driver E1 (EndDevice)
[2024-07-02 09:27:57] info:     z2m: bedroom_curtains_button (0x04cd15fffe6a7b80): E1812 - IKEA TRADFRI shortcut button (EndDevice)
[2024-07-02 09:27:57] info:     z2m: bedroom_tv_speakers (0x842e14fffe65bbf2): E1603/E1702/E1708 - IKEA TRADFRI control outlet (Router)
[2024-07-02 09:27:57] info:     z2m: water_fountain_motion_sensor (0x00124b002511c962): SNZB-03 - SONOFF Motion sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: desk_plug (0x00124b001b79a492): BASICZBR3 - SONOFF Zigbee smart switch (Router)
[2024-07-02 09:27:57] info:     z2m: living_light_sensor (0x54ef4410001ff2e1): GZCGQ01LM - Xiaomi Mi light sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: rangehood_temp (0x60a423fffe44df5f): TT001ZAV20 - Tuya Temperature & humidity sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: bedroom_door (0xa4c138cf4cdb5dfb): TS0203 - Tuya Door sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: power_meter (0x70ac08fffe18d974): PJ-MGW1203 - Tuya Clamp meter (Router)
[2024-07-02 09:27:57] info:     z2m: dorm_balcony_door (0xa4c138ede407f61d): TS0203 - Tuya Door sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: dorm_balcony_window_top (0xa4c13844ee45fc3c): TS0203 - Tuya Door sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: bathroom_motion_sensor (0x00158d000942380e): RTCGQ11LM - Aqara Motion sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: water_dispenser (0x00124b0023a8bbb0): ptvo.switch - Custom devices (DiY) Multi-functional device (Router)
[2024-07-02 09:27:57] info:     z2m: bathroom_triswitch (0x943469fffeb7a553): TS0043 - Tuya Wireless switch with 3 buttons (EndDevice)
[2024-07-02 09:27:57] info:     z2m: dorm_lamp_secondary (0x2c1165fffe2cbcb5): LED1925G6 - IKEA TRADFRI bulb E12/E14/E17, color/white spectrum, globe, opal, 440/450/470 lm (Router)
[2024-07-02 09:27:57] info:     z2m: bedroom_led_strip (0xa4c1384664612ea1): GL-C-003P - Gledopto Zigbee LED Controller RGB (pro) (Router)
[2024-07-02 09:27:57] info:     z2m: 0xa4c1380b84e05152 (0xa4c1380b84e05152): TS0201 - Tuya Temperature & humidity sensor with display (EndDevice)
[2024-07-02 09:27:57] info:     z2m: plant_watering_system (0x00124b0023a8be99): ptvo.switch - Custom devices (DiY) Multi-functional device (EndDevice)
[2024-07-02 09:27:57] info:     z2m: bathroom_door (0xa4c13826934d99a3): TS0203 - Tuya Door sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: portable_lamp (0x00212effff0c73df): Hive - Phoscon Battery powered smart LED light (EndDevice)
[2024-07-02 09:27:57] info:     z2m: dorm_balcony (0x00124b001800ecb3): TI0001 - Livolo Zigbee switch (1, 2, 3, 4 gang) (EndDevice)
[2024-07-02 09:27:57] info:     z2m: goodbye_button (0x00158d000acaecef): WXKG11LM - Aqara Wireless mini switch (EndDevice)
[2024-07-02 09:27:57] info:     z2m: kitchen_island_led (0xa4c138b9ac052aa0): GL-C-003P - Gledopto Zigbee LED Controller RGB (pro) (Router)
[2024-07-02 09:27:57] info:     z2m: headphones_lights (0x00124b002a554024): ZigUSB - xyzroe.cc [Configurable firmware](https://ptvo.info/zigbee-configurable-firmware-features/) (Router)
[2024-07-02 09:27:57] info:     z2m: litter (0xa4c1381a495cc41e): TS0203 - Tuya Door sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: fluffy_heated_bed (0xa4c1389782d8b904): TS011F_plug_1 - Tuya Smart plug (with power monitoring) (Router)
[2024-07-02 09:27:57] info:     z2m: leaksensor_centrala (0x00158d000af06fc0): SJCGQ11LM - Aqara Water leak sensor (EndDevice)
[2024-07-02 09:27:57] info:     z2m: Zigbee: disabling joining new devices.
[2024-07-02 09:27:57] info:     z2m: Connecting to MQTT server at mqtt://core-mosquitto:1883
[2024-07-02 09:27:57] info:     z2m: Connected to MQTT server
[2024-07-02 09:27:57] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'
[2024-07-02 09:28:02] info:     z2m: Adding 'tradfri_remote' to group 'living_remote_lamp'
[2024-07-02 09:28:04] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/kitchen_temp', payload '{"battery":100,"humidity":47.5,"linkquality":120,"temperature":25.6}'
[2024-07-02 09:28:05] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/fluffy_heated_bed', payload '{"child_lock":"UNLOCK","countdown":0,"current":0,"energy":6.32,"indicator_mode":"off","linkquality":47,"power":0,"power_outage_memory":"restore","state":"OFF","update":{"installed_version":192,"latest_version":192,"state":"idle"},"update_available":false,"voltage":222}'
[2024-07-02 09:28:07] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/living_curtain_motor_left', payload '{"battery":46,"charging":false,"device_temperature":30,"hand_open":false,"hooks_lock":"LOCK","hooks_state":"locked","illuminance_lux":100,"linkquality":218,"motor_state":"stopped","position":97,"power_outage_count":5,"power_source":"battery","running":false,"state":"OPEN","target_position":97,"update":{"installed_version":6168,"latest_version":6168,"state":"idle"},"update_available":false,"voltage":3000}'
[2024-07-02 09:28:07] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/power_meter', payload '{"current":1.88,"energy":0.12,"linkquality":21,"power":385.8,"voltage":219.2}'
[2024-07-02 09:28:07] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/power_meter', payload '{"current":1.88,"energy":0.12,"linkquality":25,"power":385.8,"voltage":221.5}'
[2024-07-02 09:28:07] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/power_meter', payload '{"current":1.88,"energy":0.12,"linkquality":32,"power":382.1,"voltage":221.5}'
bobslaede commented 5 days ago

I got the same issue

ov1d1u commented 5 days ago

For me it was the groups:

'1':
  friendly_name: living_lamp
  retain: false
  devices:
    - 0x2c1165fffeb96125/1
    - 0x2c1165fffed484d8/1
'2':
  friendly_name: desk_lamp
  retain: false
  devices:
    - 0x00124b001b79a492/1
'901':
  friendly_name: default_bind_group
  retain: false
  devices: []
'65289':
  friendly_name: living_remote_lamp
  retain: false
  devices:
    - 0xbc33acfffe0f09a9/1
    - 0x2c1165fffeb96125/1
    - 0x2c1165fffed484d8/1
'65290':
  friendly_name: fluffy_bed
  retain: false
  devices:
    - 0xa4c1389782d8b904/1

I removed the one under '65289' and everything started. Not sure how and why this impacted the startup.

So this seems it was not an addon issue, but I'm leaving this open until we find the root cause and create an issue on the right repository.

bobslaede commented 5 days ago

I dont have a group with those high IDs. I have up to 11 groups

ov1d1u commented 5 days ago

I don't think the high ID number was the issue. I had to recreate the group (because it was appearing in the UI but I could not delete it) with empty devices array and Zigbee2MQTT was still booting, so probably the issue lies somewhere regarding devices in a group.

bobslaede commented 4 days ago

I removed the contents of my groups.yaml file, and restartet zigbee2mqtt. It now starts the frontend, and I will recreate the groups.
Renaming them gives errors, but doing it anyways, and restarting seems to make it work.