Choose style:

Author Topic: Digi Xbee ZigBee support with Almond+  (Read 10790 times)

0 Members and 1 Guest are viewing this topic.

Offline brolly759

  • Newbie
  • *
  • Posts: 7
  • Thanks: 0
  • Registered : 01/03/2016
    YearsYearsYearsYearsYearsYearsYearsYearsYears
Digi Xbee ZigBee support with Almond+
« on: March 01, 2016, 11:50:42 am »
Hi everyone. I am trying to create a custom sensor that communicates over Zigbee to the onboard ZigBee inside the Almond. I have found on some forums that some settings for xBee need to be this:

Coordinator API 21A7
KY5A6967426565416C6C69616E63653039
EE01
AO03
ZS02

This will allow me to attempt to add a sensor but fails in the association part. What other steps are there to connect a sensor to the Almond router?

FYI, I contacted their support and they said the Almond router can support up to 100 connected ZigBee devices before you start seeing network latency issues.

Offline fillibar

  • Backer
  • *
  • Posts: 2060
  • Thanks: 4
  • Registered : 02/08/2013
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Digi Xbee ZigBee support with Almond+
« Reply #1 on: March 01, 2016, 12:04:21 pm »
If you do not mind, I would love to know how your work turns out and if you plan on making your code available at all.
Almond 3 mesh handling the home.

Offline brolly759

  • Newbie
  • *
  • Posts: 7
  • Thanks: 0
  • Registered : 01/03/2016
    YearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Digi Xbee ZigBee support with Almond+
« Reply #2 on: March 01, 2016, 12:24:53 pm »
Here are the 4 packets that I receive on the Xbee when I packet sniff trying to join the Almond+.


RX Indicator:
03-01-2016 12:16:13.006,0,RECV,7E002091000D6F0004366134000001FF05000104010018021000F034613604006F0D00B3

RX Indicator:
03-01-2016 12:16:13.046,1,RECV,7E002091000D6F0004366134000001FF05000104010019021000F034613604006F0D00B2

Modem Status: (02, Device joined to network)
03-01-2016 12:16:14.871,2,RECV,7E00028A0273

RX Indicator:
03-01-2016 12:16:43.434,3,RECV,7E001591000D6F00043661340000000000050000017D2AF482

Offline barntacular

  • Beta Testers
  • *
  • Posts: 19
  • Thanks: 0
  • Registered : 01/10/2014
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Digi Xbee ZigBee support with Almond+
« Reply #3 on: March 01, 2016, 12:31:12 pm »
If you do not mind, I would love to know how your work turns out and if you plan on making your code available at all.

I second that request!

Offline brolly759

  • Newbie
  • *
  • Posts: 7
  • Thanks: 0
  • Registered : 01/03/2016
    YearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Digi Xbee ZigBee support with Almond+
« Reply #4 on: March 01, 2016, 01:00:00 pm »
Here is a link I found of someone do this with an XBee Pro module with the SmartThings hub.
http://forums.parallax.com/discussion/157233/propeller-to-smartthings-communicating-with-the-zigbee-ha-public-profile


Here is the most important part:

"When a ZigBee device joins a network (this is how SmartThings works) an identification process occurs. The ZigBee Home Automation spec defines several ways devices can discover each other and figure out how to talk to one another using ZigBee Device Objects (ZDO). SmartThings uses three sets of ZDO clusters to identify devices when they join a network. The first thing that happens after a device has been allowed to join a network is it should send out a device announce packet (ZDO Cluster 0x0013) this is received by the SmartThings hub. Next the hub will send out a request for active end points supported by this new device by sending a ZDO Cluster 0x0005 packet to the new device. The device is expected to respond back with a list of its end points in a ZDO cluster 0x8005 formatted packet. Now each end point is queried for a profile ID, Device ID, and a set of supported clusters on that end point (ZDO 0x0004 & 0x8004 are used for this). At this point SmartThings knows what your device is and what it can do so it starts to look for a device driver to match it with (they call this the foot printing process)."


So taking this concept, unless someone can go through the firmware of the Almond+ and either inject or read off the values for pre defined sensors already there, I am not sure we can associate a sensor without Securifi's help.

It would be good if they created a dummy public HA profile that "tinkerers" can use to connect custom devices..... or we can figure out a way to hack this thing.

Offline brolly759

  • Newbie
  • *
  • Posts: 7
  • Thanks: 0
  • Registered : 01/03/2016
    YearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Digi Xbee ZigBee support with Almond+
« Reply #5 on: March 01, 2016, 01:47:28 pm »
Well some more info, I SSH into the Almond+ and found the configuration files for all the supported sensors:

Location:
root@AlmondPlus:/almond/config# cat manufacturer_specific.xml

See attached file for log

Offline brolly759

  • Newbie
  • *
  • Posts: 7
  • Thanks: 0
  • Registered : 01/03/2016
    YearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Digi Xbee ZigBee support with Almond+
« Reply #6 on: March 01, 2016, 05:00:15 pm »
Well I got it connected to the hub but its recognized as an UnknownDevice. I guess thats progress. It seems it passes something called a ZDO request. If I set xBee AO to either 0 or 1 I can connect to Almond as an unknownDevice. If I have AO set to 3, I cannot connect.

Offline brolly759

  • Newbie
  • *
  • Posts: 7
  • Thanks: 0
  • Registered : 01/03/2016
    YearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Digi Xbee ZigBee support with Almond+
