Infrared (IR)

The Centro-8M is capable of both and Sending and Receiving IR. This can be done with either LIRC IR Remote files, or by sending Pronto Raw (CCF) IR codes.

Note: If using DemoPad Designer, please refer to the Sending IR Commands for more information. The details on this page are mainly for use with 3rd party control systems.

Centro-8M IR ports

Sending Infrared

LIRC IR Remote Files

While as mentioned above, the Centro-8M can be used with any Pronto Raw IR Code, LIRC remote config files can be used. There's an LIRC remote database here.

Uploading LIRC IR Remote Files

To upload LIRC files, simply browse to the IP of the Centro-8M or http://centro8m.local and click on the LIRC IR Remote Files tab.

You'll then see the page shown below:

LIRC IR Remote Page

Simply choose the LIRC file and click Upload File.

Note: If using DemoPad Designer the LIRC files used in the project will automatically get uploaded to the Centro-8M, so this process isn't required.

Via TCP Connection

You can send IR commands using a standard TCP connection to the Centro-8M on port 8765. An example command is as follows:

SET_TRANSMITTERS 1 2 3\x0ASEND_ONCE LG_42H3000\x0A

Note: The above command will be emitted from ports 1, 2 and 3. By changing the SET_TRANSMITTERS portion of the command, you can change the ports that it'll be emitted from e.g.:

SET_TRANSMITTERS 1 3\x0ASEND_ONCE LG_42H3000\x0A

will be emitted from ports 1 and 3 only.

Via Centro-8M Web Interface

Once you have uploaded LIRC files to the Centro-8M, the Remote, and all commands within will be displayed on the LIRC page, just below where you upload the files. Clicking send on a given command will emit it from all 3 of the IR ports.

Via Centro-8M Web API

You can also emit infrared by sending a POST command to the /api/infrared/port/:portno API endpoint with the type set to lirc. An example is as follows:

POST /api/infrared/port/1 HTTP/1.1
Authorization: Basic YWRtaW46cGFzc3dvcmQ=
Content-Type: application/json; charset=utf-8
Host: centro8m.local
Connection: close
Content-Length: 45

{"type":"lirc","command":"SKY KEY_CHANNELUP"}

If the command was successful, you'll receive a response as shown below:

{"status":"command sent"}

Note: The Authorization header is required - this is the same username and password as set using the Centro-8M Web UI. For more information please refer to this article.

Pronto Raw (CCF) codes

The Centro-8M is also capable of sending Pronto Raw (CCF) IR codes.

Via TCP Connection

You can send Pronto Raw IR commands using a standard TCP connection to the Centro-8M on port 8765. An example command is as follows:

SET_TRANSMITTERS 1 2 3\x0ASEND_ONCE_CCF 0 0000 006C 0022 0002 015B 00AD 0016 0016 0016 0041 0016 0016 0016 0041 0016 0041 0016 0041 0016 0041 0016 0016 0016 0041 0016 0016 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0016 0016 0041 0016 0016 0016 0041 0016 0041 0016 0016 0016 0016 0016 0016 0016 0041 0016 0016 0016 0041 0016 0016 0016 0016 0016 0041 0016 0041 0016 0041 0016 0699 015B 0057 0016 0EA3\x0A

Note: The 0 after SEND_ONCE_CCF is the repeat count. By changing this to 1 the command would be repeated once.

e.g.:

SET_TRANSMITTERS 1 2 3\x0ASEND_ONCE_CCF 1 0000 006C 0022 0002 015B 00AD ... 0016 0EA3

Note: The above command will be emitted from ports 1, 2 and 3. By changing the SET_TRANSMITTERS portion of the command, you can change the ports that it'll be emitted from e.g.:

SET_TRANSMITTERS 1 3\x0Ax0ASEND_ONCE_CCF 1 0000 006C 0022 0002 015B 00AD ... 0016 0EA3

will be emitted from ports 1 and 3 only.

Via Centro-8M API

You can also emit infrared by sending a POST command to the /api/infrared/port/:portno API endpoint with the type set to raw. An example is as follows:

POST /api/infrared/port/1 HTTP/1.1
Authorization: Basic YWRtaW46cGFzc3dvcmQ=
Content-Type: application/json; charset=utf-8
Host: 192.168.1.59
Connection: close
User-Agent: Paw/3.0.11 (Macintosh; OS X/10.11.6) GCDHTTPRequest
Content-Length: 406

{"type":"raw","command":"0000 006C 0022 0002 015B 00AD 0016 0016 0016 0041 0016 0016 0016 0041 0016 0041 0016 0041 0016 0041 0016 0016 0016 0041 0016 0016 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0016 0016 0041 0016 0016 0016 0041 0016 0041 0016 0016 0016 0016 0016 0016 0016 0041 0016 0016 0016 0041 0016 0016 0016 0016 0016 0041 0016 0041 0016 0041 0016 0699 015B 0057 0016 0EA3"}

If the command was successful, you'll receive a response as shown below:

{"status":"command sent"}

Note: The Authorization header is required - this is the same username and password as set using the Centro-8M Web UI. For more information please refer to this article.