Can you please check it ?
I have a Sony tv and it’s run very well.
Mp3 and tts.
I would like to buy an used Samsung tv from 2019
Many thanks in advance.
Best regards
Is there any way to know if something is actually playing? I would like to be able to dim light when I start playing a video and brighten when I stop/pause.
I recently updated to HA 110.3 and I have been having trouble with my TV connection ever since. Every 3 seconds a notification pops up on my Samsung TV that says that HomeAssistant needs permission to connect. I’ll click allow and then it will pop back up in 3 seconds. Has anybody else experienced this issue?
@vormsty you will be disappointed if you compare sony with samsung, i can guarantee this after other discussions with users. didn’t manage to test if it plays mp3 yet
@bwoodworth that is a complicated question, playing in what? apps? upnp? TV channels?
@abelson you could try deleting the token file(s) from the component folder
I completely uninstalled the add on and then reinstalled it. Would the token file persist? If so, how can I do a full reinstall? @jaruba
This issue is also happening with the official Samsung integration enabled and no HACs Samsung integrations installed.
Hey @jaruba, i’m really interested in the extended source list using smart things API. primary use is to automatically show the correct input instead of TV/HDMI. Hoping this will also help with the homekit ‘sources out of sync’ errors. I have a 2017 QA65Q7FAM and have logged in with my samsung account. Should this automatically show up in the smartthing device list? (https://graph-ap02-apnortheast2.api.smartthings.com/device/list) or am I missing a step and need to set it all up manually? I found some smarthub information in ‘about this TV’
Much appreciated
Linton
Hi, I’ve got the same TV and using ollo69’s fork and their latest release has an option to turn this off as it’s not very reliable.
Yes.
I mostly only watch things through Apps so that is what I would care about the most.
Just got a new (2020) q70t 55” and have installed this hacs addon.
I added the below to my config. I can turn the tv end but that’s all. No pause, sound or anything.
Media player is showing some details but not much
Appreciate working on this is tough but wondered if I’d missed anything obvious?
@Matt_Barnes Set app_list
, set source_list
, enable the Smart Things API. All of these are described in detail in the component’s readme, read it carefully for a better understanding of these settings.
Thanks.
I have set up API now. One thing I have noticed is when viewing my tv device through the API it does not pick up app selection. It logs source changes and turning on and off but does not recognise or give me the app codes for netflix say. I can use your lists but have you experienced this behaviour.
During the time from turning on to turning off I selected the netflix app and started watching something, then switched back to Sky and then turned tv off and it didnt record any of it
Added api key and two sources, restarted and I can turn tv, mute and change volume but selecting sources still does not work.
I have this in the logs:
Logger: homeassistant.helpers.entity
Source: custom_components/samsungtv_tizen/smartthings.py:38
First occurred: 17:05:23 (1 occurrences)
Last logged: 17:05:23
Update for media_player.samsung_tv fails
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/urllib3/connection.py”, line 160, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File “/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py”, line 61, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File “/usr/local/lib/python3.7/socket.py”, line 752, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 677, in urlopen
chunked=chunked,
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 381, in _make_request
self._validate_conn(conn)
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 976, in _validate_conn
conn.connect()
File “/usr/local/lib/python3.7/site-packages/urllib3/connection.py”, line 308, in connect
conn = self._new_conn()
File “/usr/local/lib/python3.7/site-packages/urllib3/connection.py”, line 172, in _new_conn
self, “Failed to establish a new connection: %s” % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x66c59e10>: Failed to establish a new connection: [Errno -3] Try again
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/requests/adapters.py”, line 449, in send
timeout=timeout
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 725, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File “/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py”, line 439, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘api.smartthings.com’, port=443): Max retries exceeded with url: /v1/devices/dfd71c50-8531-cf99-c06c-9f5d076a7fb3/commands (Caused by NewConnectionError(’<urllib3.connection.HTTPSConnection object at 0x66c59e10>: Failed to establish a new connection: [Errno -3] Try again’))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 279, in async_update_ha_state
await self.async_device_update()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 472, in async_device_update
await self.hass.async_add_executor_job(self.update)
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/homeassistant/homeassistant/util/init.py”, line 239, in wrapper
result = method(*args, **kwargs)
File “/usr/src/homeassistant/homeassistant/util/init.py”, line 239, in wrapper
result = method(*args, **kwargs)
File “/config/custom_components/samsungtv_tizen/media_player.py”, line 426, in update
smartthings.device_update(self)
File “/config/custom_components/samsungtv_tizen/smartthings.py”, line 38, in device_update
cmdurl = requests.post(API_COMMAND,data=COMMAND_REFRESH ,headers=REQUEST_HEADERS)
File “/usr/local/lib/python3.7/site-packages/requests/api.py”, line 119, in post
return request(‘post’, url, data=data, json=json, **kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/api.py”, line 61, in request
return session.request(method=method, url=url, **kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/sessions.py”, line 530, in request
resp = self.send(prep, **send_kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/sessions.py”, line 643, in send
r = adapter.send(request, **kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/adapters.py”, line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘api.smartthings.com’, port=443): Max retries exceeded with url: /v1/devices/dfd71c50-8531-cf99-c06c-9f5d076a7fb3/commands (Caused by NewConnectionError(’<urllib3.connection.HTTPSConnection object at 0x66c59e10>: Failed to establish a new connection: [Errno -3] Try again’))
I will try the other branch of the add on see if that helps too
Hey can anyone advise - does this component allow for the current TV channel to be reported as a state attribute?
Thanks
@gurgle it used to, it does not anymore since samsung does not update channels anymore in their api.
Thanks for the info. That’s disappointing.
Hi @jaruba, thanks for this custom component. I’ve got this installed and so far works much better than the HA integration.
I have a couple of quick questions I am hoping you’ll be able to help me out with.
- I was struggling to set this up initially, after hours I realised that my TV was on the IoT network. My LAN network can talk and see IoT network through my set firewall rules but for whatever reason it does not pick my up TV. I switch my TV to the LAN network as a test and it works perfectly. Which ports does this component use to be able to function correctly? I will need to add a firewall rule in my router.
- Is the a not a quick way to get the HDMI 1, 2 or 3 other than then combined keys? I don’t want to use SmartThings and would like to keep everything local.
- Is there a way to remove the default sources? Looks like these are all apps that are installed on my TV but I do not use the tv for media… everything goes to my Apple TV. I’d ideally like just two selectable sources… Apple TV (HDMI1) and PlayStation 4 (HDMI2).
- I am seeing some error on the logs with regards to being out of sync?
cc: @LintHart - I see you mentioned this error
media_player.samsung_tv_remote: Sources out of sync. Restart Home Assistant.
Log Details (WARNING)
Logger: homeassistant.components.homekit.type_media_players
Source: components/homekit/type_media_players.py:436
Integration: HomeKit (documentation, issues)
First occurred: 17:32:56 (8 occurrences)
Last logged: 19:30:28
media_player.samsung_tv_remote: Sources out of sync. Restart Home Assistant
-
You’ll probably need 9197, 8001, 8002, you can also set a different subnet mask if needed with
broadcast_address
-
There are no dedicated keys to change to specific HDMI sources except the SmartThings keys, but
KEY_HDMI
works on some TVs (probably all) to toggle between HDMI sources -
Set
'{}'
asapp_list
maybe? -
That’s a warning, not an error, and it happens because HA irrationally believes that the source list can be gotten at the speed of light in any possible scenario, this is a very wrong pressumption which they make
Brilliant, that’s really helpful - thank you.
- Thanks. I will try those ports tomorrow and test the firewall.
- Noted - thanks.
- Setting
'{}'
worked perfectly.
In addition, I added the two items I wanted, Apple TV and PlayStation in thesource_list:
. I notice that when selecting a source, for exampleApple TV
- it reports that for a couple of seconds and within HA it switches the status toTV/HDMI
. Is there a way for it to report the correct status for when it is on either the Apple TV (HDMI 1) or PlayStation (HDMI 2)?
My Config:
media_player:
- platform: samsungtv_tizen
host: REMOVED
port: 8002
mac: REMOVED
app_list: '{}'
source_list: '{"Apple TV": "KEY_SOURCE+KEY_LEFT+KEY_LEFT+KEY_LEFT+KEY_RIGHT+KEY_ENTER", "PlayStation 4": "KEY_SOURCE+KEY_LEFT+KEY_LEFT+KEY_LEFT+KEY_RIGHT+KEY_RIGHT+KEY_ENTER"}'
@SimplyGardner There is no way of knowing which source is selected with the local API, Samsung’s Tizen OS is, as far as I know, the worst of all TV options when it comes to the local API (as it’s very limited and almost completely undocumented). Yet again, getting the correct source is possible with the SmartThings API.
FYI though, Samsung updates the SmartThings API with data regardless of if u set it up in this component or not, setting it up for the component only makes use of this data. And there is no way of stopping the TV from updating the online data from the TV settings.