SkyConnect & Zigbee2Mqtt

Hi, having trouble getting SkyConnect to work with Z2M. My goal is to have the SkyConnect replace the Sonoff-P and run multiprotocol: zigbee and thread.

If I can’t get SkyConnect to work in multiprotocol I’d also be ok with using the Sonoff-P for Zigbee and the SkyConnect for Thread. But ideally since the SkyConnect can do both I’d prefer it do both.

I had Z2M working with a Sonoff-P. It is still plugged in if that matters at /dev/ttyUSB0.

I renamed configuration.yaml to .bak in the config/zigbee2mqtt directory, also renamed coordinator_backup.json to .bak.

SkyConnect is flashed to latest multiprotocol firmware.

Z2M config updated to:

serial:
port: tcp://core-silabs-multiprotocol:9999
adapter: ezsp

and I am able to ping core-silabs-multiprotocol:9999 from the HomeAssistant console.

I have tried rebooting PC that HomeAssistant is running on multiple times.

When I try to start Z2M I get the following error:

[07:09:13] INFO: Preparing to start...
[07:09:14] INFO: Socat not enabled
[07:09:14] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:info  2024-01-15 07:09:18: Logging to console and directory: '/config/zigbee2mqtt/log/2024-01-15.07-09-18' filename: log.txt
Zigbee2MQTT:info  2024-01-15 07:09:18: Starting Zigbee2MQTT version 1.35.1 (commit #unknown)
Zigbee2MQTT:info  2024-01-15 07:09:18: Starting zigbee-herdsman (0.30.0)
Zigbee2MQTT:error 2024-01-15 07:09:38: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2024-01-15 07:09:38: Failed to start zigbee
Zigbee2MQTT:error 2024-01-15 07:09:38: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2024-01-15 07:09:38: Exiting...
Zigbee2MQTT:error 2024-01-15 07:09:38: Error: Failure to connect
    at Ezsp.connect (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:277:19)
    at Driver.startup (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/driver.ts:139:9)
    at EZSPAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/adapter/ezspAdapter.ts:172:16)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
    at Zigbee.start (/app/lib/zigbee.ts:60:27)
    at Controller.start (/app/lib/controller.ts:98:27)
    at start (/app/index.js:107:5)

And in the Silicon Labs Multiprotocol Add-On I am seeing this:

[07:14:12] INFO: Starting zigbeed...
WARNING in function 'is_endpoint_opened_reply_v5' in file /usr/src/cpc-daemon/server_core/core/protocol_v5.c at line #132 : Property-get::PROP_ENDPOINT_STATE aborted
WARNING in function 'is_endpoint_opened_reply_v5' in file /usr/src/cpc-daemon/server_core/core/protocol_v5.c at line #152 : Could not read endpoint state on the secondary
WARNING in function 'system_send_open_endpoint_ack' in file /usr/src/cpc-daemon/server_core/server/server.c at line #1044 : Failed to acknowledge the open request for endpoint #12. Bad file descriptor
otbr-agent[100690]: 49d.18:07:22.299 [C] Platform------: CPC endpoint open failed
otbr-agent[100690]: 49d.18:07:22.299 [C] Platform------: mCpcBusSpeed = 115200
otbr-agent[100690]: 49d.18:07:22.299 [C] Platform------: Init() at radio_spinel.cpp:125: Failure
close cpc endpoint: Resource temporarily unavailable
[07:14:13] INFO: otbr-agent ended with exit code 1 (signal 0)...

I’ve done my best to implement all the guidance I’ve been able to find and still not working.

Can anyone give me advice on what to try to fix this?

silabs-multiprotocol v2.4.3 may be the issue:

2.4.3 was the first version I installed so I don’t have a backup to go to. I tried looking for the Docker container to do a manual Add-On install.

I believe this is the correct Docker location: Docker

I don’t know yet how to do a manual Add-On install so if/when I do figure it out I will reply if it fixes the issue.

I hope you find a ‘solution’ that works for you. That said, are you sure you have
‘done my best to implement all the guidance I’ve been able to find’
See below.

Experimental
The adapters below are experimental, don't use these if you want a stable setup.

Based on Silicon Labs EFR32MG2x/MGM21x and EFR32MG1x/MGM1x series

I flashed the SkyConnect back to Zigbee only using the Silicon Labs Flasher, and it is working properly with Z2M.

LQI signal strength numbers are higher than with the Sonoff -P dongle, but both worked fine.

So now the trick is to figure out how to “downgrade” to Silicon Labs Multiprotocol 2.4.2 or wait until it is fixed in a future update.

Can anyone here help me with downgrading to an earlier Add-On or point me to instructions? I have looked and not able to find them.

Thank you,

Yes, I read that, but I appreciate the reminder.

It seemed like a number of people had it working with no problems so I took that as encouraging.

I would like to have both Zigbee and Thread/Matter and I have a Sonoff -P dongle and the SkyConnect dongle.

What would you recommend if I would like to to run both protocols as stable as possible?

I’ve not messed around with the transmitter power setting for the coordinator. I’m not sure I think that increasing the power on only one side of the ‘conversation’ makes sense (aka, there is not way to increase transmit power on most routers and end devices).

That said, I think I noted that the default transmit power level is higher by default on the -E dongle vs. the -P dongle. Might be a cause of why you see different LQI values between the two. Why, they are set to different defaults??? Mystery to me.

I’m not a big fan of using Home Assistant’s ‘OS supervisor’ to run it’s kinda-docker containers within Home Assistant. Never made sense to me that your zigbee or other stuff in containers should ‘go down’ if your Home Assistant crashes, or during upgrades.

