Packet Types

Each UDP packet is prefaced with a 3 digit code to determine its purpose.

Joining

Send Credentials

This is a BROADCAST packet

This packet must be sent on a secure network

Sent from ICD

ICD sends home network credentials to device so that it can join the network.

100|ssid,password
1
  • ssid: the network router ssid
  • password: the network router password

Example: 100|Telstra7000,83627465

Acknowledge Credentials

Sent from Device

Device acknowledges that it has received the network credentials.

110
1

Example: 110

Joined Network Successfully

Sent from Device

Device informs the ICD that it has successfully joined the network.

120
1

Example: 120

Failed to Join Network

Sent from Device

Device informs the ICD that it has failed connecting to the network.

130
1

Example: 130

Discovery

Discovery Request

This is a BROADCAST packet

Sent from ICD

ICD requests that the device checks if it is on the census list.

300|[device-device-device...]
1
  • device: the string representation of a currently discovered device

Where each device string contains:

mac,statusbit,visibilitybit,headerVersion
1
  • mac: device MAC address.
  • statusbit: whether the device is currently active or not. 1 or 0.
  • visibilitybit: Specifies the visibility permission level.
  • headerVersion: The current version of the device header.

Example: 300| (no currently discovered devices)

Example: 300|B4:E6:2D:67:B5:3D,1,1,5

Example: 300|B4:E6:2D:67:B5:3D,1,1,5-D5:0A:95:9D:68:16,1,1,9

Discovery Response

Sent from Device

Device will respond with its information if it is not on the received census list.

310|mac,statusbit,visibilitybit,headerVersion
1
  • mac: device MAC address.
  • statusbit: whether the device is currently active or not. 1 or 0.
  • visibilitybit: Specifies the visibility permission level.
  • headerVersion: The current version of the device header.

Example: 310|B4:E6:2D:67:B5:3D,1,1,5

Discovery Header Request

Sent from ICD

ICD requests the device to send its xml header information.

320
1

Example: 320

Discovery Header Response

Sent from Device

Device responds to a discovery header request with the devices xml header.

330|mac,version,name,location
1
  • mac: device MAC address
  • version: the rolling version number of this header
  • name: the name given to the device
  • location: the location given to the device

Example: 310|B4:E6:2D:67:B5:3D,TV,Living Room

User Interface

UI Request

Sent from ICD

ICD requests the device to send its full xml description.

200
1

Example: 200

UI Response

Sent from Device

Device responds to a ui request with its xml string.

210|xml
1
  • xml: the devices xml string

Example: 210|<?xml version="1.0" encoding="UTF-8"?><device><name> ...

Command

Command Request

Sent from ICD

ICD sends a command to request the device to update its state.

400|command
1
  • command:

The command value should be in the following format groupID-elementID=elementStatus.

groupID is the value of the group ID which the element is a part of.

elementID is the value of the gui_element ID.

elementStatus is the string which represents that specific elements status. To see the syntax of the status of a particular element, see that elements section of the elements documentation.

the - and = characters are used as delimiters.

<group id="2" permisison="WR">
    <gui_element id="1">
        <type>stepper</type>
        <disp_settings>Number,0,10</disp_settings>
        <status_location>3</status_location>
        <comment>Number Counter</comment>
    </gui_element>
    <gui_element id="2">
        <type>buttontoggle</type>
        <disp_settings>Open/Close,Open,Close</disp_settings>
        <status_location>2</status_location>
        <comment>Light Switch</comment>
    </gui_element>
</group>
1
2
3
4
5
6
7
8
9
10
11
12
13
14

If the buttontoggle element was currently in the True state and the button was pressed. Its command would be: 400|2-2=False.

If the stepper element currently had a value of 5 and it was incremented, its command would be 400|2-1=6.

Status

Lease Request

Sent from ICD

ICD requests a status lease from the device.

500|duration,interval,response
1
  • duration: requested lease duration in miliseconds
  • interval: requested update interval in miliseconds
  • response: whether the device should respond with the lease information

Example: 500|10000,2000,T

Lease Response

Sent from Device

Device responds to a lease request if the ICD requested lease information.

510|mac,duration,interval
1
  • mac: device MAC address
  • duration: the actual lease duration (may not be the same as the requested duration)
  • interval: the actual update interval (may not be the same as the requested duration)

Example: 510|B4:E6:2D:67:B5:3D,50000,1000

Leave Lease

Sent from ICD

ICD informs the device that it is no longer interested in receiving status updates.

520
1

Example: 520

Status Update

This is a BROADCAST packet

Sent from Device

Device broadcasts its current state to all devices.

530|mac,lastUpdate,status[,status,status...]
1
  • mac: devices MAC address
  • lastUpdate: whether this is the final status update in the current lease. This value is either T or F where T indicates it is the final packet.
  • status: contains state for one element

Each element must be updated in a status update. The index of the status value in the list, will corrospond to the value found in the status_location tag in an elements xml. This index starts at the value 1. Therefore, the first status value in the list will be assigned to the element that contains the xml <status_location>1</status_location>

For the following xml:

<group id="1" permisison="WR">
    <gui_element id="1">
        <type>progress</type>
        <disp_settings>Loading...</disp_settings>
        <status_location>1</status_location>
        <comment>Loading progression</comment>
    </gui_element>
</group>
<group id="2" permisison="WR">
    <gui_element id="1">
        <type>stepper</type>
        <disp_settings>Number,0,10</disp_settings>
        <status_location>3</status_location>
        <comment>Number Counter</comment>
    </gui_element>
    <gui_element id="2">
        <type>buttontoggle</type>
        <disp_settings>Open/Close,Open,Close</disp_settings>
        <status_location>2</status_location>
        <comment>Light Switch</comment>
    </gui_element>
</group>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

An example status update packet for this device layout could look like the following:

530|B4:E6:2D:67:B5:3D,F,13,True,4

In this update packet, the progress bar is at 13%, the stepper has a value of 4 and the buttontoggle is in a True state. Note, the elements do not need to be listed in order of status update index in the xml.

Device Header

Change Device Name

Sent from ICD

ICD informs the device that it should change the name value in its header.

600|name
1
  • name: new name for the device

This will cause the IoT Device to increment its rolling header version.

Example: 600|TV

Change Device Location

Sent from ICD

ICD informs the device that it should change the location value in its header.

610|location
1
  • location: new location for the device

This will cause the IoT Device to increment its rolling header version.

Example: 610|Bedroom