sampledoc Digi Smart Energy Framework for New Gateways

Table Of Contents

ZDO Records

These records relate to information about devices on the network as described the ZigBee Device Object (ZDO), or ZigBee Device Profile (ZDP), specification. These records are primarily associated with the get_device_information RPC command. Additional information about ZDO descriptors and their parameters can be found in the ZigBee Specification.

ZDODeviceRecord

This record contains all known ZDO-level information about a device. When generated, optional parameters will not be included if the device has not been detected.

Parameters

Parameter Type Description
addr_extended MAC The 64-bit extended address of the device.
active bool Whether the device appears to be active currently (see Device Activity).
discovery_status int As of 1.5.0: Status of automatic service discovery for the device described by this record. If status is Incomplete(0) or Complete with Errors(2), the information in record may be not be complete. See Remote Device Status for enumeration of status values and messages that indicate the completeness of the discovery process.
node_type int The ZigBee device type of the device. Can be coordinator (0), router (1), end device (2) or unknown (-1).
addr_short* MAC The 16-bit network address of the device.
manufacturer_id* int The 16-bit manufacturer identifier of the device.
active_endpoints* list List of integers indicating the 8-bit identifiers of all endpoints currently on the device, excluding the ZDO endpoint (0).
simple_descriptors* dict Dictionary of simple descriptors for the endpoints of the device. Keys have the format endpoint_0xXX, where XX is the 8-bit endpoint identifier in hexadecimal. Values are of type Simple_Desc_rsp.
node_descriptor* Node_Desc_rsp The ZDO node descriptor of the device.
power_descriptor* Power_Desc_rsp The ZDO power descriptor of the device.

Example

Some contents of descriptors were omitted for this example.

<record type="ZDODeviceRecord">
    <addr_extended type="MAC">11:22:33:44:55:66:77:88</addr_extended>
    <active type="bool">TRUE</active>
    <discovery_status type="int">0x1</discovery_status>
    <node_type type="int">0x0</node_type>
    <addr_short type="MAC">0000</addr_short>
    <manufacturer_id type="int">0x101E</manufacturer_id>
    <active_endpoints type="list">
        <item type="int">0x5E</item>
    </active_endpoints>
    <simple_descriptors type="dict">
        <endpoint_0x5E type="Simple_Desc_rsp">
            ...
            <output_cluster_id_list type="list">
                <item type="int">0x0</item>
                <item type="int">0x3</item>
                <item type="int">0x702</item>
                <item type="int">0x800</item>
            </output_cluster_id_list>
            <input_cluster_id_list type="list">
                <item type="int">0x0</item>
                <item type="int">0x3</item>
                <item type="int">0xA</item>
                <item type="int">0x700</item>
                <item type="int">0x701</item>
                <item type="int">0x703</item>
                <item type="int">0x800</item>
            </input_cluster_id_list>
        </endpoint_0x5E>
    </simple_descriptors>
    <node_descriptor type="Node_Desc_rsp">
        ...
    </node_descriptor>
    <power_descriptor type="Power_Desc_rsp">
        ...
    </power_descriptor>
</record>

DeviceJoinStatusRecord

This record contains the last known join status of a device.

Parameters

Parameter Type Description
addr_extended MAC The 64-bit extended address of the device.
status int The last known join status of the device. Possible values: 0 = Unknown, 1 = Attempted to join network, 2 = Successfully joined, 3 = Successfully authenticated, 4 = Left network.
timestamp int The time that the status value was last updated, in UTC 1970.

Example

<record type="DeviceJoinStatusRecord">
    <addr_extended type="MAC">11:22:33:44:55:66:77:88</addr_extended>
    <status type="int">0x1</status>
    <timestamp type="int">0x12345678</timestamp>
</record>

Simple_Desc_rsp

This record is important because it contains the profile identifier, device identifer and cluster list of an endpoint. These are used for performing service discovery on the network.

When generated, optional parameters will not be included if the status parameter does not indicate success (0).

Parameters

