How does this fork fix the issues I’ve been having with the other component?
Well, for one, it allows chaining key commands, so instead of source_list: '{"TV": "KEY_TV"}' (which never worked for me), I now do source_list: '{"TV": "KEY_SOURCE+KEY_LEFT+KEY_LEFT+KEY_ENTER"}' to auto-navigate the menu and select the TV source.
My fork also adds extended volume support, so there’s a bar that can be used in Home Assistant now to change the volume to a % value, instead of just volume up / down buttons.
I’ve also added Voice Assistant support (only tested with Google Home) that currently supports:
turn on / off
volume up / down
mute
set volume to %
change input source to X
For more information, check the README.md from the repository. I’ve managed to get all voice controls I needed for my TV with my fork, I hope it will help others do the same.
Development for this project relies solely on donations, so if you enjoy this component, please consider donating to ensure it’s continued survival.
“Manual” in source_list is my PC, because “Manual” is a whitelisted word on Google Assistant while “PC” is not, so voice commands would not work with “PC” but do work with “Manual”. “TV” and “Chromecast” are both whitelisted words too, so those also work with voice commands.
I appreciate what you are trying to do but is it possible at all for these to be integrated into the base repo from roberodin? just so we don’t end up with a multitude of different custom components.
roberodin’s repo was one custom component that I tried, but did not work well at all for my case, the biggest drawback was that it was extremely slow at sending commands compared to xchwarze’s fork. (that I forked out of)
More so the code of these 2 repos seems very different by now, and I merged 2 PRs (1 from roberodin’s repo and 1 from xchwarze’s repo) that seemed to be completely ignored at their respective repos and helped a lot to get this thing working properly.
I always try to push my changes to the repo I fork out of, so I did make a PR to xchwarze’s fork, but after a week of it being ignored (and having other PRs that were much older and still ignored), I choose to go down my own route…
Just remembered the second big drawback with roberodin’s repo: it didn’t save the auth token from the TV, so the TV kept asking me to approve HA at every command. This was also mentioned in various comments there and also seemed ignored.
I appeciate that roberodin’s trying to make a custom component that fits all Samsung TVs, but I believe the clutter of code he has there has led to a very broken and inefficient component, that he doesn’t have the time or desire to truly improve.
While my motivation was to make a perfectly working custom component for the case that I can test easily, not to fix the biggest mess I could find. I did however comment at both the PRs i merged from their repos at an attempt to gain their attention over them, as they are truly relevant and simply ignored.
I have a EU65MU6102K, I forked out of a custom component that said it was exclusively for 2016+ Samsung TVs, it should presumably work with all Tizen based Samsung TVs.
2019-12-03 20:35:11 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1830551088] extra keys not allowed @ data['media_content_type']
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 133, in handle_call_service
connection.context(msg),
File "/usr/src/homeassistant/homeassistant/core.py", line 1214, in async_call
processed_data = handler.schema(service_data)
File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
return base_validate(path, iteritems(data), out)
File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['media_content_type']
ok, for instance I can switch on, it works, switch off doesn’t work. I can see vol up down and mute, but all does not work. I can see and select sources, like Netflix, but doesn’t work. Do I have to modify something else?
EDIT: I’m stupid, just missed the Authorization popup request on TV as I was not in the same room… Thanks.
I’m very glad you got it working too, the authorization pop-up can show up to 4 times (required for various kinds of actions) after first installing this custom component and restarting. But after that it should not show the pop-up again in the future.
I haven’t forgotten about your issue, I just never had any chance to test anything in this time in order to offer relevant help…
Off the top of my head, without any testing regarding your issue. I’d say that if there is no error at all, then it’s sending the keys to your TV, but the TV doesn’t understand what the component is sending.
Presuming you have a TV that is compatible with this custom component (which means a 2016+ Samsung TV or any Tizen based Samsung TV), then it means that you need to try using the alternative way of sending keys with this component.
Check here on the readme page:
Look at "update_custom_ping_url" in those docs, then try the component with port 8002 or (if it doesn’t work with that port) try it with port 8001. It’s possible that this might fix your issues…
If that still doesn’t work, try also setting "update_method" to ping.
Did someone was success activating PIP trough HA with Q70 Samsung? In fact I would like to see my cam via Samsung TV browser when someone is detected at the house door. But I’m not sure it’s possible with Samsung TV, too bad, I was able to select different sources for PIP with my old 8 years old Sony TV, but I didn’t find this option with Samsung…
Even if u can’t find a specific key for PIP that works with ur TV, as long as you can activate PIP through the TV menu, you should be able to do it with this component by chaining keys. (won’t look pretty though, u’ll see it going through the menu)
As for the browser, i saw some projects opening the samsung browser through a WS command, not sure if that command can open a specific page… it might be possible. But you’re asking for something that is very specific, I personally have no need for something like that, I could help u identify the command to open the browser, but you’d need to put in the work of coding it into the component…