Zigbee - from flakey to stable

It seems to me that Xiaomi Aqara send its battery status every 45 minutes. In the meantime, I also make sure that it detect no movement to catch the aging device symptom.

Here is the map of my test setup.

This is the second day it reporting battery. If DIY router is incompatible/compatible, Should I be waiting for another day or two for confirmation?

Managed to improve the reliability of my Xiaomi devices connection with the ST Hub by adding a Xbee radio module (Xbee Non-Pro Series 2 for Zigbee) into my Smartthings zigbee mesh network.

I am new to using the Xbee with Smartthings, and used the extremely useful information provided by the many experts in this thread (especially with info from @adam_walker, @Falcogeorge, @TN_Oldman, @veeceeoh, @tpmanley, @nowon)

The following a compilation of the info gathered from this thread with some added details to fill in the gaps for newcomers to this thread, and with some details from the various other sources. This compilation may help newcomers to this thread who want to install a Xbee radio module as a router between the Xiaomi devices and the ST Hub.

PROBLEM
Unreliable Xiaomi devices connection with the ST hub.

ROOT CAUSE
@veeceeoh described the cause and solution very well

THE IMPLEMENTATION
Installed a Xbee radio module as a zigbee router to be a “middle-man” connected between my Xiaomi devices and the ST hub.

Purchased the Hardware

The hardware was purchased from a local electronics shop in Singapore.

  1. Bought a XBee XB24CZ7WIT at SGD$38.00 (About USD$27 at current rates - Probably could find cheaper ones online, but it was convenient for me to visit a local shop and get it immediately). As with the findings from the others in this thread, I did not need the Xbee Pro version, the Non-Pro XBee version I bought worked with Smartthings. The above model I used was a Xbee X2C Non-Pro Series 2 for Zigbee with a Wire Whip antenna.

  2. Bought XBee USB Adaptor that came with a USB cable at at SGD$14.00. (FYI - The Xbee USB Adaptor I purchased did not come with an On-Board Reset button. For the task that I was doing to Pair the XBee with the ST Hub, I did not need to perform any reset on the Xbee. If a reset was needed, I had planned to short Pin 5 and Pin 10 to initiate a reset).

    Plugged in the Xbee to the Xbee USB Adaptor and ensured that it was the right way up.

  3. I also bought a small plastic project box for SGD4.90 to protect the Xbee. Used one of the corner screws on the box to secure the Xbee to the box. Could have done this myself, but again for convenience, obtained services from the shop to drill an opening on the box for the USB connection for SGD$2.

Installed the FTDI driver for Windows 10 PC, and plugged in the Xbee to the PC via USB

  • Prior to plugging in the Xbee to the PC using USB, installed the FTDI Driver - This helped to detect the Xbee upon plugging in to the Windows 10 PC. Went to FTDI website, downloaded and installed the FTDI driver for Windows 10 at http://www.ftdichip.com/Drivers/D2XX.htm. I used the setup executable link found in the comments section. See the image below

  • Connected the xbee to the PC using a USB cable.
    Windows 10 detected the XBee and used the pre-installed drivers.

Opened the XCTU software and found the Xbee Radio module.

Updated Xbee firmware
Decided to redo the Xbee configuration by clearing all the previous configurations with a firmware update. I had earlier entered different parameters from different sources, and somehow even when the parameters looked right, it just could not be discovered by Smartthings.

  • Used XCTU to update the Firmware. Selected Configuration Mode (the Gear Icon on top), then selected the Xbee from Radio module list on the left. Clicked the Update Firmware button. A dialog box appeared displaying the available and compatible firmware for the selected module.

  • Chose the firmware family, function, and version. Selected Product Family: XB24C, Function Set: ZIGBEE TH Reg, Firmware: 4060, Disabled “Force the module to maintain its current configuration” to clear all previous configurations. Clicked Update.

