Reply
Highlighted
Posts: 11
Registered: ‎06-13-2017

Advertise new clusters and display it on Zigbee gateway web interface

Hello All

I am working on adding new clusters to the Zigbee end device. From my understanding of how Zigbee protocol works, the end device need to implement server for such cluster while the coordinator acts at a client that poll for data. 

 

I would like to add a cluster that reports door's open/close event to the gateway. By starting with HaContactSensorSoc demo project, I added Door Lock server (0x0101) with several auto generated attributes ticked. However when I generated source files and loaded to the device, the newly added clusters are not shown on Zigbee gateway web interface. The log from uart didn't show any message related to the door lock cluster. 

 

I would like to ask how to properly add new cluster that can be discovered by the zigbee gateway and shown on web interface? 

 

-------------------------------------------------------------------------------------

These information might be helpful when looking into the problem:

End device: EFR32MG12P 

Board: BRD4161A

Zigbee Stack: Zigbee Pro Stack 5.9

Profile: Home automation 

ZigBee Gateway Version: 2.2.0-20 on Raspberry Pi 3
NCP Stack Version: 5.10.0-36

 

Log recorded from serial console:

Note: I removed the code for measuring data from sensor. The temperature sensor gives errors but it won't affect the data transmission. 

 

Form and join scan done
Network find complete (scan error).
Connection Manager: Network Find status AB
Rejoin event function EMBER_NO_NETWORK MFG_LIB Enabled 00
Search for joinable network
Channels: 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26
Nwk found, ch 20, panId 0xEC01, joining
Joining on ch 20, panId 0xEC01
EMBER_NETWORK_UP 0x1AD7
Stack Status Handler: EMBER_JOINED_NETWORK EMBER_NETWORK_UP Failed to send IAS Zone update. Err 0x70
RX: ZDO, command 0x0013, status: 0x00
Device Announce: 0x1AD7
Error reading temperature from HW
Over Temperature previous state: WARNING new state: NORMAL
Temperature: 63039 milliC
Over Temperature previous state: NORMAL new state: WARNING

T00000000:RX len 14, ep 01, clus 0x0500 (IAS Zone) FC 00 seq 65 cmd 02 payload[10 00 F0 2F 62 31 FE FF 57 0B 00 ]

zero address: 1
Sending enrollment after 1000 ms
WRITE: clus 0500 attr 0010 OK

T00000000:RX len 5, ep 01, clus 0x0500 (IAS Zone) FC 00 seq 66 cmd 00 payload[10 00 ]
READ_ATTR: clus 0500
OTA READ: ep:01 cid:0500 attid:0010 msk:40 mfcode:0000
READ: clus 0500, attr 0010, dataLen: 08, OK

T00000000:RX len 5, ep 01, clus 0x0500 (IAS Zone) FC 00 seq 65 cmd 0B payload[04 00 ]
Sent enroll request to IAS Zone client.

T00000000:RX len 14, ep 01, clus 0x0500 (IAS Zone) FC 00 seq 67 cmd 02 payload[10 00 F0 2F 62 31 FE FF 57 0B 00 ]

zero address: 0
WRITE: clus 0500 attr 0010 OK

T00000000:RX len 9, ep 01, clus 0x0500 (IAS Zone) FC 00 seq 68 cmd 00 payload[00 00 01 00 02 00 ]
READ_ATTR: clus 0500
OTA READ: ep:01 cid:0500 attid:0000 msk:40 mfcode:0000
READ: clus 0500, attr 0000, dataLen: 01, OK
OTA READ: ep:01 cid:0500 attid:0001 msk:40 mfcode:0000
READ: clus 0500, attr 0001, dataLen: 02, OK
OTA READ: ep:01 cid:0500 attid:0002 msk:40 mfcode:0000
READ: clus 0500, attr 0002, dataLen: 02, OK

T00000000:RX len 5, ep 01, clus 0x0500 (IAS Zone) FC 00 seq 66 cmd 0B payload[01 00 ]
RX: ZDO, command 0x8000, status: 0x00

