2

I just bought a gateway equipped with the zigbee module (zigbee pro stack ). Also, I bought a zigbee humidity / temperature sensor as well.

It's HA profile and humidity / temperature cluster Id.

There is an operating system (WindRiver) running on this gateway.

To write an application to read the value sent from zigbee sensor, where should I get to start?

Is there any document available? like defining the data structure for the temperature / humidity ?

Thanks

Sam
  • 4,521
  • 13
  • 46
  • 81
  • 1
    I'm voting to close this question as off-topic because it isn't asking about a specific programming problem and sounds more like a customer support issue. I recommend that the OP get in touch with their vendor first, and then come back to Stack Overflow if they have a specific question about code or the ZigBee standard. – tomlogic Jun 17 '15 at 16:45
  • well, not really. My intention is to know how to get to start the zigbee development from scratch. – Sam Jun 18 '15 at 01:55
  • 1
    I guess it will depend on your definition of "from scratch". Buy a development kit from a vendor and use their documentation and support to build something. If you ask on SO, be sure to mention what platform you're using and post code since answers will depend on that information. – tomlogic Aug 04 '15 at 22:24

2 Answers2

1

Start with the Gateway documentation. The company selling it should provide enough information to you that you can discover devices (like the sensor) that have joined the network, and then discover the endpoints, clusters and attributes on those devices.

The ZigBee Alliance has documentation for various layers of their network stack that you'll want to understand if you're going to work with the ZigBee Home Automation profile.

The ZigBee Cluster Library (ZCL) defines attributes and general functions for discovery, reading, writing and reporting on them. You should have a basic understanding of ZCL as a foundation for working with ZigBee.

For the Home Automation Profile, you may need to join the ZigBee Alliance to gain access to the specification. I wasn't able to find it with some quick Google Searches. It will list all of the attributes, their data types, and what values they represent. From that, you can create ZCL Read Attribute Requests to read the values and process the responses.

tomlogic
  • 11,489
  • 3
  • 33
  • 59
0

Sorry, but without knowing the gateway that you are using it is impossible to know the API and what the functions are for joining, discovering and controlling devices. There is no "Standard ZigBee Gateway API", each gateway will implement its own. Some may offer a high level interface with API's for controlling devices, others will send "raw" messages where you will need to form the ZCL command your self. The ZigBee Gateway here:

Free SW SDK (Z-STACK-LINUX-GATEWAY): http://www.ti.com/tool/z-stack HW Reference Design: http://www.ti.com/tool/CC2531EM-IOT-HOME-GATEWAY-RD

Has a well documented API with features like: - Open Network - Close network - Device discovery - Turn Light On/Off - Read Temperature - Read Humidity

It has an open source node.js example application which offer a local web interface and connects to a cloud service (this also includes connecting to and configuring reports for humidity and temperature sensors, as well as connecting to and controlling Philips Hue Lights): https://git.ti.com/zigbee-iot-agent/zigbee-iot-agent

An example JAVA application is also available: https://git.ti.com/zigbee-iot-agent/ti-zstack-linux-gateway-java-cmdline-example

Regards, TC.

t.c.
  • 454
  • 2
  • 5
  • @ t.c. we currently use Exegin zigbee module on our gateway. They have a sample application called zapp. However, this sample application does not support to read the sensor value by now. So I guess I may need to write one myself. – Sam Jun 17 '15 at 09:50
  • I talked to an engineer working in the sensor company, he mentions that their sensor use the standard "ZCL report" function to report data. On the other hand, if the zigbee module could listen to the "ZCL report" then I should be able to get the data. I am not sure how to ensure this capability on this module. – Sam Jun 17 '15 at 09:52
  • 1
    If they have a smple application called ZAP then this sounds like it is from the TI ZStack-Home SDK (www.ti.com/tool/z-stack), this means that the ZNP (Zigbee Netowrk Processor) should be running on the module. This is the same zigbee FW as used on the CC2531 in the Z-STACK-LINUX-GATEWAY SDK. So in theory you should be able to run the Z-STACK-LINUX-GATEWAY on a Linux host and connect to the Exegin zigbee module. – t.c. Jun 18 '15 at 12:07