zigbee2MQTT problem after update to 2.0

I have looked at much of the online information regarding breaking changes in zigbee2MQTT version 2.0. I have implemented all of the suggested changes (as far as I can tell) but I still can’t get it working. My symptoms seem to be different from what a lot of users are experiencing. In addition, I had a dongle failure during the troubleshooting and have a new dongle to add to the mix of variables.
One thing I don’t understand completely is how the configuration specification makes use of the two sources (GUI in the add-on tab and the yaml file in config/zigbee1MQTT/).
My problem is that the add-on won’t start. It appears to start in the add-on page and in the log output, but when I switch to the web interface, it says that it’s not running. I can then go back to the add-on page and it’s stopped with no apparent reason why.
Here is the log file output I see:

Starting Zigbee2MQTT without watchdog.
[15:55:11] INFO: Preparing to start...
[15:55:11] INFO: Socat not enabled
[15:55:11] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[15:55:14] INFO: Preparing to start...
[15:55:14] INFO: Socat not enabled
[15:55:14] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[15:55:17] INFO: Preparing to start...
[15:55:17] INFO: Socat not enabled
[15:55:17] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[15:55:20] INFO: Preparing to start...
[15:55:20] INFO: Socat not enabled
[15:55:20] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[15:59:31] INFO: Preparing to start...
[15:59:31] INFO: Socat not enabled
[15:59:31] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[16:00:50] INFO: Preparing to start...
[16:00:50] INFO: Socat not enabled
[16:00:50] INFO: Starting Zigbee2MQTT...

I have a Sonoff Zigbee 3.0 Dongle Plus (type E) and the new one I purchased as a “V2” in the ‘by-id’ name for the device file:

usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_c47198083c1fef11a44357d0639e525b-if00-port0 

The configuration file in config/zigbee2MQTT looks like this:

homeassistant:
  enabled: true
advanced:
  homeassistant_legacy_entity_attributes: false
  homeassistant_legacy_triggers: false
  legacy_api: false
  legacy_availability_payload: false
  network_key:
    - 210
    - 75
    - 12
    - 14
    - 33
    - 92
    - 202
    - 92
    - 15
    - 57
    - 188
    - 245
    - 232
    - 184
    - 108
    - 176
  pan_id: 29663
  ext_pan_id:
    - 223
    - 102
    - 199
    - 124
    - 200
    - 186
    - 62
    - 134
  log_level: warning
  log_syslog:
    host: -----
    port: 514
    protocol: udp4
    app_name: zigbee2mqtt
    eol: /n
    localhost: localhost
    path: /dev/log
    pid: process.pid
    type: "5424"
  log_output:
    - syslog
    - syslog
availability:
  enabled: true
mqtt:
  server: mqtt://---------
  user: zigbee
  password: -------
  client_id: zigbee2mqtt
  keepalive: 60
  reject_unauthorized: true
  version: 4
  base_topic: zigbee2mqtt
serial:
  port: >-
    /dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_c47198083c1fef11a44357d0639e525b-if00-port0
  adapter: ember
frontend:
  enabled: true
  port: 8099
device_options:
  legacy: false
  retain: true
devices:
  "0x00158d0006bebfd4":
    friendly_name: front_door
  "0x00158d0006bfb11b":
    friendly_name: hallway_garage_door
  "0x00158d0006c4d08b":
    friendly_name: patio_door
  "0x00158d0009cc272d":
    friendly_name: marcs_sink
  "0x00158d0009ea1f53":
    friendly_name: utility_room
  "0x00158d0009f4256f":
    friendly_name: pats_sink
  "0x00158d0006c5c25b":
    friendly_name: backyard_garage_door
  "0x00158d0009cc2718":
    friendly_name: noahs_sink
  "0x00158d0009cc26e8":
    friendly_name: kitchen_sink
  "0xa4c1383cc076466e":
    friendly_name: p1sb_chamber_thermo
    temperature_precision: 2
  "0xa4c1385eddb26d51":
    friendly_name: pats_desk_thermo
  "0xa4c138d33a6ae54c":
    friendly_name: noahs_desk_thermo
  "0xa4c1387c43a85055":
    friendly_name: master_bath_thermo
  "0xa4c13812c1f10be9":
    friendly_name: utility_room_thermo
  "0xa4c138e080dead8c":
    friendly_name: pats_nightstand_thermo
  "0xa4c138ab71c72532":
    friendly_name: kitchen_thermo
  "0x00158d000a97e144":
    friendly_name: marc_office_window
  "0x00158d000a982661":
    friendly_name: vr_room_window
  "0x00158d000a97e1db":
    friendly_name: dining_room_window_left
  "0x00158d000a97380e":
    friendly_name: dining_room_window_right
  "0x00158d000a97e188":
    friendly_name: pat_office_window_left
  "0x00158d000a98272a":
    friendly_name: pat_office_window_right
  "0x00158d000a982725":
    friendly_name: master_bedroom_window_left
  "0x00158d000a98263d":
    friendly_name: master_bedroom_window_right
  "0x00158d000aca54ed":
    friendly_name: living_room_window_left
  "0x00158d000aca5472":
    friendly_name: living_room_window_right
  "0x00158d000a97e158":
    friendly_name: living_room_window_center
  "0x00158d000a98271a":
    friendly_name: noah_bedroom_window_right
  "0x00158d000a9736b9":
    friendly_name: noah_bedroom_window_left
  "0x00158d000aca5364":
    friendly_name: master_commode_door
  "0x00158d000aca1ed7":
    friendly_name: noah_bathroom_door
  "0xa4c138419addc28f":
    friendly_name: p1sa_chamber_thermo