T00000000:RX len 5, ep 01, clus 0x0402 (Temperature Measurement) FC 00 seq 69 cmd 00 payload[00 00 ]
READ_ATTR: clus 0402
OTA READ: ep:01 cid:0402 attid:0000 msk:40 mfcode:0000
READ: clus 0402, attr 0000, dataLen: 02, OK

T00000000:RX len 5, ep 01, clus 0x0500 (IAS Zone) FC 00 seq 6A cmd 00 payload[02 00 ]
READ_ATTR: clus 0500
OTA READ: ep:01 cid:0500 attid:0002 msk:40 mfcode:0000
READ: clus 0500, attr 0002, dataLen: 02, OK

 

Enabled events:

 

Svc Disc NWK 0  : inactive
Identify Cluster Server EP 1  : inactive
Poll Control Cluster Server EP 1  : inactive
IAS Zone Cluster Server EP 1  : inactive
Battery Monitor Plugin ReadADC  : inactive
Button Interface Plugin Button0Pressed  : inactive
Button Interface Plugin Button0Released  : inactive
Button Interface Plugin Button1Pressed  : inactive
Button Interface Plugin Button1Released  : inactive
Button Interface Plugin ButtonTimeout  : inactive
Connection Manager Plugin Reboot  : inactive
Connection Manager Plugin Rejoin  : inactive
Connection Manager Plugin Poll  : inactive
Form and Join Library Plugin Cleanup  : inactive
GPIO Sensor Interface Plugin Debounce  : inactive
GPIO Sensor Interface Plugin Interrupt  : inactive
IAS Zone Server Plugin ManageQueue  : inactive
LED Blinking Plugin Led0EventFunction  : inactive
LED Blinking Plugin Led1EventFunction  : inactive
Manufacturing Library Ota Plugin Kickoff  : inactive
Manufacturing Library Ota Plugin Timeout  : inactive
Network Find Plugin Tick  : inactive
Reporting Plugin Tick  : 1125906 ms
Security Sensor Interface Plugin Init  : inactive
Security Sensor Interface Plugin InitialReport  : inactive
Silicon Labs Device UI Plugin Init  : inactive
Silicon Labs Device UI Plugin ButtonPressCount  : inactive
Temperature Measurement Server Cluster Plugin Read  : 264996 ms
Temperature Si7053 Plugin Init  : inactive
Temperature Si7053 Plugin Read  : inactive
End Device Support Plugin Polling NWK 0  : 24924 ms
End Device Support Plugin Move NWK 0  : inactive
Poll Control Server Cluster Plugin CheckIn EP 1  : 966597 ms

 

Posts: 201
Registered: ‎02-05-2014

Re: Advertise new clusters and display it on Zigbee gateway web interface

I'm pretty sure the Silicon Labs Zigbee Gateway code doesn't have the Door Lock cluster in its list of things to discover/query, so that would be why it doesn't pick up the door lock events from your sensor.  However, that's just an educated guess, so somebody on the Gateway dev team need to confirm...

 

_z_

--------
The views represented in this post are the independent views of the author and don't necessarily represent the official views of Silicon Labs.
Posts: 11
Registered: ‎06-13-2017

Re: Advertise new clusters and display it on Zigbee gateway web interface

Hello zigmaster

I've heard from one of your employee from development team. Yes you are right. The zigbee gateway only contains 6 preset profiles for several development kits. The door lock profile is not included.

 

By following the guide, I have already implement alternative gateway solution that connects to the MQTT broker, which does the same thing as the demo gateway program. 

 

Thank you very much

 


Dear Ran Bao,

 

UG129 presents two diagrams, one for node server and the other for webUI. If a new device type needs to be supported, both node server and webUI should be modified.

Here’s a briefing:

 

1. To include a new deviceType and/or clusters, one needs to specify the related info in the Constants modules (both node server and webUI).

2. You may need to add a handler for the new cluster in the Controller module (node server) for collecting human-readable data from the raw.

3. If display icon is required, modifying Stores module is a must.

 

Last but not the least, it is suggested to insert feature code in DeviceListControl and ExtenedInfo modules to illustrate the data from new clusters.

 

I highly recommend you to download our latest gateway reference software, which is version 2.2.0.

 

Best Regards,

Jason