This shows you the differences between two versions of the page.
hardware:cflink:solo-cflink-protocol [2015/10/15 12:53] jarrod |
hardware:cflink:solo-cflink-protocol [2017/09/13 23:20] (current) jarrod |
||
---|---|---|---|
Line 239: | Line 239: | ||
// Reply | // Reply | ||
< [F2][03][F3]RVARLST[F4]variable1:variable2:someName[F5][F5] | < [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 438: | Line 465: | ||
// Reply | // Reply | ||
< [F2][03][F3]RSOLHTP[F4]http://192.168.0.100/device/1|200||id=10&status=on[F5][F5] | < [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> | </sxh> | ||