CommandFusion Wiki

Documentation Resources

User Tools

Site Tools


Sidebar

hardware:cflink:solo-cflink-protocol

Solo CFLink Protocol

The following documentation is for the Solo device CFLink protocol messages.
Note that the Solo does NOT feature an on-board CFLink port, but it still uses the same protocol for communication over Ethernet.

By default, the Solo communicates the CFLink Protocol via:

  • TCP port 10207
  • UDP port 10207
  • WebSocket on port 80

The Solo has IR ports, for which documentation is available in the IR Port docs.
Note: To send IR signals via the on-board blaster, you use the same IR Port commands described above, targeting P07 (Port 7).

The Solo has RS232 ports, for which documentation is available in the On-Board RS232 docs.

Queries

WHO - Device discovery

The WHO query is used to discover what device is at a specific address.
The WHO reply will be automatically broadcast as a notification to the network when a device is powered up or reset.

Data

The WHO query does not have any associated data.

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

Reply

< [F2]<ID>[F3]RSOLWHO[F4]CFSOLO:<SERIAL#>:<APP_VER>:<CFLINK_VER>:<IP4>:<MAC>:<DEVICE_NAME>,M1:<CARD_1>,M2:<CARD_2>[F5][F5]

  • <APP_VER> = The firmware version running on the device.
  • <DEVICE_NAME> = A friendly name given to the device. By default this is simply SOLO, but you can name the device anything you desire for your identification purposes.
  • <CARD_1> = The model number of the card that is plugged into expansion slot 1. This will report BLANK if no card is detected.
  • <CARD_2> = The model number of the card that is plugged into expansion slot 2. This will report BLANK if no card is detected.

Example

// Request the details for the device at CFLink ID [03]
> [F2][03][F3]QCFXWHO[F4][F5][F5]
// The Reply if a Solo is found, with no cards inserted, and the default device name
< [F2][03][F3]RSOLWHO[F4]CFSOLO:0004A3C4EBA2:1.0.1:1.0.4:192.168.0.100:00.04.A3.C4.EB.A2:SOLO,M1:BLANK,M2:BLANK[F5][F5]

CFG - Query Configuration

The CFG query is used to obtain details about the configuration of a specific Solo unit.

Data

The CFG query does not have any associated data.

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

Reply

< [F2]<ID>[F3]RSOLCFG[F4]<IPADDRESS>:<SUBNETMASK>:<GATEWAY>:<DNS>:<DHCP>:<UDPBROADCAST>:<CONNECTIONS>[F5][F5]

  • <IPADDRESS> = The IPv4 address the Solo is currently assigned.
  • <SUBNETMASK> = The IPv4 subnet mask the Solo is currently assigned.
  • <GATEWAY> = The IPv4 gateway the Solo is currently assigned.
  • <DNS> = The IPv4 DNS the Solo is currently assigned.
  • <DHCPMODE> = DHCP mode disabled or enabled (0 or 1).
  • <UDPBROADCAST> = UDP Broadcasting on port 10207 disabled or enabled (0 or 1).
  • <CONNECTIONS> = The number of connections currently active to the TCP Server on port 10207.

Example

// Query configuration of Solo on ID [03]
> [F2][03][F3]QSOLCFG[F4][F5][F5]
// Configuration query reply
< [F2][03][F3]RSOLCFG[F4]192.168.0.100:255.255.255.0:192.168.0.1:1:1[F5][F5]

NAM - Port Names

The NAM query is used to query friendly names given to each port on the Solo.
The NAM query can be targeted at any of the port types as follows:

  • SOL = Query the on-board dry contact input port names
  • COM = Query the on-board RS232 port names
  • IRX = Query the on-board IR port names

Data

The NAM query does not have any associated data. Simply change the target type from the list above to get the name of the specific port types.

> [F2]<ID>[F3]Q<TARGET>NAM[F4][F5][F5]

Reply

< [F2]<ID>[F3]R<TARGET>NAM[F4]<PORT>:<NAME>|<PORT>:<NAME>|<PORT>:<NAME>|<PORT>:<NAME>[F5][F5]

  • <TARGET> = The type of port that was queried.
  • Pair of data for each targeted port:
    • <PORT> = The port number, in the format P##, eg. P01, P02, etc.
    • <NAME> = The friendly name given to the port.

