Tube's ZB Coordinators and Routers (was Zigbee router on steroids?)

Thanks for the reply! I’m having trouble connecting to the coordinator via zigpy-znp on Mac OS. All installed as expected, and I can access the coordinator’s internal web server at http://192.168.2.155 but when I run an energy scan via port 6638 I’m getting a “socket disconnected” error. Details below in case you have any hints for me. Thanks!

(venv) woolmagnet@Wools-MacBook-Air Downloads % python -m zigpy_znp.tools.energy_scan socket://192.168.2.155:6638
2022-08-10 00:10:10.421 Wools-Air.localdomain __main__ INFO Starting up zigpy-znp
2022-08-10 00:10:10.437 Wools-Air.localdomain zigpy_znp.uart WARNING Lost connection
Traceback (most recent call last):
  File "/Users/woolmagnet/Downloads/venv/lib/python3.10/site-packages/serial/urlhandler/protocol_socket.py", line 171, in read
    raise SerialException('socket disconnected')
serial.serialutil.SerialException: socket disconnected

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/woolmagnet/Downloads/venv/lib/python3.10/site-packages/serial_asyncio/__init__.py", line 115, in _read_ready
    data = self._serial.read(self._max_read_size)
  File "/Users/woolmagnet/Downloads/venv/lib/python3.10/site-packages/serial/urlhandler/protocol_socket.py", line 178, in read
    raise SerialException('read failed: {}'.format(e))
serial.serialutil.SerialException: read failed: socket disconnected
Traceback (most recent call last):
  File "/Users/woolmagnet/Downloads/venv/lib/python3.10/site-packages/zigpy_znp/api.py", line 652, in _skip_bootloader
    result = await responses.get()
  File "/opt/homebrew/Cellar/[email protected]/3.10.6/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/queues.py", line 159, in get
    await getter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/homebrew/Cellar/[email protected]/3.10.6/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/homebrew/Cellar/[email protected]/3.10.6/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/woolmagnet/Downloads/venv/lib/python3.10/site-packages/zigpy_znp/tools/energy_scan.py", line 96, in <module>
    asyncio.run(main(sys.argv[1:]))  # pragma: no cover
  File "/opt/homebrew/Cellar/[email protected]/3.10.6/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/opt/homebrew/Cellar/[email protected]/3.10.6/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/Users/woolmagnet/Downloads/venv/lib/python3.10/site-packages/zigpy_znp/tools/energy_scan.py", line 92, in main
    await perform_energy_scan(args.serial, num_scans=args.num_scans)
  File "/Users/woolmagnet/Downloads/venv/lib/python3.10/site-packages/zigpy_znp/tools/energy_scan.py", line 22, in perform_energy_scan
    await app.connect()
  File "/Users/woolmagnet/Downloads/venv/lib/python3.10/site-packages/zigpy_znp/zigbee/application.py", line 111, in connect
    await znp.connect()
  File "/Users/woolmagnet/Downloads/venv/lib/python3.10/site-packages/zigpy_znp/api.py", line 694, in connect
    self.capabilities = (await self._skip_bootloader()).Capabilities
  File "/Users/woolmagnet/Downloads/venv/lib/python3.10/site-packages/zigpy_znp/api.py", line 651, in _skip_bootloader
    async with async_timeout.timeout(CONNECT_PROBE_TIMEOUT):
  File "/Users/woolmagnet/Downloads/venv/lib/python3.10/site-packages/async_timeout/__init__.py", line 129, in __aexit__
    self._do_exit(exc_type)
  File "/Users/woolmagnet/Downloads/venv/lib/python3.10/site-packages/async_timeout/__init__.py", line 212, in _do_exit
    raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

Hi Marc.

Can you try to reflash the ESP32 firmware over serial?

You can access the USB port for flashing by removing the case top and lifting up the board from the port side.

FW bin file is here: https://github.com/tube0013/tube_gateways/tree/main/models/current/tubeszb-cc2652-poe-2022/firmware/esphome

grab the esphome flasher release for mac: https://github.com/esphome/esphome-flasher/releases

https://github.com/tube0013/tube_gateways/blob/1bf7611c3f29fd47f78808c75ce03bf90792f275/Troubleshooting.md#flashing

