ZWave + Zigbee USB dongle replacement for SmartThings

Ok, so it’s not just me. haha

I really want to break from the cloud dependence of ST. That outage (or whatever the hell it was) was messed up! Doors unlocking 30 minutes (!!!) after you sent the command is NOT ok.

I’m going to keep trying, I’m wondering if its possible to just connect the device, and manually create the end points by editing the zigbee.db file. So far this has just errored out so might have to walk through some code.

Overall looks like there isn’t alot of active effort into getting this zigbee radio working, the last edit on bellows was a few months ago.

That’s where I’m at right now as well. Referencing this:
error when trying to add zigbee light (OSRAM lightify rgbw) · Issue #7473 · home-assistant/core · GitHub (rcloran’s comment on Jul 4, 2017)

…the “zdo” commands did not work for me, but I’m hoping that everything needed is in the “devices” dump.

1 Like

Cool, I’m going to give this a go tonight!

Looks like the endpoints for my sensor are already in there…

From “bellows -d /dev/ttyUSB1 devices -D ./zigbee.db”:

Device:
  NWK: 0x1604
  IEEE: 00:0d:6f:00:xx:xx:xx:xx
  Endpoints:
    1: profile=0x104, device_type=DeviceType.IAS_ZONE
      Input Clusters:
        Basic (0)
        Power Configuration (1)
        Identify (3)
        Poll Control (32)
        Temperature Measurement (1026)
        IAS Zone (1280)
        Diagnostic (2821)
      Output Clusters:
        Ota (25)
    2: profile=0xc2df, device_type=263
      Input Clusters:
        Basic (0)
        Power Configuration (1)
        Identify (3)
        Diagnostic (2821)
        Manufacturer Specific (64582)
      Output Clusters:
        Identify (3)

…and from sqlite:

$ sqlite3 zigbee.db
sqlite> .tables
attributes       devices          output_clusters
clusters         endpoints
sqlite> .dump devices
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE devices (ieee ieee, nwk, status);
INSERT INTO "devices" VALUES('00:0d:6f:00:xx:xx:xx:xx',5636,2);
CREATE UNIQUE INDEX ieee_idx ON devices(ieee);
COMMIT;
sqlite> .dump endpoints
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE endpoints (ieee ieee, endpoint_id, profile_id, device_type device_type, status);
INSERT INTO "endpoints" VALUES('00:0d:6f:00:xx:xx:xx:xx',1,260,1026,1);
INSERT INTO "endpoints" VALUES('00:0d:6f:00:xx:xx:xx:xx',2,49887,263,1);
CREATE UNIQUE INDEX endpoint_idx ON endpoints(ieee, endpoint_id);
COMMIT;
sqlite> .dump clusters
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE clusters (ieee ieee, endpoint_id, cluster);
INSERT INTO "clusters" VALUES('00:0d:6f:00:xx:xx:xx:xx',1,0);
INSERT INTO "clusters" VALUES('00:0d:6f:00:xx:xx:xx:xx',1,1);
INSERT INTO "clusters" VALUES('00:0d:6f:00:xx:xx:xx:xx',1,3);
INSERT INTO "clusters" VALUES('00:0d:6f:00:xx:xx:xx:xx',1,32);
INSERT INTO "clusters" VALUES('00:0d:6f:00:xx:xx:xx:xx',1,1026);
INSERT INTO "clusters" VALUES('00:0d:6f:00:xx:xx:xx:xx',1,1280);
INSERT INTO "clusters" VALUES('00:0d:6f:00:xx:xx:xx:xx',1,2821);
INSERT INTO "clusters" VALUES('00:0d:6f:00:xx:xx:xx:xx',2,0);
INSERT INTO "clusters" VALUES('00:0d:6f:00:xx:xx:xx:xx',2,1);
INSERT INTO "clusters" VALUES('00:0d:6f:00:xx:xx:xx:xx',2,3);
INSERT INTO "clusters" VALUES('00:0d:6f:00:xx:xx:xx:xx',2,2821);
INSERT INTO "clusters" VALUES('00:0d:6f:00:xx:xx:xx:xx',2,64582);
CREATE UNIQUE INDEX cluster_idx ON clusters(ieee, endpoint_id, cluster);
COMMIT;
sqlite> .dump output_clusters
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE output_clusters (ieee ieee, endpoint_id, cluster);
INSERT INTO "output_clusters" VALUES('00:0d:6f:00:xx:xx:xx:xx',1,25);
INSERT INTO "output_clusters" VALUES('00:0d:6f:00:xx:xx:xx:xx',2,3);
CREATE UNIQUE INDEX output_cluster_idx ON output_clusters(ieee, endpoint_id, cluster);
COMMIT;
sqlite> .dump attributes
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE attributes (ieee ieee, endpoint_id, cluster, attrid, value);
INSERT INTO "attributes" VALUES('00:0d:6f:00:xx:xx:xx:xx',1,0,4,X'43656E7472614C697465');
INSERT INTO "attributes" VALUES('00:0d:6f:00:xx:xx:xx:xx',1,0,5,X'333332362D4C');
INSERT INTO "attributes" VALUES('00:0d:6f:00:xx:xx:xx:xx',2,0,4,X'43656E7472614C697465');
INSERT INTO "attributes" VALUES('00:0d:6f:00:xx:xx:xx:xx',2,0,5,X'333332362D4C');
INSERT INTO "attributes" VALUES('00:0d:6f:00:xx:xx:xx:xx',1,1280,1,13);
CREATE UNIQUE INDEX attribute_idx ON attributes(ieee, endpoint_id, cluster, attrid);
COMMIT;
sqlite>

