OpenRemote 2.0 How To - Samsung TV Remote
The Samsung TV Remote protocol can be used to control Samsung TV's which support the Samsung iOS remote app. Usually these include the "Smart Hub" feature and have an ethernet port.
The TV has to be turned for this to work. Also, when OpenRemote connects for the first time you have to use your TV's remote to grant access for the new "IP remote".
Starting with version 1.0.11, the Samsung TV Remote protocol is not bundled anymore with the Pro Controller distribution but needs to be separately installed. This also affects some aspects of configuration. Please take a look at the specific section below covering these aspects in detail.
OpenRemote controller configuration
For the protocol to work, you have to specify the IP address of your TV in the controller configuration. In the moment you cannot do this via the designer which means you have to edit the file "config.properties" manually.
The file is located within the controller in the folder "webapps/controller/WEB-INF/classes".
You have to change the ip address in this section:
# Samsung TV CONFIGURATION:
# Configuration related to Samsung TV remote control protocol
# IP-Address of the Samsung TV to use
#----------------------------------------- end of Samsung TV ---------
After this is done restart the controller and design your remote.
OpenRemote Online Designer
Now, let's create a remote in OpenRemote Online Designer. The Online Designer already supports the Samsung TV Remote protocol, so all you need is an account to log into it.
Our task will be to create Volume up and down buttons and a mute button.
Create new Device
In "Building Modeler", create new device (New>New Device)
Still in "Building Modeler", select device that was created in step 1 and click on New>New Command
Specify a name and select "Samsung TV Remote" as protocol.
Samsung TV Remote specific settings:
- KeyCode - The keyCode to send to the TV
The following keyCodes are available, but maybe not all work for your TV:
KEY_BLUE(KEY_CYAN), // Proxy for KEY_CYAN
KEY_RSS, // Internet
KEY_INTERNET(KEY_RSS), // Proxy for KEY_RSS
KEY_W_LINK, // Media P
Since we are going to configure a second and third command, click on "Submit and continue". This will store our current settings, but preserver filled-in values. We can then easily update settings without the need to re-enter all the values again.
And the last one.
Since we are not going to add any other command, click on "Submit".
We are done in the Building Modeler and have created all commands.
We don't have any sensors because the protocol is not able to read status information from the TV in the moment. The Samsung TV's itself do provide some feedback which can be read from the device but this is not implemented.
Use commands in UI Designer
Now we switch to the UI Designer and create a panel which will be our remote.
The panel will contain three buttons which are linked to our three commands.
Here you can see the result of our work.
Starting with version 1.0.11, the Samsung TV Remote protocol is not bundled anymore with the Pro Controller distribution but needs to be separately installed (due to the licensing terms associated with some of the code used in this implementation).
The Pro Controller is instead shipped with a "dummy" version of the protocol, that prints a warning message. To restore the full functionality requires you to replace the existing jar with the full implementation, which is done following this procedure:
- download the samsungtv.jar file from here.
- stop the controller
- inside your Controller main folder, go to webapps/controller/WEB-INF/lib
- replace the existing samsungtv.jar with the one you downloaded above
- re-start the controller
The eBox disk image does not contain the Samsung protocol implementation either and also requires the above jar to be installed.
On the eBox, the controller is installed in /opt/OpenRemote-Controller. The procedure is similar to one described above, with the caveat that the file system on which the controller is installed is read-only. You must make it writable before applying the changes, this is done using the 'remountrw' command.
The IP address of the Samsung TV is not configured via the "config.properties" file anymore but directly in the Designer.
In the Designer, in the "Config for Controller" pane, there is now a "samsungtv" section. In that section, there is a "samsungTV.address" property that is used to configure the address.
Do not modify the other property ("protocol.samsungTV.classname").