Example

// Request the names for the IR ports in the Solo at CFLink ID [03]
> [F2][03][F3]QIRXNAM[F4][F5][F5]
// The reply, with the default names for each port
< [F2][03][F3]RIRXNAM[F4]P01:IR 1|P02:IR 2|P03:IR 3|P04:IR 4|P05:IR 5|P06:IR 6|P07:IR 7[F5][F5]

// Request the names for the dry contact ports in the Solo at CFLink ID [03]
> [F2][03][F3]QSOLNAM[F4][F5][F5]
// The reply, with the default names for each port
< [F2][03][F3]RSOLNAM[F4]P01:DRY 1|P02:DRY 2|P03:DRY 3|P04:DRY 4[F5][F5]

// Request the names for the RS232 ports in the Solo at CFLink ID [03]
> [F2][03][F3]QCOMNAM[F4][F5][F5]
// The reply, with the default names for each port
< [F2][03][F3]RCOMNAM[F4]P01:COM 1|P02:COM 2[F5][F5]

SLT - Query Slot Configuration

The Solo features 5 communication slots that can be used to connect to third party networked devices.
Each slot also has a dedicated bridging port, allowing TCP Clients (such as iPads, other control systems, etc) to send/receive data to the third part networked device. The SLT query returns the configuration of a specific communication slot.
If not slot number is given, then all slots will report their configuration in separate replies.

Data

> [F2]<ID>[F3]QSOLSLT[F4]<SLOT#>[F5][F5]

  • <SLOT#> = The communication slot number to request configuration from. Omit this to return configuration of all slots.

Reply

< [F2]<ID>[F3]RSOLSLT[F4]<SLOT#>:<MODE>:<IPADDRESS>:<PORT>:<TIMEOUT>:<RECONNECT>:<MAX_BRIDGE_SOCKETS>:<NUM_BRIDGE_CONNECTIONS>:<CONNECTED>:<STARTUP_MACRO>[F5][F5]

  • <SLOT#> = The communication slot number being described.
  • <MODE> = Disabled (default behaviour) OFF, TCP Client TCP, UDP Bi-directional UDP, UDP Transmit Only UDPT.
  • <IPADDRESS> = The IP Address assigned to the slot:
    • TCP Client = The IP Address of the TCP Server to connect to
    • UDP Bi-directional = The IP Address to send/received data to/from. Broadcast addresses can be used (eg. 255.255.255.255 to send to everyone on the network).
    • UDP Transmit Only = The IP Address to send data to. Incoming packets are ignored.
  • <PORT> = The port number assigned to the slot (same rules apply as <IPADDRESS> above)
  • <TIMEOUT> = The time in seconds to hold a TCP connection open for without any data transmissions. 0 = Disable timeout. Minimum of 5 seconds to avoid network overhead. Maximum of 65535 seconds.
  • <RECONNECT> = Time to wait between connections attempts after a TCP disconnection. Default is 0 for immediate connection retry. Maximum of 65535 seconds.
  • <MAX_BRIDGE_SOCKETS> = The maximum number of incoming connections to the slots dedicated TCP Server (starting at port 10301 for slot 1, 10305 for slot 5). A maximum of 10 bridged connections can be statically shared between all 5 communication slots.
  • <NUM_BRIDGE_CONNECTIONS> = The number of clients currently connected to the dedicated bridging TCP Server. If all bridged sockets are in use, then no more clients will be able to connect.
  • <CONNECTED> = Whether or not the connection to the assigned IP Address and port has been established. UDP slots will always report a 1, whilst TCP slots will report that actual connection state.
  • <STARTUP_MACRO> = A macro to be fired each time the socket connection takes place. For TCP slots, this means each time a connection is established. For UDP this means each time the unit is given an IP Address (after reboot, etc). If left blank, no startup macro will be fired.

Example

// Query the configuration for slot 1 of Solo on ID [03] 
> [F2][03][F3]QSOLSLT[F4]1[F5][F5]
// Reply when slot configured as a TCP Client
< [F2][03][F3]RSOLSLT[F4]1:TCP:192.168.0.10:23:0:0:2:0:1:Macro Name[F5][F5]

