Newbie failing to get Zigbee2MQTT working

Hey there !

I just received and launched Home Assistant Green.

I followed a tutorial to install Mosquitto and Zigbee2MQTT.
I use SkyConnect and flashed the latest firmware Zigbee (EZSP) 7.4.2.0 build 0.

First problem : in Home Assistant, when I try to see SkyConnect, it just says « unsupported_firmware ». I tried flashing it again : it goes fine apparently but the error stays the same.

Now, I had a working Zigbee2MQTT but with errors when starting. I deleted it and installed again.
Now, it won’t start at all with this error :

[2024-07-15 17:21:45] error: 	z2m: Error while starting zigbee-herdsman
[2024-07-15 17:21:45] error: 	z2m: Failed to start zigbee
[2024-07-15 17:21:45] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-07-15 17:21:45] error: 	z2m: Exiting...
[2024-07-15 17:21:45] error: 	z2m: Error: Failed to start EZSP layer with status=HOST_FATAL_ERROR.
    at EmberAdapter.initEzsp (/app/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:889:19)
    at EmberAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:2722:24)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:129:29)
    at Zigbee.start (/app/lib/zigbee.ts:63:27)
    at Controller.start (/app/lib/controller.ts:139:27)
    at start (/app/index.js:154:5)

This is making me, like, super sad and frustrated. It’s supposed to be a “clean” install : those are just literally the first things I installed on this HA Green, and it’s already not working as intended.

I would immensely appreciate some help =)

Thank you good people.

Wild guess, but does your Z2M config for the skyconnect contain the following?

serial:
  adapter: ezsp

If so, you need to change it to

serial:
  adapter: ember

as per the installation docs. Ezsp stopped being used since 7.4.0

HI newbie here and also having same problem with smlight slzb-07 with latest recommended fw (same as OP). Hope this is allowed to post here instead of creating a duplicate thread as the issues are related apart from mine is in minipc within proxmox.

anyway, the problem for me is I can’t find the path for usb.

Blockquote
lsusb: /devices/pci0000:00/0000:00:01.2/usb1

System - > hardware ->USB1

That’s not the correct device. You have probably not configured Proxmox correctly. Either fix that or use the SLZB in ethernet mode.

edit: fixed now. Had to pass USB device to VM in proxmox.

hi all,
I am in the same boat as Newbie and also very new to HASS.
HS green
Sky Connect
I was using ZHA and was ok but couldnt find some devices so tried with Zigbee2mqtt and can not make it work.

Started with ezsp and changed to ember it progress furher hitting a problem

Configuration:
data_path: /config/zigbee2mqtt
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
mqtt: {}
serial:
port: >-
/dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_42f713dbdc9ced118b3074faa7669f5d-if00-port0
adapter: ember

