Everything Xbee

Since Xbee devices were taking the Xiaomi devices - are they pairing / staying connected for you? thread off track and info is scattered between here and the SmartThings forum.
I figured I would create a thread for everything Xbee related.

These are great little devices to use as routers to extend your network and for mapping out your zigbee network.
They have made my Xiaomi devices stable routing through them and have extended my SmartThings arrival sensor range.

  • They can be used as a router and mapping device to route 12-20 (depending on xbee model) other devices through them if using "Xbee3 router settings" verses a standard plug which can usually only do around 6.

  • They can also be used as an arrival/presence device if using "End point settings" and @dan.t "micro python code" in the same way SmartThings arrival sensors work just with much better range.
    I plug one of these into my vehicle usb port so they only power on when the vehicle is running to open my garage door when my vehicle arrives or as a safety feature if the vehicle starts in the garage with the garage doors closed.


         **I try keep this first post up to date with the latest info**
    

Ok here is a simple overview to setting up Xbee3

I found Zigbee channel 20 to work the best for all Zigbee devices

9 easy steps ( you only have to make 3 manual edits JV, ID, and NI ):

1. Purchase:

2. download and install

3. Hubitat settings
Go to your Hubitat settings page and select "Zigbee Details" on that page you should see " Extended Pan ID: XXXXXXXXXXXXX" X being your Pan ID number copy it.

4. Attach your Xbee3 pro and DEV board to your computer and start XTCU s/w

  • select the top left corner + (add radio module) select your com port and set the baud rate to 115200 and uncheck "the radio module is programmable" (you would think it should be checked but it is not).
  • Select the new radio module in the left column and select "Update" (firmware)
    • product family should be XB3-24
    • function set should be Diji Xbee3 Zigbee 3.0 TH
    • firmware version select the one that says (Newest)
    • now select update and update the Xbee3 firmware
  • Select "Default" and "yes" then select "write"
    (to ensure all settings not used are set to default)
  • Select "Profile" and "Apply configuration profile"
    selecting the "Xbee3 router settings profile_1008.xpro" file
    or
    the "Xbee3 End Device settings profile_1008.xpro"
  • In XTCU you can find these settings easily by typing them in the magnifying glass at the top right (example type in Ky or ID)
    • paste your Hubitat Pan ID number in the XTCU ID settings
    • ensure KY is set to 5a6967426565416c6c69616e63653039
    • ensure JV is set to 1
    • select a NI name
    • (if adding more than 1 Xbee you must change each Xbee NI value to a different name for the identifier)
    • now select "Write"

5. Load the micro python code
(firmware updates WILL corrupt the micro python code you may have to do this step again if you update the firmware in the future)

In XTCU at the top of the page now select

  • "Tools"
  • "File system manager"
  • "open" (you will have to format it the first time)
  • In the left column you will have to find where you downloaded either the 60 second or 10 second "Main.py" file
  • drag that "Main.py" file to the right column (not into one of the folders)
  • Select "Closed"
  • Push the reset button on the Dev Board or power off then back on the Xbee3

6. Pair the Xbee3 to Hubitat

  • place Hubitat in Zigbee pairing mode
  • reset or power cycle the Xbee3
  • It should appear as a device save it with a name

7. Change DH type

  • Go to the new device you just saved and change the DH type to XBee Presence
  • select save device
  • select configure
  • select save preferences

8. Hubitat logs
Check the log to make sure there are no errors for this device and it is reporting a battery mV every 60 or 10 seconds depending on which micro python code you loaded.
If you see errors in the logs remove the device from Hubitat and redo this from step 2.

9. Go back to XTCU

  • change JV to 0 and select write
    (to disable after pairing to the hub to keep the Xbee on the same channel after power cycling)

10. Done!

  **************************************************************************

Below is older more detailed info:

@eduardo pointed out some older but good Xbee info on youtube

First change your hub zigbee away from channel 25-26 (see below)
I found channel 20 worked best for me.
You should also move your 2.4 wifi channel on your router away from channel 20 just to keep any interference on your zigbee mesh down.

I use the xbee3 XB3-24Z8ST RP SMA antenna and XB3-24Z8PT (pcb antenna already built in)
I bought direct from Digikey (which I would recommend) or mouser
There are lots of different styles regardless which one you get make sure it is a zigbee not a 802.15.4 they are terrible at having both in their description but 802.15.4 will not work. basically the zigbee version have a Z in their model number.
RP-SMA antennas are just like the 2.4 wifi ones off your routers.