Parameter Type Description
status int The ZDO status code of reading the node descriptor from the device. Should be success (0).
nwk_addr int 16-bit network address of the device.
endpoint_id int 8-bit identifier of the endpoint.
profile_id int 16-bit profile identifier of the endpoint.
device_id int 16-bit device identifier of the endpoint, as defined for the given profile.
device_version int 4-bit device version of the endpoint.
input_cluster_id_list list List of 16-bit integer identifiers of input (server) clusters on the endpoint.
output_cluster_id_list list List of 16-bit integer identifiers of output (client) clusters on the endpoint.

Example

<record type="Simple_Desc_rsp">
    <status type="int">0x0</status>
    <nwk_addr type="MAC">0000</nwk_addr>
    <endpoint_id type="int">0x5E</endpoint_id>
    <profile_id type="int">0x109</profile_id>
    <device_id type="int">0x500</device_id>
    <device_version type="int">0x1</device_version>
    <output_cluster_id_list type="list">
        <item type="int">0x0</item>
        <item type="int">0x3</item>
        <item type="int">0x702</item>
        <item type="int">0x800</item>
    </output_cluster_id_list>
    <input_cluster_id_list type="list">
        <item type="int">0x0</item>
        <item type="int">0x3</item>
        <item type="int">0xA</item>
        <item type="int">0x700</item>
        <item type="int">0x701</item>
        <item type="int">0x703</item>
        <item type="int">0x800</item>
    </input_cluster_id_list>
</record>

Node_Desc_rsp

When generated, optional parameters will not be included if the status parameter does not indicate success (0). The contents of this descriptor are not needed for most applications. Note that some parameters are separated in the record but are packed into a single byte when transmitted.

Parameters

Parameter Type Description
status int The ZDO status code of reading the node descriptor from the device. Should be success (0).
nwk_addr int The 16-bit network address of the device.
logical_type* int Refer to ZigBee specification.
complex_desc_avail* int Refer to ZigBee specification.
user_desc_avail* int Refer to ZigBee specification.
aps_flags* int Refer to ZigBee specification.
frequency_band* int Refer to ZigBee specification.
mac_capability_flags* int Refer to ZigBee specification.
manufacturer_code* int Refer to ZigBee specification.
max_buffer_size* int Refer to ZigBee specification.
max_incoming_transfer_size* int Refer to ZigBee specification.
server_mask* int Refer to ZigBee specification.
max_outgoing_transfer_size* int Refer to ZigBee specification.
descriptor_capability_field* int Refer to ZigBee specification.

Example

<record type="Node_Desc_rsp">
    <status type="int">0x0</status>
    <nwk_addr type="MAC">0000</nwk_addr>
    <logical_type type="int">0x0</logical_type>
    <complex_desc_avail type="int">0x0</complex_desc_avail>
    <user_desc_avail type="int">0x0</user_desc_avail>
    <aps_flags type="int">0x0</aps_flags>
    <frequency_band type="int">0x8</frequency_band>
    <mac_capability_flags type="int">0x8F</mac_capability_flags>
    <manufacturer_code type="int">0x101E</manufacturer_code>
    <max_buffer_size type="int">0x52</max_buffer_size>
    <max_incoming_transfer_size type="int">0x80</max_incoming_transfer_size>
    <server_mask type="int">0x0</server_mask>
    <max_outgoing_transfer_size type="int">0x80</max_outgoing_transfer_size>
    <descriptor_capability_field type="int">0x0</descriptor_capability_field>
</record>

Power_Desc_rsp

When generated, optional parameters will not be included if the status parameter does not indicate success (0). The contents of this descriptor are not needed for most applications. Note that some parameters are separated in the record but are packed into a single byte when transmitted.

Parameters

Parameter Type Description
status int The ZDO status code of reading the node descriptor from the device. Should be success (0).
nwk_addr int The 16-bit network address of the device.
current_power_mode* int Refer to ZigBee specification.
available_power_sources* int Refer to ZigBee specification.
current_power_source* int Refer to ZigBee specification.
current_power_source_level* int Refer to ZigBee specification.

Example

<record type="Power_Desc_rsp">
    <status type="int">0x0</status>
    <nwk_addr type="MAC">0000</nwk_addr>
    <current_power_mode type="int">0x0</current_power_mode>
    <available_power_sources type="int">0x1</available_power_sources>
    <current_power_source type="int">0x1</current_power_source>
    <current_power_source_level type="int">0xC</current_power_source_level>
</record>