I’ve already run in to the first challenge which is that Zigbee2mqtt gives me a “502: bad gateway” error.
I’ve tried a lot of things but so far I haven’t been able to get it up and running.
To start troubleshooting I would like to test if the HASS vm sees the ZigBee dongle. Is there anyway to test this so I can check the hardware test and start looking at the software?
Settings → System → Hardware → three dots in top right corner → all hardware will show you if HA sees your USB stick. You should also paste the logs from Z2M.
It seems the dongel is not showing in hardware.
The log from zigbee2mqtt is showing the following. I hope you can make something out of this.
*[23:27:54] INFO: Handing over control to Zigbee2mqtt Core ...* *> [email protected] start /app* *> node index.js* *Zigbee2MQTT:error 2023-01-04 23:27:55: Error while starting zigbee-herdsman* *Zigbee2MQTT:error 2023-01-04 23:27:55: Failed to start zigbee* *Zigbee2MQTT:error 2023-01-04 23:27:55: Exiting...* *Zigbee2MQTT:error 2023-01-04 23:27:55: Error: Error while opening serialport 'Error: Error: No such ``file or directory, cannot open /dev/ttyACM0'* * at Znp.<anonymous> (/app/node_modules/zigbee-herdsman/dist/adapter/z-``stack/znp/znp.js:136:32)* * at Generator.next (<anonymous>)* * at /app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:27:71* * at new Promise (<anonymous>)* * at __awaiter (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:23:12)* * at SerialPort.<anonymous> (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:134:49)* * at SerialPort._error (/app/node_modules/zigbee-``herdsman/node_modules/@serialport/stream/lib/index.js:198:14)* * at /app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12* *npm ERR! code ELIFECYCLE* *npm ERR! errno 1* *npm ERR! [email protected] start: node index.js* *npm ERR! Exit status 1* *npm ERR! * *npm ERR! Failed at the [email protected] start script.* *npm ERR! This is probably not a problem with npm. There is likely additional logging output above.* *npm ERR! A complete log of this run can be found in:* *npm ERR! /root/.npm/_logs/2023-01-04T22_27_55_603Z-debug.log*
This is how it is showing up on the host (W11) hardware.
So I managed to solve the problem
I hooked the dongle up with a USB extension cable. The problem was that the G4 mini has 5 USB 3.1 ports and only one USB 2.0 port. After swapping to the USB 2.0 port I found it in hardware. The rest worked by following the tutorials. I’m in the Zigbee2mqtt user interface now, so good to go
Thanks for thinking with me!!
@jerrm Thanks for the link!! I’ll be checking it out for auto connecting after reboot.
Ok. Cheered a bit to early.
I tried to pair my first device, but it didn’t work.
Looking at the zigbee2mqtt log I get the following,
[22:36:45] INFO: Handing over control to Zigbee2mqtt Core … [email protected] start /app
node index.js
Zigbee2MQTT:warn 2023-01-05 22:37:01: permit_join set to true in configuration.yaml.
Zigbee2MQTT:warn 2023-01-05 22:37:01: Allowing new devices to join.
Zigbee2MQTT:warn 2023-01-05 22:37:01: Set permit_join to false once you joined all devices.
Zigbee2MQTT:error 2023-01-05 22:37:07: Failed to call ‘Bridge’ ‘onMQTTConnected’ (Error: SRSP - ZDO - extNwkInfo after 6000ms
at Timeout._onTimeout (/app/node_modules/zigbee-herdsman/dist/utils/waitress.js:46:35)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7))
(node:364) UnhandledPromiseRejectionWarning: Error: SRSP - ZDO - mgmtPermitJoinReq after 6000ms
at Timeout._onTimeout (/app/node_modules/zigbee-herdsman/dist/utils/waitress.js:46:35)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
(Use node --trace-warnings ... to show where the warning was created)
(node:364) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see Command-line API | Node.js v21.6.2 Documentation). (rejection id: 1)
(node:364) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
When I hit the “Permit Join (all)” button in zigbee2mqtt I get the message below
Zigbee2MQTT:error 2023-01-05 22:43:16: Request ‘zigbee2mqtt/bridge/request/permit_join’ failed with error: ‘SRSP - ZDO - mgmtPermitJoinReq after 6000ms’
I thought I would manage this with the decent experience I have, but I feel like a complete noob by now…
I flashed it to the latest firmware and I managed to get my first client paired. Looking good.
When I configure the dongle from “devices and services” zigbee2mqtt stops working though.
Is it needed to configure the dongle or is this best left untouched?
What do you mean configure the dongle from devices and services? If you mean the screenshot you posted that is ZHA, not Zigbee2mqtt. You can’t run both with one adapter. Z2M is not listed under integrations, it’s an addon. You will see the connected devices under the MQTT-integration. From my installation:
MQTT broker