Zigbee2MQQT with Slae's stick

Hi.

I’ve just got slaes’s CC2652RB with zigbee2mqtt firmware (hopefully…). But I can’t get it working with HA. I have RPi4, tried both USB2 & USB3 ports and it behaves the same.

My config looks like this:

data_path: /config/zigbee2mqtt
external_converters: []
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  user: '!secret mqtt_username'
  password: '!secret mqtt_password'
serial:
  port: /dev/ttyUSB0
advanced:
  log_level: warn
  pan_id: 6754
  channel: 11
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  availability_blocklist: []
  availability_passlist: []
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
  port: 8099
experimental: {}
availability: false
socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: '-d -d'
  log: false

and I end up with this in the log

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] socat.sh: executing... 
[18:08:10] INFO: Socat not enabled, marking service as down
[cont-init.d] socat.sh: exited 0.
[cont-init.d] zigbee2mqtt.sh: executing... 
[18:08:11] INFO: MQTT available, fetching server detail ...
[18:08:11] INFO: MQTT server settings not configured, trying to auto-discovering ...
[18:08:12] INFO: Configuring 'mqtt://core-mosquitto:1883' mqtt server
[18:08:12] INFO: Previous config file found, checking backup
[18:08:12] INFO: Creating backup config in '/config/zigbee2mqtt/.configuration.yaml.bk'
[18:08:12] INFO: Adjusting Zigbee2mqtt core yaml config with add-on quirks ...
[cont-init.d] zigbee2mqtt.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[18:08:14] INFO: Handing over control to Zigbee2mqtt Core ...
> [email protected] start
> node index.js
Zigbee2MQTT:error 2021-12-01 18:09:38: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-12-01 18:09:38: Failed to start zigbee
Zigbee2MQTT:error 2021-12-01 18:09:38: Check https://www.zigbee2mqtt.io/information/FAQ.html#help-zigbee2mqtt-fails-to-start for possible solutions
Zigbee2MQTT:error 2021-12-01 18:09:38: Exiting...
Zigbee2MQTT:error 2021-12-01 18:09:38: Error: AREQ - ZDO - stateChangeInd after 60000ms
    at Timeout._onTimeout (/app/node_modules/zigbee-herdsman/src/utils/waitress.ts:64:35)
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)

The USB port should be correct:

[core-ssh ~]$ test -w /dls -l /dev/serial/by-id
total 0
lrwxrwxrwx    1 root     root            13 Dec  1 17:20 usb-Silicon_Labs_slae.sh_cc2652rb_stick_-_slaesh_s_iot_stuff_00_12_4B_00_21_4F_1D_16-if00-port0 -> ../../ttyUSB0

If I try changing the port in config as recommended by slaes to

serial:
  port: /dev/serial/by-id/usb-Silicon_Labs_slae.sh_cc2652rb_stick_-_slaesh_s_iot_stuff_00_12_4B_00_21_4F_1D_16-if00-port0

I end up with the same error.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] socat.sh: executing... 
[18:21:40] INFO: Socat not enabled, marking service as down
[cont-init.d] socat.sh: exited 0.
[cont-init.d] zigbee2mqtt.sh: executing... 
[18:21:41] INFO: MQTT available, fetching server detail ...
[18:21:41] INFO: MQTT server settings not configured, trying to auto-discovering ...
[18:21:42] INFO: Configuring 'mqtt://core-mosquitto:1883' mqtt server
[18:21:42] INFO: Previous config file found, checking backup
[18:21:42] INFO: Creating backup config in '/config/zigbee2mqtt/.configuration.yaml.bk'
[18:21:42] INFO: Adjusting Zigbee2mqtt core yaml config with add-on quirks ...
[cont-init.d] zigbee2mqtt.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[18:21:44] INFO: Handing over control to Zigbee2mqtt Core ...
> [email protected] start
> node index.js
Zigbee2MQTT:error 2021-12-01 18:22:35: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-12-01 18:22:35: Failed to start zigbee
Zigbee2MQTT:error 2021-12-01 18:22:35: Check https://www.zigbee2mqtt.io/information/FAQ.html#help-zigbee2mqtt-fails-to-start for possible solutions
Zigbee2MQTT:error 2021-12-01 18:22:35: Exiting...
Zigbee2MQTT:error 2021-12-01 18:22:35: Error: SRSP - SAPI - readConfiguration after 6000ms
    at Timeout._onTimeout (/app/node_modules/zigbee-herdsman/src/utils/waitress.ts:64:35)
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)

I’ve made some progress here. Reinstalled completely everything. Flashed the USB stick with an older firmware and now I don’t see any errors in the log, but the device page in the frontend editor does not load - it ends up with “Loading, please wait” and never loads.

The config file looks like this:

data_path: /config/zigbee2mqtt
external_converters: []
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  user: '!secret mqtt_username'
  password: '!secret mqtt_password'
  server: mqtt://core-mosquitto:1883
serial:
  port: >-
    /dev/serial/by-id/usb-Silicon_Labs_slae.sh_cc2652rb_stick_-_slaesh_s_iot_stuff_00_12_4B_00_21_4F_1D_16-if00-port0
advanced:
  log_level: warn
  pan_id: 6754
  channel: 11
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  availability_blocklist: []
  availability_passlist: []
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
  port: 8099
experimental: {}
availability: false
socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: '-d -d'
  log: false

Log then looks like this:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] socat.sh: executing... 
[08:35:37] INFO: Socat not enabled, marking service as down
[cont-init.d] socat.sh: exited 0.
[cont-init.d] zigbee2mqtt.sh: executing... 
[08:35:38] INFO: MQTT available, fetching server detail ...
[08:35:38] INFO: Previous config file found, checking backup
[08:35:38] INFO: Creating backup config in '/config/zigbee2mqtt/.configuration.yaml.bk'
[08:35:38] INFO: Adjusting Zigbee2mqtt core yaml config with add-on quirks ...
[cont-init.d] zigbee2mqtt.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[08:35:40] INFO: Handing over control to Zigbee2mqtt Core ...
> [email protected] start
> node index.js
Zigbee2MQTT:warn  2021-12-02 08:35:56: Using experimental new availability feature

And if I open the frontend page, I see this and it never loads.

Any idea why? If I try accessing frontend directly via localip:8099 I get ERR_CONNECTION_REFUSED - both via http and https.

Are you connecting the stick directly to the RPI4? Try to put an USB extension cable between the stick and the USB port of the RPI to get at least 0.5 - 1m distance between the two devices.

Yes, I’ve tried both - directly connected to RPI4 and connected via an extension USB3 cable and none of it helped.

But it seems to be a bug [Bug]: Frontend loads sometimes slow · Issue #1124 · nurikk/zigbee2mqtt-frontend (github.com)