Issue launching Zigbee2MQTT integration

Good evening,

After receiving a Zigbee key and some switches, lights, and other various peripherals, I wanted to test them on Gladys. Unfortunately, it seems that the integration fails to launch :frowning:

Gladys is installed following the official instructions under Docker, but in a Ubuntu VM (Virtualbox) running on a Windows host. I have shared the Zigbee key on Virtualbox so that it is mapped to the VM. The key appears in Gladys, but it is impossible to make the warning message disappear, even by saving the configuration:

I’m a bit out of ideas of things to try, so if you have any, I’m interested :smiley:

I retrieved the logs from the container, in case it helps!

Docker Log
> gladys-server@ start:prod /src/server
> cross-env NODE_ENV=production node index.js

2021-11-05T20:52:50+0100 <info> job.purge.js:17 (Job.purge) Deleting all background jobs created before = Fri Oct 29 2021 21:52:50 GMT+0200 (Central European Summer Time)
Initialising OpenZWave 1.6.0 binary addon for Node.JS.
        OpenZWave Security API is ENABLED
        ZWave device db    : /usr/local/etc/openzwave
        User settings path : /src/server/services/zwave/node_modules/openzwave-shared/build/Release/../../
        Option Overrides : --Logging false --ConsoleOutput false --SaveConfiguration true
2021-11-05T20:52:50+0100 <info> index.js:19 (Object.start) Starting example service
2021-11-05T20:52:50+0100 <info> index.js:14 (Object.start) starting GoogleActions service
2021-11-05T20:52:50+0100 <warn> service.start.js:44 (Service.start) Unable to start service zigbee2mqtt Error: (HTTP code 301) unexpected -
    at /src/server/node_modules/docker-modem/lib/modem.js:301:17
    at getCause (/src/server/node_modules/docker-modem/lib/modem.js:331:7)
    at Modem.buildPayload (/src/server/node_modules/docker-modem/lib/modem.js:300:5)
    at IncomingMessage.<anonymous> (/src/server/node_modules/docker-modem/lib/modem.js:275:14)
    at IncomingMessage.emit (events.js:412:35)
    at endReadableNT (internal/streams/readable.js:1334:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  reason: undefined,
  statusCode: 301,
  json: <Buffer >
}
2021-11-05T20:52:50+0100 <info> index.js:18 (Object.start) Starting TP-Link service
2021-11-05T20:52:50+0100 <info> index.js:17 (Object.start) Starting eWeLink service
2021-11-05T20:52:50+0100 <info> service.start.js:40 (Service.start) Service ewelink is not configured, so it was not started.
2021-11-05T20:52:50+0100 <info> index.js:15 (Object.start) Starting Bluetooth service
2021-11-05T20:52:50+0100 <error> index.js:20 (process.<anonymous>) uncaughtException catched: uncaughtException
2021-11-05T20:52:50+0100 <error> index.js:21 (process.<anonymous>) Error: ENODEV, No such device
    at Hci.init (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/hci.js:100:35)
    at NobleBindings.init (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:78:13)
    at /src/server/services/bluetooth/node_modules/@abandonware/noble/lib/noble.js:60:24
    at processTicksAndRejections (internal/process/task_queues.js:77:11) {
  errno: 19,
  code: 'ENODEV',
  syscall: 'bind'
}
2021-11-05T20:52:51+0100 <info> index.js:15 (Object.start) Starting Tasmota service
2021-11-05T20:52:51+0100 <info> index.js:16 (Object.start) Starting zwave service
2021-11-05T20:52:51+0100 <info> service.start.js:40 (Service.start) Service zwave is not configured, so it was not started.
2021-11-05T20:52:51+0100 <info> index.js:14 (Object.start) Starting Xiaomi service
2021-11-05T20:52:51+0100 <info> index.js:13 (Object.start) Starting usb service
2021-11-05T20:52:51+0100 <info> index.js:19 (Object.start) Starting Telegram service
2021-11-05T20:52:51+0100 <info> service.start.js:40 (Service.start) Service telegram is not configured, so it was not started.
2021-11-05T20:52:51+0100 <info> index.js:16 (Object.start) Starting RTSP service
2021-11-05T20:52:51+0100 <info> index.js:18 (Object.start) Starting Philips Hue service
2021-11-05T20:52:51+0100 <info> index.js:16 (Object.start) Starting MQTT service
2021-11-05T20:52:51+0100 <warn> service.start.js:44 (Service.start) Unable to start service mqtt Error: (HTTP code 301) unexpected -
    at /src/server/node_modules/docker-modem/lib/modem.js:301:17
    at getCause (/src/server/node_modules/docker-modem/lib/modem.js:331:7)
    at Modem.buildPayload (/src/server/node_modules/docker-modem/lib/modem.js:300:5)
    at IncomingMessage.<anonymous> (/src/server/node_modules/docker-modem/lib/modem.js:275:14)
    at IncomingMessage.emit (events.js:412:35)
    at endReadableNT (internal/streams/readable.js:1334:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  reason: undefined,
  statusCode: 301,
  json: <Buffer >
}
2021-11-05T20:52:51+0100 <info> index.js:20 (Object.start) Starting Open Weather service
2021-11-05T20:52:51+0100 <info> service.start.js:40 (Service.start) Service openweather is not configured, so it was not started.
2021-11-05T20:52:51+0100 <info> index.js:64 (Object.start) Starting CalDAV service
2021-11-05T20:52:51+0100 <info> scene.dailyUpdate.js:58 () Sunrise today is at 7:59 today, in your timezone = Europe/Paris
2021-11-05T20:52:51+0100 <info> scene.dailyUpdate.js:59 () Sunset today is at 17:43 today, in your timezone = Europe/Paris
2021-11-05T20:52:51+0100 <info> scene.dailyUpdate.js:70 () The sun rose this morning. Not scheduling for today.
2021-11-05T20:52:51+0100 <info> scene.dailyUpdate.js:84 () The sun has already set. Not scheduling for today.
2021-11-05T20:52:51+0100 <info> device.calculateAggregate.js:38 (DeviceManager.calculateAggregate) Calculating aggregates device feature state for interval hourly
2021-11-05T20:52:51+0100 <info> index.js:63 (Server.<anonymous>) Server listening on port 80
2021-11-05T20:52:51+0100 <info> device.calculateAggregate.js:105 (ChildProcess.<anonymous>) device.calculateAggregate: Finishing processing for interval hourly
2021-11-05T20:52:51+0100 <info> device.calculateAggregate.js:38 (DeviceManager.calculateAggregate) Calculating aggregates device feature state for interval daily