let me know if that is successful and then you can try the scan again. Also feel free the DM me.

FYI, the developers Zigbee2MQTT, the popular stand-alone Zigbee to MQTT bridge application (and IoBroker, both based on zigbee-herdsman open-source library) are currently planning to soon remove the “experimental” tag from Silicon Labs EFR32-based Zigbee adapters on their “Supported Adapters List” and working to instead list them as “Recommended” and “stable” for everyday use just like Texas Instruments CC2652 based adapters are today.

For this reason, I submitted a change request for Zigbee2MQTT documentation to add TubeZB’s EFR32 Hybrid (network + USB) adapter to Zigbee2MQTT’s existing list of “Supported Adapters” (see PR):

https://www.zigbee2mqtt.io/guide/adapters/

The main argument that the lead developer of their Silicon Labs EFR32 “EZSP” adapter implementation has is that keeping Silabs based adapters listed as “Not recommended” by the Zigbee2MQTT community discourages any users and new developers from actively trying it out and assisting in the development of the Silicon Labs EFR32 “EZSP” adapter implementation by reporting all bugs/issues or helping out with the development, thus hindering the development of support for other adapter implementations than those based on Texas Instruments Zigbee chips.

So if you want to help out the Zigbee2MQTT and IoBroker (both based on zigbee-herdsman) developers then please consider testing Silabs EFR32 based adapters with those applications. See discussions:

https://github.com/Koenkk/zigbee-herdsman/issues/319

and

https://github.com/Koenkk/zigbee2mqtt/discussions/13373#discussioncomment-3309655

2 Likes

Hey Tube! I bought three of these from you … none of them working so I’m imagining it’s a not a firmware flash issue unless you’re sure there’s a rash of bad FW on them?

I also tried a different power adapter and cable and the PCB LEDs power up with all of them. Still, nothing shows up under Zigbee2MQTT → Devices after clicking “Permit join (All)” and then powering up the coordinaators. I also tried moving one of the coordinators closer to the router, nearly LOS except for one wall between them, and no luck.

I feel like there’s something basic I’m missing.

Any luck getting the energy scan to work? Did you have z2m disabled when you tried before? Only one thing can utilize the coordinator at a time.

I have not had any issues reported I’m with routers that weren’t explained by interference in the past several months :man_shrugging:t3:

You asked if I had z2m disabled. In case I’m missing something basic, I have:

Does that look like the right state of play? ZHA not configured and Z2M not showing any devices but searching for them. BTW that’s two screenshots pasted into one image because one image per post is my n00b limit…

Also re: the interference scan, I posted the step at which I got stuck in previously above, in case the console log gives you any indication of what I am doing wrong there? Thank you!!

But it is configured in your picture, just failing.

1 Like

@tube0013 I already own a ESP32-POE-ISO with functionality for DSMR on GPIO16 with ESPHome. I want to add your idea of the CC2652 and like the pcb design you have. Are you willing to share the design with me? Or ship a pcb to me with a already soldered cc2652?

please send me a DM. Just one note - ESPHome 2021.10 and later do not work will with the serial stream component used con my coordinators - lots of serial disconnects.

click the 3 dots and remove ZHA then try the scan again making sure z2m is not also trying to run/use the network serial port.

So I now appreciate the difference between ZHA not configured, and ZHA disabled. Using your instructions to disable ZHA, I was able to pair the router but only when it was placed very close to the coordinator. So I changed the channel from default 11 to 20, but I couldn’t remove the router to then re-add with the new channel, reeiving this error:

quest 'zigbee2mqtt/bridge/request/device/remove' failed with error: 'Failed to remove device '0x00124b00259067fc' (block: false, force: false) (Error: AREQ - ZDO - mgmtLeaveRsp after 10000ms)'

So I did a force remove, which did remove it, but now I cannot add it back with Channel: 20 in my configuration.yaml file, even when I place it very close to the coordinator again and after rebooting HA and the coordinator. Is the router somehow blaklisted now? I’m seriously frustrated!

Try switching back to 11, remove it, then switch to 20 and re-add it.

In order to pair the Zigbee Router with hub again, you will first need to RESET the Router. Instructions for resetting the router are included in @tube0013’s GitHub repo for the device below.

