Trying to understand Zigbee

I purchased a HUSBZB-1 device that is currently attached to my RPi; and the Zigbee integration currently only shows my Zigbee controller (USB stick) as a device Device / Entity list is otherwise empty. The integration has been installed and running for about a day; making plenty of time to initialize and build the DB.

I have a device that I am trying to pair in order to learn Zigbee and figure out how it works; as available tutorials are WAY too high level and they just don’t do a good job breaking this down into simple / basic terms for newbies trying to get a good grasp.

I have a Legrand Smart Switch that I had connected into my Google Home / Home Assistant and it worked over the Cloud. But now I am getting rid of SmartThings; and anything Cloud based for internal interoperability.

So my switch is in (pairing mode?) - which I assume is what happens when I factory reset the device to re-establish it back into a state to join it to my network using the Legrand app. This is where I think that adding it back into the Cloud is NOT the way I want to go; rather I want Zigbee to pick it up and start controlling it.

Although; when I scan for devices within the Zigbee integration; nothing is ever found even though it is waiting to pair with something.

Distance from USB radio to Device is within the same room. IS there something that I am missing; or does a device still need to be connected to a Hub of some sort so that Zigbee can properly discover it?

Or am I just not at all understanding how this works?

What are you using with HA as a Zigbee router? You have to put that device into “permit” mode to add the switch (which would also be in pairing mode at the same time).

What are you using with HA as a Zigbee router?

This may be what I am missing.

When you say a ‘router’; are you referring to something other than my Zigbee USB stick?

I am referring to the USB stick. Depending on which integration you are using (I use ZHA), you need to set that stick into “permit” mode. I do this through the Developer Tools/services section (under zha.permit).

1 Like

So calling the zha.permit service using something like:

duration: 60
ieee_address: '00:0d:6f:00:15:xx:xx:xx' (that is the mac of my Zigbee controller)

Do I need all of the addresses for each device joining in; or is this a manual process each time?

You don’t need to specify the address (just remove that line)… Just call zha.permit and then put your device (switch) into pairing mode. It should connect within a few seconds.

1 Like

It’s just searching…

[0x0000:zdo] ZDO request ZDOCmd.Mgmt_Permit_Joining_req: [60, <Bool.false: 0>]
Permitting joins for 60s
[0x0000:zdo] ZDO request ZDOCmd.Mgmt_Permit_Joining_req: [60, <Bool.false: 0>]

The device states to reset it by holding the bottom of the button down for 10 seconds. I did that before running zha.permit. I am assuming this is the same thing as pairing-mode?

Few things to check:

Are you properly placing the switch into pairing mode (when did you fully reset it?)?

Is your USB stick plugged directly into your rpi? A USB extension cable has has proven to be a necessity (to create some distance between the stick and the rpi due to interference)?

Is your switch within range of the USB stick?

1 Like

I am ‘fully resetting’ it each time that I am trying to do a pair. The light switch says to hold the light button for 10 seconds; to do this. My switch currently has an amber blinking light which does indicate it is ready for a pair.

Yes; my USB stick is plugged directly into it; without a medium in between. Could this be why?

And range = within the same room. No more than 20 feet or so. Is Zigbee badly affected by interference? I suppose that I could attempt to relocate my device elsewhere; if this is what is happening.

Yes it’s very possible. Try plugging the USB stick into an extension cable (6 ft or something) and move it away from the rpi. I had the same issue and dismissee this as the cause at first… the extension cable did the trick though.

1 Like

I am going to have to scour around for an extension cable.

In the effort of supporting only USB-C in my house moving forward; I may have discarded anything that may have worked.

I will certainly try to use an extension cable; and also relocate it; as where it is now is buried under a subwoofer and surrounded by cables.

I am voting that interference is causing this.

Try moving the whole RPi out from among all those magnets (speakers) and wires. My HUSBZB is directly plugged into the RPi USB port and it works fine. I’ve had it in two different locations in the house with no issue.

I’m not saying it’s not possible this is the problem (clearly, it is very possible) but until you can scrounge up an extension USB cable, might as well try everything else.

Interference is because zigbee, wifi and bluetooth all work in the 2.4Ghz band. The pi has wifi and bluetooth built in. Moving the zigbee device to the end of a cable is a good idea. Some may find it unneccessary.

I was able to find an extender cable from a friend; but it is only a foot long.

I am still not seeing anything showing up in my ZHA discovery scan.

I rebooted the Host from Supervisor to ensure that after it was reconnected; everything restarted in case it might help; to no avail. The cable works; as there is communication from the USB dongle and HA.

Edit: Relocated my RPi / USB stick within 15 feet from my light device; and still nothing. Does Zigbee / ZHA even work? lol

Is it at all possible that I missed a configuration or something? I cannot understand why this being so close to my device (which is broadcasting its WiFi signal) - still is not registering / discovering.

I have tried having someone hold the dongle in the air; moving it around closer / etc. Restarting my host system, removed the integration; re-added.

I am seriously at a loss. Is there a special Zigbee signal that gets broadcasted; or the simple fact that my device is broadcasting a WiFi signal (Legrand_342fe3454g); is this enough that it is ready for pairing; so long as my USB stick can see it? Or am I supposed to connect it onto my WiFi first?

Hell, I even removed ZHA entirely; tried to add Z-Wave. The network starts; but even Z-Wave sees nothing.

Zigbee and ZHA definitely work.

You haven’t told us about how you set ZHA up in HA.

Your link to the Legrand switch appears to be a dumb switch. Do you have the actual model number for that switch? A search of the Legrand smart lighting page shows a lot of Wi-Fi and RF switches, but nothing that’s zigbee. I found a reference to a Model 067773 switch that mentions it only works on zigbee channel 11.

For reference, I have 23 zigbee devices, and I’ve added all of them by going into the Configuration - Integrations - Zigbee - Configure option and clicking on the + sign to start the inclusion process. Once it starts searching put your device into pairing mode, and then click on the “Show Logs” option to see if it’s detecting the device.

You haven’t told us about how you set ZHA up in HA

Specifically what aspect? When I install ZHA it asks which serial device path to use; I select the first auto-populated option - which works because it gives me expected feedback about the operational status of the device configuration.

Anyway; within the ZHA integration once it finishes installing; I see Devices / Entities; and then I go into + to add (right after running ZHA.permit service). I also enter pairing mode on the device (per MFR instructions) by holding the power / light button for 10 seconds.

Is there more setup beyond these steps? Do you need logs / screenshots?

Whatever you need to help assist with this.

My smart switch I believe is the Legrand Radiant collection. I will have to get the exact model number off the device to confirm after the holiday (tonight / tomorrow morning).

https://legrand.us/brands/radiant-collection/smart-switch-wi-fi/p/wwrl10niccv2

That looks like a WiFi switch, not Zigbee. So I don’t think it will ever show in HA as a Zigbee device. I’m guessing you were using a cloud-to-cloud integration to get it to work with either Google Home or SmartThings.