Samsung Smart TV Control With Smartthings/Webcore


When editing/creating pistons, if you don’t already have them on, turn on:

Show complex IFs


Show when true/false actions

First: Update Existing Netflix Switch

  • Update switch triggers to only respond to Physical changes
    • Prevents triggering the switch when updating the status in the timer later on.
  • Add support for turning off the switch by calling DELETE on /ws/apps/Netflix/run.
    • You can now turn off Netflix by turning your switch off.
  • Remove auto-off functionality since the status is now also updated by the timer created later.

Seconds: Create New Piston for Polling Status

  • Create a new piston and name it something like “Netflix Switch Status Checker”.
  • Add a Timer to execute every 30 seconds.
    • This is how often we’ll check for status updates.
  • Make a GET request to http://<TV_IP>:8001/ws/apps/Netflix
  • Add an if expression of $response contains ‘running’ is true
  • When 4 is true, do a sanity check if the switch isn’t on, then turn it on. Otherwise do nothing.
    • No need to run a command when we don’t have to.
  • When 4 is false, do a sanity check if the switch isn’t off, then turn it off. Otherwise do nothing.

FYI, the false case for $response contains ‘running’ can be one of two things:

  1. When the response body doesn’t contain the text ‘running’, e.g. when Netflix is off the status will be ‘stopped’.
  2. The the TV is off, the web request will return an empty response.

Let me know if you have any questions.

I built these when others were using the TV and I couldn’t fully test them. Now that the pistons have run for a bit, there is an error where the polling will cause the TV to turn on when it’s off. Will figure out a fix and update this in a bit.

Hey, thanks for your help.

My piston is exactly like yours. The only thing that I added for test purposes was a “chanelUp();” before the URL call to test.
When I added the chanelUp it worked, but the URL call responded with a 408 response.
To clarify I don´t have a Smarthings hub. Just the Classic app.

Thats looking very good. Thanks for the great tutorial. As soon as i find some time i will implement this.

Sould the same trick be possible with a ´pause´ status? I have a movie mode button, and when thats pressed while the netflix app is running play/pause will adjust the lighting. If i can do something with the netflix status like you did with ‘stopped’ it would mean if i press pause on the actual tv remote it will also adjust the lighting.

Sorry for jumping in on a slghtly different issue (feel free to tell me to start another thread), but you guys seem to know a lot about TV control.

Im using the standard ST App to control my TV and I note that I can set the source on the TV when it powers on along with picture mode and sound mode (also ambient mode). Is this something that wasnt possible when this thread started?

My question is that power on sometimes fails with this message in the Log:-

9:23:19 AM: warn throw : returned java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException: Request timed out to of 5000 ms

If this happens then the TV doesnt power on although it may work a few mins later.

Do you guys know anything about this TimeoutException?


Hello, everyone, and thanks very much for these notes. I’ve had good luck adding a launch command for the Samsung TV’s Disney+ app in my universal remote application, Simple Control. I’d like to add launch commands for my TV’s Xfinity Stream Beta and Apple TV apps. Does anyone know those app names and app IDs- or how can I find that information? These apps were not listed in the above links. Thanks!

Hey mate,

My post here may help.

Did anyone find a response ‘Paused’ yet from either the Netflix app or the Samsung tv?

What im trying to do is to change the lights when i press pause on my tv remote. The remote will pause netflix on the tv app. I just cant seem to figure out how to get the ‘Paused’ status as a response with a GET request on either the tv or the app.

When in webcore there is also $status and Playbackstatus on the tv. Also cant make it work that way.

Interested in controlling the TV via webcore … @Sovenger any insight?

@IceBear, what part of the TV are you looking to control with WebCore?

My usual FYI… webcore is most likely heading into it’s sunset. So anyone should be aware that using it will be short term at this point.

With the newer Samsung TVs you can set automations to change source and other things in ST