Specifically

Hi,
I have the tubeszb coordinator ( tube-zb-gw-cc2652p2-v2), but i see lqi of about 70, from a plug only 10ft away (strait line, no walls )
Is that normal? (New to zigbee)
Already changed the channel to 20
I use the zigbee2mqtt

Thanks ogiewon! This worked, but note it takes a sharp press of the BSL button and the LED will turn off when you get it right. Then unplug/replug the device and it will enter pairing mode.

I still had to place router1 exceedingly close to the coordinator to pair it and the LQI is only 21. Then I added another router2 that paired to the router1 from much further away with an LQI of 43. This suggests I’ve got an issue with the Tube’s coordinator rather than the routers as I first thought.

The coordinator is a foot or so from a lower power access point (UniFi6 Lite). According to this calulator at 2.4ghz, the nearfield should be about three inches, so it would surprise me if my placement was causing strong interference and they’re not easy for me to separate because of Ethernet drops … but is this placement likely to be the source of my issue?

Does anyone else using Tube’s coordinator find poor range if placed on the same shelf as an access point? How far away do I need to get for interference to drop off if that’s my issue?

What 2.4GHz WiFi channel(s) are you using on your WiFi Router/Access Points. Please be sure to only use 2.4GHz WiFi channels 1, 6, and/or 11 with a 20MHz frequency width. This will avoid/minimize the chance for conflict with Zigbee channels 15, 20, or 25. (Note: While Zogbee channel 26 may look promising, its signal strength is capped at a lower level by the FCC in the USA.)

2 Likes

1 Like

@tube0013 sorry if its been asked a million times but I can’t seem to find it, promise I’ve looked.

I saw you tweet the OpenThread plug-in a little while back but also swear I saw you post the forum once that your CC2652 bases devices would be able to support Thread.

But yea, as I said I can’t find the post.
I know the team are making their own dongle but the Adaptor from yourself has been rock solid so I have high hopes for it supporting Thread :wink:

I have currently have
1x tube_zb_gw_cc2652p2_v3
2x cc2652 routers (can’t find the sku for them, purchased around same time)

As of now, here’s what I know about Thread support.

EFR32
like the module in the Yellow and Sky-Connect as well as my limited run of efr32 products will support concurrent zigbee and thread through a multi-pan set up. this in alpha/beta now, and there is a HA Addon for this in the developer repo, it does require the host to be an ARM machine as the zigbeed ncp runs on the host. There is also a path to have the zigbee ncp run on the efr32 and also still pass rcp to the host- this was only just released recently in the SDK and I have not tried it.

CC2652
Currently as far as I know has no concurrent zigbee and thread options.
RCP firmware exampled which work with the HA OpenThread addon (via USB network support may come) were released in the last SDK release. I’ve compiled these and tested with my PoE boards and they work fine (and should work on other products as well). I also compiled a version for the zzh! and it’s confirmed working as well, these are what are posted on GitHub.

There is also a OpenThread Boarder Router for the ESP32. I’ve successfully run it on a PoE Coord paired with the same RCP FW and had it talking to a thread mesh. My hope is down the road the current CC2652 TubesZB coordinators could be used as standalone border routers to extend a thread network if desired.

2 Likes

Also, new users you should know while the official Home Assistant SkyConnect USB Stick will probably be good for early adopters of those wanting to buy new devices using the upcoming Matter/CHIP standard over Thread protocol, the official Home Assistant SkyConnect USB Stick on paper actually performs worse then a dedicated Zigbee adapter with a large Zigbee network if you will use as a multiprotocol radio with Matter/CHIP over Thread in combination than if you instead buy and use a separate dedicated Zigbee adapter. This is totally understandable considering it runs needs to handle the work of two radios, even with the off-loading to System CPU it will do.

So instead recommend that users should consider just buying separate dedicated Zigbee adapter now to use only for Zigbee devices, …and then if they want also buy a OpenThread adaper like the official Home Assistant SkyConnect USB Stick when it comes out then do so however suggest then only it as a separate dedicated for Matter/CHIP over Thread.

With dedicated coordinator/controller radio adapters you will for sure get the best performance. So there are really no good points in waiting for an all-in-one combination adapter if want to use Zigbee today.