// Query the configuration for slot 2 of Solo on ID [03] 
> [F2][03][F3]QSOLSLT[F4]2[F5][F5]
// Reply when slot configured for UDP Bi-directional
< [F2][03][F3]RSOLSLT[F4]12:UDP:255.255.255.255:49155:0:0:0:0:1[F5][F5]

TME - Real Time Clock status

The TME query will return the current configuration of the real time clock on-board the Solo.

Data

The TME query does not have any associated data.

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

Reply

< [F2]<ID>[F3]RSOLTME[F4]<YEAR>:<MONTH>:<DATE>:<DAYOFWEEK>:<HOUR>:<MINUTE>:<SECOND>:<UTCTIMEZONE>:<UTCTIMEZONESTR>:<NTP_SYNC>:<NTP_SERVER_ID>[F5][F5]

  • <YEAR> = 4 digit year.
  • <MONTH> = 2 digit month (01-12).
  • <DATE> = 2 digit day (01-31).
  • <DAYOFWEEK> = 1 digit day of week. Sunday = 1, Saturday = 7 (1-7)
  • <HOUR> = 2 digit hour, in 24 hour military format (00-23)
  • <MINUTE> = 2 digit minute (00-59)
  • <SECOND> = 2 digit second (00-59)
  • <UTCTIMEZONE> = ID from Timezone Lookup Table (2 digits, 01-40)
  • <UTCTIMEZONESTR> = String representation of the timezone
  • <NTP_SYNC> = Whether or not the unit is configured to sync to a time server.
  • <NTP_SERVER_ID> = The time server that the unit is syncing to. Refer to list below.

Available time server IDs:

  • 1 = pool.ntp.org
  • 2 = europe.pool.ntp.org
  • 3 = asia.pool.ntp.org
  • 4 = oceania.pool.ntp.org
  • 5 = north-america.pool.ntp.org
  • 6 = south-america.pool.ntp.org
  • 7 = africa.pool.ntp.org

Example

// Query time from Solo on CFLink ID [03]
> [F2][03][F3]QSOLTME[F4][F5][F5]
// Reply
< [F2][03][F3]RSOLTME[F4]2015:05:27:3:18:12:12:29:UTC+8.00:1:4[F5][F5]

VARLST - Query Variable List

Query the list of variables stored on the device. List of variable names, separated by colons : will be returned.
A maximum of 50 variables can be stored and will all be returned by name.

Data

The VARLST query does not have any associated data.

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

Reply

< [F2]<ID>[F3]RVARLST[F4]<VAR_NAME_1>:<VAR_NAME_2>:<VAR_NAME_3>[F5][F5]

  • <VAR_NAME (0-50)> = The name of each variable stored on the device. Only variables that have previously been defined will be returned.

Example

// Query list of variables from Solo on CFLink ID [03]
> [F2][03][F3]QVARLST[F4][F5][F5]
// Reply
< [F2][03][F3]RVARLST[F4]variable1:variable2:someName[F5][F5]

VARGET - Get Variable Value

Query the current value of a variable stored on the device.

Data

> [F2]<ID>[F3]QVARGET[F4]<VAR_NAME>[F5][F5]

  • <VAR_NAME> = The name of the variable to retrieve the value of.

Reply

< [F2]<ID>[F3]RVARGET[F4]<VAR_NAME>:<VALUE>[F5][F5]

  • <VAR_NAME> = The name of the variable that is being returned.
  • <VALUE> = The value of the variable

Example

// Query value of variable named 'room_state' from Solo on CFLink ID [03]
> [F2][03][F3]QVARGET[F4]room_state[F5][F5]
// Reply
< [F2][03][F3]RVARGET[F4]room_state:on[F5][F5]

Configuration Messages

CFG - Network Configuration

The CFG command will configure the network settings used by the Solo.
The changes will not take effect until the Solo is rebooted.

Data

