This may be related to the timeout value I’ve got set. The samsung_tv component looks like it’s making periodic calls to ensure my TV is active but this timeout got triggered when I was trying to turn off the TV and I had to wait for the connection to reset.
There’s also a 15 second timer that gets activated during shutdown which prevents you from pressing any other buttons. This should be fine but I was unable to turn my TV off for a few minutes.
2018-05-20 23:35:23 INFO (Thread-12) [homeassistant.components.media_player.samsungtv] TV is powering off, not sending command: KEY_EXIT
…
2018-05-20 23:38:47 INFO (Thread-2) [homeassistant.components.media_player.samsungtv] TV is powering off, not sending command: KEY_EXIT
In the end, it probably all comes down to the weird behaviour I’m seeing with my TV where I sometimes lose the first input. I’ll spend some time experimenting with samsungctl to see what I can find.
This is great however, I’ve just added the Mac address and it doesn’t seem to be working. Is there anything else I need to do? It turns off and I can control volume etc it just doesn’t turn back on. I have a wired connection.
Ok, it must depend on the model then. I’m sure it didn’t work with both my Samsung TV’s (one with wlan usb stick and the newest one with integrated wifi), only turn off did work. The TV appeared to not be connected to the wifi when the tv was off.
I start Netflix and other apps over HTTP on my Samsung TV. Yesterday I wrote a blog-post about that so maybe it will work on your TV too. The post is in german but the configuration might be self-explaining: https://www.panbachi.de/samsung-tv-app-starten-ueber-http-132/
I analyzed the network traffic to see what happens when the YouTube or Netflix apps on my Android-Smartphone starts the app on TV to continue streaming (I hope you know what I mean). So I found that HTTP-request and tried it for other apps and it works. I think it might work on other brands too and not only on Samsung.
Sorry, I misread your original comment. I thought you had a single app on your phone that was used to launch apps on the TV and thought there might be more functionality that we could look at.
I spent some time looking at the Samsung Developer portal (i.e. Convergence | Samsung Developer) to see what kinds of other useful commands could be performed through this interface but didn’t find much of interest.
I can confirm that napsio’s discovery works on my UE49MU6400 for YouTube and Netflix (but not Amazon?).
However, I was particularly interested in launching the Plex and iPlayer apps, so I did a bit of digging and found that the YouTube and Netflix apps require a HTTP POST of ‘/ws/app/YouTube’ and ‘/ws/app/Netflix’ as described. The plex Android app doesn’t have the ability to cast directly to the Samsung TV, but when I launch Plex via the SmartView App, the analyzed HTTP POST was ‘/ws/app/setdmsuuid’, where the uuid is stated as ‘uuid:55076f6e-6b79-1d65-a47b-2c0e3d2f748b’.
I tried forming this into some sort of POST command, but couldn’t get it to work. Unless I’m wrong, it would seem that only apps that you can cast to (from Android) have there own ‘/ws/app/APP NAME’? It would be good if we could launch any app, even if we have to discover it’s uuid in advance.
Hi,
both @Drywcyfyr and @napsio’s solutions do work like a charm. I was wondering though (same as @knaks) if we could launch some further apps using napsio’s solution. I am particularly interested in PLEX. If we can find a way around PLEX then I’ll have my top 3 favorites (Netflix , Youtube , PLEX) and I don’t mind emulating the rest (less used - Spotify , Twitch ) via send_key commands per Drywcyfyr’s solution.
@kaiomatico - I wasn’t planning to submit anything because I haven’t really done anything except to expose existing functionality through a new service.
I’d be happy to see this functionality exposed officially but I can’t think of a way that makes sense within the confines of the media_player component. But now that I’m looking into it a little bit, I’m wondering if it would make sense to create a Samsung remote component.
I’ll investigate to see how much work would be required for official integration.
Hey, with the updated play_media from the new 0.73 Hassio samsungtv component we are now able to change the channel directly at least. Hopefull the check for only accepting integers will be removed soon. Here is a template light which is able to change the channels I just configured. My samsung TV instance is called “tv2”, so I was able to name the template light “tv”. It works fine with the emulated_hue component to tell alexa to set tv to 5% (which changes the channel to channel 5)