Simple Java library/API to control a Samsung Smart TV (supports all TVs built before 2014)
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
build.gradle Added constructor with InetAddress. Dec 23, 2015

Samsung TV control

This is a simple Java library/API for controlling a Samsung Smart TV over the network that listens on port 55000. Samsung TVs built in 2014 and later use encryption and can therefore not be controlled by this library! You can check for this using your model number, it is explained on this page.

The protocol information has been gathered from here:

It is not possible to connect to a TV over the network when it is powered off, thus it is not possible to turn on a TV in this manner.


Javadoc location:


The latest build can be found here:


See javadoc, short example:

try {
  InetAddress address = InetAddress.getByName("");
  SamsungRemote remote = new SamsungRemote(address);
  TVReply reply = remote.authenticate("Toaster"); // Argument is the device name (displayed on television).
  if (reply == TVReply.ALLOWED) {
} catch (IOException e) {

You should already know the TV IP address. Then the following steps are needed and can be seen above:

  1. SamsungRemote remote = new SamsungRemote(InetAddress); this opens a socket connection to the TV.
  2. TVReply reply = remote.authenticate("Friendly name"); this sends an authentication message. This will make the TV show a message asking the TV user to allow or deny the connection. The method blocks waiting for the reply. The reply is returned as TVReply and can be one of ALLOWED, DENIED or TIMEOUT.
  3. When the reply is ALLOWED, you can send keycodes: remote.keycode("KEY_INFO"); this method blocks and waits for a TV confirmation to check if it arrived. A list of key codes that can be send can be found here and is also listed in the Keycode enum in this package.
  4. When finished, close the socket connection using remote.close();