Configured Xbee Radio Module Parameter Settings

  • Selected the Xbee device. Selected Configuration Mode (the Gear Icon on top), then selected the Xbee from Radio module list on the left.

  • Updated the device with the parameters with the list below, the remaining parameters were left with their default values. Changed the value of the setting to be configured, and Clicked on the Write button found beside each parameter to write the newly configured value to the module.

    Tried several other parameter suggestions, but these worked for me and allowed my Xbee to be discovered by the ST Hub. Thanks to TN_Oldman’s post found at DIY Programmable XBee (S2B,S2C) ZigBee integration with SmartThings - #17 by TN_Oldman

    Also Added the SN and SP for Sleepy Xiaomi - thanks to Tom Manley and Veeceeoh, found at Zigbee - from flakey to stable - #80 by tpmanley

      ZS = 2
      NJ = 5A
      NI = Entered "My XBee" for the name 
      NO = 3
      EE = 1 (Enabled)
      EO = 1
      AP = 2 (API enabled with escaping)
      AO = 7 (Exlicit+ZDO)
      D8 = 0 (Disabled)
      D6 = 0 Default (but D6=1 somehow worked as well for me)
    
      SN = AF0
      SP= 130
    
      KY = 5A6967426565416C6C69616E63653039
    

    KY is the Smartthings encryption key. For me, the KY data was not displayed when the Xbee radio module was later disconnected and re-connected back to XCTU. But KY data appeared to work still, and probably not displayed as designed for security reasons. KY data seems to be persistent and is preserved through power cycles.

Added Xbee as a Thing to Smartthings

  • In the Smartthings App, tapped Add Device to begin the discovery. The device was discovered, and displayed on the App. Tapped Rename, and renamed it as “My XBee”.

    (Because the previous parameters didn’t work for me, I was glad to see the xbee finally discovered by the ST Hub! )

Note 1: The Xbee device did not need a Reset to join or to pair. Upon selecting add a new thing, Smartthings discovered and displayed the Xbee as a new Thing

Note 2: Xbee device appears to retain its settings with power cycles

Joined Xiaomi Devices with Xbee
Used the advice below from veeceeoh to join the Xiaomi devices with the XBee

With the advice from above.

  • Placed the Xbee in a location between my Xiaomi Devices and the ST Hub. The Xiaomi devices will pick the parent with the strongest signal. For my setup, I placed my Xbee device in a location between my ST Hub and the Xiaomi devices. Because the new Xbee is intended to help with the sleepy devices, it was important for the Xiaomi device to pick the Xbee router and not the ST hub as the parent.

  • Paired Xiaomi Devices with Smartthings. In the Smartthings App, tapped Add Device to begin discovery. For each of my xiaomi devices at it’s installation location, I then paired the devices. Each Xiaomi device was discovered, and displayed on the App. The intention of the pairing was to connect to the ST Hub through the Xbee Router. I subsequently did a scan to check.

  • Confirmed that the Xbee radio module was a zigbee router as a “middle-man” connected between my Xiaomi devices and the ST hub. In XCTU, Selected Network Working Mode (Click the Network Icon on the top right), then selected the Xbee from Radio module list on the left. Clicked Scan.

    The scan showed that the Xiaomi devices (End-Point) were connected to the Xbee (Router), and the Xbee was connected to the ST Hub (Coordinator)

Instead of the previous daily disconnections, the Xiaomi devices have since been operating reliably now for the past 3 days. Hopefully it continues…

15 Likes

Great write up. That will be VERY helpful for others.

Thank you. One of these settings made my network scan start working properly. Now it picks up all the It was either AP, A0. Before it took me hours to see devices past my sylvania routers but since i made the changes based on your recommendations after 20 mins or so I see everything show up.

What Sylvania product are you referring to? Someone just commented in another thread that his Sylvania Zigbee outlet wasn’t repeating, and that Sylvania confirmed that they don’t, so I dropped them off my list to look out for…

There are two versions of the sylvania plug. One works the other doesn’t. Unfortunately the only way to tell was to look at the model number on the back. I went into a local store that had them and verified the model number first before grabbing 4 of them for my setup and they are working. Another person I talked to said they ordered of amazon and got the non working model.

Sylvania Smart Plug 72922 is the one the works. The other model I believe has a -A at the end and that is the non working model.

This is a link to the product but I can’t say for sure if you order this which one you would get.

https://www.amazon.ca/Sylvania-Smart-Home-Osram-Plug/dp/B01M6UM8QD/ref=sr_1_1?ie=UTF8&qid=1530131001&sr=8-1&keywords=sylvania+plug

More info can be found at this thread.

1 Like

Hi
ever since xctu updated to 6.4
i cannot program this devices
are you experience the same?

Haven’t been on this thread in a while - but just saying that @tpmanley ‘s pointer on sleep settings just fixed things for me - that little last tweak. Ihaven’t had a xiaomi drop in months when connected to my Xbees - and of course huge kudos to @adam_walker for this great guide to begin with. Xbees are cool and the fact that you made them accessible is even cooler!

