CommandFusion Wiki

Documentation Resources

User Tools

Site Tools


hardware:cflink:solo-cflink-protocol

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

hardware:cflink:solo-cflink-protocol [2015/07/03 03:08]
jarrod
hardware:cflink:solo-cflink-protocol [2017/09/13 23:20] (current)
jarrod
Line 3: Line 3:
 The following documentation is for the [[hardware:​solo|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.
 +
 +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]].\\ The Solo has IR ports, for which documentation is available in the [[ir-module|IR Port docs]].\\
Line 36: Line 41:
 <sxh cflink; light: true> <sxh cflink; light: true>
 // Request the details for the device at CFLink ID [03] // Request the details for the device at CFLink ID [03]
-> [F2][03][F3]TCFXWHO[F4][F5][F5]+> [F2][03][F3]QCFXWHO[F4][F5][F5]
 // The Reply if a Solo is found, with no cards inserted, and the default device name // 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] < [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]
Line 54: Line 59:
 === Reply === === Reply ===
 <sxh cflink; light: true> <sxh cflink; light: true>
-< [F2]<​ID>​[F3]RSOLCFG[F4]<​IPADDRESS>:<​SUBNETMASK>:<​GATEWAY>:<​DNS>:<​DHCPMODE>:<​CONNECTIONS>​[F5][F5]+< [F2]<​ID>​[F3]RSOLCFG[F4]<​IPADDRESS>:<​SUBNETMASK>:<​GATEWAY>:<​DNS>:<​DHCP>:<​UDPBROADCAST>:<​CONNECTIONS>​[F5][F5]
 </​sxh>​ </​sxh>​
  
Line 62: Line 67:
   * **<​DNS>​** = The IPv4 DNS the Solo 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''​).
 +  * **<​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.   * **<​CONNECTIONS>​** = The number of connections currently active to the TCP Server on port 10207.
  
Line 70: Line 76:
 // Configuration query reply // Configuration query reply
 < [F2][03][F3]RSOLCFG[F4]192.168.0.100:​255.255.255.0:​192.168.0.1:​1:​1[F5][F5] < [F2][03][F3]RSOLCFG[F4]192.168.0.100:​255.255.255.0:​192.168.0.1:​1:​1[F5][F5]
 +</​sxh>​
 +
 +==== 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.
 +<sxh cflink; light: true>
 +> [F2]<​ID>​[F3]Q<​TARGET>​NAM[F4][F5][F5]
 +</​sxh>​
 +
 +=== Reply ===
 +<sxh cflink; light: true>
 +< [F2]<​ID>​[F3]R<​TARGET>​NAM[F4]<​PORT>:<​NAME>​|<​PORT>:<​NAME>​|<​PORT>:<​NAME>​|<​PORT>:<​NAME>​[F5][F5]
 +</​sxh>​
 +
 +  * **<​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 ===
 +<sxh cflink; light: true>
 +// 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]
 </​sxh>​ </​sxh>​
  
Line 162: Line 212:
 // Reply // Reply
 < [F2][03][F3]RSOLTME[F4]2015:​05:​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>​
 +
 +==== 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.
 +<sxh cflink; light: true>
 +> [F2]<​ID>​[F3]QVARLST[F4][F5][F5]
 +</​sxh>​
 +
 +=== Reply ===
 +<sxh cflink; light: true>
 +< [F2]<​ID>​[F3]RVARLST[F4]<​VAR_NAME_1>:<​VAR_NAME_2>:<​VAR_NAME_3>​[F5][F5]
 +</​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 ===
 +<sxh cflink; light: true>
 +// 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]
 +</​sxh>​
 +
 +==== VARGET - Get Variable Value ====
 +
 +Query the current value of a variable stored on the device.
 +
 +=== Data ===
 +
 +<sxh cflink; light: true>
 +> [F2]<​ID>​[F3]QVARGET[F4]<​VAR_NAME>​[F5][F5]
 +</​sxh>​
 +  * **<​VAR_NAME>​** = The name of the variable to retrieve the value of.
 +
 +=== Reply ===
 +<sxh cflink; light: true>
 +< [F2]<​ID>​[F3]RVARGET[F4]<​VAR_NAME>:<​VALUE>​[F5][F5]
 +</​sxh>​
 +
 +  * **<​VAR_NAME>​** = The name of the variable that is being returned.
 +  * **<​VALUE>​** = The value of the variable
 +
 +=== Example ===
 +<sxh cflink; light: true>
 +// 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]
 </​sxh>​ </​sxh>​
  
