Zigbee - from flakey to stable

Quick question the s2b’s with the wire antennas are relatively expensive - will the s2b’s with pcb trace antennas work as well?

Also a question on s2c’s which have replaced the s2b’s. Eg

https://www.digikey.com.au/product-detail/en/digi-international/XBP24CZ7WIT-004/602-1564-ND/5322378

Looks like it has pro firmware - will it work?

Try this link…
https://www.digikey.com.au/product-detail/en/digi-international/XB24CZ7WIT-004/602-1560-ND/5322374

PRO isn’t really a firmware… it’s a higher power version of the same thing for more range. Costs more but functionally similar.

Many thanks - so both the XB24CZ7 and the pro versions will work for mapping the network with xtcu? I’m not familiar with the xbee range and this thread has been a bit confusing in parts for me.Also any particular recommendations for the usb adapters. The ebay ones all look like the same board design and the one sole through digikey is mightily pricey in comparison.

Yup. Basically the same thing.

As for the explorer… I get a lot of stuff from AliExpress. If you type Xbee USB explorer you’ll see heaps of them for around $3.

Hey

Sure its not the usb adapter? I think i read somewhere that some are fussy if not connected to a usb port on a pc

Hi Adam. I fixed this by changing the phone charger, clearly the other one was substandard and is now in the bin.
So I got two of these suckers, 2 boards, and 2 antennas. I couldn’t use the exact same settings of the one you sorted for me because these are different. By guesswork, I got them both on my network, repeating in my mesh, BUT only one is included as a Thing, I can’t include the other one, it has a yellow question mark at the top, but strangely is still repeating.

I added mine manually as a new device and seems happy. However you might want to look at this from @TN_Oldman
OK I got mine to work again today and join correctly.

I tried a bunch of things. I think what worked was this:
I removed anything I could find associated to the old Xbee setup before I started.

Reset firmware to a default value, Also tried recovery which failed. In the end wrote default vales as last step.

cycled radio power

I then went in and changed all the values that needed changing. Not writing them in , just editing them. They will have the green triangle.

ZS = 2
NJ = 5A
NI = I changed this to Xbee3 (In case the hub had an issue with old name)
NO = 3
EE = 1
EO = 1
KY = 5A6967426565416C6C69616E63653039
AP = 2 API enabled w/ Escaping
AO = 7 Explicit + ZDO (I have been told 3 should work too)
D8 = 0 Disabled

I then put smartthings in ADD a thing mode

wrote the settings into the radio.

as soon as it finished writing the parameters in. it showed up as a thing in smartthings. let me rename it, then finished adding it. Now shows up in my list as what I named it during the join setup.

There is NO recent activity, or anything. There never has been with these things. If you are using the same adapter board I am for connecting it to the computer your blue light should be blinking, and when you refresh AI it should read zero.

You should also be able to see your Zigbee mesh when you do a scan. (top right icon)

You should be able to discover your other XB2C radio modules when you click the scan icon next to the radio in top left your working with. Mine sees the other radio in my shed.

Just thought I would update you and let you know how I got mine working and JOINING right again.

After I got it to join I changed JV to 1 per the recommendation of another member. In case the hub changes channels (for some reason) the radio should go look for it upon power up.

Don W

1 Like

Don, are you using any of the Xiaomi zigbee sensors? If so, are they repeating via the xbee?

1 Like

No, sorry I am not. Currently I have 2 visonic door sensors (mct-340 e) and 1 Iris motion sensor. I am using mine as a repeater in my shed about 80 to 100 feet from my house. So no need for alot of hardware. My only future addition I forsee is a Zigbee light switch.

As an added update, I have mine in a hacked plastic box to help protect it in the shed. Here’s a couple pictures.

The one in my shed has been working for months now without a hitch. I tried making it solar powered but never finished the project. Currently plugged into a USB plug.


When I get home I will take a picture of my 4 devices. I actually used old ADT security contact boxes. Kind of hide all the lights so as not to be too noticeable.

They will not repeat. That is why I no longer have any Xiaomi sensors in my network. I also use the Visonic for temperature with my own DTH.

Just want to chime in here and say that with inspiration and information on this thread, I got an XBee S2 (eBay US $16) / Waveshare USB Adapter (Amazon US $14) connected to my Mac and mapping my SmartThings & Hubitat Zigbee mesh just great.

For some reason I had to use a baud rate of 9600 to initially add my XBee module in XCTU, but then was able to set it to 115000 in the configuration settings.

Like @AlecM and @ArstenA the S2 is part of the XBP24-ZB family, so I first update the firmware to XBP24-ZB > ZigBee Router API > 23A7 (Newest) and then manually change the config settings by opening up @adam_walker’s file in the “Firmware Explorer” and replicating all the changed values (indicated with green triangles).

It should be pointed out that the encryption key is actually the default Zigbee HA (Home Automation) trust center link key, and should work for almost any HA ZigBee hub.

I’m use quite a lot of Xiaomi devices, but I haven’t started experimenting with getting them to connect through the XBee or the one other router device I just got, a Securifi Peanut Plug. But that was the reason I got the Xbee, so I can report back my findings, if anyone is interested, in another thread.

I’ve notice some back and forth on this thread about how to use an XBee both as a mesh mapping tool and also serving as a router, and I have a question on this:

Will the ZigBee Router API function set allow the XBee to serve as a ZigBee router when used standalone (i.e., just connected to USB power rather than to host computer, etc.)

