Table of Contents

SW16 CFLink Protocol

This document details the CFLink protocol for the SW16 device.

Queries

STA - Query Input Status

The STA (Status) query returns the states of all the dry contact inputs.

Data

< [F2]<ID>[F3]RSWXSTA[F4]P01:<STATE>|P02:<STATE>|P03:<STATE>|P04:<STATE>|P05:<STATE>|P06:<STATE>|P07:<STATE>|P08:<STATE>|P09:<STATE>|P10:<STATE>|P11:<STATE>|P12:<STATE>|P13:<STATE>|P14:<STATE>|P15:<STATE>|P16:<STATE>[F5][F5]

Example

// States returned for SW16 on CFLink ID [22]
< [F2][22][F3]RSWXSTA[F4]P01:1|P02:0|P03:0|P04:0|P05:0|P06:0|P07:0|P08:0|P09:0|P10:0|P11:0|P12:0|P13:0|P14:0|P15:0|P16:0[F5][F5]
// Port 1 is closed, on.
// Ports 2-16 are open, off.

LED - Query LED States

The LED query returns the states of all the LEDs (except backlight LEDs).

Data

> [F2]<ID>[F3]QSWXLED[F4][F5][F5]

Reply

< [F2]<ID>[F3]RSWXLED[F4]<PORT>:<STATE>:<LEVEL>[F5][F5]

The reply will include data for all ports of the device. So for the SW16, there will be 16 sets of port data, separated by single pipe |.


Note that the LED level

Example

// Request the LED states of a SW16 on CFLink ID [22]
> [F2][22][F3]QSWXLED[F4][F5][F5]
// Returns states for all 16 LEDs
< [F2][22][F3]RSWXLED[F4]P01:X:0|P02:X:100|P03:D:50|P04:D:20|P05:B:0|P06:B:70|P07:P:0|P08:P:68|P09:X:0|P10:X:0|P11:X:0|P12:X:0|P13:X:0|P14:X:0|P15:X:0|P16:X:0[F5][F5]

BKL - Query Backlight LED States

The BKL (Backlight) query returns the states of all the backlight LEDs.

Data

> [F2]<ID>[F3]QSWXBKL[F4][F5][F5]

Reply

< [F2]<ID>[F3]RSWXBKL[F4]<PORT>:<STATE>:<LEVEL>[F5][F5]

BKL - Query Backlight LED States

The BKL (Backlight) query returns the states of all the backlight LEDs.

Data

> [F2]<ID>[F3]QSWXBKL[F4][F5][F5]

Reply

< [F2]<ID>[F3]RSWXBKL[F4]<PORT>:<STATE>:<LEVEL>[F5][F5]

The reply will include data for all backlight LEDs of the device. So for the SW16, there will be 4 sets of port data, separated by single pipe |.

Example

// Request the backlight LED states of a SW16 on CFLink ID [22]
> [F2][22][F3]QSWXBKL[F4][F5][F5]
// Returns states for all 4 LEDs
< [F2][22][F3]RSWXBKL[F4]P01:X:0|P02:P:100|P03:D:50|P04:B:20[F5][F5]

Transmission Messages

LED - Set LED States

The LED command is used to set the states of one or more of the 16 LED channels on the SW16.

Data

The LED command can be used to change the LED states in a variety of ways, including basic on/off/toggle, and more advanced blinking, dimming and ramping.
Combine multiple LED port changes by using the port separator character, | (single pipe).

On, Off, Toggle

> [F2]<ID>[F3]TSWXLED[F4]<PORT>:<STATE>[F5][F5]

Pulse

> [F2]<ID>[F3]TSWXLED[F4]<PORT>:P:<TIME>[F5][F5]

Blinking, Dimming

> [F2]<ID>[F3]TSWXLED[F4]<PORT>:<MODE>:<MIN_LEVEL>:<MAX_LEVEL>:<TIME_ON>:<TIME_OFF>:<COUNT>[F5][F5]

Ramping

> [F2]<ID>[F3]TSWXLED[F4]<PORT>:R:<LEVEL>:<TIME>[F5][F5]

Reply

See LED Query Reply for more information.

Example

// Change the state of 6 LEDs on a SW16 on CFLink ID [22]
> [F2][22][F3]TSWXLED[F4]P01:T|P02:1|P03:P:100|P04:B:10:88:10:10|P05:D:0:100:10:20:3|P06:R:55:33[F5][F5]
// LED 1 = Toggle
// LED 2 = On
// LED 3 = Pulse on for 10 seconds
// LED 4 = Blink at min level of 10 for 1 second, max level of 88 for 1 second, continuously.
// LED 5 = Dim to min level of 0 over 1 second, then to max level of 100 over 2 seconds, 3 times.
// LED 6 = Ramp to a level of 55 over a period of 3.3 seconds.

BKL - Set Backlight State

The BKL (Backlight) command is used to set the state of one or more of the 4 backlight LED channels.
It uses the exact same options as the LED command, so see the ''LED'' command for more details.

Notifications

CHA - Input State Change

The CHA (Change) notification is sent out any time a dry contact input on the SW16 changes state.
This notification only contains the state for the port that actually changed.

Data

> [F2]<ID>[F3]RSWXCHA[F4]<PORT>:<STATE>[F5][F5]

Example

// Input 1 is closed on SW16 on CFLink ID [22]
< [F2][22][F3]RSWXCHA[F4]P01:1[F5][F5]

// Input 1 is opened on SW16 on CFLink ID [22]
< [F2][22][F3]RSWXCHA[F4]P01:0[F5][F5]

STA - Input States

The STA (Status) notification is sent out any time a dry contact input on the SW16 changes state or the input states are queried.
This notification contains the state of all ports at once, separated using the port separator character, | (single pipe).

Data

< [F2]<ID>[F3]RSWXSTA[F4]P01:<STATE>|P02:<STATE>|P03:<STATE>|P04:<STATE>|P05:<STATE>|P06:<STATE>|P07:<STATE>|P08:<STATE>|P09:<STATE>|P10:<STATE>|P11:<STATE>|P12:<STATE>|P13:<STATE>|P14:<STATE>|P15:<STATE>|P16:<STATE>[F5][F5]

Example

// States returned for SW16 on CFLink ID [22]
< [F2][22][F3]RSWXSTA[F4]P01:1|P02:0|P03:0|P04:0|P05:0|P06:0|P07:0|P08:0|P09:0|P10:0|P11:0|P12:0|P13:0|P14:0|P15:0|P16:0[F5][F5]
// Port 1 is closed, on.
// Ports 2-16 are open, off.