version: 4

The GUI configuration in the add-on page looks like this:

Is there a way to increase log verbosity? What I see in the log never varies from what I showed above. Normal operation and failed operation look the same.

When I got the new dongle, I used the web tool to update the firmware to 7.4.4.0 build 0.

You need to put that in the add-on configuration serial section, not your config file.

That did not fix the problem. The symptoms are the same as reported initially. However, in trying to start the add-on several times, I got a 502 Bad Gateway error. The documentation says, when you get this error, to refresh the web page and it will eventually load. My experience is that it did not and refresh took me back to the add-on page where it showed as not running.

The web page is never going to load if the add-on is not running. Can you please share a screenshot of your add-on configuration serial section as it is after adding the adapter setting.

Are you sure? I have my adapter only specified in the configuration.yaml, not in the config settings of the add-on and that works perfectly.

When I try to launch the web page, the add-on page says that it’s running. It stays that way, indicating that all is well, until I leave and come back.

Here is the configuration:

Now I think about it - no.

1 Like

The weird thing here is that herdsman is not even attempting to start.

No idea if it helps, but you could try cleaning out the config in the GUI (look at my screenshot for reference), and just have the config specified in the configuration.yaml. Copy / paste it to notepad or similar to keep it.

Here is my configuration.yaml for comparison, I run both MQTT and Z2M as add-ons. Note that I’ve been running this for several years so might be a bit outdated:

devices:
  - devices.yaml
groups:
  - groups.yaml
homeassistant:
  enabled: true
mqtt:
  base_topic: zigbee2mqtt
  user: addons
  password: 
  server: mqtt://core-mosquitto:1883
serial:
  port: tcp://192.168.0.108:6638
  baudrate: 115200
  adapter: zstack
  disable_led: false
advanced:
  transmit_power: 20
  log_level: info
  pan_id: 6753
  channel: 20
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  last_seen: ISO_8601_local
  log_syslog:
    app_name: Zigbee2MQTT
    eol: /n
    host: localhost
    localhost: localhost
    path: /dev/log
    pid: process.pid
    port: 514
    protocol: udp4
    type: '5424'
device_options: {}
blocklist:
passlist: []
queue: {}
frontend:
  enabled: true
  port: 8099
availability:
  enabled: false
ota: {}
version: 4

Edit: I see that the

advanced:
  homeassistant_legacy_entity_attributes: false
  homeassistant_legacy_triggers: false
  legacy_api: false
  legacy_availability_payload: false

was removed during the upgrade, it exists in configuration_backup_v1.yaml but not in v2, v3 and the current file. No idea if that is any help though.

I tried reducing the add-on configuration to just the socat section but it would not let me have a blank mqtt or serial section. :frowning:

I used a backup to restore the 1.42.0-2 configuration I had on Jan 3. This was functional at the time but is not now. The main thing that changed since Jan 3 is the new dongle I had to get to replace the failed one. The log shows the same “successful” startup even though the add-on does not start.

Is there no way to increase the verbosity of the log?

Sorry if I seem blundt, Marc LeFevre, but I cannot believe you took the time to black out things that matter nothing…

image

But you leave your PAN_ID’s and your network key in the open (Which are passwords I could use to own your zigbee network.

(I did send you a private message to delete that, but That was not received.)

It’s working now. I had to uninstall the add-on and remove all of the existing files. After doing that, I’m re-joining all of my sensors. There are only about 30 so it’s not a huge inconvenience.
Thanks to everyone for their help.

1 Like