you will also need a usb adapter board to program the xbee and to optionally power it.
I preferred the digikey Grove USB board part number 602-1979-ND
(note surface mount xbee will require a surface mount usb board not this one)

another cheap Xbee adapter option that works from Ebay
Not recommended now due to missing a reset button
May have issues with initial programming and does not have a reset button for programming.
Better to use as just a power source.
Ebay Xbee USb adapter arrived after about 2 months and it appears to work fine with my Xbee3, not bad for $2.62 US.
you will need a mini usb cable for it instead of a micro usb cable.

Note: when writing settings to your Xbee to be careful to not use the scroll wheel on the mouse it grabs the wrong settings sometimes

I would still recommend using an Xbee3 router with the Xbee3 end device but it appears to work without it.
If you add a Xbee3 router device and power cycle the Xbee3 end device it will jump over to the Xbee3 router

downloadable Xbee3 config files below

You will have to input the ID info (extended pan ID) from your Hubitat zigbee info when you load the file below

Xbee3 end device (use the newer file in the summary at the top of the post)

You will have to input the ID (extended pan ID) info from your Hubitat zigbee info when you load the file below

Xbee3 router (use the newer file in the summary at the top of the post)

Xbee3 (router) configuration (all settings not listed are set to default settings)
CE = join network (0)
ID = "Hubitat extended pan ID"
ZS = 2 (zigbee pro)
CR = 0 (since extended pan ID is set I disabled this)
NJ = FF (to extend the allowable time for devices to join)
JV = 1 (I changed to 0 after pairing to the hub to keep the Xbee on the same channel after power cycling I have never seen it change but just to be safe)
JN = 1 (optional but device appears faster in the network digikey recommends not enabling on a large network but does not define large network I enabled it and works for me)
EE = Enabled (1)
E0 = 1
KY = 5a6967426565416c6c69616e63653039 (standard home automation key)
(but will be blank after you write and try to read again it is a write only option for security)
NI - (name it whatever you like)
DL = FFFF (to send the signal to all router devices)
NH = FF (latest firmware 1008 maximum is FF now) (I set to max so devices could travel farther by being able to travel through more routers)
AR = 6 (I found that setting this rebuilds networks if the last router is not found)
DD = 3000C
N0 = 3
DL = FFFF (set to transmit to all routers/coordinator to extend range)
TO = 6 (use the extended timeout for this destination)
PL = 4 (max power output)
SM = "no sleep (router) 0" for router settings or "MicroPython Sleep (6)" for End Device
SC = 7FFF (default setting) scan channels if having trouble pairing your Xbee try changing this to your Hubitat Zigbee channel in Hex. I use channel 20 so i would put in 14.
AP = "API without escapes (1)" for router or "MicroPython REPL (4)" for End Devices
BD - 115200 (7)
A0 = 1 (not sure if it matters but changed from 3 to 1 due to this note in the manual
"Setting AO = 1 is required for the XBee3 Zigbee RF Module to use the Explicit Rx Indicator frame - 0x91
when receiving RF data packets. This is required if the application needs indication of source or
destination endpoint, cluster ID, or profile ID values used in received Zigbee data packets. ZDO
messages can only be received if AO = 1."
I have not seen this setting make any difference)
PS = 1 (enabled micro python auto start on power up)
SP = AF0 (didn't want it to sleep so set it to max)
SN = 130
D8 = disabled (I do not use them so why have them enabled)
D9 = disabled (I do not use them so why have them enabled)

image

ID = Hubitat zigbee PAN ID unique to each Hub found on the Hubitat Zigbee information page
this ID setting is required if you only have 1 Xbee3 using it as an end device.
If you leave ID = 0 you need a second Xbee3 set as a router
If you are using 2 XBee3 one as an end device one as a router it is fine to set the ID to Match
your Hubs.
Thanks to Ryan780 for figuring this out.

  • then press reset on your USB adapter board
  • you may have to put your hub in zigbee joining mode and power cycle you Xbee3 to get your hub to recognize your new Xbee3 end device settings.

of course to pair it after writing all the settings remove power from the xbee then put the hub into pairing and repower the xbee.
They pair as devices but still function.

  • I am no expert these are just what worked for me there maybe (are likely) better settings

Why end device settings if you cannot route or scan your network with end device settings?
These Xbee3 have a range up to 2 miles and are programable with micropython so in theory we might be able to program them and use them as a high powered arrival sensor for perhaps your vehicle.
I have not figured out micropython code yet and a DH would still have to be made.

thanks to @dan.t we now can use Xbees as arrival sensors !

You can display Xbee zigbee network scans as a graph like this

or a table like this

Xbee2 manual
Xbee3 manual
XCTU manual
micropython programming guide

surface mount (SMT) type
through hole (TH MT) type
Xbee usb THT vs SMT programmer

@rsjaffe Xbee3 case mod

19 Likes
Zigbee repeater best job cheapest price
Zigbee signal strength
Best orientation for hub & USB stick
Sylvania plugs $14.99, color bulb $19.99 clearance Canadiantire.ca
Hue Dimmer keeps disconnecting with built in driver
Made a set of Xbee3 repeaters in cases
Hubitat with Homemade Temperature, Humidity, Pressure and Light sensor
The Fate of true Insteon PLM support from an already great product
Help to select smart bulbs
Google Home integration saying random lights are offline
Inactive Device
Unreliability with Hue Color Bulbs paired directly to Hubitat
Sylvania plugs $14.99, color bulb $19.99 clearance Canadiantire.ca
Sylvania plugs $14.99, color bulb $19.99 clearance Canadiantire.ca
Zigbee signal strength
Xiaomi & Aqara Devices - Pairing & Keeping them connected
Xiaomi devices with out the gateway?
Xiaomi & Aqara Devices - Pairing & Keeping them connected
Slow Lighting Response Times
Car presence detection (without cloud)
Car presence detection (without cloud)
Zigbee repeater best job cheapest price
Xiaomi & Aqara Devices - Pairing & Keeping them connected
Garage Car Presence Sensor & Button Recommendation
Garage Car Presence Sensor & Button Recommendation
Aurora Smart Lighting Products
Weird bug took Zigbee network offline
Zigbee Routing Table
[COMING SOON] HubConnect Automatic.com Vehicle Tracking Client (HubConnect not req’d)
Smart Outlets Recommendations
My Hubitat system and experience
My Hubitat system and experience
Xiaomi / Aqara ZigBee device drivers (possibly may no longer be maintained)
Life 360 with States as Presence Sensor
Stronger Zigbee Repeater
Hubitat for AUS/NZ Chat
Mesh strength tool?
Trying to find a Zigbee repeater
Cool Zigbee Devices
GE 45856 Zigbee Switch won't pair
Sylvania smart+
Zigbee signal strength
Help me pick a zigbee repeater
Hubitat for AUS/NZ Chat
Check status of zigbee network?
Best Finds During Prime Day
Looking for introduction to presence
Tradfri repeater feedback
Really Really dissappointed in Zigbee implemenation -
Possible Way To See Zigbee Mesh?
Extending Zigbee and Zwave
Solder antenna wire on 3326-L Iris motion sensor for mailbox
Need to extend zigbee range outside
[Deprecated] Hampton Bay Zigbee Fan Controller Driver (with Component Devices)
How do you tell if a device is currently connected to the hub?
Xiaomi / Aqara ZigBee device drivers (possibly may no longer be maintained)
Map Zigbee mesh?
Xiaomi / Aqara ZigBee device drivers (possibly may no longer be maintained)
Xiaomi / Aqara ZigBee device drivers (possibly may no longer be maintained)
Iris v2 leak sensor not working
Tell Me It Gets Better
Device connected or not status
Zigbee logs - should all devices report?

Sorry to ask this, but man, that early thread is hard to follow! :grin:

Has anyone tried a Xiaomi socket as a repeater? There is a post on reddit that suggests it's working, no idea what hub they're using though, and working how well, relative to an Xbee module is unknown. Does anyone already setup to test happen to know, or willing to buy one to compare to Xbee and one of the Sylvania plugs that @gavincampbell has tested?

[Edit] Previous posted link was wrong Here is the Zigbee version.

I think the north american plug version was discontinued and likely not UL or CSA approved. But I think a few people tried them over on SmartThings. They should work with other Xiaomi devices but maybe not with non Xiaomi devices judging by the posts there.

1 Like

Good point and certification is most certainly important.

I think xiaomi was going to make a big push in the US soon and release NA versions of some of their devices. I was originally going to wait and try those out but been having so much success with my sylvania plugs I don't want to introduce anything new.

1 Like

Did you buy from Amazon.ca?

Ended up grabbing them from Canadian tire. Was more worried about the two different model numbers so act CanTire was able to verify they were the "working" model before buying.

1 Like

Were you ever able to get the Xbee to scan the sylvania plugs and see the end devices connected to them?
If so what did you change to to see them? Wondering what the issue was.
I can still see my end devices connected to my sylvania plug after a number of scans but never on every scan.
Hopefully Xiaomi comes to north america huge price difference will drive others to lower their prices.

Yes. Eventually. It takes hours for some reason though. So I would turn on the scan and leave it and 4 hours later I would look and it would show. Anything connected directly to the xbee or hub showed up right away. The other strange thing is that it would not show the two way link quality on most of the devices. But in the end I got an idea of my network setup so I worked with it.

what are these for?

thank you.

my xbee install:

2 Likes

only for future development if someone wants to try make something like a high powered arrival/presence sensor. You would not want router settings if the device was coming and going.
I am going to try if I have any free time (working 50 hours overtime at work this week)

1 Like

ahh ... got it. thank you.

what we need to do is convince @mike.maxwell to build a driver for the xbee. it would be good to be able to see which devices are routing through it or not.

1 Like

@NoWon I'm not in a rush. Would this XBee USB Adapter S2 2m with Bluetooth Bee FT232RL board work with this Xbee Zigbee module?

never tried that but reading the description it says it will work as long as it's powered of course. Never used Bluetooth for much but pretty cheap to test out. If it doesn't work at the very least you would likely end up with a cheap USB power adapter for an Xbee.

1 Like

Made some changes based on another thread about xbee and it looks like my device is working much better now. Here is my device/settings info in case anybody else has the same one to work with. After about 20 minutes all of my devices, including anything attached to my sylvania plugs, are showing up properly. Hopefully this will help somebody else.

Product Family: XBP24C
Function set: Zigbee TH Pro
Firmware version: 4060

ZS=2
JV=Enabled [1]
NI=Device 1
NH=30
AR=0
DD=3000C
NO=3
EE=Enabled [1]
EO=1
KY=
BD=115200 [7]
AP=API enabled with escaping [2]
AO=Explicit+ZDO [7]
SP=130
SN=AF0
D8=Disabled [0]
D9=Disabled [0]

Links to my devices are below.

https://www.mouser.ca/ProductDetail/digi-international/xbp24cz7sit-004/?qs=3VJ0tGt%2bi1yuX178R0ovzA==&countrycode=CA&currencycode=CAD

https://www.mouser.ca/ProductDetail/digi-international/a24-hasm-450/?qs=YPg7lQ8MWSfg2uAoe%2F49%2FQ==&countrycode=CA&currencycode=CAD

https://www.mouser.ca/ProductDetail/dfrobot/dfr0050/?qs=Zcin8yvlhnNM90mtSqmV9A==&countrycode=CA&currencycode=CAD

2 Likes

damn sorry my AO setting was 3 not 1
Not sure how I changed it to 1.
I originally had it set to 7 as other xbee users had and it worked but I could not find any documentation for setting it to 7.

from the manual:
AO (API Options)
Configure the serial output options for received API frames. The current options select the type of
receive API frame to send out the UART for received RF data packets.
Leave unused bits clear so future API options are not inadvertently enabled during a firmware update.
Bit field
Parameter Description
0 0 = Native API output (0x90 frame type).
1 = Explicit API output (0x91 frame type).
AT commands Serial interfacing commands
XBee3® Zigbee® RF Module User Guide 166
Parameter Description
1 Unsupported ZDO request pass-through.
2 Supported ZDO request pass-through.
3 Binding request pass-through.

No worries. No idea what half the settings do, even after reading them, but I thought I would post my hardware configuration and software settings in case they are specific. All 54 of my nodes are showing up now and I even see them jump from one router to another every now and then. Got a clear visual of my mapping.

The only thing I don't see is the two way link quality. From the hub or the xbee I can see 1 way quality only and from the plugs I don't see either way link quality. But that is no big deal as they are all good anyways.

Thanks. True, why not try it at that price?

Was just going to place and order for one of these for delivery (whenever), but will this non-pro version work? Is there an advantage I'll be missing or need with the pro version?

https://www.digikey.ca/products/en?keywords=XB3-24Z8ST-J

I ordered a bluetooth usb board to try it out but will take awhile to get here. It looked interesting.

non pro version will work fine I believe the only difference is they are lower transmit power rating so not the 2 mile range but still plenty for a house and of course since it has a lower power rating it will use less power so if you use a battery to power it then it will last longer. If you just plug it into a house outlet then the power consumption will not matter.
The pro version is not allowed in Europe due to their high transmitting power.

1 Like