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.
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\Unified\Examples
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".
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.
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.
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.
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.
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.
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.
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!
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
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!