OK having successfully got one http request working I now need to integrate an IR command sent to a Global Cache Flex IP2IR unit. I’ve successfully captured the correct IR code and having tested this code, it works. However I cannot work out the format within the Flic Internet Request to successfully send the command. Global Cache have a very useful API document which shows the format the http request needs sent. It must be a POST request and the format is as follows:
IR COMMAND TRANSMISSION
When sending IR commands to a Flex unit via HTTP, an HTTP POST is used to send the JSON packet as shown below.
HTTP/1.1 POST
<Base URL>/irports/<IR port number>/sendir
Header Values:
"crossDomain" must be true if issuing this command from the web page of a different Flex unit
{
“frequency”:“<FrequencyString>”,
“preamble”:“<PreamblePulseTrain>”,
“irCode”:“<IRCodePulseTrain>”,
“repeat”:“<RepeatCount>”
}
Where:
<FrequencyString> is the frequency of the command in hertz (Hz)
<PreamblePulseTrain> is a comma separated list of numeric values signifying the first portion of the IR command that is only fired once. This portion is not repeated when using a repeat count.
<IRCodePulseTrain> is a comma separated list of numeric values signifying the full IR command when not using a preamble. This portion of the code is repeated when using a repeat count.
<RepeatCount> is the number of times that the
<IRCodePulseTrain> is to be repeated after sending the preamble of the command in the case that it is used.
Can anyone help with how to enter this within the Flic app under Internet Request? The IR code I need to send is:
sendir,1:1,1,40506,1,1,343,182,22,22,22,22,22,22,21,22,22,22,22,22,21,22,22,22,22,22,21,22,22,22,22,22,22,67,22,22,21,22,22,22,22,67,22,67,22,22,21,68,21,68,21,22,22,22,22,22,21,22,22,22,22,67,22,22,22,22,21,68,21,68,21,68,21,1945,342,90,22,3892,342,90,22,3893,342,90,21,3893,342,90,21,3893,342,90,22,3892,342,90,22,3893,342,90,21,3893,342,90,22,3892,342,90,22,3892,342,90,22,3893,342,90,21,3893,342,90,22,3892,342,90,22,3893,342,89,22,3893,342,90,21,3893,342,90,22,3892,342,90,22,3893,342,90,21,3893,342,90,21,3893,342,90,22,3892,342,90,22,3893,342,90,21,3893,342,90,22,3892,342,90,22,3892,342,90,22,3893,342,90,21,3893,342,90,22,3892,342,90,22,3893,342,89,22,3893,342,90,21,3893,342,90,22,3892,342,90,22,3893,342,90,21,3893,342,90,21,4050 sendir,1:1,1,40506,1,1,343,182,22,22,22,22,22,22,21,22,22,22,22,22,21,22,22,22,22,22,21,22,22,22,22,22,22,67,22,22,21,22,22,22,22,67,22,67,22,22,21,68,21,68,21,22,22,22,22,22,21,22,22,22,22,67,22,22,22,22,21,68,21,68,21,68,21,1945,342,90,22,3892,342,90,22,3893,342,90,21,3893,342,90,21,3893,342,90,22,3892,342,90,22,3893,342,90,21,3893,342,90,22,3892,342,90,22,3892,342,90,22,3893,342,90,21,3893,342,90,22,3892,342,90,22,3893,342,89,22,3893,342,90,21,3893,342,90,22,3892,342,90,22,3893,342,90,21,3893,342,90,21,3893,342,90,22,3892,342,90,22,3893,342,90,21,3893,342,90,22,3892,342,90,22,3892,342,90,22,3893,342,90,21,3893,342,90,22,3892,342,90,22,3893,342,89,22,3893,342,90,21,3893,342,90,22,3892,342,90,22,3893,342,90,21,3893,342,90,21,4050