Samsung Smart TV smart home integration, free and open source

Control your Samsung Smart TVs (Tizen) over the local network: power, volume, mute and input source.
Overview
Control your Samsung televisions (Tizen, 2016 models onwards) from Gladys, entirely over the local network: no Samsung account, nothing going through the cloud.
What the integration exposes
| Feature | Detail |
|---|---|
| Power | Turns the TV off, and wakes it up with Wake-on-LAN |
| Volume | A 0 to 100 % slider, showing the level actually read back from the TV |
| Volume up / down | One volume step, like the remote |
| Mute | Set or cleared, never toggled blindly |
| Source | TV, HDMI, and the installed apps when the TV reports them |
Sources and applications
TV and HDMI are always offered: they are remote-control keys, present on every model.
The list of installed applications is requested from the TV during the scan, but several recent models (2021 and later) ignore that request. When that happens only TV and HDMI show up — that is expected behaviour, not a failure. Run a new scan after installing an app: if your model answers, it will be added.
Prerequisites
- Gladys 4.86 or later.
- A Samsung Smart TV running Tizen, 2016 model or later.
- The TV connected to the same local network as Gladys: Gladys finds it with a network scan and turns it on with a Wake-on-LAN packet. No Samsung account is needed.
- The TV remote, to accept the authorization prompt the first time Gladys sends a command.
- To turn the TV on from Gladys: the wake-on-network option enabled on the TV (see "Turning the TV back on").
Configuration
-
Turn your television on, then open the Discovery tab and run a scan. It shows up under its own name ("Samsung AU7025 55 TV", for instance). Create it.
A TV in standby shuts its network interface down: it answers nothing and no scan can find it. A scan that comes back empty is almost always a television that is off — switch it on and scan again.
-
Run a first command, Volume up for example. The TV then displays an authorization prompt for "Gladys": accept it with the remote. This happens only once, the token is kept afterwards.
If the TV asks nothing and commands keep failing, check that Settings → General → External Device Manager → Device Connection Manager still allows new devices.
Turning the TV back on
A TV that is off answers nothing on the network: the only way in is Wake-on-LAN, a packet Gladys emits towards its MAC address. This requires the wake-on-network option to be enabled on the TV, under Settings → General → Network → Expert settings → Power On with Mobile (the wording varies across models).
Over Wi-Fi this wake-up depends on the model and is not guaranteed by every television. If turning on does not work while the option is enabled, an Ethernet link makes it reliable. Turning off always works.
To find out where you stand, turn the TV off, then run ping <TV IP address> from any machine on the network:
- the TV still answers: its network interface stays alive in standby, and Wake-on-LAN has every chance of working;
- the TV answers nothing at all: it shut its network interface down, no packet can reach it any more and the wake-up will fail. That is the symptom of a disabled wake-on-network option — enable it, then run the test again.
Refresh
The integration reads the power state, the volume and the mute state back from every TV at the Refresh interval chosen in the integration settings (every 30 seconds by default, every 10 seconds at the quickest). A change made with the remote, or a TV woken up by Wake-on-LAN, shows up in Gladys within that interval.
How it works
Three channels, each for what it does best:
- the TV REST API (port 8001) reports the power state, read on every refresh;
- UPnP RenderingControl (port 9197) reads and writes the volume level and the mute state, with no token involved;
- the remote-control WebSocket (port 8002) carries key presses, the only part needing the authorization.
The pairing token is kept in the integration's /data volume: it survives restarts and container updates.
Troubleshooting
The integration logs are available in Gladys, from the Configuration tab of the integration, alongside the supervision controls (start, stop, restart…).
The scan finds no TV: the TV is almost always in standby (see "Configuration"). Turn it on,
wait a few seconds, then scan again. The integration logs then read
No Samsung TV found. A television in standby is invisible on the network: turn it on, then run the scan again.
If the TV is on, check that it is on the same local network as Gladys.
"Test the connection" answers "No answer from …: the TV is off or unreachable.": the TV is off, or no longer answers at the address it had when you created it. Turn it on and test again; if it still does not answer, see the next point.
The TV changed IP address: a TV whose address was reassigned by your router stops answering at
the old one. If another Samsung TV took that address, the logs read
A different device (…) now answers at …, not …: rescan to pick up the new address of this TV.
Turn the TV on and run a new scan from the Discovery tab: the TV you created picks up its new
address. Reserving its IP address in your router avoids the problem.
A command fails with Authorization was not granted on the TV at … within 30 s: the
authorization prompt was not accepted in time. Send the command again and accept the prompt with
the remote.
A command fails with The TV at … refused the connection (authorization denied): the prompt
was refused on the TV. Check the Device Connection Manager settings described in "Configuration",
then send a command again.
A command fails with The TV at … did not answer or Connection to … failed: …: the TV is
off, or Gladys cannot reach its remote-control channel (port 8002, see "How it works").
The TV does not turn on: check the wake-on-network option and run the ping test described in
"Turning the TV back on". If the command fails with
This TV reported no MAC address: Wake-on-LAN is impossible, turn the TV on with the remote and
run a new scan: its MAC address is read again.
Volume and mute are not updated while the TV is on: the logs read
Could not read the volume of …: …. The TV did not answer on its UPnP channel (port 9197, see
"How it works"); check that nothing between Gladys and the TV filters that port.
Only TV and HDMI in the sources: expected on several recent models, see "Sources and applications".
The connection status reads "Initialization failed, check the integration logs.": the
integration could not finish starting up after connecting to Gladys. The logs give the reason
(Post-connection initialization failed). Restart the integration from its Configuration tab.
Configuration settings
These are the settings Samsung Smart TV asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Finding your TV | section | No | Turn the television ON before running a scan from the Discovery tab. A TV in standby cuts its network interface off: it answers nothing, and no scan can find it. If the scan comes back empty, switch the TV on, wait a few seconds, and scan again. |
| Before you start | section | No | Two settings on the TV itself matter. The first time Gladys sends a command, the TV asks you to authorize it: accept on screen, this happens only once. To turn the TV back ON, Gladys sends a Wake-on-LAN packet, which requires the wake-on-network option to be enabled on the TV (Settings > General > Network > Expert settings). |
| Refresh interval | select | No | How often the power state, volume and mute are read back from the TV. |
How to install Samsung Smart TV in Gladys
- In Gladys, open Integrations: Samsung Smart TV appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/cicoub13/gladys-samsung-tv:1.1.2), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration). - Open the Configuration screen of the integration, fill in the settings, and save.
- You can also install it directly from its repository URL: https://github.com/cicoub13/gladys-samsung-tv.
Samsung Smart TV requires Gladys >=4.86.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.
Not running Gladys yet? It is free and open source: follow the installation guide to get started.
About external integrations
Samsung Smart TV is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by cicoub13, not by the Gladys core team.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub — source of this documentation