Line 173: Line 277:
 === Data === === Data ===
 <sxh cflink; light: true> <sxh cflink; light: true>
-> [F2]<​ID>​[F3]CSOLCFG[F4]<​IPADDRESS>:<​SUBNETMASK>:<​GATEWAY>:<​DNS>:<​DHCP>:<​UDP_BROADCAST_MODE>​[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.   * **<​IPADDRESS>​** = The IPv4 Address to assign to the Solo. It will be ignored if DHCP is enabled.
Line 180: Line 284:
   * **<​DNS>​** = The IPv4 DNS Server Address to assign to the Solo.   * **<​DNS>​** = The IPv4 DNS Server Address to assign to the Solo.
   * **<​DHCP>​** = DHCP mode enable/​disable (''​1''​ or ''​0''​).   * **<​DHCP>​** = DHCP mode enable/​disable (''​1''​ or ''​0''​).
-  * **<UDP_BROADCAST_MODE>** = UDP Broadcasting ​mode enable/​disable (''​1''​ or ''​0''​).+  * **<UDPBROADCAST>** = UDP Broadcasting ​via port 10207 enable/​disable (''​1''​ or ''​0''​).
  
 === Reply === === Reply ===
Line 329: Line 433:
  
   * 100 = Invalid Slot Number   * 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 ===
 +<sxh cflink; light: true>
 +> [F2]<​ID>​[F3]TSOLHTP[F4]<​URL>​|<​METHOD>​|<​HEADERS>​|<​BODY>​[F5][F5]
 +</​sxh>​
 +
 +  * **<​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 ===
 +<sxh cflink; light: true>
 +// Any replies to the HTTP request will be reported via CFLink formatted command:
 +< [F2]<​ID>​[F3]RSOLHTP[F4]<​URL>​|<​STATUS>​|<​HEADERS>​|<​BODY>​[F5][F5]
 +</​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 ===
 +<sxh cflink; light: true>
 +// 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]
 +</​sxh>​
 +
 +==== RUN - Run Macro ====
 +
 +The ''​RUN''​ command allows you to trigger a macro defined on the Solo to instantly run.\\
 +
 +=== Data ===
 +<sxh cflink; light: true>
 +> [F2]<​ID>​[F3]TSOLRUN[F4]<​MACRO_NAME>​[F5][F5]
 +</​sxh>​
 +
 +  * **<​MACRO_NAME>​** = The name of the macro to trigger. The macro must already be defined and saved within the Solo configuration.
 +
 +=== Reply ===
 +<sxh cflink; light: true>
 +< [F2]<​ID>​[F3]RSOLRUN[F4]<​MACRO_NAME>​[F5][F5]
 +</​sxh>​
 +
 +=== Example ===
 +<sxh cflink; light: true>
 +// 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]
 +</​sxh>​
 +
 +==== 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 ===
 +
 +<sxh cflink; light: true>
 +> [F2]<​ID>​[F3]CVARSET[F4]<​VAR_NAME>:<​VALUE>​[F5][F5]
 +</​sxh>​
 +  * **<​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 ===
 +<sxh cflink; light: true>
 +< [F2]<​ID>​[F3]RVARSET[F4]<​VAR_NAME>:<​VALUE>​[F5][F5]
 +</​sxh>​
 +
 +  * **<​VAR_NAME>​** = The name of the variable being assigned a new value.
 +  * **<​VALUE>​** = The value of the variable that was just assigned.
 +
 +=== Example ===
 +<sxh cflink; light: true>
 +// 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]
 +</​sxh>​
  
 ====== Timezone Lookup Table ====== ====== Timezone Lookup Table ======
hardware/cflink/solo-cflink-protocol.txt ยท Last modified: 2017/09/13 23:20 by jarrod