This shows you the differences between two versions of the page.
hardware:cflink:solo-cflink-protocol [2015/07/02 01:41] jarrod created |
hardware:cflink:solo-cflink-protocol [2017/09/13 23:20] (current) jarrod |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Solo CFLink Protocol ====== | ====== Solo CFLink Protocol ====== | ||
- | The following documentation is for the Solo device CFLink protocol messages.\\ | + | The following documentation is for the [[hardware:solo|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. | Note that the Solo does NOT feature an on-board CFLink port, but it still uses the same protocol for communication over Ethernet. | ||
- | The Solo also has on-board RS232 port(s), for which documentation is available in the [[on-board-rs232-port-protocol|On-Board RS232 docs]]. | + | 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-module|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-port-protocol|On-Board RS232 docs]]. | ||
===== Queries ===== | ===== Queries ===== | ||
Line 22: | Line 30: | ||
=== Reply === | === Reply === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | < [F2]<ID>[F3]RSOLWHO[F4]CFSOLO:<SERIAL#>:<APP_VER>:<CFLINK_VER>:<IP4>:<MAC>[F5][F5] | + | < [F2]<ID>[F3]RSOLWHO[F4]CFSOLO:<SERIAL#>:<APP_VER>:<CFLINK_VER>:<IP4>:<MAC>:<DEVICE_NAME>,M1:<CARD_1>,M2:<CARD_2>[F5][F5] |
</sxh> | </sxh> | ||
+ | |||
+ | * **<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 === | === Example === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // Request the details for the device at CFLink ID [02] | + | // Request the details for the device at CFLink ID [03] |
- | > [F2][02][F3]TCFXWHO[F4][F5][F5] | + | > [F2][03][F3]QCFXWHO[F4][F5][F5] |
- | // The Reply if a LAN Bridge is found | + | // The Reply if a Solo is found, with no cards inserted, and the default device name |
- | < [F2][02][F3]RLANWHO[F4]LANBridge:00000012:1.0.1:1.0.4:192.168.0.100:00.04.A3.19.D5.70[F5][F5] | + | < [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] |
</sxh> | </sxh> | ||
==== CFG - Query Configuration ==== | ==== CFG - Query Configuration ==== | ||
- | The ''CFG'' query is used to obtain details about the configuration of a specific LAN Bridge unit. | + | The ''CFG'' query is used to obtain details about the configuration of a specific Solo unit. |
=== Data === | === Data === | ||
Line 41: | Line 54: | ||
The ''CFG'' query does not have any associated data. | The ''CFG'' query does not have any associated data. | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | > [F2]<ID>[F3]QLANCFG[F4][F5][F5] | + | > [F2]<ID>[F3]QSOLCFG[F4][F5][F5] |
</sxh> | </sxh> | ||
=== Reply === | === Reply === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | < [F2]<ID>[F3]RLANCFG[F4]<IPADDRESS>:<SUBNETMASK>:<GATEWAY>:<DNS>:<DHCPMODE>:<RS232MODE>:<BAUD>:<DATABITS>:<PARITY>:<STOPBITS>:<FLOWCONTROL>:<UDPBROADCAST>:<SLOTS>[F5][F5] | + | < [F2]<ID>[F3]RSOLCFG[F4]<IPADDRESS>:<SUBNETMASK>:<GATEWAY>:<DNS>:<DHCP>:<UDPBROADCAST>:<CONNECTIONS>[F5][F5] |
</sxh> | </sxh> | ||
- | * **<IPADDRESS>** = The IPv4 address the LAN Bridge is currently assigned. | + | * **<IPADDRESS>** = The IPv4 address the Solo is currently assigned. |
- | * **<SUBNETMASK>** = The IPv4 subnet mask the LAN Bridge is currently assigned. | + | * **<SUBNETMASK>** = The IPv4 subnet mask the Solo is currently assigned. |
- | * **<GATEWAY>** = The IPv4 gateway the LAN Bridge is currently assigned. | + | * **<GATEWAY>** = The IPv4 gateway the Solo is currently assigned. |
- | * **<DNS>** = The IPv4 DNS the LAN Bridge is currently assigned. | + | * **<DNS>** = The IPv4 DNS the Solo is currently assigned. |
* **<DHCPMODE>** = DHCP mode disabled or enabled (''0'' or ''1''). | * **<DHCPMODE>** = DHCP mode disabled or enabled (''0'' or ''1''). | ||
- | * **<RS232MODE>** = The mode of the RS232 port (''PGM'' or ''232''). | + | * **<UDPBROADCAST>** = UDP Broadcasting on port 10207 disabled or enabled (''0'' or ''1''). |
- | * **<BAUD>** = The baud rate of the RS232 port: | + | * **<CONNECTIONS>** = The number of connections currently active to the TCP Server on port 10207. |
- | * 100 | + | |
- | * 300 | + | |
- | * 600 | + | |
- | * 1200 | + | |
- | * 2400 | + | |
- | * 4800 | + | |
- | * 9600 | + | |
- | * 14400 | + | |
- | * 19200 | + | |
- | * 38400 | + | |
- | * 57600 | + | |
- | * 115200 | + | |
- | * 128000 | + | |
- | * 256000 | + | |
- | * **<DATABITS>** = The data bits of the RS232 port, always 8. | + | |
- | * **<PARITY>** = The parity of the RS232 port (single char): | + | |
- | * ''N'' None | + | |
- | * ''O'' Odd | + | |
- | * ''E'' Even | + | |
- | * **<STOPBITS>** = The stop bits of the RS232 port (''1'' or ''2''). | + | |
- | * **<FLOWCONTROL>** = The flow control of the RS232 port (''0'' = None, ''1'' = RTS/CTS). | + | |
- | * **<UDPBROADCAST>** = UDP Broadcast communication for CFLink protocol on port 10207 disabled or enabled (''0'' or ''1''). | + | |
- | * **<SLOTS>** = The number of communication slots enabled | + | |
=== Example === | === Example === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // Query configuration of LAN Bridge on ID [02] | + | // Query configuration of Solo on ID [03] |
- | > [F2][02][F3]QLANCFG[F4][F5][F5] | + | > [F2][03][F3]QSOLCFG[F4][F5][F5] |
// Configuration query reply | // Configuration query reply | ||
- | < [F2][02][F3]RLANCFG[F4]192.168.0.100:255.255.255.0:192.168.0.1:PGM:115200:8:N:1:1:1:3[F5][F5] | + | < [F2][03][F3]RSOLCFG[F4]192.168.0.100:255.255.255.0:192.168.0.1:1:1[F5][F5] |
</sxh> | </sxh> | ||
- | ==== SLT - Query Slot Configuration ==== | + | ==== NAM - Port Names ==== |
- | The SLT query returns the configuration of a specific communication slot. | + | 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 === | === 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. | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | > [F2]<ID>[F3]QLANSLT[F4]<SLOT#>[F5][F5] | + | > [F2]<ID>[F3]Q<TARGET>NAM[F4][F5][F5] |
</sxh> | </sxh> | ||
- | |||
- | * **<SLOT#>** = The communication slot number to request configuration from | ||
=== Reply === | === Reply === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // If the slot is configured for TCP communications: | + | < [F2]<ID>[F3]R<TARGET>NAM[F4]<PORT>:<NAME>|<PORT>:<NAME>|<PORT>:<NAME>|<PORT>:<NAME>[F5][F5] |
- | < [F2]<ID>[F3]RLANSLT[F4]<SLOT#>:TCP:<TCPMODE>:<IPADDRESS>:<PORT>:<TIMEOUT>:<MAXCONNECTIONS>:<ECHO>[F5][F5] | + | |
- | // If the slot is configured for UDP communications: | + | |
- | < [F2]<ID>[F3]RLANSLT[F4]<SLOT#>:UDP:<UDPMODE>:<IPADDRESS>:<PORT>[F5][F5] | + | |
</sxh> | </sxh> | ||
- | * **<SLOT#>** = The communication slot number being described. | + | * **<TARGET>** = The type of port that was queried. |
- | * **<TCPMODE>** = Server ''S'' or client ''C''. | + | * Pair of data for each targeted port: |
- | * **<UDPMODE>** = Unicast ''U'', Multicast ''M'', Broadcast ''B''. | + | * **<PORT>** = The port number, in the format ''P##'', eg. ''P01'', ''P02'', etc. |
- | * **<IPADDRESS>** = The IP Address assigned to the slot: | + | * **<NAME>** = The friendly name given to the port. |
- | * TCP Server = The IP Address to allow connections from (''0.0.0.0'' to allow connections from any IP Address) | + | |
- | * TCP Client = The IP Address of the TCP Server to connect to | + | |
- | * UDP Unicast = The IP Address to send data to | + | |
- | * UDP Multicast = The IP Address of the multicast group to subscribe to | + | |
- | * UDP Broadcast = The IP Address to broadcast data to (''255.255.255.255'' to send to all IP Addresses) | + | |
- | * **<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. | + | |
- | * **<MAXCONNECTIONS>** = The maximum number of connections a TCP Server slot can handle at once. ''0'' = Unlimited connections. Ignored for TCP Client slots. | + | |
- | * **<ECHO>** = Option to echo data received on a TCP Server slot from any TCP Client to all other connected clients. Ignored for TCP Client slots. (''0'' or ''1'') | + | |
=== Example === | === Example === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // Query the configuration for slot 12 of LAN Bridge on ID [02] | + | // Request the names for the IR ports in the Solo at CFLink ID [03] |
- | > [F2][02][F3]QLANSLT[F4]12[F5][F5] | + | > [F2][03][F3]QIRXNAM[F4][F5][F5] |
- | // Reply when slot configured as a TCP Server | + | // The reply, with the default names for each port |
- | < [F2][02][F3]RLANSLT[F4]12:TCP:11:S:0.0.0.0:9602:0:10:1[F5][F5] | + | < [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] |
- | // Query the configuration for slot 13 of LAN Bridge on ID [02] | + | // Request the names for the dry contact ports in the Solo at CFLink ID [03] |
- | > [F2][02][F3]QLANSLT[F4]13[F5][F5] | + | > [F2][03][F3]QSOLNAM[F4][F5][F5] |
- | // Reply when slot configured for UDP Unicast | + | // The reply, with the default names for each port |
- | < [F2][02][F3]RLANSLT[F4]13:UDP:U:192.168.0.100:9601[F5][F5] | + | < [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] | ||
</sxh> | </sxh> | ||
- | ==== SLS - Query Slot Startup Command Configuration ==== | + | ==== SLT - Query Slot Configuration ==== |
- | + | The Solo features 5 communication slots that can be used to connect to third party networked devices.\\ | |
- | The ''SLS'' query returns the configuration of a specific communication slot's startup command. | + | 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 === | === Data === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | > [F2]<ID>[F3]QLANSLS[F4]<SLOT#>[F5][F5] | + | > [F2]<ID>[F3]QSOLSLT[F4]<SLOT#>[F5][F5] |
</sxh> | </sxh> | ||
- | * **<SLOT#>** = The communication slot number to request startup command configuration from | + | * **<SLOT#>** = The communication slot number to request configuration from. Omit this to return configuration of all slots. |
=== Reply === | === Reply === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // If the slot has a startup command assigned: | + | < [F2]<ID>[F3]RSOLSLT[F4]<SLOT#>:<MODE>:<IPADDRESS>:<PORT>:<TIMEOUT>:<RECONNECT>:<MAX_BRIDGE_SOCKETS>:<NUM_BRIDGE_CONNECTIONS>:<CONNECTED>:<STARTUP_MACRO>[F5][F5] |
- | < [F2]<ID>[F3]RLANSLS[F4]<SLOT#>:<DELAY>:<COMMAND>[F5][F5] | + | |
- | // If the slot has no startup command | + | |
- | < [F2]<ID>[F3]RLANSLT[F4]<SLOT#>:0:[F5][F5] | + | |
</sxh> | </sxh> | ||
* **<SLOT#>** = The communication slot number being described. | * **<SLOT#>** = The communication slot number being described. | ||
- | * **<DELAY>** = The time (in 100ms resolution) to delay before sending the command data after each connection. eg. ''10'' = 1 second. | + | * **<MODE>** = Disabled (default behaviour) ''OFF'', TCP Client ''TCP'', UDP Bi-directional ''UDP'', UDP Transmit Only ''UDPT''. |
- | * **<COMMAND>** = The command data to send on startup. | + | * **<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 === | === Example === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // Query the startup configuration for slot 12 of LAN Bridge on ID [02] | + | // Query the configuration for slot 1 of Solo on ID [03] |
- | > [F2][02][F3]QLANSLS[F4]12[F5][F5] | + | > [F2][03][F3]QSOLSLT[F4]1[F5][F5] |
- | // Reply when the data 'Startup Command Data <Carriage Return>' is to be sent after a 1 second delay. | + | // Reply when slot configured as a TCP Client |
- | < [F2][02][F3]RLANSLS[F4]12:10:Startup Command Data\x0D[F5][F5] | + | < [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 13 of LAN Bridge on ID [02] | + | // Query the configuration for slot 2 of Solo on ID [03] |
- | > [F2][02][F3]QLANSLS[F4]13[F5][F5] | + | > [F2][03][F3]QSOLSLT[F4]2[F5][F5] |
- | // Reply when no startup command is defined | + | // Reply when slot configured for UDP Bi-directional |
- | < [F2][02][F3]RLANSLS[F4]13:0:[F5][F5] | + | < [F2][03][F3]RSOLSLT[F4]12:UDP:255.255.255.255:49155:0:0:0:0:1[F5][F5] |
</sxh> | </sxh> | ||
- | ==== SUB - Query Slot Subscription Configuration ==== | ||
- | The SUB query returns the configuration of a specific slot subscription. | ||
- | |||
- | === Data === | ||
- | |||
- | Each communication slot (Slot A) can be subscribed to another slot (Slot B). Only one subscription per slot is allowed.\\ | ||
- | So to retrieve the subscription details, you need to provide the slot number for the Slot A parameter. | ||
- | <sxh cflink; light: true> | ||
- | > [F2]<ID>[F3]QLANSUB[F4]<SLOT#>[F5][F5] | ||
- | </sxh> | ||
- | |||
- | * **<SLOT#>** = The communication slot number of the subscription 'Slot A' parameter. | ||
- | |||
- | === Reply === | ||
- | <sxh cflink; light: true> | ||
- | < [F2]<ID>[F3]RLANSUB[F4]<SLOTA>:<SLOTB>:<CFLINKID>:<MODULE>:<TXCOMMANDNAME>:<RXCOMMANDNAME>[F5][F5] | ||
- | </sxh> | ||
- | |||
- | * **<SLOTA>** = The communication slot number that will transfer data to/from **<SLOTB>** (''2'' or ''11''-''20''). See [[hardware:cflink:lanbridge-cflink-protocol?&#sub-configure-slot-subscription|SUB Configuration Command]] for more details | ||
- | * **<SLOTB>** = The communication slot number that will transfer data to/from **<SLOTA>** (''1'', ''2'' or ''11''-''20'') | ||
- | * **<CFLINKID>** = If **<SLOTB>** is configured to slot 1 (CFLink), the CFLink ID is the device on the CFLink network to forward data to/from. This allows you to subscribe a communication slot to a single device on the network. (used only when **<SLOTB>** is configured to CFLink Slot ''1''). | ||
- | * **<MODULE>** = If **<CFLINKID>** is configured to subscribe to a modular device (such as MOD4), then you can optionally specify which module slot to subscribe to. ''0'' means not subscribed to a module. (optional) | ||
- | * **<TXCOMMANDNAME>** = The 7 char command to use when wrapping the incoming data from **<SLOTA>** before sending it out via **<SLOTB>** as valid CFLink protocol. Optional, only used when **<SLOTB>** is configured to CFLink Slot 0. If **<TXCOMMANDNAME>** is left empty, then all data received on **<SLOTA>** will be sent out **<SLOTB>** without any manipulation, and must be valid CFLink protocol. | ||
- | * **<RXCOMMANDNAME>** = The 7 char command to strip data from when received from **<SLOTB>** before sending it out via **<SLOTA>**. Optional, only used when **<SLOTB>** is configured to CFLink Slot ''1''. If **<RXCOMMANDNAME>** is left empty, then all data received on **<SLOTB>** will be sent out **<SLOTA>** in it's full CFLink protocol format. | ||
- | |||
- | === Example === | ||
- | <sxh cflink; light: true> | ||
- | // Query subscription config for slot 12 of a LAN Bridge on CFLink ID [02] | ||
- | > [F2][02][F3]QLANSUB[F4]12[F5][F5] | ||
- | // Slot 12 is subscribed to CFLink Slot 0, to CFLink ID [03], Module 1. | ||
- | // All incoming data from slot 12 will be wrapped into a CFLink protocol message for setting relay states. | ||
- | // All outgoing data to slot 12 will be stripped from a relay state reply | ||
- | < [F2][02][F3]RLANSUB[F4]12:0:03:M1:TRLYSET:RRLYSTA[F5][F5] | ||
- | |||
- | // Query subscription config for slot 13 of a LAN Bridge on CFLink ID [02] | ||
- | > [F2][02][F3]QLANSUB[F4]13[F5][F5] | ||
- | // Slot 13 is subscribed to Slot 14 (possibly a TCP Client slot subscribed to a TCP Server) | ||
- | < [F2][02][F3]RLANSUB[F4]13:14[F5][F5] | ||
- | </sxh> | ||
==== TME - Real Time Clock status ==== | ==== TME - Real Time Clock status ==== | ||
- | The ''TME'' query will return the current configuration of the real time clock on-board the LAN Bridge. | + | The ''TME'' query will return the current configuration of the real time clock on-board the Solo. |
=== Data === | === Data === | ||
Line 219: | Line 177: | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | > [F2]<ID>[F3]QLANTME[F4][F5][F5] | + | > [F2]<ID>[F3]QSOLTME[F4][F5][F5] |
</sxh> | </sxh> | ||
=== Reply === | === Reply === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | < [F2]<ID>[F3]RLANTME[F4]<YEAR>:<MONTH>:<DATE>:<DAYOFWEEK>:<HOUR>:<MINUTE>:<SECOND>:<UTCTIMEZONE>:<UTCTIMEZONESTR>:<NTP_SYNC>:<NTP_SERVER_ID>[F5][F5] | + | < [F2]<ID>[F3]RSOLTME[F4]<YEAR>:<MONTH>:<DATE>:<DAYOFWEEK>:<HOUR>:<MINUTE>:<SECOND>:<UTCTIMEZONE>:<UTCTIMEZONESTR>:<NTP_SYNC>:<NTP_SERVER_ID>[F5][F5] |
</sxh> | </sxh> | ||
Line 250: | Line 208: | ||
=== Example === | === Example === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // Query time from LAN Bridge on CFLink ID [02] | + | // Query time from Solo on CFLink ID [03] |
- | > [F2][02][F3]QLANTME[F4][F5][F5] | + | > [F2][03][F3]QSOLTME[F4][F5][F5] |
// Reply | // Reply | ||
- | < [F2][02][F3]RLANTME[F4]2011:10:27:3:18:12:12:29:UTC+8.00:1:4[F5][F5] | + | < [F2][03][F3]RSOLTME[F4]2015:05:27:3:18:12:12:29:UTC+8.00:1:4[F5][F5] |
</sxh> | </sxh> | ||
- | ===== Configuration Messages ===== | + | ==== VARLST - Query Variable List ==== |
- | ==== IP4 - IPv4 Address ==== | + | 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. | ||
- | The ''IP4'' command will configure the IPv4 address used by the LAN Bridge if DHCP is disabled. It will be ignored if DHCP is enabled.\\ | + | === Data === |
- | The change will not take effect until the LAN Bridge is rebooted. | + | |
- | === Data === | + | The ''VARLST'' query does not have any associated data. |
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | > [F2]<ID>[F3]CLANIP4[F4]<IPADDRESS>[F5][F5] | + | > [F2]<ID>[F3]QVARLST[F4][F5][F5] |
</sxh> | </sxh> | ||
- | * **<IPADDRESS>** = The IPv4 Address to assign to the LAN Bridge | ||
=== Reply === | === Reply === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // The reply is just an echo of the command in reply format. | + | < [F2]<ID>[F3]RVARLST[F4]<VAR_NAME_1>:<VAR_NAME_2>:<VAR_NAME_3>[F5][F5] |
- | // The change does not take effect until the LAN Bridge is rebooted, so the reply will not contain any data. | + | |
- | < [F2]<ID>[F3]RLANIP4[F4][F5][F5] | + | |
</sxh> | </sxh> | ||
+ | |||
+ | * **<VAR_NAME (0-50)>** = The name of each variable stored on the device. Only variables that have previously been defined will be returned. | ||
=== Example === | === Example === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // Configure IP Address of LAN Bridge on CFLink ID [02] | + | // Query list of variables from Solo on CFLink ID [03] |
- | > [F2][02][F3]CLANIP4[F4]192.168.0.100[F5][F5] | + | > [F2][03][F3]QVARLST[F4][F5][F5] |
// Reply | // Reply | ||
- | < [F2][02][F3]RLANIP4[F4][F5][F5] | + | < [F2][03][F3]RVARLST[F4]variable1:variable2:someName[F5][F5] |
</sxh> | </sxh> | ||
- | ==== SNM - Subnet Mask ==== | + | ==== VARGET - Get Variable Value ==== |
- | The ''SNM'' (Subnet Mask) command will configure the subnet mask used by the LAN Bridge if DHCP is disabled. It will be ignored if DHCP is enabled.\\ | + | Query the current value of a variable stored on the device. |
- | The change will not take effect until the LAN Bridge is rebooted. | + | |
=== Data === | === Data === | ||
- | <sxh cflink; light: true> | ||
- | > [F2]<ID>[F3]CLANSNM[F4]<SUBNETMASK>[F5][F5] | ||
- | </sxh> | ||
- | * **<SUBNETMASK>** = The IPv4 Subnet Mask to assign to the LAN Bridge | ||
- | |||
- | === Reply === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // The reply is just an echo of the command in reply format. | + | > [F2]<ID>[F3]QVARGET[F4]<VAR_NAME>[F5][F5] |
- | // The change does not take effect until the LAN Bridge is rebooted, so the reply will not contain any data. | + | |
- | < [F2]<ID>[F3]RLANSNM[F4][F5][F5] | + | |
</sxh> | </sxh> | ||
- | + | * **<VAR_NAME>** = The name of the variable to retrieve the value of. | |
- | === Example === | + | |
- | <sxh cflink; light: true> | + | |
- | // Configure Subnet Mask of LAN Bridge on CFLink ID [02] | + | |
- | > [F2][02][F3]CLANSNM[F4]255.255.255.0[F5][F5] | + | |
- | // Reply | + | |
- | < [F2][02][F3]RLANSNM[F4][F5][F5] | + | |
- | </sxh> | + | |
- | + | ||
- | ==== GTW - Default Gateway ==== | + | |
- | + | ||
- | The ''GTW'' (Gateway) command will configure the default gateway used by the LAN Bridge if DHCP is disabled. It will be ignored if DHCP is enabled.\\ | + | |
- | The change will not take effect until the LAN Bridge is rebooted. | + | |
- | + | ||
- | === Data === | + | |
- | <sxh cflink; light: true> | + | |
- | > [F2]<ID>[F3]CLANGTW[F4]<GATEWAY>[F5][F5] | + | |
- | </sxh> | + | |
- | + | ||
- | * **<GATEWAY>** = The IPv4 Gateway to assign to the LAN Bridge | + | |
=== Reply === | === Reply === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // The reply is just an echo of the command in reply format. | + | < [F2]<ID>[F3]RVARGET[F4]<VAR_NAME>:<VALUE>[F5][F5] |
- | // The change does not take effect until the LAN Bridge is rebooted, so the reply will not contain any data. | + | |
- | < [F2]<ID>[F3]RLANGTW[F4][F5][F5] | + | |
</sxh> | </sxh> | ||
- | === Example === | + | * **<VAR_NAME>** = The name of the variable that is being returned. |
- | <sxh cflink; light: true> | + | * **<VALUE>** = The value of the variable |
- | // Configure Default Gateway of LAN Bridge on CFLink ID [02] | + | |
- | > [F2][02][F3]CLANGTW[F4]192.168.0.1[F5][F5] | + | |
- | // Reply | + | |
- | < [F2][02][F3]RLANGTW[F4][F5][F5] | + | |
- | </sxh> | + | |
- | + | ||
- | ==== DNS - Domain Name System Server ==== | + | |
- | + | ||
- | The ''DNS'' (Domain Name System) command will configure the DNS Server used by the LAN Bridge if DHCP is disabled. It will be ignored if DHCP is enabled.\\ | + | |
- | The change will not take effect until the LAN Bridge is rebooted. | + | |
- | + | ||
- | === Data === | + | |
- | <sxh cflink; light: true> | + | |
- | > [F2]<ID>[F3]CLANDNS[F4]<DNS>[F5][F5] | + | |
- | </sxh> | + | |
- | + | ||
- | * **<DNS>** = The IPv4 DNS Server Address to assign to the LAN Bridge | + | |
- | + | ||
- | === Reply === | + | |
- | <sxh cflink; light: true> | + | |
- | // The reply is just an echo of the command in reply format. | + | |
- | // The change does not take effect until the LAN Bridge is rebooted, so the reply will not contain any data. | + | |
- | < [F2]<ID>[F3]RLANDNS[F4][F5][F5] | + | |
- | </sxh> | + | |
=== Example === | === Example === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // Configure DNS of LAN Bridge on CFLink ID [02] | + | // Query value of variable named 'room_state' from Solo on CFLink ID [03] |
- | > [F2][02][F3]CLANDNS[F4]192.168.0.1[F5][F5] | + | > [F2][03][F3]QVARGET[F4]room_state[F5][F5] |
// Reply | // Reply | ||
- | < [F2][02][F3]RLANDNS[F4][F5][F5] | + | < [F2][03][F3]RVARGET[F4]room_state:on[F5][F5] |
</sxh> | </sxh> | ||
- | ==== DHC - DHCP Mode ==== | + | ===== Configuration Messages ===== |
- | The DHC (DHCP) command will configure the DHCP mode of the LAN Bridge.\\ | + | ==== CFG - Network Configuration ==== |
- | The change will not take affect until the LAN Bridge is rebooted. | + | |
- | DHCP Mode is enabled by default.\\ | + | The ''CFG'' command will configure the network settings used by the Solo.\\ |
+ | The changes will not take effect until the Solo is rebooted. | ||
=== Data === | === Data === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | > [F2]<ID>[F3]CLANDHC[F4]<DHCP>[F5][F5] | + | > [F2]<ID>[F3]CSOLCFG[F4]<IPADDRESS>:<SUBNETMASK>:<GATEWAY>:<DNS>:<DHCP>:<UDPBROADCAST>[F5][F5] |
</sxh> | </sxh> | ||
- | + | * **<IPADDRESS>** = The IPv4 Address to assign to the Solo. It will be ignored if DHCP is enabled. | |
- | * **<DHC>** = DHCP mode enable/disable (''1'' or ''0''). | + | * **<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 === | === Reply === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // The reply is just an echo of the command in reply format. | + | // The reply is an echo of the command in reply format, with no data. |
- | // The change does not take affect until the LAN Bridge is rebooted, so the reply will not contain any data. | + | < [F2]<ID>[F3]RSOLCFG[F4][F5][F5] |
- | < [F2]<ID>[F3]RLANDHC[F4][F5][F5] | + | |
</sxh> | </sxh> | ||
=== Example === | === Example === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // Disable DHCP mode of LAN Bridge on CFLink ID [02] | + | // Configure network settings of Solo on CFLink ID [03] |
- | > [F2][02][F3]CLANDHC[F4]0[F5][F5] | + | > [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 | // Reply | ||
- | < [F2][02][F3]RLANDHC[F4][F5][F5] | + | < [F2][03][F3]RSOLCFG[F4]0[F5][F5] |
- | </sxh> | + | |
- | + | ||
- | ==== UDB - UDP Broadcasting Configuration ==== | + | |
- | + | ||
- | The ''UDB'' (UDP Broadcast) command is used to enable/disable broadcasting of UDP Data from CFLink.\\ | + | |
- | The change will take affect immediately. | + | |
- | \\ | + | |
- | UDP Broadcasting is enabled by default. | + | |
- | + | ||
- | === Data === | + | |
- | <sxh cflink; light: true> | + | |
- | > [F2]<ID>[F3]CLANUDB[F4]<UDBMODE>[F5][F5] | + | |
- | </sxh> | + | |
- | * **<UDBMODE>** = UDP Broadcasting mode enable/disable (''1'' or ''0''). | + | |
- | + | ||
- | === Reply === | + | |
- | <sxh cflink; light: true> | + | |
- | // The reply is an echo of the command in reply format. | + | |
- | < [F2]<ID>[F3]RLANUDB[F4]<UDBMODE>[F5][F5] | + | |
- | </sxh> | + | |
- | + | ||
- | === Example === | + | |
- | <sxh cflink; light: true> | + | |
- | // Disable UDB mode of LAN Bridge on CFLink ID [02] | + | |
- | > [F2][02][F3]CLANUDB[F4]0[F5][F5] | + | |
- | // Reply | + | |
- | < [F2][02][F3]RLANUDB[F4]0[F5][F5] | + | |
</sxh> | </sxh> | ||
==== SLT - Configure TCP Slot ==== | ==== SLT - Configure TCP Slot ==== | ||
- | The ''SLT'' (Slot TCP) command is used to configure a communication slot for TCP communication.\\ | + | The ''SLT'' (Slot) command is used to configure a communication slot on the Solo.\\ |
- | The change will not take effect until the LAN Bridge is rebooted. | + | The change will not take effect until the Solo is rebooted. |
=== Data === | === Data === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | > [F2]<ID>[F3]CLANSLT[F4]<SLOT#>:<TCPMODE>:<IPADDRESS>:<PORT>:<TIMEOUT>:<MAXCONNECTIONS>:<ECHO>[F5][F5] | + | > [F2]<ID>[F3]CSOLSLT[F4]<SLOT#>:<MODE>:<IPADDRESS>:<PORT>:<TIMEOUT>:<RECONNECT>:<MAX_BRIDGE_SOCKETS>:<STARTUP_MACRO>[F5][F5] |
</sxh> | </sxh> | ||
- | * **<SLOT#>** = The slot number to configure for TCP communication. | + | * **<SLOT#>** = The communication slot number to configure. |
- | * **<TCPMODE>** = ''S'' for TCP Server, ''C'' for TCP Client. | + | * **<MODE>** = Disabled (default behaviour) ''OFF'', TCP Client ''TCP'', UDP Bi-directional ''UDP'', UDP Transmit Only ''UDPT''. |
- | * **<IPADDRESS>** = The IPv4 Address to assign to the slot: | + | * **<IPADDRESS>** = The IP Address to assign the slot: |
- | * TCP Server = The IP Address to allow connections from (''0.0.0.0'' to allow connections from any IP Address) | + | |
* TCP Client = The IP Address of the TCP Server to connect to | * TCP Client = The IP Address of the TCP Server to connect to | ||
- | * **<PORT>** = The port number to assign to the slot (same rules apply as **<IPADDRESS>** above) | + | * 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). |
- | * **<TIMEOUT>** = The time in seconds to hold a TCP connection open for without any data transmissions. ''0'' = Disable timeout. Valid range ''0''-''4294967295'' seconds. | + | * UDP Transmit Only = The IP Address to send data to. Incoming packets are ignored. |
- | * **<MAXCONNECTIONS>** = The maximum number of connections a TCP Server slot can handle at once. ''0'' = Unlimited connections. Ignored for TCP Client slots. Valid range ''0''-''25''. | + | * **<PORT>** = The port number to assign the slot (same rules apply as **<IPADDRESS>** above) |
- | * **<ECHO>** = Option to echo data received on a TCP Server slot from any TCP Client to all other connected clients. Ignored for TCP Client slots. (''0'' or ''1'') | + | * **<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 === | === Reply === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
// The reply is an echo of the command in reply format. | // The reply is an echo of the command in reply format. | ||
- | // The change does not take effect until the LAN Bridge is rebooted, so the reply will not contain any data. | + | // The change does not take effect until the Solo is rebooted, so the reply will not contain any data. |
- | < [F2]<ID>[F3]RLANSLT[F4][F5][F5] | + | < [F2]<ID>[F3]RSOLSLT[F4][F5][F5] |
</sxh> | </sxh> | ||
=== Example === | === Example === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // Configure slot 11 to be a TCP Server, on LAN Bridge ID [02] | + | // 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][02][F3]CLANSLT[F4]11:S:0.0.0.0:9601:0:10:1[F5][F5] | + | > [F2][03][F3]CSOLSLT[F4]1:TCP:192.168.0.10:23:0:10:5[F5][F5] |
// Reply | // Reply | ||
- | < [F2][02][F3]RLANSLT[F4][F5][F5] | + | < [F2][03][F3]RSOLSLT[F4]1[F5][F5] |
</sxh> | </sxh> | ||
- | ==== SLU - Configure UDP Slot ==== | + | ==== TME - Configure Real Time Clock ==== |
- | The ''SLU'' (Slot UDP) command is used to configure a communication slot for UDP communication.\\ | + | The TME command is used to set the time and date settings for the real time clock on-board the Solo. |
- | The change will not take effect until the LAN Bridge is rebooted. | + | |
=== Data === | === Data === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | > [F2]<ID>[F3]CLANSLU[F4]<SLOT#>:<UDPMODE>:<IPADDRESS>:<PORT>[F5][F5] | + | > [F2]<ID>[F3]CSOLTME[F4]<YEAR>:<MONTH>:<DATE>:<DAYOFWEEK>:<HOUR>:<MINUTE>:<SECOND>:<UTCTIMEZONE>:<NTP_SYNC>:<NTP_SERVER_ID>[F5][F5] |
</sxh> | </sxh> | ||
- | * **<SLOT#>** = The slot number to configure for TCP communication. | + | * **<YEAR>** = 4 digit year. |
- | * <**UDPMODE>** = ''U'' for Unicast, ''M'' for Multicast, ''B'' for Broadcast. | + | * **<MONTH>** = 2 digit month (''01''-''12''). |
- | * <IPADDRESS> = The IPv4 Address to assign to the slot: | + | * **<DATE>** = 2 digit day (''01''-''31''). |
- | * UDP Unicast = The IP Address to send data to | + | * **<DAYOFWEEK>** = 1 digit day of week. Sunday = ''1'', Saturday = ''7'' (''1''-''7'') |
- | * UDP Multicast = The IP Address of the multicast group to subscribe to | + | * **<HOUR>** = 2 digit hour, in 24 hour military format (''00''-''23'') |
- | * UDP Broadcast = The IP Address to broadcast data to ''(255.255.255.255'' to send to all IP Addresses) | + | * **<MINUTE>** = 2 digit minute (''00''-''59'') |
- | * **<PORT>** = The port number to assign to the slot (same rules apply as **<IPADDRESS>** above) | + | * **<SECOND>** = 2 digit second (''00''-''59'') |
+ | * **<UTCTIMEZONE>** = ID from [[#timezone-lookup-table|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. | ||
- | === Reply === | + | Available time server IDs: |
- | <sxh cflink; light: true> | + | * ''1'' = pool.ntp.org |
- | // The reply is an echo of the command in reply format. | + | * ''2'' = europe.pool.ntp.org |
- | // The change does not take affect until the LAN Bridge is rebooted, so the reply will not contain any data. | + | * ''3'' = asia.pool.ntp.org |
- | < [F2]<ID>[F3]RLANSLU[F4][F5][F5] | + | * ''4'' = oceania.pool.ntp.org |
- | </sxh> | + | * ''5'' = north-america.pool.ntp.org |
- | + | * ''6'' = south-america.pool.ntp.org | |
- | === Example === | + | * ''7'' = africa.pool.ntp.org |
- | <sxh cflink; light: true> | + | |
- | // Configure slot 12 to be UDP Unicast, on LAN Bridge ID [02] | + | |
- | > [F2][02][F3]CLANSLT[F4]12:U:192.168.0.101:9602[F5][F5] | + | |
- | // Reply | + | |
- | < [F2][02][F3]RLANSLU[F4][F5][F5] | + | |
- | </sxh> | + | |
- | + | ||
- | ==== SLO - Disable Communication Slot ==== | + | |
- | + | ||
- | The ''SLO'' (Slot Off) command is used to disable a specific communication slot.\\ | + | |
- | The change will not take affect until the LAN Bridge is rebooted. | + | |
- | + | ||
- | === Data === | + | |
- | <sxh cflink; light: true> | + | |
- | > [F2]<ID>[F3]CLANSLO[F4]<SLOT#>[F5][F5] | + | |
- | </sxh> | + | |
- | + | ||
- | * **<SLOT#>** = The slot number to disable. | + | |
=== Reply === | === Reply === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // The reply is an echo of the command in reply format. | + | // Reply with the data used to configure the time/date. |
- | // The change does not take affect until the LAN Bridge is rebooted, so the reply will not contain any data. | + | < [F2]<ID>[F3]RSOLTME[F4]<YEAR>:<MONTH>:<DATE>:<DAYOFWEEK>:<HOUR>:<MINUTE>:<SECOND>:<UTCTIMEZONE>:<UTCTIMEZONESTR>:<NTP_SYNC>:<NTP_SERVER_ID>[F5][F5] |
- | < [F2]<ID>[F3]RLANSLO[F4][F5][F5] | + | |
</sxh> | </sxh> | ||
=== Example === | === Example === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // Disable slot 13 on LAN Bridge ID [02] | + | // Configure the real time clock on a Solo ID [03] |
- | > [F2][02][F3]CLANSLO[F4]13[F5][F5] | + | > [F2][03][F3]CSOLTME[F4]2015:05:27:3:18:12:12:29:1:4[F5][F5] |
// Reply | // Reply | ||
- | < [F2][02][F3]RLANSLO[F4][F5][F5] | + | < [F2][03][F3]RSOLTME[F4]2015:05:27:3:18:12:12:29:UTC+8.00:1:4[F5][F5] |
</sxh> | </sxh> | ||
- | ==== SLS - Configure Slot Startup Command ==== | + | === Error === |
- | The ''SLS'' (Slot Startup) command is used to configure a communication slot startup command for TCP communication slots.\\ | + | * 100 = Invalid UTC Timezone |
- | The startup command is sent whenever a client connects (if TCP Server mode) or whenever the slot connects to a server (if TCP Client mode), with an adjustable delay.\\ | + | * 100 = Invalid Date |
- | The startup command has no effect on UDP slots.\\ | + | * 100 = Invalid Time |
- | The change will not take effect until the LAN Bridge is rebooted. | + | |
- | === Data === | + | ==== SPC - Serial Port Configuration ==== |
- | <sxh cflink; light: true> | + | |
- | > [F2]<ID>[F3]CLANSLS[F4]<SLOT#>:<DELAY>:<COMMAND>[F5][F5] | + | |
- | </sxh> | + | |
- | * **<SLOT#>** = The slot number to configure the startup command for. Startup commands valid for slots ''11'' to ''20'' only. | + | The SPC command is used to configure the RS232 settings for the on-board serial ports.\\ |
- | * **<DELAY>** = The time (in 100ms resolution) to delay before the startup command is sent after each connection. eg. ''10'' = 1 second. Max allowed delay value is ''9999999'' (999999.9 seconds) | + | For the 2 on-board bi-directional RS232 ports, follow the protocol documentation for [[hardware:cflink:on-board-rs232-port-protocol|on-board serial ports]]. |
- | * **<COMMAND>** = The command data to send on startup. Maximum of 100 bytes is allowed for the startup command data. | + | |
- | === Reply === | + | === 1-way IR/RS232 Ports === |
- | <sxh cflink; light: true> | + | 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''.\\ |
- | // The reply is an echo of the command in reply format. | + | |
- | // The change does not take effect until the LAN Bridge is rebooted, so the reply will not contain any data. | + | |
- | < [F2]<ID>[F3]RLANSLS[F4][F5][F5] | + | |
- | </sxh> | + | |
=== Example === | === Example === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // Configure slot 11 on LAN Bridge ID [02] to send a startup command 'Hello World <Carriage Return>' after a 1.5 second delay. | + | // 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][02][F3]CLANSLS[F4]11:15:Hello World\x0D[F5][F5] | + | > [F2][03][F3]CIRXSPC[F4]P01:232:9600:8:N:1:0[F5][F5] |
- | // Reply | + | // Reply contains settings for all 1-way RS232 configurations for each IR port |
- | < [F2][02][F3]RLANSLS[F4][F5][F5] | + | < [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] |
</sxh> | </sxh> | ||
- | === Error === | + | ===== Transmission Messages ===== |
- | * 134 = Invalid startup command settings. | + | ==== SND - Send Data ==== |
- | * 135 = Invalid startup command delay format or value (0 to 9999999 only). | + | |
- | * 136 = Invalid command data length. Max data length is 100 bytes. | + | |
- | * 137 = Invalid slot number. Startup command only valid for slots 11-20. | + | |
- | ==== SLD - Delete Slot Startup Command ==== | + | |
- | The ''SLD'' (Slot Startup Delete) command is used to remove the startup command for a specific communication slot.\\ | + | The ''SND'' (Send) command allows you to send data to a specific communication slot defined on the Solo.\\ |
- | The change will not take effect until the LAN Bridge is rebooted. | + | |
=== Data === | === Data === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | > [F2]<ID>[F3]CLANSLD[F4]<SLOT#>[F5][F5] | + | > [F2]<ID>[F3]TSOLSND[F4]<SLOT#>:<DATA>[F5][F5] |
</sxh> | </sxh> | ||
- | * **<SLOT#>** = The slot number to remove the startup command from. | + | * **<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 === | === Reply === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // The reply is an echo of the command in reply format. | + | // In an effort to reduce network traffic, the reply will not contain the <DATA> sent, only the slot it was sent to. |
- | // The change does not take effect until the LAN Bridge is rebooted, so the reply will not contain any data. | + | < [F2]<ID>[F3]RSOLSND[F4]<SLOT#>[F5][F5] |
- | < [F2]<ID>[F3]RLANSLD[F4][F5][F5] | + | |
</sxh> | </sxh> | ||
=== Example === | === Example === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // Remove the startup command from slot 11 on LAN Bridge ID [02]. | + | // Send a command to an ethernet device connected to slot 1, for Solo on CFLink ID [03] |
- | > [F2][02][F3]CLANSLD[F4]11[F5][F5] | + | > [F2][03][F3]TSOLSND[F4]1:Hello World!\x0D[F5][F5] |
// Reply | // Reply | ||
- | < [F2][02][F3]RLANSLD[F4][F5][F5] | + | < [F2][03][F3]RSOLSND[F4]1[F5][F5] |
</sxh> | </sxh> | ||
=== Error === | === Error === | ||
- | * 137 = Invalid slot number. | + | * 100 = Invalid Slot Number |
- | ==== SUB - Configure Slot Subscription ==== | + | ==== HTP - Send HTTP Request ==== |
- | The ''SUB'' (Subscription) command is used to configure a slot subscription. A subscription is a way to send/receive data between two communication slots on the LAN Bridge automatically.\\ | + | 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.\\ |
- | \\ | + | |
- | When subscribing to the CFLink slot, a subscription can be refined to communicate only with a device at a specific CFLink ID and optionally which module.\\ | + | |
- | \\ | + | |
- | When subscribing to the CFLink slot, a subscription can also handle automatically manipulating the incoming data to wrap it in CFLink protocol formatting, and stripping the CFLink formatting before sending the outgoing data.\\ | + | |
- | \\ | + | |
- | This allows TCP/UDP communication slots to send basic commands like ''P01:0|P02:0'' and have it automatically wrapped into a CFLink command targeted at a specific device and module to open relays in this example. | + | |
- | And the same in reverse, taking CFLink protocol message and only sending the data segment.\\ | + | |
- | \\ | + | |
- | See the [[hardware:cflink:lanbridge-cflink-protocol#common-definitions|Common Definitions]] for a list of available communication slots. | + | |
=== Data === | === Data === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | > [F2]<ID>[F3]CLANSUB[F4]<SLOTA>:<SLOTB>:<CFLINKID>:<MODULE>:<TXCOMMANDNAME>:<RXCOMMANDNAME>[F5][F5] | + | > [F2]<ID>[F3]TSOLHTP[F4]<URL>|<METHOD>|<HEADERS>|<BODY>[F5][F5] |
</sxh> | </sxh> | ||
- | * **<SLOTA>** = The communication slot number that will transfer data to/from **<SLOTB>** (''2'' or ''11''-''20''). | + | * **<URL>** = The URL to send the HTTP Request to. If no port is defined, then port 80 is assumed. Required! |
- | * **<SLOTB>** = The communication slot number that will transfer data to/from **<SLOTA>** (''0'',''1'', ''2'' or ''11''-''20''). ''0'' = Turn off subscription for **<SLOTA>**. | + | * **<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. |
- | * **<CFLINKID>** = If **<SLOTB>** is configured to slot ''1'' (CFLink), the CFLink ID is the device on the CFLink network to forward data to/from. This allows you to subscribe a communication slot to a single device on the network. (used only when **<SLOTB>** is configured to CFLink Slot ''1''). | + | * **<HEADERS>** = A series of key=value pairs, separated by colons. eg: id=10:action=play. Optional. |
- | * **<MODULE>** = If **<CFLINKID>** is configured to subscribe to a modular device (such as MOD4), then you can optionally specify which module slot to subscribe to. ''0'' means not subscribed to a module. (optional) | + | * **<BODY>** = Any data to send as the body of the HTTP request. Optional. |
- | * **<TXCOMMANDNAME>** = The 7 char command to use when wrapping the incoming data from **<SLOTA>** before sending it out via **<SLOTB>** as valid CFLink protocol. Optional, only used when **<SLOTB>** is configured to CFLink Slot ''1''. If **<TXCOMMANDNAME>** is left empty, then all data received on **<SLOTA>** will be sent out **<SLOTB>** without any manipulation, and must be valid CFLink protocol. | + | |
- | * **<RXCOMMANDNAME>** = The 7 char command to strip data from when received from **<SLOTB>** before sending it out via **<SLOTA>**. Optional, only used when **<SLOTB>** is configured to CFLink Slot ''1''. If **<RXCOMMANDNAME>** is left empty, then all data received on **<SLOTB>** will be sent out **<SLOTA>** in it's full CFLink protocol format. | + | |
=== Reply === | === Reply === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // The reply is an echo of the command in reply format. | + | // Any replies to the HTTP request will be reported via CFLink formatted command: |
- | // The change does not take affect until the LAN Bridge is rebooted, so the reply will not contain any data. | + | < [F2]<ID>[F3]RSOLHTP[F4]<URL>|<STATUS>|<HEADERS>|<BODY>[F5][F5] |
- | < [F2]<ID>[F3]RLANSUB[F4][F5][F5] | + | |
</sxh> | </sxh> | ||
+ | |||
+ | * **<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 === | === Example === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // Subscribe slot 12 to CFLink Slot 1, CFLink ID [02], Module 1, with relay commands for manipulating incoming/outgoing data | + | // Send HTTP POST request to a local device on the network (without any header data) |
- | > [F2][02][F3]CLANSUB[F4]12:1:02:M1:TRLYSET:RRLYSTA[F5][F5] | + | > [F2][03][F3]TSOLHTP[F4]http://192.168.0.100/device/1|POST||id=10&action=on[F5][F5] |
// Reply | // Reply | ||
- | < [F2][02][F3]RLANSUB[F4][F5][F5] | + | < [F2][03][F3]RSOLHTP[F4]http://192.168.0.100/device/1|200||id=10&status=on[F5][F5] |
</sxh> | </sxh> | ||
- | === Error === | + | ==== RUN - Run Macro ==== |
- | + | ||
- | * 100 = Invalid Subscription | + | |
- | + | ||
- | ==== 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 LAN Bridge. | + | The ''RUN'' command allows you to trigger a macro defined on the Solo to instantly run.\\ |
=== Data === | === Data === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | > [F2]<ID>[F3]CLANTME[F4]<YEAR>:<MONTH>:<DATE>:<DAYOFWEEK>:<HOUR>:<MINUTE>:<SECOND>:<UTCTIMEZONE>:<NTP_SYNC>:<NTP_SERVER_ID>[F5][F5] | + | > [F2]<ID>[F3]TSOLRUN[F4]<MACRO_NAME>[F5][F5] |
</sxh> | </sxh> | ||
- | * **<YEAR>** = 4 digit year. | + | * **<MACRO_NAME>** = The name of the macro to trigger. The macro must already be defined and saved within the Solo configuration. |
- | * **<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|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 === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // Reply with the data used to configure the time/date. | + | < [F2]<ID>[F3]RSOLRUN[F4]<MACRO_NAME>[F5][F5] |
- | < [F2]<ID>[F3]RLANTME[F4]<YEAR>:<MONTH>:<DATE>:<DAYOFWEEK>:<HOUR>:<MINUTE>:<SECOND>:<UTCTIMEZONE>:<UTCTIMEZONESTR>:<NTP_SYNC>:<NTP_SERVER_ID>[F5][F5] | + | |
</sxh> | </sxh> | ||
=== Example === | === Example === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // Configure the real time clock on a LAN Bridge ID [02] | + | // Trigger a macro called 'Good Night' to run |
- | > [F2][02][F3]CLANTME[F4]2011:12:27:3:18:12:12:29:1:4[F5][F5] | + | > [F2][03][F3]TSOLRUN[F4]Good Night[F5][F5] |
// Reply | // Reply | ||
- | < [F2][02][F3]RLANTME[F4]2011:12:27:3:18:12:12:29:UTC+8.00:1:4[F5][F5] | + | < [F2][03][F3]RSOLRUN[F4]Good Night[F5][F5] |
</sxh> | </sxh> | ||
- | === Error === | + | ==== VARSET - Set Variable Value ==== |
- | * 100 = Invalid UTC Timezone | + | 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. |
- | * 100 = Invalid Date | + | |
- | * 100 = Invalid Time | + | |
- | ===== Transmission Messages ===== | + | === Data === |
- | ==== SND - Send Data ==== | ||
- | |||
- | The ''SND'' (Send) command allows you to send data to a specific communication slot defined on the LAN Bridge.\\ | ||
- | Any other communication slots subscribed to the slot targeted by the ''SND'' command will also receive the data.\\ | ||
- | This command is not to be used to send data to the RS232 slot (Slot 1), instead use the [[on-board-rs232-port-protocol|''SPW'' Command]] common to all devices with an on-board RS232 port.\\ | ||
- | |||
- | === Data === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | > [F2]<ID>[F3]TLANSND[F4]<SLOT#>:<DATA>[F5][F5] | + | > [F2]<ID>[F3]CVARSET[F4]<VAR_NAME>:<VALUE>[F5][F5] |
</sxh> | </sxh> | ||
- | + | * **<VAR_NAME>** = The name of the variable to set the value of. Must be 10 characters or less. Cannot contain colons '':''. | |
- | * **<SLOT#>** = The communication slot number to send data to. Known as the 'target slot'. | + | * **<VALUE>** = The value to assign to the variable. Must be 20 characters or less. |
- | * **<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 === | === Reply === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // In an effort to reduce network traffic on the CFLink bus, the reply will not contain the <DATA> sent, only the slot it was sent to. | + | < [F2]<ID>[F3]RVARSET[F4]<VAR_NAME>:<VALUE>[F5][F5] |
- | < [F2]<ID>[F3]RLANSND[F4]<SLOT#>[F5][F5] | + | |
</sxh> | </sxh> | ||
+ | |||
+ | * **<VAR_NAME>** = The name of the variable being assigned a new value. | ||
+ | * **<VALUE>** = The value of the variable that was just assigned. | ||
=== Example === | === Example === | ||
<sxh cflink; light: true> | <sxh cflink; light: true> | ||
- | // Send a command to an ethernet device connected to slot 11, for LAN Bridge on CFLink ID [02] | + | // Set the value of variable named 'room_state' to 'off' from Solo on CFLink ID [03] |
- | > [F2][02][F3]TLANSND[F4]11:Hello World!\x0D[F5][F5] | + | > [F2][03][F3]CVARSET[F4]room_state:off[F5][F5] |
// Reply | // Reply | ||
- | < [F2][02][F3]RLANSND[F4]11[F5][F5] | + | < [F2][03][F3]RVARSET[F4]room_state:off[F5][F5] |
</sxh> | </sxh> | ||
- | |||
- | === Error === | ||
- | |||
- | * 100 = Invalid Slot Number | ||
====== Timezone Lookup Table ====== | ====== Timezone Lookup Table ====== |