Samsung TV integration - we need to talk!

@jaruba Yes, you’re right. And yes, my TV is old tech, but still working. :grinning: I think all this complexity was the reason to only allow external libraries in components and not implement it directly. With the already mentioned abstraction layer it would be no problem to add support for new protocols. But for more advanced libraries we definetly have to extend the abstract class: https://github.com/tulindo/home-assistant/blob/0ac95fbed3e38378f1c4212f889af1fd47d4c1d7/homeassistant/components/samsungtv/bridge.py#L33-L123

@escoand

“I think all this complexity was the reason to only allow external libraries in components and not implement it directly.”

^ there are other issues to consider here, for example: if you allow setting up SmartThings (requires an API key) on a component that also supports non-Tizen TVs you’re going to have a lot of confused users

And in general, there will be a lot of features that will only work with Tizen TVs, and a lot of users with non-Tizen TVs asking about them. I think it’s generally cleaner to support current / future tech over old tech to alleviate user confusion in the long run. But heck, you have an old TV, so I know I won’t convince you. :upside_down_face:

Judging by the TV model groups link from earlier ( https://developer.samsung.com/smarttv/develop/specifications/tv-model-groups.html ) that ‘pre-Tizen’ Samsung TV’s were 2012-2014 (3 year period). Tizen based TV’s are 2014 - 2020 (almost 7 years). Would it be worth considering a separation of the integration to “Samsung TV (legacy)” or “Samsung TV (Tizen)”, considering the underlying OS of both are somewhat different?

I can appreciate @escoand that you’re using a legacy Samsung TV and the integration works very well in that instance. The concern going forward (personally) is that there is a lot of confusion out there already for the broad spectrum of Tizen OS users and currently no definitive pattern on why the integration works for some users and not for others. Then in some cases, you have legacy users saying “works fine for me” without understanding the full picture! Its a tough one :thinking:

As long as the legacy is still working (in any way) I’m fine with a separation. But there are a few questions:

  • Is there only one Tizen solution, or do we need more?
  • Is this separation into legacy and post-legacy (or even more) allowed by the HA core team? @balloob
  • What should be used as a basis for this new integration? The code of the chosen custom components needs to be extracted into an external library.
  • Who feels responsible? Not me. I can’t help with testing and my time is pretty limited.
  • When is the right time to deprecate and remove the legacy integration?

And maybe more…

All very valid questions. Any thoughts peeps: [mass notifications removed by moderator]

Is there an appetite to split the integration to Samsung TV (Legacy) and Samsung TV (Tizen)? It appears that the legacy is somewhat reliable and stable. But for Tizen users, its very much a mixed bag with no apparent pattern that I’m aware of. Even for basic features (state, on/off, volume/channel up/down, mute etc). Is there a willing group out there to support this project? Personally, I’m able to manage documentation and testing if its of any help (my Python isn’t up to standard unfortunately). Don’t be shy, drop a constructive comment :blush:

@rosscullen It is limited to 10, because there is in general no need to have more. One should not go and start tagging people randomly.

See point 16 of: https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371

Please adjust your message and remove the mass tagging. Thanks.

1 Like

Apologies @frenck, duly noted with thanks. Everyone tagged has had input previously on this integration. Look forward to reading further feedback from the community. Thanks :slight_smile:

i’m new to both HA and python. Even with my limited experience with Samsungtv, the built-in and custom variations available, I understand the complexity and time involved in maintaining an inclusive component to satisfy all samsung models currently running. Establishing separate components for legacy, tizen or future systems that samsung will release seems to be the path to follow. Being a samsung legacy owner with a 2013 model, which works perfectly, should not be considered expendable and deprecated for HA.
The built-in integration for samsungtv works for me but it has limited functions with respect to source selection. I assume this is due to the supported version of samsungctl and the set source list in the component. I noticed that kdschlosser had developed a revised samsungctl with enhancements to expand the functions for a legacy tv. I have gone through numerous threads/posts trying to track down how to incorporate this into HA without much success. Any hints would be appreciated.

1 Like

Afraid I can’t be of much help. I note that the custom integration you’re referring to (presume this one) hasn’t been updated in 20 months (compared to the official integration and others). Might I suggest raising an issue with the official integration? https://github.com/home-assistant/core/issues

Found this link that I thought might be of interest to you all. Was looking for a list of ports for my IOT firewall rules.

F-Secure Labs did an in depth poke around a Samsung Q60 series smart TV this time last year.

https://labs.f-secure.com/blog/samsung-q60r-smart-tv-opening-up-the-samsung-q60-series-smart-tv

Also a handy link on reddit of network ports but I’ve no doubt you’re each aware of them at this stage:

Is there any way to push messages to Samsung televisions? I have a Samsung UHD8 series. Pushing messages via call_service notify doesn’t work.

Afraid not… my personal advise going forward to any serious Home Assistant users, looking to buy a new TV, is to avoid Samsung. For similar quality TV with good HA integration and on-screen notifications, I will be choosing LG.

If you’re on a budget and in Europe, I hear the 50 inch Hisense R50B7120UK Roku TV is supposed to be excellent quality for price (€380) and communicates via MQTT (although I’ll admit I haven’t fully read into the quality of its HA integration).

1 Like

I actually fall In the bucket of having a 2012 (maybe 2013) and a 2019 as well.
So am in a position to test both legacy and tizen

I don’t remember what pre-tizen was called but believe it had a name (might be more appropriate than legacy) but clearly the older tv’s are slightly less capable in terms of what functions they expose. These TV’s still work great and I wouldn’t be deprecating them - maybe it’s even as simple as one integration being ‘pre-2013’ rather than legacy

If split - would there be any issues in discovery? My Tizen doesn’t currently discover at all.

Did plan on trying to have a crack at updating the tizen plugin but got a bit side tracked when I couldn’t even change the source (HDMI 1/2/3/4) without using SmartThings

Any help to get added my smart tv to HA, the discovery keep finding the TV but is not able to connect…
it’s a UE58H5203 here a portscan:

nmap 192.168.1.21                                                                                                                                                                         3412ms  Mon 31 May 19:25:46 2021
Starting Nmap 7.91 ( https://nmap.org ) at 2021-05-31 19:26 CEST
Nmap scan report for SamsungTV58.fritz.box (192.168.1.21)
Host is up (0.0073s latency).
Not shown: 996 closed ports
PORT     STATE SERVICE
4443/tcp open  pharos
7676/tcp open  imqbrokerd
8080/tcp open  http-proxy
8443/tcp open  https-alt

PS. i never found an official app that allow remote control, the only “smart thing” that the TV does, is to appear on the Youtube app on the smartphone and i’m able to remote control the playback of youtube videos from the phone

on the 8080 and 8443 ports seems there is an http(s) server that reply with these headers:

HTTP/1.1 404 Not Found
Access-Control-Allow-Origin: https://www.youtube.com
Content-Type: text/html
Content-Length: 345
Date: Thu, 01 Jan 1970 00:30:05 GMT

on the 4443 another (broken) https server:

curl -k https://192.168.1.21:4443/                                                                                                                                                        2146ms  Mon 31 May 19:39:49 2021
curl: (35) error:1401E410:SSL routines:CONNECT_CR_FINISHED:sslv3 alert handshake failure

@jaruba @ollo69 Any updates on your collaboration on @jaruba 's original integration? I notice there are still the two separate ones out there. I’ve tried @jaruba 's on my UN65H8000 and no luck. But I always default to “I’m doing it wrong” rather than the integration is wrong.

Also, if any testing is wanted I have these Samsung TVs:
UN65H8000
UN55TU7000FXZC
QN75Q80TAFXZC

1 Like

I have a SAMSUNG 2020 THE FRAME - Code: QA75LS03TAWXXY - available to test with.

to be honest, after testing a couple of components, jaruba among them, I wasn’t completely pleased. I’ve been using jaruba’s for more than a year, which is great, but recently certain features went down for my model and moved away to something else.

I ended up creating my own “integration”, mixing webCoRE (webCore only works for TVs showing up in Smartthings) with http requests and node red (I assume it can be done in HA as well) and putting everythign together with the universal media player integration in HA. I’ts not really hard, I’m kind of a newbie and it works worlds better than any integration I tried.

The tv updates every 5 seconds in HA and always sets the correct picture and sound settings for every source/app/whatever, which were my two main aims. Beyond that,webcore does feature a bunch of available commands not present in any integration. It would be great if we could investigrate webCoRE together in this forum because the majority of commands are straightforward but some aren’t and there’s not documentation about them in the webCoRE forums. We are probably missing something really powerful whithin webcore and it can be really easily triggered from HA. Here are all the commands available for my TV.


1 Like

I decided to open a new thread so whoever wants to come investigate is welcome:

1 Like

Another user with 2 TVs here, an older 2013 legacy one and a 2020 Tizen one. I seem to have the opposite problem of everyone else in that the new one works well with both ollo69 and jaruba’s integrations (thanks for the great work) but I can’t find one that will reliably report on the power state of the older legacy one. The official integration will pick it up but the power state flips between on and off when the TV is constantly on so it is no good for a simple automation to switch the back lighting which is all I am trying to do. Does anyone know of a integration that works on the older pre Tizen models and will reliably report state please?
Thanks Pete

UN40MU6290 and UN55KU6290 here. Certainly willing to test intermittently.

I haven’t gone down the path of checking out the implementations mentioned above but I will be looking into those with interest over the next few weeks.