So I run docker on linux, then run each of my ‘systems’ in parallel under ‘real’ Docker. Minimum three docker containers in parallel are:
Mosquitto MQTT Broker
Home Assistant
Zigbee2MQTT

I run a number of other systems in containers as well, the communicate with Home Assistant via API or MQTT, very solid.

I run a 2nd Zigbee2MQTT docker container with it’s own Sonoff-P dongle, this where I test new devices and firmware upgrades before the ‘real test’ of putting it on the production Zigbee2MQTT where the ‘significant other’ will ‘explain to me’ whether it is working or not :wink:

While I have not explored the Home Assistant Matter ‘server’ code, I believe you can find a couple people running it in isolated Docker containers in parallel with Home Assistant. Again, this seem the most stable way, especially with very new/raw code such as in the SkyConnect and Matter code.

Good hunting!

I increased transmit power in the Z2M config.yaml as shown here: Adapter settings | Zigbee2MQTT

advanced:
  # Optional: Transmit power setting in dBm (default: 5).
  # This will set the transmit power for devices that bring an inbuilt amplifier.
  # It can't go over the maximum of the respective hardware and might be limited
  # by firmware (for example to migrate heat, or by using an unsupported firmware).
  # For the CC2652R(B) this is 5 dBm, CC2652P/CC1352P-2 20 dBm.
  transmit_power: 5

I set it to 20, the setting was not present before and since the Sonoff -P is based on the CC2625P I would assume it was already using the default setting of 20.

After restarting the LQI numbers did change, some up, some down, but not significantly so I’m guessing it was already at 20.

Thanks for the tip, good thing to check out.

Sonoff -P dongle is now back to handling Zigbee via Z2M. I can confirm this is working as it was before changing anything.

SkyConnect is now only handling Thread/Matter using the Open Thread Border Router Add-On to flash Thread/Matter only firmware onto the SkyConnect.

I am able to see the Thread/Matter network in HA, and I can log onto the OTBR web interface. I can also see the Matter network on the nanoleaf iOS app, but it will not allow me to add the bulb to the Matter network. This may be a nanoleaf issue as other users have reported that if they use an Android phone then it will add.

Therefore, based on what I can tell, Z2M is working on the Sonoff -P and Thread/Matter is working on the SkyConnect.

1 Like

That setting for the coordinator device reminds of two old (and probably no longer PC) comedy skits :wink: :

Spinal Tap … turn it up to 11.

Garrett Morris … news for the hearing impaired.

Hi all, since I want to use a TRV602 with Zigbee (not supported by SkyConnect v1.0) I want to switch to Zigbee2MQTT using my SkyConnect stick. Is that easily possible?

This worked for my SkyConnect too, thank you so much!

Hello everyone!

I have been trying for days to get my SkyConnect to work with Zigbee2MQTT on my HA Running in docker on my Synology NAS.
I installed the USB Drivers and ZHA works (using ttyUSB0)
(NOTE that i have disabled ZHA before trying MQTT).
But I get the same error as everyone here.
I tried both the

serial:
  port: /dev/ttyUSB0
  adapter: ezsp

and the

serial:
  port: tcp://core-silabs-multiprotocol:9999
  adapter: ezsp

Configs but neither of these work.
I cant figure out device ID or use the add-on as I am running HA in a docker and cannot run HomeassistOS.

Any help would be greatly appreciated!

Hello @SimeJah

You cannot use the same device on both HA and Z2MQTT

If your SkyConnect is already been used by HA (using ttyUSB0) you cannot use it in Zigbee2MQTT, you will need a second device.

That being said, if I didn’t understand you right, the correct configuration to use your SkyConnect would be:

serial:
  port: /dev/ttyUSB0
#  ezsp was/will be deprecated
# don't set any value here, Z2M will use the default value (ember)
#  adapter: ezsp 

Hope this helps

I made the same mistake.
Is there no way to revert it? I would love to use z2m, but I only learned about it afterward.

There are ways to reflash the SkyConnect with the appropriate firmware for ZigBee2MQTT.
Here is an example Community Forum thread that may be of interest. It is about upgrading the ZigBee stack firmware, but should work for you.

1 Like

Thank you.
I was able to flash it again however I wasn’t able to remove ZHA before, so I’m back at square 1 now and as far as I understand it, I won’t be able to get zugbee2mqtt running again.

I wish there would be a step by step guide how to manage that from zero.
This thread gives me headaches with all those chip numbers, firmware versions, abbreviations.
I intentionally went for SkyConnect since I assumed it would be easier…

What firmware did you flash it to?
As for ZHA, if you don’t have any devices paired, then with the Stick removed, you should be able to delete the ZHA integration, and then plug the stick back in and you should see HA “Autodiscover” ZHA SkyConnect Integration, but you should be able to ignore it, and this should leave the ZStick available for use with Z2M directly.

1 Like

I can’t really tell you what firmware.
I guess the newest one. I plugged it into my PC and went to the homepage and it dit what it did.

Furthermore, I couldn’t delete the ZHA integration as it gave me an error which I could see in the settings. The error went away after I’ve flashed it.

I bought a sonoff now and I’ll start over with that.

Hello everyone,

I’ve already tried everything. But whenever I set the port to ezsp I get the following error message:
“Failed to save add-on configuration: does not match regular expression ^zstack|deconz|zigate$. Got {‘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’: {‘base_topic’: ‘zigbee2mqtt’, ‘server’: ‘mqtt://core-mosquitto:1883’, ’ user’: ‘mqtt-user’, ‘password’: ‘mqtt’, ‘keepalive’: 60, ‘reject_unauthorized’: True, ‘zigbee_herdsman_debug’: False}, ‘serial’: {‘port’: 'tcp:// core-silabs-multiprotocol:9999…”

Can anyone help me where the problem lies.
Thanks in advance!!