Home made Xbee sensor integration


#1

Hello,
this is my first post to the community, and I am really excited about this smartthings technology. I bought the smartthings hub a few weeks ago and I am trying to make it work with my xbee sensors I already have to build a smart alarm system.
My sensors are able to report, 2 contacts, battery status, temperature and tampering. The radio is a xbee series 2 driven by a small PIC18 uC which stack I am upgrading to HA. BUT I have troubles to sign them on the smarthub.
I have created my own XbeeWindowSensor device type (fingerprint 42 0104 0402 00 0000 0402, 0500) with temperature, and IAS Zone output clusters. However my devices are never recognized as XbeeWindowSensor, only ‘Thing’ (it did work 2 days ago, but then I changed something, and I couldn’t reproduce it !).
Here is where I stand today:

  • my device can join the smarthub network
  • I send a device announce message
  • I receive Active EP request (0x0005)
  • I respond 0x8005, one endpoint 0x42
  • I receive Simple Desc request (0x0004) for endpont 0x42
  • I respond 0x8004, 1 basic input cluster 0000, and 2 output cluster 0x500 and 0x402
    => But then my device is only seen as a Thing. (it work once though, but cannot reproduce)
    Is it possible to activate traces or logs on the Hub ? to see what happens during fingerprint check ?
    Are there known limitation on the fingerprint itself (I noticed strange behaviour when there is no input cluster)?
    Could you suggest any hints or tips I could try to progress on my integration?
    Thanks for your support.

(John Rucker) #2

First thing I would try is to have your device send out a device announce every time you turn it on. That triggers the fingerprinting process. In the IDE you should see your device get queried and the responses it sends back under the Live Logging tab.

Another thing to try would be to delete your device out of your device list in the IDE and re-add your device. That will also trigger the finger printing process. All it takes is for one wrong cluster, end point, or version number and the fingerprint wont match. I have found the fewer parameters the better.

I created a xBee ZB smt library for the Parallax Propeller that may have some information in the post that can help you. Good look and good job getting this far!! http://forums.parallax.com/showthread.php/157233-Propeller-to-SmartThings-(communicating-with-the-ZigBee-HA-public-profile)


#3

Hello John,
yes it is your thread about xbee and propeller that convinve me to buy the smarthub and that upgrading my sensor would be possible.
I just discovered that there was a bunch of device examples, I will take a look. And I will try to reduce my footprint to see if it helps.
Thanks for your reply,
cheers


#4

I am almost there !

I am now able to report contact status, battery level, and temperature.
My problem now is about dealing with sleep periods, as my sensor is battery powered, I want it to sleep for long periods: I had planned for a 1 hour period. But today when my device wakes up the smarthub misses the 2-3 first attribute reports :frowning: bad thing for a contact sensor.
Does anybody know how long it takes for the smarthub to remove a node from the network?Ideally my sensor wouldn’t need to re-join the network after each wake-up.
I started some tests with 30 minutes period, but I not sure it works correctly, I need to do more tests to be sure though.

Second point, I used as reference for my Device Type the “SmartSense open/close sensor”, and it uses for temperature parsing the function “zigbee.parseHATemperatureValue”. Does anybody know what this function does, because I have strange results with it: I use attribute report for the temperature with a 2 byte-signed int value in celsius degree *100 : 0x0960 for 24°C, and the function returns a negative value in °F ?

Cheers for now.


#5

Hi
I’ve been doing some test this week end: and if I wakeup my sensor every 5 minutes, no problem, every message is received correctly by the smarthub. But I’am afraid it will impact my battery lifetime :frowning:

@Urman: Jeanette told me you were the guy to talk to, but very busy :wink:
My main issue is after my sensor wakes up after a sleeping period (I
tried, 60 45, 15 minutes) most of the time reported attributes are not
received by the smarthub, and I see no traces in the live log.
What should I do after a wakeup to be sure that my events are received correctly by the smarthub ?
is the drop_a_device_from_the_network_timeout parameter configurable on the smarthub ?