I’m missing endpoints for the ikea bulbs, but the device is registered.

When i requested the endpoints, bellow crashed:

bellows zdo -D ./zigbee.db 00:0b:57:ff:fe:48:1c:a1 endpoints
Traceback (most recent call last):
  File "/usr/local/bin/bellows", line 11, in <module>
    load_entry_point('bellows==0.4.0', 'console_scripts', 'bellows')()
  File "/usr/local/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/bellows/cli/util.py", line 72, in inner
    loop.run_until_complete(async_inner(*args, **kwargs))
  File "/usr/local/lib/python3.5/asyncio/base_events.py", line 467, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
  File "/usr/local/lib/python3.5/asyncio/tasks.py", line 242, in _step
    result = coro.throw(exc)
  File "/usr/local/lib/python3.5/site-packages/bellows/cli/util.py", line 59, in async_inner
    yield from f(ctx, *args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/bellows/cli/application.py", line 139, in endpoints
    v = yield from dev.zdo.request(0x0005, dev.nwk)
  File "/usr/local/lib/python3.5/site-packages/bellows/zigbee/application.py", line 284, in request
    v = yield from send_fut
  File "/usr/local/lib/python3.5/asyncio/futures.py", line 381, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
    future.result()
  File "/usr/local/lib/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
bellows.zigbee.exceptions.DeliveryError: Message send failure: EmberStatus.DELIVERY_FAILED

I figured out how to get the Ikea lights bulbs working, had to patch bellows:

https://github.com/rcloran/bellows/issues/44#issuecomment-357484946

Got two motion sensors working (SmartThings v1 and Iris v2) properly now, and I have no idea what did the trick AT ALL. :-\

wow - I wasn’t unable to get a smartthings “original 2013” sensor working… it paired, but would not display. I would see errors in the HA logs when it would try to send status

Are there any USB alternatives for HuSBZB-1?
At the moment im using Aeotec gen 5 Zstick and im perfectly happy with it, so i dont need another Zwave controller.

Just get a husbzb and don’t use the zwave component?

1 Like

I just got this stick a few weeks ago. The zwave side of it has been working wonderfully. But whenever I enable the zigbee side of it upon restart of HASS it just hangs.

My config is

zha:
  usb_path: /dev/ttyUSB1
  database_path: /config/zigbee.db

My hardware output

hassio hardware info
{
    "result": "ok",
    "data": {
        "serial": [
            "/dev/ttyUSB1",
            "/dev/ttyUSB0",
            "/dev/ttyAMA0"
        ],
        "input": [],
        "disk": [],
        "gpio": [
            "gpiochip0",
            "gpiochip100"
        ],
        "audio": {
            "0": {
                "name": "bcm2835 - bcm2835 ALSA",
                "type": "ALSA",
                "devices": {
                    "0": "digital audio playback",
                    "1": "digital audio playback"
                }
            }
        }
    }
}

If I remove the entries from my configuration.yaml then I’m back up and running once more but whenever its in there it just hangs there. I’ve left it alone for as long as 30 mins but well there comes a point when I’m ready for HA to go back to working mode. Thanks.

Could the zigbee related issues with the HuSBZB-1 connected to a Pi be related to not enough power being supplied to the usb device? I haven’t used the HuSBZB-1 but when I run certain usb devices such as a Wi-Fi dongle in my Pi devices, they sometimes require too much power and don’t work properly.

The solution may be a powered USB hub for the peripherals which can then also be used to power the Pi.

After the recent smartthings outage, I’m looking to go straight HA as well with the HuSBZB-1 and Pi.

Just buy a cheap USB dongle and flash it with zigbee2mqtt.
Adios Ikea brigde and Xiaomi Bridge, no cloud, just local gateway, faster response.

I’ve been told that there was a bad batch of them released that the zigbee side was just bad. I’ve removed mine from the pi that it was connected to and my HA setup is now running on one of my servers in a Docker VM. So I know now that power is def not the issue.

hey @TonyDams with zigbee2mqtt if I get a usb zigbee + zwave stick and flash it. will that work? or do you have to have a zigbee stick only?

the Zme UZB is really good

https://www.homecontrolshop.com/products/zwaveme-usb-zmeeuzb1