This is clearly a problem outside of Gladys.

How did you map the port in VirtualBox? (It’s a serial port)

Thank you for your response.

I started by setting the key as a serial device:


But the device /dev/ttyS1 does not work in Gladys. The same goes for /dev/ttyS0 and /dev/ttyS2, which I also tested in this configuration.
So I switched to a USB device in VB, which made a corresponding device appear in the VM, but it doesn’t work any better.

I had already done this setup a few months ago, which worked perfectly and even led to the request to add 2 Zigbee devices (Zigbee2mqtt: Add device ZM-L03E-Z · Issue #1244 · GladysAssistant/Gladys · GitHub and Zigbee2mqtt: Add device TS0002 · Issue #1245 · GladysAssistant/Gladys · GitHub). But since the installation is new, I must be forgetting something…

Good evening,

I am using Windows 10 + Virtual Box + Ubuntu and I must say that I regularly have to reconfigure the system because the USB port is no longer recognized even though it is visible in the Virtualbox interface. Often, simply disabling/enabling the USB port and restarting VSC fixes the problem…

Hi,

Thanks for your feedback, I’ll test all that :+1:
Which version of VB are you using? I think the latest version (6.1.28) doesn’t work… The last successful attempt I made was with version 6.1.26.

For information, this is Windows 10 Pro

Thanks for the quick reply!

Disabling/re-enabling the port via the device manager doesn’t seem to help.

I’m on Windows 10 Education, which is supposed to be as complete as Pro in terms of features.
I see that you’re on Ubuntu 20.04, I’ll try to switch to that as well, I’m on 21.10 at the moment.

For the VB configuration, are you mapping the serial port as I did?

No, I have a USB map. Do you have multiple USB nails?

Well, I had to update my Windows 10 yesterday and since then the USB ports are no longer recognized by VirtualBox, so it seems quite random behavior… :triumph:

I’ve been focused on other things lately… And I’ve let this topic slide a bit.
Regarding the USB dongles, I have another one, but it’s completely different. Nevertheless, I’m sure I selected the right one.

Well, that’s not good news for us! I’ll end up buying another RPi. It won’t be easy given the current situation, they’re out of stock everywhere…