SOLVED - ZHA with Sonoff dongle no longer working after install and removal of Zigbee2MQTT

I had a perfectly good setup using ZHA with Sonoff 3.0 USB Dongle V2 E (using original firmware, no flashing) controlling multiple Zigbee devices.

For “reasons” I installed Mosquitto broker and Zigbee2MQTT on the side to run some tests. Afterwards I uninstalled both of them.

Now I can’t get ZHA to work anymore and I have no clue what’s wrong. My switches are greyed out but the ZHA “device” does seem connected to the USB dongle.

I tried:
ZHA backup (“migrate radio”)
Full restore of home assistant using an earlier full backup
Reconfiguring the zigbee devices, but this results in error

What could be going wrong?

When searching the home-assistant.log for zigbee, sonoff or zha this is the only thing I find:

2023-07-29 13:56:07.230 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x72DE:1:0x0006]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]

ZHA diagnostics:

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.5.4",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.11",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Amsterdam",
    "os_name": "Linux",
    "os_version": "6.1.29",
    "supervisor": "2023.07.1",
    "host_os": "Home Assistant OS 10.2",
    "docker_version": "23.0.6",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "smartthinq_sensors": {
      "version": "0.31.8",
      "requirements": [
        "pycountry>=20.7.3",
        "xmltodict>=0.12.0",
        "charset_normalizer>=2.0.0"
      ]
    },
    "hacs": {
      "version": "1.32.1",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "tapo": {
      "version": "1.7.1",
      "requirements": [
        "plugp100==2.5.1"
      ]
    }
  },
  "integration_manifest": {
    "domain": "zha",
    "name": "Zigbee Home Automation",
    "after_dependencies": [
      "onboarding",
      "usb"
    ],
    "codeowners": [
      "@dmulcahey",
      "@adminiuga",
      "@puddly"
    ],
    "config_flow": true,
    "dependencies": [
      "file_upload"
    ],
    "documentation": "https://www.home-assistant.io/integrations/zha",
    "iot_class": "local_polling",
    "loggers": [
      "aiosqlite",
      "bellows",
      "crccheck",
      "pure_pcapy3",
      "zhaquirks",
      "zigpy",
      "zigpy_deconz",
      "zigpy_xbee",
      "zigpy_zigate",
      "zigpy_znp"
    ],
    "requirements": [
      "bellows==0.35.5",
      "pyserial==3.5",
      "pyserial-asyncio==0.6",
      "zha-quirks==0.0.99",
      "zigpy-deconz==0.21.0",
      "zigpy==0.55.0",
      "zigpy-xbee==0.18.0",
      "zigpy-zigate==0.11.0",
      "zigpy-znp==0.11.1"
    ],
    "usb": [
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*2652*",
        "known_devices": [
          "slae.sh cc2652rb stick"
        ]
      },
      {
        "vid": "1A86",
        "pid": "55D4",
        "description": "*sonoff*plus*",
        "known_devices": [
          "sonoff zigbee dongle plus v2"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*sonoff*plus*",
        "known_devices": [
          "sonoff zigbee dongle plus"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*tubeszb*",
        "known_devices": [
          "TubesZB Coordinator"
        ]
      },
      {
        "vid": "1A86",
        "pid": "7523",
        "description": "*tubeszb*",
        "known_devices": [
          "TubesZB Coordinator"
        ]
      },
      {
        "vid": "1A86",
        "pid": "7523",
        "description": "*zigstar*",
        "known_devices": [
          "ZigStar Coordinators"
        ]
      },
      {
        "vid": "1CF1",
        "pid": "0030",
        "description": "*conbee*",
        "known_devices": [
          "Conbee II"
        ]
      },
      {
        "vid": "10C4",
        "pid": "8A2A",
        "description": "*zigbee*",
        "known_devices": [
          "Nortek HUSBZB-1"
        ]
      },
      {
        "vid": "0403",
        "pid": "6015",
        "description": "*zigate*",
        "known_devices": [
          "ZiGate+"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*zigate*",
        "known_devices": [
          "ZiGate"
        ]
      },
      {
        "vid": "10C4",
        "pid": "8B34",
        "description": "*bv 2010/10*",
        "known_devices": [
          "Bitron Video AV2010/10"
        ]
      }
    ],
    "zeroconf": [
      {
        "type": "_esphomelib._tcp.local.",
        "name": "tube*"
      },
      {
        "type": "_zigate-zigbee-gateway._tcp.local.",
        "name": "*zigate*"
      },
      {
        "type": "_zigstar_gw._tcp.local.",
        "name": "*zigstar*"
      },
      {
        "type": "_slzb-06._tcp.local.",
        "name": "slzb-06*"
      }
    ],
    "is_built_in": true
  },
  "data": {
    "config": {},
    "config_entry": {
      "entry_id": "8e1c3e901e433952b93b29686004f3dd",
      "version": 3,
      "domain": "zha",
      "title": "SONOFF Zigbee 3.0 USB Dongle Plus V2",
      "data": {
        "device": {
          "path": "/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230329140052-if00",
          "baudrate": 115200,
          "flow_control": "software"
        },
        "radio_type": "ezsp"
      },
      "options": {},
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "usb",
      "unique_id": "**REDACTED**",
      "disabled_by": null
    },
    "application_state": {
      "node_info": {
        "nwk": 0,
        "ieee": "**REDACTED**",
        "logical_type": 0
      },
      "network_info": {
        "extended_pan_id": "**REDACTED**",
        "pan_id": 7972,
        "nwk_update_id": 0,
        "nwk_manager_id": 0,
        "channel": 11,
        "channel_mask": 134215680,
        "security_level": 5,
        "network_key": "**REDACTED**",
        "tc_link_key": {
          "key": [
            90,
            105,
            103,
            66,
            101,
            101,
            65,
            108,
            108,
            105,
            97,
            110,
            99,
            101,
            48,
            57
          ],
          "tx_counter": 16384,
          "rx_counter": 0,
          "seq": 0,
          "partner_ieee": "**REDACTED**"
        },
        "key_table": [],
        "children": [],
        "nwk_addresses": {},
        "stack_specific": {
          "ezsp": {
            "hashed_tclk": "df19cb71ad1d9ddfe666315183598586"
          }
        },
        "metadata": {
          "ezsp": {
            "manufacturer": "",
            "board": "",
            "version": "6.10.3.0 build 297",
            "stack_version": 8,
            "can_write_custom_eui64": true
          }
        },
        "source": "[email protected]"
      },
      "counters": {
        "controller_app_counters": {
          "unicast_rx": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='unicast_rx', _raw_value=17, reset_count=0, _last_reset_value=0)"
          },
          "unicast_tx_success": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='unicast_tx_success', _raw_value=24, reset_count=0, _last_reset_value=0)"
          },
          "broadcast_tx_success_unexpected": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='broadcast_tx_success_unexpected', _raw_value=2, reset_count=0, _last_reset_value=0)"
          },
          "unicast_tx_failure": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='unicast_tx_failure', _raw_value=17, reset_count=0, _last_reset_value=0)"
          },
          "broadcast_rx": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='broadcast_rx', _raw_value=1, reset_count=0, _last_reset_value=0)"
          }
        },
        "ezsp_counters": {
          "MAC_RX_BROADCAST": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='MAC_RX_BROADCAST', _raw_value=90, reset_count=0, _last_reset_value=0)"
          },
          "MAC_TX_BROADCAST": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='MAC_TX_BROADCAST', _raw_value=111, reset_count=0, _last_reset_value=0)"
          },
          "MAC_RX_UNICAST": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='MAC_RX_UNICAST', _raw_value=20, reset_count=0, _last_reset_value=0)"
          },
          "MAC_TX_UNICAST_SUCCESS": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='MAC_TX_UNICAST_SUCCESS', _raw_value=57, reset_count=0, _last_reset_value=0)"
          },
          "MAC_TX_UNICAST_RETRY": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='MAC_TX_UNICAST_RETRY', _raw_value=16, reset_count=0, _last_reset_value=0)"
          },
          "MAC_TX_UNICAST_FAILED": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='MAC_TX_UNICAST_FAILED', _raw_value=5, reset_count=0, _last_reset_value=0)"
          },
          "APS_DATA_RX_BROADCAST": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='APS_DATA_RX_BROADCAST', _raw_value=2, reset_count=0, _last_reset_value=0)"
          },
          "APS_DATA_TX_BROADCAST": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='APS_DATA_TX_BROADCAST', _raw_value=2, reset_count=0, _last_reset_value=0)"
          },
          "APS_DATA_RX_UNICAST": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='APS_DATA_RX_UNICAST', _raw_value=17, reset_count=0, _last_reset_value=0)"
          },
          "APS_DATA_TX_UNICAST_SUCCESS": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='APS_DATA_TX_UNICAST_SUCCESS', _raw_value=24, reset_count=0, _last_reset_value=0)"
          },
          "APS_DATA_TX_UNICAST_RETRY": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='APS_DATA_TX_UNICAST_RETRY', _raw_value=23, reset_count=0, _last_reset_value=0)"
          },
          "APS_DATA_TX_UNICAST_FAILED": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='APS_DATA_TX_UNICAST_FAILED', _raw_value=17, reset_count=0, _last_reset_value=0)"
          },
          "ROUTE_DISCOVERY_INITIATED": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='ROUTE_DISCOVERY_INITIATED', _raw_value=11, reset_count=0, _last_reset_value=0)"
          },
          "NEIGHBOR_ADDED": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='NEIGHBOR_ADDED', _raw_value=1, reset_count=0, _last_reset_value=0)"
          },
          "NEIGHBOR_REMOVED": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='NEIGHBOR_REMOVED', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "NEIGHBOR_STALE": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='NEIGHBOR_STALE', _raw_value=1, reset_count=0, _last_reset_value=0)"
          },
          "JOIN_INDICATION": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='JOIN_INDICATION', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "CHILD_REMOVED": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='CHILD_REMOVED', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "ASH_OVERFLOW_ERROR": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='ASH_OVERFLOW_ERROR', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "ASH_FRAMING_ERROR": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='ASH_FRAMING_ERROR', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "ASH_OVERRUN_ERROR": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='ASH_OVERRUN_ERROR', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "NWK_FRAME_COUNTER_FAILURE": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='NWK_FRAME_COUNTER_FAILURE', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "APS_FRAME_COUNTER_FAILURE": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='APS_FRAME_COUNTER_FAILURE', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "UTILITY": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='UTILITY', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "APS_LINK_KEY_NOT_AUTHORIZED": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='APS_LINK_KEY_NOT_AUTHORIZED', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "NWK_DECRYPTION_FAILURE": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='NWK_DECRYPTION_FAILURE', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "APS_DECRYPTION_FAILURE": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='APS_DECRYPTION_FAILURE', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "ALLOCATE_PACKET_BUFFER_FAILURE": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='ALLOCATE_PACKET_BUFFER_FAILURE', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "RELAYED_UNICAST": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='RELAYED_UNICAST', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "PHY_TO_MAC_QUEUE_LIMIT_REACHED": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='PHY_TO_MAC_QUEUE_LIMIT_REACHED', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "PACKET_VALIDATE_LIBRARY_DROPPED_COUNT": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='PACKET_VALIDATE_LIBRARY_DROPPED_COUNT', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "TYPE_NWK_RETRY_OVERFLOW": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='TYPE_NWK_RETRY_OVERFLOW', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "PHY_CCA_FAIL_COUNT": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='PHY_CCA_FAIL_COUNT', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "BROADCAST_TABLE_FULL": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='BROADCAST_TABLE_FULL', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "PTA_LO_PRI_REQUESTED": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='PTA_LO_PRI_REQUESTED', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "PTA_HI_PRI_REQUESTED": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='PTA_HI_PRI_REQUESTED', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "PTA_LO_PRI_DENIED": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='PTA_LO_PRI_DENIED', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "PTA_HI_PRI_DENIED": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='PTA_HI_PRI_DENIED', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "PTA_LO_PRI_TX_ABORTED": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='PTA_LO_PRI_TX_ABORTED', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "PTA_HI_PRI_TX_ABORTED": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='PTA_HI_PRI_TX_ABORTED', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "ADDRESS_CONFLICT_SENT": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='ADDRESS_CONFLICT_SENT', _raw_value=0, reset_count=0, _last_reset_value=0)"
          },
          "EZSP_FREE_BUFFERS": {
            "__type": "<class 'zigpy.state.Counter'>",
            "repr": "Counter(name='EZSP_FREE_BUFFERS', _raw_value=249, reset_count=0, _last_reset_value=0)"
          }
        }
      },
      "broadcast_counters": {},
      "device_counters": {},
      "group_counters": {}
    },
    "energy_scan": {
      "11": 13.711043742539033,
      "12": 8.631361812931262,
      "13": 52.75969252664325,
      "14": 49.512515447068886,
      "15": 46.26944564832987,
      "16": 80.38447947821754,
      "17": 96.64469941013013,
      "18": 95.69133648577223,
      "19": 78.25348754651363,
      "20": 59.15797905332195,
      "21": 55.9836862725909,
      "22": 10.914542804728702,
      "23": 23.33483723001185,
      "24": 36.830390267097734,
      "25": 23.33483723001185,
      "26": 75.96022321405563
    },
    "versions": {
      "bellows": "0.35.5",
      "zigpy": "0.55.0",
      "zigpy_deconz": "0.21.0",
      "zigpy_xbee": "0.18.0",
      "zigpy_znp": "0.11.1",
      "zigpy_zigate": "0.11.0",
      "zhaquirks": "0.0.99"
    }
  }
}

The fix was to rediscover the devices by searching for them and pressing the pair button on each and every device.

This sounds like a quick fix, but this meant I had to remove my wall switches to be able the reach the switches behind them. Not an easy or quick task.

Feel free to reply if there was an easier way…