Help: Ubable to Connect Zigbee2MQTT to Sonoff USB

PROBLEM DESCRIPTION:
When clicking “open web UI” in Zigbee2MQTT the UI fails to load; instead a popup window says “The add-on seems to not be ready, it might be starting. Do you want to try again?” In the background (outside the window) it says “502: Bad Gateway”. See screenshot. Additionally, the add-on does not stay enabled (i.e. green); it reverts to disabled (red) - see screenshot.

SETUP:
Server: Raspberry Pi 4 (no Docker)
Zigbee device: Sonoff 3.0 USB Dongle
Device path (identified in System → Hardware → All Hardware): /dev/ttyUSB0
Mosquitto broker version: 6.2.1
Zigbee2MQTT version: 1.32.2-1
Home Assistant 2023.8.2
Supervisor 2023.08.1
Operating System 10.5

Zigbee2MQTT CONFIGURATION SETTINGS: (see screenshot)
mqtt:

  • server: mqtt://core-mosquito:1883

serial:

  • port: /dev/ttyUSB0



Two questions :

  • Sonoff Dongle P or Sonoff Dongle E ?
  • ZHA is not installed ?

@francisp It is a P and ZHA is running.

then you can’t connect to Zigbee2mqtt… only ZHA or Z2M can use the stick, not both at the same time.

1 Like

Good info. Wonder if you can answer a couple [related] followup questions for me… the reason I was trying to install Z2M was because my Aqara Magic Cube stopped working. I don’t know why it was working for over a year and then stopped. Perhaps an update broke it, but idk. As I read more, it sounds like you need the Aqara hub for it to work; preferably the v1 hub - but you can’t buy that anymore. Then I read people get around the need for a hub by using Z2M. So… these are my followup questions:

  1. In general, do you think Z2M is a better option than ZHA, when considering reliability and functionality?
  2. Any idea if Z2M would be likely to fix my original issue with the Aqara cube?

Actually… just did some online reading on ZHA vs Z2M. Found this: Zigbee2MQTT vs ZHA vs deCONZ. I think it answers my follow up questions.