> [F2]<ID>[F3]CSOLCFG[F4]<IPADDRESS>:<SUBNETMASK>:<GATEWAY>:<DNS>:<DHCP>:<UDPBROADCAST>[F5][F5]

  • <IPADDRESS> = The IPv4 Address to assign to the Solo. It will be ignored if DHCP is enabled.
  • <SUBNETMASK> = The IPv4 Subnet Mask to assign to the Solo.
  • <GATEWAY> = The IPv4 Gateway to assign to the Solo.
  • <DNS> = The IPv4 DNS Server Address to assign to the Solo.
  • <DHCP> = DHCP mode enable/disable (1 or 0).
  • <UDPBROADCAST> = UDP Broadcasting via port 10207 enable/disable (1 or 0).

Reply

// The reply is an echo of the command in reply format, with no data.
< [F2]<ID>[F3]RSOLCFG[F4][F5][F5]

Example

// Configure network settings of Solo on CFLink ID [03]
> [F2][03][F3]CSOLCFG[F4]192.168.0.59:255.255.255.0:192.168.0.1:192.168.0.1:0:1[F5][F5]
// Reply
< [F2][03][F3]RSOLCFG[F4]0[F5][F5]

SLT - Configure TCP Slot

The SLT (Slot) command is used to configure a communication slot on the Solo.
The change will not take effect until the Solo is rebooted.

Data

> [F2]<ID>[F3]CSOLSLT[F4]<SLOT#>:<MODE>:<IPADDRESS>:<PORT>:<TIMEOUT>:<RECONNECT>:<MAX_BRIDGE_SOCKETS>:<STARTUP_MACRO>[F5][F5]

  • <SLOT#> = The communication slot number to configure.
  • <MODE> = Disabled (default behaviour) OFF, TCP Client TCP, UDP Bi-directional UDP, UDP Transmit Only UDPT.
  • <IPADDRESS> = The IP Address to assign the slot:
    • TCP Client = The IP Address of the TCP Server to connect to
    • UDP Bi-directional = The IP Address to send/received data to/from. Broadcast addresses can be used (eg. 255.255.255.255 to send to everyone on the network).
    • UDP Transmit Only = The IP Address to send data to. Incoming packets are ignored.
  • <PORT> = The port number to assign the slot (same rules apply as <IPADDRESS> above)
  • <TIMEOUT> = The time in seconds to hold a TCP connection open for without any data transmissions. 0 = Disable timeout. Minimum of 5 seconds to avoid network overhead. Maximum of 65535 seconds.
  • <RECONNECT> = Time to wait between connections attempts after a TCP disconnection. Default is 0 for immediate connection retry. Maximum of 65535 seconds.
  • <MAX_BRIDGE_SOCKETS> = The maximum number of incoming connections to the slots dedicated TCP Server (starting at port 10301 for slot 1, 10305 for slot 5). A maximum of 10 bridged connections can be statically shared between all 5 communication slots.
  • <STARTUP_MACRO> = A macro to be fired each time the socket connection takes place. For TCP slots, this means each time a connection is established. For UDP this means each time the unit is given an IP Address (after reboot, etc). If left blank, no startup macro will be fired. The macro name must exist already within the Solo macro configuration.

Reply

// The reply is an echo of the command in reply format.
// The change does not take effect until the Solo is rebooted, so the reply will not contain any data.
< [F2]<ID>[F3]RSOLSLT[F4][F5][F5]

Example

// Configure slot 1 to be a TCP Client, on Solo ID [03]. Connect to IP address 192.168.0.10 on port 23. Allow up to 5 bridged clients to connect to this bridged socket.
> [F2][03][F3]CSOLSLT[F4]1:TCP:192.168.0.10:23:0:10:5[F5][F5]
// Reply
< [F2][03][F3]RSOLSLT[F4]1[F5][F5]

TME - Configure Real Time Clock

The TME command is used to set the time and date settings for the real time clock on-board the Solo.

Data

> [F2]<ID>[F3]CSOLTME[F4]<YEAR>:<MONTH>:<DATE>:<DAYOFWEEK>:<HOUR>:<MINUTE>:<SECOND>:<UTCTIMEZONE>:<NTP_SYNC>:<NTP_SERVER_ID>[F5][F5]

  • <YEAR> = 4 digit year.
  • <MONTH> = 2 digit month (01-12).
  • <DATE> = 2 digit day (01-31).
  • <DAYOFWEEK> = 1 digit day of week. Sunday = 1, Saturday = 7 (1-7)
  • <HOUR> = 2 digit hour, in 24 hour military format (00-23)
  • <MINUTE> = 2 digit minute (00-59)
  • <SECOND> = 2 digit second (00-59)
  • <UTCTIMEZONE> = ID from Timezone Lookup Table (2 digits, 01-40)
  • <NTP_SYNC> = Whether or not to sync to a time server.
  • <NTP_SERVER_ID> = The time server that the unit should syncing to. Refer to list below.

