This document details the CFLink protocol for the SW16 device.
The STA
(Status) query returns the states of all the dry contact inputs.
< [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]
0
= open, off.1
= closed, on.
// 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.
The LED
query returns the states of all the LEDs (except backlight LEDs).
> [F2]<ID>[F3]QSWXLED[F4][F5][F5]
< [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 |
.
P##
format. Eg. Port 1 is P01
.X
= Not changingB
= BlinkingD
= DimmingP
= PulsingR
= Ramping0
to 100
.
Note that the LED level
// 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]
The BKL
(Backlight) query returns the states of all the backlight LEDs.
> [F2]<ID>[F3]QSWXBKL[F4][F5][F5]
< [F2]<ID>[F3]RSWXBKL[F4]<PORT>:<STATE>:<LEVEL>[F5][F5]
The BKL
(Backlight) query returns the states of all the backlight LEDs.
> [F2]<ID>[F3]QSWXBKL[F4][F5][F5]
< [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 |
.
P##
format. Eg. Port 1 is P01
.X
= Not changingB
= BlinkingD
= DimmingP
= PulsingR
= Ramping0
to 100
.
// 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]
The LED
command is used to set the states of one or more of the 16 LED channels on the SW16.
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).
> [F2]<ID>[F3]TSWXLED[F4]<PORT>:<STATE>[F5][F5]
P##
format. Eg. Port 1 is P01
.0
= Off1
= OnT
= Toggle (invert the LED state, on if it was off, off if it was on)
> [F2]<ID>[F3]TSWXLED[F4]<PORT>:P:<TIME>[F5][F5]
P##
format. Eg. Port 1 is P01
.10
= 1 second100
= 10 seconds9999
= 999.9 seconds
> [F2]<ID>[F3]TSWXLED[F4]<PORT>:<MODE>:<MIN_LEVEL>:<MAX_LEVEL>:<TIME_ON>:<TIME_OFF>:<COUNT>[F5][F5]
P##
format. Eg. Port 1 is P01
.B
= Blink (no fading between levels, instant change to min and max levels)D
= Dim (fade between mid and max levels)0
to 100
.0
to 100
.15
= 1.5 second105
= 10.5 seconds9999
= 999.9 seconds15
= 1.5 second105
= 10.5 seconds9999
= 999.9 seconds1
= Blink/Dim to max level and back to min level once.5
= Blink/Dim to max level and back to min level 5 times.0
= Blink/Dim continuously, until state is changed by another command.
> [F2]<ID>[F3]TSWXLED[F4]<PORT>:R:<LEVEL>:<TIME>[F5][F5]
P##
format. Eg. Port 1 is P01
.0
to 100
.15
= 1.5 second105
= 10.5 seconds9999
= 999.9 secondsSee LED Query Reply for more information.
// 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.
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.
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.
> [F2]<ID>[F3]RSWXCHA[F4]<PORT>:<STATE>[F5][F5]
P##
format. Eg. Port 1 is P01
.0
= open, off.1
= closed, on.
// 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]
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).
< [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]
0
= open, off.1
= closed, on.
// 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.