Zigbee - from flakey to stable

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