Available time server IDs:

  • 1 = pool.ntp.org
  • 2 = europe.pool.ntp.org
  • 3 = asia.pool.ntp.org
  • 4 = oceania.pool.ntp.org
  • 5 = north-america.pool.ntp.org
  • 6 = south-america.pool.ntp.org
  • 7 = africa.pool.ntp.org

Reply

// Reply with the data used to configure the time/date.
< [F2]<ID>[F3]RSOLTME[F4]<YEAR>:<MONTH>:<DATE>:<DAYOFWEEK>:<HOUR>:<MINUTE>:<SECOND>:<UTCTIMEZONE>:<UTCTIMEZONESTR>:<NTP_SYNC>:<NTP_SERVER_ID>[F5][F5]

Example

// Configure the real time clock on a Solo ID [03]
> [F2][03][F3]CSOLTME[F4]2015:05:27:3:18:12:12:29:1:4[F5][F5]
// Reply
< [F2][03][F3]RSOLTME[F4]2015:05:27:3:18:12:12:29:UTC+8.00:1:4[F5][F5]

Error

  • 100 = Invalid UTC Timezone
  • 100 = Invalid Date
  • 100 = Invalid Time

SPC - Serial Port Configuration

The SPC command is used to configure the RS232 settings for the on-board serial ports.
For the 2 on-board bi-directional RS232 ports, follow the protocol documentation for on-board serial ports.

1-way IR/RS232 Ports

For the one way (transmit only) RS232 port functionality of the onboard IR ports, use the same protocol documentation as the on-board bi-directional RS232 ports, but replace SOL or CFX CFLink target data with IRX.

Example

// Configure the on-board 1-way serial port for a Solo on ID [03] to enable IR Port 1 to transmit RS232 commands at 9600 baud, 8:None:1.
> [F2][03][F3]CIRXSPC[F4]P01:232:9600:8:N:1:0[F5][F5]
// Reply contains settings for all 1-way RS232 configurations for each IR port
< [F2][03][F3]RIRXSPC[F4]P01:232:9600:8:N:1:0|P02:232:115200:8:N:1:0|P03:232:115200:8:N:1:0|P04:232:115200:8:N:1:0|P05:232:115200:8:N:1:0|P06:232:115200:8:N:1:0[F5][F5]

Transmission Messages

SND - Send Data

The SND (Send) command allows you to send data to a specific communication slot defined on the Solo.

Data

> [F2]<ID>[F3]TSOLSND[F4]<SLOT#>:<DATA>[F5][F5]

  • <SLOT#> = The communication slot number to send data to. Known as the 'target slot'. Range of 1 to 5.
  • <DATA> = The actual data to send to the target slot. Hex bytes should be defined in \xFF format. eg. A carriage return is written as \x0D

Reply

// In an effort to reduce network traffic, the reply will not contain the <DATA> sent, only the slot it was sent to.
< [F2]<ID>[F3]RSOLSND[F4]<SLOT#>[F5][F5]

Example

// Send a command to an ethernet device connected to slot 1, for Solo on CFLink ID [03]
> [F2][03][F3]TSOLSND[F4]1:Hello World!\x0D[F5][F5]
// Reply
< [F2][03][F3]RSOLSND[F4]1[F5][F5]

Error

  • 100 = Invalid Slot Number

HTP - Send HTTP Request

The HTP (HTTP) command allows you to send a HTTP request from the Solo and receive a response which can be processed by the rules engine.

Data

> [F2]<ID>[F3]TSOLHTP[F4]<URL>|<METHOD>|<HEADERS>|<BODY>[F5][F5]

  • <URL> = The URL to send the HTTP Request to. If no port is defined, then port 80 is assumed. Required!
  • <METHOD> = The HTTP Request Method to use. Optional, default to GET if only a <URL> is defined. Options are: GET, POST. Other methods might be added in future.
  • <HEADERS> = A series of key=value pairs, separated by colons. eg: id=10:action=play. Optional.
  • <BODY> = Any data to send as the body of the HTTP request. Optional.