Log:
Starting Zigbee2MQTT without watchdog.
[2024-08-19 17:01:16] info: z2m: Logging to console, file (filename: log.log)
[2024-08-19 17:01:16] info: z2m: Starting Zigbee2MQTT version 1.39.1 (commit #unknown)
[2024-08-19 17:01:16] info: z2m: Starting zigbee-herdsman (0.55.3)
[2024-08-19 17:01:17] info: zh:ember: Using default stack config.
[2024-08-19 17:01:17] info: zh:ember: ======== Ember Adapter Starting ========
[2024-08-19 17:01:17] info: zh:ember:ezsp: ======== EZSP starting ========
[2024-08-19 17:01:17] info: zh:ember:uart:ash: ======== ASH Adapter reset ========
[2024-08-19 17:01:17] info: zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
[2024-08-19 17:01:17] info: zh:ember:uart:ash: Serial port opened
[2024-08-19 17:01:17] info: zh:ember:uart:ash: ======== ASH starting ========
[2024-08-19 17:01:18] info: zh:ember:uart:ash: ======== ASH connected ========
[2024-08-19 17:01:18] info: zh:ember:uart:ash: ======== ASH started ========
[2024-08-19 17:01:18] info: zh:ember:ezsp: ======== EZSP started ========
[2024-08-19 17:01:18] error: z2m: Error while starting zigbee-herdsman
[2024-08-19 17:01:18] error: z2m: Failed to start zigbee
[2024-08-19 17:01:18] error: z2m: Check Zigbee2MQTT fails to start | Zigbee2MQTT for possible solutions
[2024-08-19 17:01:18] error: z2m: Exiting…
[2024-08-19 17:01:19] error: z2m: Error: Adapter EZSP protocol version (9) is not supported by Host [13-14].

The error says it all

You are running ember on unsupported firmware. Update the firmware to 7.4.x

1 Like

Thanks, will try

Hi Sky connect firmware updated.
Still not working

[2024-08-21 21:56:25] info: 	zh:ember:uart:ash:   DATA frames : RX=43, TX=38
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash:   DATA bytes  : RX=397, TX=404
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash:   Retry frames: RX=3, TX=0
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash:   ACK frames  : RX=1, TX=42
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash:   NAK frames  : RX=0, TX=1
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash:   nRdy frames : RX=0, TX=0
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash:   CRC errors      : RX=0
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash:   Comm errors     : RX=0
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash:   Length < minimum: RX=0
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash:   Length > maximum: RX=0
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash:   Bad controls    : RX=0
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash:   Bad lengths     : RX=0
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash:   Bad ACK numbers : RX=5
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash:   Out of buffers  : RX=0
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash:   Retry dupes     : RX=0
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash:   Out of sequence : RX=0
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash:   ACK timeouts    : RX=0
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash: Port closed.
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash: ======== ASH stopped ========
[2024-08-21 21:56:25] info: 	zh:ember:ezsp: ======== EZSP stopped ========
[2024-08-21 21:56:25] info: 	zh:ember: ======== Ember Adapter Stopped ========
[2024-08-21 21:56:25] info: 	zh:ember: ======== Ember Adapter Starting ========
[2024-08-21 21:56:25] info: 	zh:ember:ezsp: ======== EZSP starting ========
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash: Serial port opened
[2024-08-21 21:56:25] info: 	zh:ember:uart:ash: ======== ASH starting ========
[2024-08-21 21:56:28] info: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
[2024-08-21 21:56:28] info: 	zh:ember:uart:ash: ======== ASH starting ========
[2024-08-21 21:56:29] info: 	zh:ember:uart:ash: ======== ASH connected ========
[2024-08-21 21:56:29] info: 	zh:ember:uart:ash: ======== ASH started ========
[2024-08-21 21:56:29] info: 	zh:ember:ezsp: ======== EZSP started ========
[2024-08-21 21:56:30] error: 	zh:ember:uart:ash: Received frame with CRC error
[2024-08-21 21:56:33] error: 	zh:ember:uart:ash: Received frame with comm error
[2024-08-21 21:56:43] error: 	zh:ember:ezsp: ERROR Transaction failure; status=ASH_ERROR_TIMEOUTS. Last Frame: [FRAME: ID=0:"VERSION" Seq=0 Len=0].
[2024-08-21 21:56:43] error: 	zh:ember: !!! ADAPTER FATAL ERROR reason=ASH_ERROR_TIMEOUTS. !!!
[2024-08-21 21:56:43] info: 	zh:ember: Attempting adapter reset...
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash: ASH COUNTERS since last clear:
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Total frames: RX=5, TX=3
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Cancelled   : RX=0, TX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   DATA frames : RX=2, TX=1
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   DATA bytes  : RX=0, TX=4
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Retry frames: RX=0, TX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   ACK frames  : RX=1, TX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   NAK frames  : RX=1, TX=1
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   nRdy frames : RX=0, TX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   CRC errors      : RX=1
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Comm errors     : RX=1
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Length < minimum: RX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Length > maximum: RX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Bad controls    : RX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Bad lengths     : RX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Bad ACK numbers : RX=3
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Out of buffers  : RX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Retry dupes     : RX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Out of sequence : RX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   ACK timeouts    : RX=0
[2024-08-21 21:56:43] error: 	zh:ember: Failed to reset and init adapter. Error: ASH_ERROR_TIMEOUTS
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash: ASH COUNTERS since last clear:
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Total frames: RX=5, TX=3
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Cancelled   : RX=0, TX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   DATA frames : RX=2, TX=1
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   DATA bytes  : RX=0, TX=4
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Retry frames: RX=0, TX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   ACK frames  : RX=1, TX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   NAK frames  : RX=1, TX=1
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   nRdy frames : RX=0, TX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   CRC errors      : RX=1
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Comm errors     : RX=1
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Length < minimum: RX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Length > maximum: RX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Bad controls    : RX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Bad lengths     : RX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Bad ACK numbers : RX=3
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Out of buffers  : RX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Retry dupes     : RX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   Out of sequence : RX=0
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash:   ACK timeouts    : RX=0
[2024-08-21 21:56:43] error: 	zh:ember:uart:ash: Failed to close serial port Error: Port is not open.
[2024-08-21 21:56:43] info: 	zh:ember:uart:ash: ======== ASH stopped ========
[2024-08-21 21:56:43] info: 	zh:ember:ezsp: ======== EZSP stopped ========
[2024-08-21 21:56:43] info: 	zh:ember: ======== Ember Adapter Stopped ========
[2024-08-21 21:56:43] error: 	z2m: Adapter disconnected, stopping
[2024-08-21 21:56:43] info: 	z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload '{"state":"offline"}'
[2024-08-21 21:56:43] info: 	z2m: Disconnecting from MQTT server
[2024-08-21 21:56:43] info: 	z2m: Stopping zigbee-herdsman...
[2024-08-21 21:56:43] info: 	z2m: Stopped zigbee-herdsman
[2024-08-21 21:56:43] info: 	z2m: Stopped Zigbee2MQTT

/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:264
  var er = new ERR_STREAM_WRITE_AFTER_END();
           ^
Error: write after end
    at writeAfterEnd (/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:264:12)
    at DerivedLogger.Writable.write (/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:300:21)
    at DerivedLogger.log (/app/node_modules/winston/lib/winston/logger.js:231:12)
    at Logger.log (/app/lib/util/logger.ts:189:25)
    at Logger.error (/app/lib/util/logger.ts:194:14)
    at EmberAdapter.onNcpNeedsResetAndInit (/app/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:1354:24)
[21:58:14] INFO: Preparing to start...
[21:58:15] INFO: Socat not enabled

Are you sure ZHA is not running ?

1 Like

Thanks Francsip. No I am not. I am very new so not sure of much. I disable ZHA (or at least I think I did) before starting the Zigbee2MQTT.
After the ZBMQQ failed to start I had to enable ZHA to make it work.
But I will retry disabelling the ZHA again just in case

Thanks Francisp. ZigbedtoMQQT wroking now.

Incredibly interesting… describing my case just for everybody struggling with 502 error and not being able to start zigbee2mqtt:

  1. I am using the mqtt broker thus initially I was not filling the config for mqtt. Wrong. You need to put into the config file:

server: mqtt://core-mosquitto
user: user
password: “password”

where user & password must match this in the mqtt broker.

  1. you need to fill also the port / device:

port: /dev/ttyUSB0
adapter: ezsp

in my case USB port, but hey - can you see the device name? It is the EZSP - the one that was supposed to be replaced with “ember”… I have been sitting today for over 4 hours trying to start this bloody add-on and just last ry this evening and off it goes…

So keep trying ALL the options even if documentation says is not valid anymore…

Have a great night.

J.

1 Like

Hi there everyone.
I am also an absolute beginner with HA. I have in the last week set up HA on a Green so based on a fresh install. I have added a few WiFi and Zigbee devices. Now I am trying to add a Vesternet 4 button Zigbee switch which seemingly is integrated through MQTT.
So I today installed the MOSQUITTO broker and I now have MQTT…?

Anyway, I am not able to get my switch to show up in MQTT. I have paired it to the Zigbee broker numerous times.

I am wondering if I am barking up the wrong tree, maybe I should not be Zigbee pairing?

The device I am getting after pairing is this:

As you can see, no interesting entities.

Any suggestions?

ZHA, MQTT and Z2MQTT are all separate integrations. You’re trying to use ZHA and MQTT separately, when those 2 integrations don’t talk to each other.

You need to move over to Z2MQTT (and remove ZHA in the process) to be able to make use of ZigBee via MQTT

1 Like

Thanks for your response. I already have 14 ZigBee devices via ZHA without any issue. When I tried to add the Vesternet Zigbee 4 button device it did show up in ZHA, but without the interesting bits, button presses. I there googled and found that Vesternet Zigbee devices required MQTT. So i installed MQTT support in the form of Mosquitto.

However, i am totally at sea when it comes to how i pair/ join/ associate or whatever the switch with MQTT.

Can I have ZHA and MQTT running in parallel serving different devices?

As you can see, not at all clear what I need now (-:

1 Like

Read my previous reply please. You need ZigBee2MQTT integration to do that.

For that to happen, you need to either remove your ZHA integration or else buy a separate ZigBee dongle just for the vesternet device. Note that if you have a single device on that network, it will be in its own mesh & can’t communicate with your other devices unless you move them over

Thanks, I realise now MQTT is the wrong approach. I have the device talking on ZHA, what I think i need is to apply a blueprint as per this post.

Yep, the blueprint should fix it. Battery devices with a button don’t usually have an entity - they send events instead, and the blueprint handles that for you.

Side not - Just saw your earlier screenshot and noticed you have duplicate entities & logbook entries for the device. I suggest you fix that first before trying any blueprint, or you’ll get 2 events for each button press. Putting in a fresh battery might be a good idea too - 31% on a new device is a bit too low.