Where are you guys finding them for this price? I’m in the US and that should be around $7-8 for 2 and $2 for the usb converter?

But all I can find are $27 xbees and $14 usb adapters. That’s a huge price increase.

Actually, I am also looking for same information. How people are finding these cheap? Would give a try if comes around $7-10. I am not on the edge so I can wait if I need to.

Phil, for reference that is the kit that I’ve purchased in the UK from Farnell/mouser as I couldn’t find the XBee modules particularly cheaply and the issues that everyone has mentioned around the USB adapters being hit and miss so thought this was a reasonable way of getting a working device.

Just got the first one loaded with the ZIGBEE TH Reg firmware opposed to the 802.15.4 that they come with and programmed with the settings as pulled together from the thread in @gswoosh’s post #175, it’s paired successfully with Smartthings and mapped my ZigBee network.

Now to get it in a suitable case to put out between the SmartThings hub and the garage where I’m trying to use some of the Xiaomi Vibration/Motion Sensors.

Did anyone get a DH working with the XBee’s?

Thanks to OP and everyone that’s contributed to this!

If your using Xiaomi devices, you might be interested in this thread.

I have unplugged my Xbee’s since aquiring two of these devices.

2 Likes

Thanks Don, I am but the XBee I’ve configured is doing the job of keeping the sensors out in the garage connected up.

Out of interest why have you moved from the XBee to the other device for ZigBee repeating/router?

@Bahubali @xamindar

I’ve found the same model XBee’s that @adam_walker was using at the beginning of the thread here, got two for £7 as the power output is higher on the Pro’s: https://www.ebay.co.uk/itm/DIGI-INTERNATIONAL-ZIGBEE-MODULE-XBEE-PRO-ZB-PCB-ANT-XBP24-Z7PIT-001/173543583604?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

However I’ve not been able to get the XBP24-BZ7 to play with the SmartThings Zigbee network unlike the newer ones I started with. @adam_walker any chance of getting a copy of your config file to try?

Scan of my network below, the Green Router is one of the ZBee S2C’s that came in the Digi Connectivity Kit, working a treat and keeping the Vibration Sensor in the garage connected. The XBP24-BZ7’s is the ? device connected to my laptop and running the scan from XCTU it’s showing as Type: Unknown but is configured with the same firmware that @adam_walker was running and the settings as per the thread above apart from AO as don’t have option 7 available only 0,1,2,3. It also isn’t found as a thing by SmartThings so there’s something not right somewhere, any pointers would be gratefully received.

2018-11-09_21-13-12

I originally got one of the above mentioned sensors as a test. It works very good at what it is supposed to do.

I’d say the main reason it it’s a plug and play solution. I do like messing with the Xbee. This sensor just plugs in and does its magic.

Also it has other sensors on board to give you extra data. It tells you things like light levels, temperature, pressure. Makes them available to smartthings environment for use.
I like that it tells me the number of devices connected through it. Easy to see if my shed sensors are routing at a glance.

Since I’ve installed my environment sensor he has modified and created newer version with even more options.

Hope that helps.

3 Likes

I believe you can select AO = 3 it should be the same as 7 in some firmware versions. Your looking for this setting “Explicit+ZDO”

I am sure you have read these 2 threads but there is a bunch of information on Xbee and some of my own experiences with them to possibly help you.

I know when 1 was having issues getting smartthings to see my module it was a setting for " I think parameter D6" been a while since I have messed with these.

I have also had to load the default firmware and power cycle Xbee, Then load the firmware I wanted to use and reconfigure all the settings again to get it to connect again once it had before.

It can be a frustrating process.

Hope that helps you.

Thanks for the replies Don, yeah I’d read that AO=3 on these should be the same and had that set, strangely I’ve unplugged the one XBee Pro that I’d left powered on and connected back up to the laptop and it’s now showing happily as a Router, I’ll have more of a play around with it later this week.

Can’t argue with the other device’s extra features, particularly the visibility of it being alive and the number of devices routing through it. Might have to take a look at getting one of those to play around with also.

Take it no one got anywhere with a DH for the XBee then?

Several people sent me stuff to try but none of them really worked.

Hi. Really appreciate the compilation. Going to try it myself now as I have reached the limit of Zigbee devices and my Xiaomi sensors keep dropping off. I wonder how are your xbee router doing? Any issues you faced thus far?

The xbees work good unless they lose power. So having a battery backup is important.

Here is another option that is in the works.