Reply

// Any replies to the HTTP request will be reported via CFLink formatted command:
< [F2]<ID>[F3]RSOLHTP[F4]<URL>|<STATUS>|<HEADERS>|<BODY>[F5][F5]

  • <URL> = The same URL that was used to make the request.
  • <STATUS> = The status code of the request, eg. 200, 404, etc.
  • <HEADERS> = A series of key=value pairs, separated by colons. These are taken from the headers sent in the actual response from the HTTP server.
  • <BODY> = Any data in the body of the response from the HTTP server.

Example

// Send HTTP POST request to a local device on the network (without any header data)
> [F2][03][F3]TSOLHTP[F4]http://192.168.0.100/device/1|POST||id=10&action=on[F5][F5]
// Reply
< [F2][03][F3]RSOLHTP[F4]http://192.168.0.100/device/1|200||id=10&status=on[F5][F5]

RUN - Run Macro

The RUN command allows you to trigger a macro defined on the Solo to instantly run.

Data

> [F2]<ID>[F3]TSOLRUN[F4]<MACRO_NAME>[F5][F5]

  • <MACRO_NAME> = The name of the macro to trigger. The macro must already be defined and saved within the Solo configuration.

Reply

< [F2]<ID>[F3]RSOLRUN[F4]<MACRO_NAME>[F5][F5]

Example

// Trigger a macro called 'Good Night' to run
> [F2][03][F3]TSOLRUN[F4]Good Night[F5][F5]
// Reply
< [F2][03][F3]RSOLRUN[F4]Good Night[F5][F5]

VARSET - Set Variable Value

Set the current value of a variable stored on the device. If no variable is already defined using the given variable name, a new variable will be created. A max of 50 variables can be stored on the device.

Data

> [F2]<ID>[F3]CVARSET[F4]<VAR_NAME>:<VALUE>[F5][F5]

  • <VAR_NAME> = The name of the variable to set the value of. Must be 10 characters or less. Cannot contain colons :.
  • <VALUE> = The value to assign to the variable. Must be 20 characters or less.

Reply

< [F2]<ID>[F3]RVARSET[F4]<VAR_NAME>:<VALUE>[F5][F5]

  • <VAR_NAME> = The name of the variable being assigned a new value.
  • <VALUE> = The value of the variable that was just assigned.

Example

// Set the value of variable named 'room_state' to 'off' from Solo on CFLink ID [03]
> [F2][03][F3]CVARSET[F4]room_state:off[F5][F5]
// Reply
< [F2][03][F3]RVARSET[F4]room_state:off[F5][F5]

Timezone Lookup Table

  • 01 - UTC-1200
  • 02 - UTC-1100
  • 03 - UTC-1000
  • 04 - UTC-930
  • 05 - UTC-900
  • 06 - UTC-800
  • 07 - UTC-700
  • 08 - UTC-600
  • 09 - UTC-500
  • 10 - UTC-430
  • 11 - UTC-400
  • 12 - UTC-330
  • 13 - UTC-300
  • 14 - UTC-200
  • 15 - UTC-100
  • 16 - UTC-0
  • 17 - UTC+100
  • 18 - UTC+200
  • 19 - UTC+300
  • 20 - UTC+330
  • 21 - UTC+400
  • 22 - UTC+430
  • 23 - UTC+500
  • 24 - UTC+530
  • 25 - UTC+545
  • 26 - UTC+600
  • 27 - UTC+630
  • 28 - UTC+700
  • 29 - UTC+800
  • 30 - UTC+845
  • 31 - UTC+900
  • 32 - UTC+930
  • 33 - UTC+1000
  • 34 - UTC+1030
  • 35 - UTC+1100
  • 36 - UTC+1130
  • 37 - UTC+1200
  • 38 - UTC+1245
  • 39 - UTC+1300
  • 40 - UTC+1400
hardware/cflink/solo-cflink-protocol.txt · Last modified: 2017/09/13 23:20 by jarrod