How To Create a Custom IR Remote

If your device has an IR blaster, for example Samsung and HTC devices, then you can create a custom remote for controlling TVs, sound systems, or other devices that can be controlled using IR.

1

The latest version of Unified Remote Server comes with some basic custom remote examples, including an example of a custom IR remote. We will use that has a starting point. They are located in:

C:\ProgramData\Unified Remote\Remotes\Bundled\Examples

2

Start by creating a copy of the IR example remote. Copy the "IR" folder and give it a name. For example, let's create a custom IR remote for a "Samsung TV".

3

Open the folder, and you should see three files. The layout file defines how your remote should look, the meta file describes the name/author etc. The remote file contains the IR code for each button.

4

Start by opening the meta file in a text editor. Give it a fitting name, author, and description. You must give it a new name (two remotes can't have the same name). Save and close the file.

5

Next, have a look at the layout file, also in a text editor. Layouts typically include some rows, and each row has one or more buttons. The text field gives it a name, and "ontap" tells the remote which action to run (we'll get to that later). Let's close the file for now.

6

Now open the remote file in a text editor. This file defines what IR code to send for each action. Note how the "ontap" field matches the action names. This is important if you wish to add more buttons and actions.

7

Now for the tricky part. How do we know what IR codes to send? Most devices (TVs, sound systems, etc) use different codes - typically different for each model. One of the best places to find codes is www.remotecentral.com and Google.

For example let's search for "samsung ir hex codes" - ideally you should include a model name/number. The second result looks promising.

8

This looks promising. Notice that the codes have the same format as the ones in the example. That's what we want to look for.

9

Now lets copy the code for "Power" and put it into the remote file for our remote. Let's also rename the command to "power". Don't forget to change it in the layout file as well!

10

Before we add any more buttons, let's make sure we test this one. IR codes are trial and error. Make sure all your files are saved. Then go to the manager and restart the server: http://localhost:9510/web

You may also want to check the log to make sure your remote loaded without any errors: http://localhost:9510/web/#/log

11

Finally, open the remote on your device, and test the button. If it works, great! Go ahead and add more buttons. If not, try and finding better codes. Good luck!

12

If you'd like to use your remote control without being connected to your server, then you need to use the inline action format instead. Basically, you should enter the IR codes in the layout file, instead of the remote file.