« Reply #7 on: March 01, 2016, 05:52:45 pm »
The file I linked before seems to be for only Z-Wave products and not ZigBee products. If someone can SSH into the Almond+ to find the config file, that would be great, I cannot find it :(

Offline SecureComp

  • Backer
  • *
  • Posts: 541
  • Thanks: 1
  • Registered : 05/08/2014
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Digi Xbee ZigBee support with Almond+
« Reply #8 on: March 01, 2016, 09:49:22 pm »
I haven't looked at the zigbee stuff in a while but here are few clues:


haserver and zigbee_server do a lot of "stuff" but most of what you want is in zigbee_server
run a strings command on zigbee_server to get a few clues  about messages

log files of interest

in /almond/runzb.sh

killall zigbee_server
while [ 1 ]
do
   ./almond/zigbee_server -n 1    
   echo "zigbee_server got crashed" > /dev/ttyS0
   echo "zigbee_server" $(date) >> /almond/log/ServerHistory.log
   cp /almond/log/ServerHistory.log /tmp
   tail -50 /tmp/zigbee_server.log > /almond/log/LastFailedZigbeeServer.log
   cp /almond/log/LastFailedZigbeeServer.log /tmp/
   echo "Restarting zigbee_server" > /dev/ttyS0
done
Kickstarter Backer
Securifi Wiki Editor and Beta Tester, Not a Securifi employee
Almond+, many sensors, IOS App, Android Apps and Widgets

Offline brolly759

  • Newbie
  • *
  • Posts: 7
  • Thanks: 0
  • Registered : 01/03/2016
    YearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Digi Xbee ZigBee support with Almond+
« Reply #9 on: March 01, 2016, 11:28:52 pm »
I saw that file and looked at the SH file you linked. That just shows log files if the app crashes. What I would need to do is take a known compatible ZigBee sensor and look at the log files to see if I can make anything of it, or find a way to break apart zigbee_server and read the code of what an acceptable sensor is.

WOULD BE NICE IF THEY JUST MADE THE NUMBER 1 ZIGBEE CHIP THAT ALL TINKER'S USE COMPATIBLE!

Caps for level of intentness lol

Offline Ashok

  • Securifi Staff
  • *
  • Posts: 2770
  • Thanks: 3
  • Registered : 25/07/2014
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Digi Xbee ZigBee support with Almond+
« Reply #10 on: March 02, 2016, 07:17:39 am »
@ brolly759,

Hi everyone. I am trying to create a custom sensor that communicates over Zigbee to the onboard ZigBee inside the Almond. I have found on some forums that some settings for xBee need to be this:

Coordinator API 21A7
KY5A6967426565416C6C69616E63653039
EE01
AO03
ZS02

This will allow me to attempt to add a sensor but fails in the association part. What other steps are there to connect a sensor to the Almond router?

FYI, I contacted their support and they said the Almond router can support up to 100 connected ZigBee devices before you start seeing network latency issues.


It seems like if we could follow proper HA 1.2 profile and make it as a IAS Zone client, then select IAS zone cluster and select Zone ID as Door Sensor. It may work. 

Offline cthree87

  • Newbie
  • **
  • Posts: 10
  • Thanks: 0
  • Registered : 12/09/2016
    YearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Digi Xbee ZigBee support with Almond+
« Reply #11 on: September 12, 2016, 11:21:12 pm »
Sorry to bring this up but I was searching the forums and this never got a satisfactory response so I'm adding to it for the benefit of future searchers.

ZigBee consists of many layers. At the bottom is 802.15.2 which you can think of like Ethernet or WiFi, It defines how data is presented on the network but not much more. Above that is ZigBee which is like TCP/IP. It organizes the network and frames the data, it's the mesh part of network, it handles routing and end devices and what happens when devices do when they sleep and wake, but it doesn't define what the data is or what services are available from a device. If you are building sensors with ZigBee/XBee you will define what temperature data looks like and how to know that temperature data is available from a given sensor. There is no discovery protocol except the one you make.

Beyond ZigBee/XBee is something called ZigBee PRO. ZigBee Pro defines device profiles and and how that data is presented and how sensors are discovered and what temperature data looks like and what data locks a lock and what data unlocks it and how a sensor reports it provides a lock service. It is very similar to Bluetooth in this regard.

Because there are so many possible profiles they are broken into a number of different groups of their own and how they are implemented give the unique environments they live in. Some of these are:

Home Automation (HA)
Building Automation (BA)
Health Care
Smart Energy (power meters, etc)
Light Link (Hue, etc.)
and so on.

Read about ZigBee Pro here: http://www.zigbee.org/zigbee-for-developers/network-specifications/

TL;DR version: XBee modules lack ZigBee Pro support with the HA v1.2 profile required by Almond+ to discover the sensor capabilities and know how to interact with them. HA sensors can be controlled by Almond+ because they all look and work the same. To make them work you need to implement the ZigBee Pro protocol stack and the HA spec: http://www.zigbee.org/zigbee-for-developers/applicationstandards/zigbeehomeautomation/

You might try adapting the Atmel BitCloud ZigBee stack if you use a capable ATMega or SAM controller in addition to an Xbee radio: http://www.atmel.com/tools/BITCLOUD-ZIGBEEPRO.aspx?tab=overview

You might also want to use an Atmel ZigBit module instead of an XBee for an all in one solution: http://www.atmel.com/devices/ATmega256RFR2-ZigBit-Wireless-Module.aspx

HTH

 

Page created in 0.04 seconds with 17 queries.