AN1003: TG-PM-0523-CICIE R3xx CICIE AT Command Set This document describes the Home Automation (HA) AT Command Set firmware to be used with Silicon Labs ZigBee(R) PRO wireless meshing modules on a HA device that can act as a Combined Interface (CI), Control and Indicating Equipment (CIE) device, or On/Off output. The ZigBee HA Profile is a public application profile which defines device descriptions and standard practices for applications commonly found in a residential or commercial environment. Installation scenarios range from a single room to an entire building. The key applications included in this profile are lighting, HVAC, window shades, and security. KEY POINTS * Provides an overview of the Home Automation (HA) AT command set firmware * Explains the AT style command conventions * Provides a list of status codes * Describes the S-Registers * Shows how to interpret RSSI energy levels * Offers step-by-step instructions for upgrading firmware Current Firmware CICIE R311, Hardware ETRX358USB silabs.com | Smart. Connected. Energy-friendly. Rev. 0.1 AN1003: TG-PM-0523-CICIE R3xx CICIE AT Command Set Overview 1. Overview 1.1 Objective This document describes the Home Automation (HA) AT Command Set firmware to be used with Silicon Labs ZigBee PRO wireless meshing modules on a HA device that can act as a Combined Interface (CI), Control and Indicating Equipment (CIE) device, or On/Off output. The HA AT Command Set provides a simple AT command interface to implement the CI, CIE, or on/off output of the ZigBee HA Application Profile. The AT command set described in this document can be used to evaluate the Silicon Labs implementation of HA applications. It also enables developers to efficiently design and build ZigBee Home Automation compliant combined interface or CIE products without having to do embedded firmware or RF work. The on/off output can be further developed if required by the customer to satisfy the Home Automation profile specification. Silicon Labs ZigBee modules are based on the EM35x family of devices, with integrated ARM(R) Cortex(R)-M3 processor and IEEE 802.15.4 radio, running the industry-leading EmberZNet ZigBee stack. These modules can be built into any device and provide a lowcost, low-power ZigBee solution. RF experience or expertise is not required to apply this powerful wireless networking capability to your products. Silicon Labs ZigBee Modules offer fast integration opportunities and the shortest possible time to market for your product. This document is meant as an AT-Command and S-Register reference for HA R3xx firmware based on EmberZNet5.x. 1.2 ZigBee Home Automation Profile The ZigBee HA Profile is a public application profile which defines device descriptions and standard practices for applications commonly found in a residential or commercial environment. Installation scenarios range from a single room to an entire building. The key applications included in this profile are lighting, HVAC, window shades, and security. 1.2.1 Home Automation Devices Various types of devices can participate in a Home Area Network (HAN) to enable HA applications and market programs. These devices can be categorized into several groups: Generic Devices On/Off Switch, Level Control Switch, On/Off Output, Level Controllable Output, Scene Selector, Configuration Tool, Remote Control, Combined Interface, Range Extender, Mains Power Outlet, Door Lock, Door Lock Controller, Simple Sensor Lighting Devices On/Off Light, Dimmable Light, Colour Dimmable Light, On/Off Light Switch, Dimmer Switch, Colour Dimmer Switch, Light Sensor, Occupancy Sensor Closure Devices Shade, Shade Controller, Window Covering, Window Covering controller HVAC Devices Heating/Cooling Unit, Thermostat, Temperature Sensor, Pump, Pump Controller, Pressure Sensor, Flow Sensor Intruder Alarm System (IAS) Devices IAS CIE (Control and Indicating Equipment), IAS ACE (Ancillary Control Equipment), IAS Zone, IAS WD (Warning Device) The Silicon Labs HA device is introduced in this document, and supports three endpoints: 0x01, 0x02, and 0x0A. The endpoint 0x01 has been configured to a combined interface; the endpoint 0x02 has been configured to an IAS CIE device, and the endpoint 0x0A has been configured to an On/Off output device. Table 1.1 Clusters Supported by the Combined Interface on page 2 lists the supported clusters on each endpoint. silabs.com | Smart. Connected. Energy-friendly. Rev. 0.1 | 1 AN1003: TG-PM-0523-CICIE R3xx CICIE AT Command Set Overview 1.2.2 Combined Interface The Combined Interface device is capable of controlling and monitoring other devices. This is typically a mains-powered device, such as a personal computer. Table 1.1. Clusters Supported by the Combined Interface Cluster Cluster ID Implementation Basic 0x0000 Server & Client Power configuration 0x0001 Client Determines detailed information about a device's power source(s). Device temperature configuration 0x0002 Client Determines information about a device's internal temperature. Identify 0x0003 Server & Client Group 0x0004 Client Provides the capability for group addressing. Scenes 0x0005 Client Sets/recalls scenes. On/off 0x0006 Client Attributes and commands for switching devices between `on' and `off' states. On/off switch configuration 0x0007 Client Attributes and commands for configuring On/Off switching devices. Level control 0x0008 Client Provides an interface for controlling a characteristic of a device that can be set to a level. Time 0x000A Server Provides a basic interface to a real-time clock. OTA 0x0019 Server Provides an interoperable mean for devices from different manufacturers to upgrade each other's image over the air. Poll Control 0x0020 Client Provides a mechanism to manage an end device's MAC data request rate. Shade configuration 0x0100 Client Provides an interface for reading information about a shade and configuring its open/close limits. Door lock 0x0101 Client Provides an interface with a generic way to secure a door. Window covering 0x0102 Client Provides an interface with the ability to control and adjust automatic window coverings. Pump configuration and control 0x0200 Client Provides an interface for setup and control of pump devices. Thermostat 0x0201 Client Provides an interface to control the functionality of a thermostat. Thermostat user interface configuration 0x0204 Client Provides an interface to allow configuration of the user interface for a thermostat. Colour control 0x0300 Client Provides an interface for changing the colour of a light. Illuminance measurement 0x0400 Client Provides an interface to the illuminance measurement functionality. Illuminance level sensing 0x0401 Client Provides an interface to the illuminance level sensing functionality. Temperature measurement 0x0402 Client Provides an interface to the temperature measurement functionality. Simple Metering 0x0702 Client Provides a mechanism to retrieve usage information from electric, gas, and water metering devices. silabs.com | Smart. Connected. Energy-friendly. Description Provides basic information about a device. Puts a device into Identification mode. Rev. 0.1 | 2 AN1003: TG-PM-0523-CICIE R3xx CICIE AT Command Set Overview 1.2.3 IAS Control and Indicating Equipment (CIE) The IAS CIE device is the central Control and Indicating Equipment for an Intruder Alarm System. It receives inputs from sensors (Zone Devices) and control equipment (ACE), and sends outputs to a warning device (WD). Table 1.2. Clusters Supported by IAS CIE Cluster Cluster ID Implementation Description Basic 0x0000 Server Provides basic information about a device. Identify 0x0003 Server/Client IAS Zone 0x0500 Client Defines an interface to the functionality of an IAS security zone device. IAS ACE 0x0501 Server Defines an interface to the functionality of any Ancillary Control Equipment of the IAS system. IAS WD 0x0502 Client Provides an interface to the functionality of any Warning Device equipment of the IAS system. Puts a device into Identification mode. 1.2.4 On/Off Output The On/Off Output device is capable of being switched on and off. This device should only be used when a more specific device specification (for example, a basic light) is not available. Table 1.3. Clusters Supported by On/Off Output Cluster Cluster ID Implementation Description Basic 0x0000 Server Provides basic information about a device. Power configuration 0x0001 Server Determines detailed information about a device's power source(s). Device temperature configuration 0x0002 Server Determines information about a device's internal temperature. Identify 0x0003 Server Puts a device into Identification mode. Group 0x0004 Server Provides the capability for group addressing. Scenes 0x0005 Server Sets/recalls scenes. On/off 0x0006 Server Attributes and commands for switching devices between 'on' and 'off' states. Generic Tunnel 0x0600 Server/Client Meets the minimum requirement for use tunnelling. Tunnelling 0x0704 Server/Client Provides an interface for tunnelling protocols. silabs.com | Smart. Connected. Energy-friendly. Rev. 0.1 | 3 AN1003: TG-PM-0523-CICIE R3xx CICIE AT Command Set Overview The firmware supports: * 16 entries of flash-maintained Zone table * 16 entries of RAM-maintained Zone table * 22 entries of binding table for ETRX357USB, and 24 entries for ETRX358USB * 3 entries of reporting table * 8 entries of address table * 24 entries of child table for ETRX357USB, and 64 entries for ETRX358USB * 3 scene entries to be used with an on/off server on endpoint 0x0A The CICIE device is not designated as a primary cache device, which is capable of buffering messages for sleepy end device with slow polling rate. So the user should consider the sleepy end device's polling settings when using the CICIE to communicate with that sleepy end device. The CI and CIE endpoints for the ETRX357 module have been HA 1.2.1 certified. However, the CICIE firmware for the 358USB has not yet been certified. The endpoint 0x0A (OnOff output) is not tested, as this endpoint is introduced for demonstration purposes. It contains some customized features, which may affect compliance tests. If the user intends to develop a certified OnOff output (e.g. light) product, it is recommended to contact Silicon Labs for a solution. 1.3 Compatibility with other devices The CICIE R3xx AT-Command line Interpreter is based on the ZigBee Home Automation specification [6], using the ZigBee PRO feature set [4]. Interoperability is supported with devices that implement the Home Automation Application Profile and use the ZigBee PRO feature set. Note: The devices should support corresponding clusters, which have been listed in the tables of this chapter. However, CICIE R3xx is not compatible with devices that do not implement the Home Automation Profile, nor is it compatible with earlier versions of ZigBee. silabs.com | Smart. Connected. Energy-friendly. Rev. 0.1 | 4 AN1003: TG-PM-0523-CICIE R3xx CICIE AT Command Set AT Style Command Conventions 2. AT Style Command Conventions To simplify the communication with the Silicon Labs modules, an AT-style command set (similar to the industry standard Hayes modem control language) is used. Each command must be preceded by an "AT" or "at" prefix. To terminate a command enter . Any data not following this pattern is either not accepted by the module or will cause an error message in response. Commands are followed by an optional response that includes and/or a prompt where the prompt could also be an error message. Example: ATS00? FFFF OK It is recommended to wait for an "OK" or "ERROR: XX" prompt before issuing the next command. Any data prompted to the user is delivered in the format: . Example: A prompt intersecting a command being entered will not affect the command itself. Throughout this document, only the responses and prompts are presented, and are omitted intentionally. Sequences of AT commands in a single line are not supported. Table 2.1. Types of AT Commands Command Read Command Description Commands ending with a `?' return the current set value of the parameter(s). ATXXX? Write Command This command sets user-definable parameters, as indicated by the `=' sign. ATXXX=<...> Execute Command This command executes routines of the module and returns parameters. ATXXX silabs.com | Smart. Connected. Energy-friendly. Rev. 0.1 | 5 AN1003: TG-PM-0523-CICIE R3xx CICIE AT Command Set AT Style Command Conventions 2.1 Parameters Each parameter must be entered in the correct format for any of the AT commands to execute correctly. Optional parameters are marked with square brackets [...]. Some general abbreviations are shown below: Table 2.2. Different Parameter Formats Command Description XX 8-bit hexadecimal number. Valid characters are 0-9, a-f, and A-F XXXX 16-bit hexadecimal number. Valid characters are 0-9, a-f, and A-F n Numbers from 0-9 s Sign b Bit (0 or 1) c Character 16-bit hexadecimal PAN ID (0000 to FFFF) 64-bit hexadecimal extended PAN ID Decimal channel (802.15.4 channel 11-26) Eight-character password 64-bit IEEE 802.15.4 address in hexadecimal silabs.com | Smart. Connected. Energy-friendly. Rev. 0.1 | 6 AN1003: TG-PM-0523-CICIE R3xx CICIE AT Command Set AT Style Command Conventions 2.2 Prompt Overview The following prompts can show up during the operation of the AT Command set for a CICIE device. Table 2.3. Prompt Overview Command Description WRONG HARDWARE Check if the module is ETRX3xx. OK OK terminator. ERROR:XX Error number XX occurred. ACK:XX Acknowledgement for message XX was received. NACK:XX Acknowledgement for message XX was not received. LeftPAN Local Node has left the PAN. LostPAN Local Node (not COO) has lost its parent node. FFD:, A router joins CICIE's network. SED:, A sleepy-end device joins CICIE's network. ZED:, A ZigBee-end device joins CICIE's network. JPAN:,, Local Node has joined PAN with given parameters. Bind:, Bind to the target device. Unbind: , Unbind from the target device. ATTR: See the +GETATR command description. RESPATTR:,,,,, See the +READATR command description. RESPMATTR:,, ,,, , See the +READMATR command description. WRITEATTR:,,,, See the +WRITEATR command description. WRITEMATTR:,, ,,, See the +WRITEMATR command description. REPORTATTR:,,,,, This prompt is shown when the CICIE receives a ReportAttribute command. REPORTMATTR:,,,,,, This prompt is shown when the CICIE receives a ReportAttribute command for a manufacturer-specified attribute. DISCATTR:, See the +ATTRDISC description for more information. ENDDISCATTR This prompt shows at the end of the attribute discovery response. DISCMATTR:,, See the +MATTRDISC description for more information. ENDDISCMATTR This prompt shows at the end of a manufacturer-specified attribute discovery response. DFTREP:,,, , Received default response. DEV:, ZigBee Service Discovery information. See +DISCOVER for more information. silabs.com | Smart. Connected. Energy-friendly. Rev. 0.1 | 7 AN1003: TG-PM-0523-CICIE R3xx CICIE AT Command Set AT Style Command Conventions Command Description IDENTIFY:,,, Received an Identify command. ON:, Received an On command. OFF:, Received an Off command. TOGGLE:, Received a Toggle command. RX:,,,,,: Set S0F Bit 9 to enable this prompt (Check 4.2 S-Registers for Module Setup for more information). CMD:, PAYLOAD: This prompt is used to show received ZDO commands which are not handled with a specific prompt. For example: MatchDesc for match descriptor response. EBINDREQ:,,,INPUTCLUSTER:...OUTPU TCLUSTER: ... This prompt is used to show that an End device binding request is received by the CICIE device. The CICIE can handle end device binding request and set up binding for two device endpoint. If the user want to do end device binding for the OnOff output on CICIE firmware with a switch, end device bind request should be sent from the switch to CICIE, then AT+EBIND:0A can be used after EBINDREQ prompt is received. EBINDRSP: This prompt is used to show that an end device binding response is received by the CICIE device. ZENROLLREQ:,, , This prompt shows when CICIE received an enroll request command. CICIE will automatically handle the request and send a response back if the local zone table is not full. ENROLLED:,, This prompt shows when a zone device enrolls successfully. ZONEENTRY:,, Show zone table entry information. See AT+ZENTRY or AT+ZTABLE. ZMAPSECTION : Show local zone map sections. See AT+PRINTZMAP. GETZONEINFO:,, , Receive a GetZoneInfo command. Note: This prompt will only show when the user set S61 bit 6 zone ID is larger than 31. NOTFOUNDZONE This prompt will show if the user deletes a non-existent zone entry. MZONETYPE: Show user-specified zone type. ARM:,,, [,] Receive an ARM command. If the ARM command is sent from a HA1.2 device, , will show. BYPASS:,,, ..., Receive a Bypass command. EMERGENCY:, Receive an Emergency command. FIRE:, Receive a Fire command. PANIC:, Receive a Panic command. silabs.com | Smart. Connected. Energy-friendly. Rev. 0.1 | 8 AN1003: TG-PM-0523-CICIE R3xx CICIE AT Command Set AT Style Command Conventions Command ZONESTATUS:,, , [,,] Description Receive a Zone Status Change Notification command. -- 16-bit hexadecimal (Check the ZigBee Cluster Library ZoneStatus attribute section for more information.) -- 8-bit hexadecimal, this parameter is reserved for additional sta- tus If this notification is sent by a HA1.2 device the following information will show: -- 8-bit hexadecimal, zone ID -- 16-bit hexadecimal, the amount of time (in quarter seconds) from the mo- ment when a change takes place in one or more bits of the ZoneStatus and the successful transmission of the Zone Status Change Notification. This is designed to help congested networks or offline servers quantify the amount of time from when an event was detected and when it could be reported to the client. ALARM:,,, The CICIE does not support Alarm cluster. This prompt is used to show that the CICIE received an Alarm command from a remote device. TNLOPEN:, Indicates a tunnel has been opened. TNLDATA:, Received tunnel data with length. TNLERROR:, Received a TransferDataError command after sending tunnel data to the target. TNLCLOCE: Indicates a tunnel has been closed. TNLC00:,,, Local client tunnel information. TNLS00:,,, Local server tunnel information. TNLOPEN:, Indicate a tunnel has been opened. INTERPAN:,, ,