zigbee module talks to humidity / temperature sensor

1.3k views Asked by At

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

2

There are 2 answers

0
tomlogic On BEST ANSWER

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.

3
t.c. On

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.