Prelude and Background
As I’m a new member and this is my first topic, a bit of background is in order. I have fiddled with HA for a while - starting with X10 based stuff and a Mac driven Hub running Indigo Domotics. Over the years I’ve tried and tested too many to name different systems and solutions as well as built my own based on the actual need. I’ve always been impressed by what SmartThings was and tried to achieve so I decided to quit lurking around and bought one to drive some Z-wave devices. It seems like a great Hub that suits well for different type of commercial devices as well as allowing the DIY crowd integrate their own masterpieces with the system. Another reason for me to choose the SmartThings hub, was the awesome community around it!
Thus far, things seem to work great - I love it. As I have a custom XBee network running with devices, I started to look into the ZigBee device handlers and saw that there seems to be some interest in the community to integrate these DIY modules to work with SmartThings.
Couple of topics I’ve seen covering this:
- Do myOwnThing - Connect my XBee Radio to the Hub?
- XBee S2C with Arduino & SmartThings
So some work has already been made to integrate XBee based systems with ST. This is great!
I made this topic about connecting/integrating Programmable XBees with SmartThings in hopes that there are others interested in this topic besides myself.
There is a special breed of Digi XBee modules that come with a HCS08 CPU alongside the EM357 tranceiver. These modules cost ~3€ more than the standard S2C Pro radios and what this potentially means, is that you can have the ST Hub and the XBee module working together without any additional Arduino, Raspberry or some other developer board connected to it for application logic.
- It overall reduces cost for the project
- It can substantially reduce the footprint of device
- It can save power (the added HCS08 is a low consumption 8bit CPU)
I’ve written a longer blog post about these modules and how to get started if anyone is interested. But official documentation is available from Digi.
In 2016 I was looking to automate my swing-gate that unfortunately is a “dumb” device. Like all such previous-generation automatons, it has a pin out for operating it using an external impulse switch or a device. Meaning, you can short-circuit 2 pins to operate the gate either to open it or close it. Thus, the Trigger project was born. I used a Programmale XBee module connected to a relay to connect the pins for 125ms and in general it works great.
Now, I’ve updated the code for it to work with SmartThings with the default ZigBee device handler that can be created via the Web IDE.
Some of the goals:
- Use the default ST device handler for ZigBee HA profile (ZigBee Switch)
- Implement HA profile 0x1004 Cluster 0x0006 (On/Off switch)
Trigger does not stay in “On” state, it currently only shortly operates the relay (125ms) and returns to “Off” state. but the code can be easily changed for it to operate as standard relay switch.
- Project URL: https://github.com/exsilium/pxbee-trigger
- Device handler fingerprint:
fingerprint profileId: "0104", inClusters: "0000, 0006", manufacturer: "PXBee", model: "Trigger", deviceJoinName: "PXBee Trigger"
As of now it’s a working prototype. I do have a problem that when you turn “On” the device from SmartThings app it stays in “TurningOn” state. I haven’t figured out the proper signalling ST expects to report the state change. However, if you refresh the mobile app GUI the state is read back successfully and it doesn’t affect operating the device.
If you feel interested, try it out. Feel free to use the project code as an example how to pair with the ST Hub and how to implement other HA Clusters for other device types. Even more importantly you can look into the Programmable XBees for all kinds of project logic so you can free up all those Arduinos and other boards currently connected to the radios
NB! As I’m a new user, I was limited only having 2 links in this post. Sorry about that!