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 04:49]
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 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 206: 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 217: 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 224: 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 373: 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.1435898973.txt.gz ยท Last modified: 2015/07/03 04:49 by jarrod