My thought is if an XBee can act as a router without a host connected, then I might be able to use an inexpensive powered USB hub to supply power at whatever location I decide to install it, but then plug in my laptop when I need to examine the mesh map.

Hello Keith @veeceeoh,

@adam_walker has been able to use his xbee(s) as router(s) for xiaomi devices and have them stick and keep working. I haven’t, even after using his settings and many variations of them. My xiaomi devices connect and work initially, then drop after like they would with any other router that’s not the hub/coordinator. There’s an x factor we haven’t been able to identify. I use mine for mapping and as router for a few of my other zigbee devices - in particular some of my Quirky Trippers - which does help with keeping a few of the 32 slots open. They do work beautifully for mapping! (And when they do work as routers work fine w/o being connected to laptop).

Alec

1 Like

All good to know, @AlecM, thanks!

My goal is to get my Xiaomi devices working with my Hubitat, and since it also has a 32 device limit, I’m going to need at least one or two repeaters. Having the XBee will make it a lot easier to find out if the Xiaomi devices will “play” well with my Peanut Plug and/or the XBee itself, and if not, then I’ll have to come up with another game plan (which might mean connecting less “time-sensitive” Xiaomi devices to my ST hub so as to avoid hitting the 32 device limit.) Fortunately distance / mesh strength doesn’t appear to be an issue with my home being relatively small.

I’ve had great luck using a powered USB hub with my synthesizer setup acting as a standalone power source to which I sometimes connect my laptop for host control, so hopefully that will also work with the XBee and then I won’t have to unplug it whenever I need to use it for mapping.

@AlecM Have you tried adjusting the SN and SP parameters on the XBee? I haven’t tried this myself but I’d suggest setting SP to the max value of 0xAF0 and SP to something like 130. That should be more than enough to keep the XBee from thinking the Xiaomi device has left the network.

1 Like

Well done @tpmanley I was going to suggest the same thing, after a few weeks of trying various profiles, I stumbled across some literature relating to those two values, I increased them, and no issues since. It relates to a “sleep” value.

2 Likes

Out of curiosity, do the SN and SP parameters relate to the potential issue that Xiaomi devices have with End Device Aging, as you described last year in this post? Or are they for another kind of time out?

EDIT: I did some poking around to try to answer my own question and it appears that the SN (Number of Sleep periods) and SP (Sleep Period) parameters are not related to End Device Aging~ EDIT: Tom has confirmed they are related to End Device Aging (see two posts down for more).

Here’s a few bits of info from the XBee SDK Documentation Programming Guide:

In cyclic sleep mode there are several parameters that can be configured in the power management component:

  • Sleep Option (SO): Defaults to short sleep. This setting should not be changed to cope with the examples and procedures described in this guide.

  • Sleep Period (SP): Defaults to 5000; ranges from 320 to 28000 mS. It Sets the number of milliseconds that the radio will sleep before it awakens again to poll the coordinator for packets. It is likely that you will customize this parameter for cyclic sleep mode.

  • Time before sleep (ST): Defaults to 500; ranges from 1 to 65535. It Sets the number of milliseconds of inactivity (no serial or RF data is sent or received) before going to sleep.

  • Number of sleep periods (SN): Defaults to 65535; ranges from 1 to 65535. If SN is 1 when the sleep option (SO) is configured to short sleep, the On Sleep pin will be asserted during every sleep period. Otherwise, the On Sleep pin will be asserted when a package is received or when the number of SN cycles has been consumed. This configuration should not be modified. The high default value prevents the radio from disturbing the CPU if there are no packets pending to receive.

If the SP parameter within the power management component is set to 5000, meaning 5000 mS or 5 seconds, the SP parameter within the coordinator must be set to 5000 / 10 = 500 = 0x1F4 → 1F4.

EDIT: Note that the above information pertains to end devices, not routers (repeaters), or hubs (coordinators) as Tom M explains a couple posts below.

1 Like

I did a little research on the model of XBee I bought to see if it’s programmable, and thought it may help to share a little insight on the model designations.

Mine which is silkscreened “S2” is not programmable. The units which are programmable would be silkscreened S2B or S2C. Programmable means that it has it’s own CPU and supports development of applications without a host developer board. Both the programmable and non-programmable variants allow for firmware changes / upgrades.

The full model of my particular XBEE is XB24-Z7WIT-004. Here’s how to break down the full model designation:

Series 1 (802.15.4) or Series 2 (ZigBee) XBees
XB24- = non-Pro version
XBP24- = Pro version (higher transmission power)

Shipped Firmware type
A : 802.15.4 (for series 1)
DM : Digimesh (for series 1)
B + something other than Z7 : ZNet2.5 (obsolete firmware for series 2)
Z7 : Zigbee (for series 2)
BZ7 : Zigbee (series 2B module)
CZ7 : Zigbee (series 2C module)
DZ7 : Zigbee, thread-ready (series 2D module)

Type of Antenna
CI : on board ceramic chip
PI : PCB (trace)
RI : RF pad
SI : RPSMA connector
UI : U.FL connector
WI : wire whip

PCB Type
T : Thru-hole
S : Surface Mount (SMT)

-001: series 1 module
B003: series 2 programmable module
-004: series 2 module

The above breakdown doesn’t include the new XBee 3. Keep in mind that for each different original firmware type there’s a different set of firmware updates. That’s why Adam’s config profile which includes a firmware file for his Series 2B Pro programmable module XBP24-BZ7 comes up as incompatible with my Series S2 XB24-Z7.

1 Like