Continuing the discussion from Weather underground to ZigBee custom device type:
Recently @BenB2016 asked If I would be interested in working with him to port over my Propeller based ZigBee project board and cluster library to the Arduino platform since the Arduino Thing Shield is a little hard to get your hands on these days. After kicking a few ideas around with Ben and group I think we have come up with an idea that may allow Arduino users to use an off the shelf xBee shield with a Digi ZB S2C chip plugged into the socket. @geko, and @Ben have both found boards that may work for this and I will let them re-post the links here if they have time. If not you can check them out by clicking on the previous discussion above.
Let me start off by saying I have very little experience with the Arduino. I spend most of my time jumping between propeller based and raspberry pi based projects. One thing almost all my projects have in common is ZigBee and Digiās xBee ZB radio. So Iām looking for input from the Arduino community to keep me on track and I think once we have it all laid-out you guys can just run with it. Things are very much at the spit-balling stage. Someone may have already done this or have a better solution. Donāt be shy not going to hurt my feelings one little bit just chime in would love to hear about it!!
Here is what Iām thinking. Based on previous discussions and how the old SmartThings Thing Shield worked I think we need to run the xBee radio in transparent mode. Transparent mode is designed to replace a serial connection with two xBees. The problem is, that is not how you communicate in a ZigBee home automation network, it uses end points and clusters with attributes that can be queried and reported on. Well here is the bit I bet most people may not know. When the Digi ZB S2C radio sends and receives data in transparent mode it is doing so on the ZigBee endpoint 0xE8 Cluster 0x0011. If the xBee ZB radio was configured with the destination address of the SmartThings hub (part of a one time setup) then any data that was sent to its serial port would be transparently sent to the SmartThings cloud from endpoint 0x08 cluster 0x0011. That makes it possible for a Device Type Handler (DTH) to receive the communications and respond to them. This would allow your Arduino to send string formatted data like the current SmartThings Shield does today. There are several challenges to making this work. The first is fragmentation of the data. If the timing is off between the Arduino and xBee your string may arrive in two packets. It the data gets broke up into small packets they may not arrive in the correct order so when you send ātemperature=32ā the DTH may receive ā=32ā and then later ātemperatureā. But there are timing settings on the xBee that may allow us to minimize this and a few other tricks we can explore.
So there you have it. I think you can get pretty darn close to what the SmartThings shield does by running an xBee ZB radio in transparent mode and communicating with it over cluster 0x0011 on end point 0xE8 from your DTH. Iām willing to help with the xBee configuration and the DTH if no one else wants to take that on. But I donāt have time to mess with the Arduino side. If someone wants to take this and just run with it all Iām totally fine with that.
Thoughts? Reasons this wont work? @CR76 @geko, @tgauchat @ben
Please keep in mind this solution will only work with SmartThigns since it doesnāt use standard clusters to communicate you wont be able to move it to another platform. I have not run this by anyone from SmartThings I donāt think they would have concern but if they do project is over! No argument from me!!