Improving Samsung TV Control

This explains a lot. This component is made specifically for 2016+ Samsung TVs (with Tizen).

What error do you mean though? As @steadi did not post an error afaik. Do you mean Retti’s error? (which I always suspected was due to an incompatible Samsung TV?)

Yeah, sorry! I meant Retti’s error.

UnboundLocalError: local variable ‘mute’ referenced before assignment

I only realized after that I had the 2015 TV. Thought I had a 2016…

The 2015 has Tizen too tho. At least the JU7005.

The error states that an API endpoint is not working as expected. There are numerous things based on this API, although more then one API is used.

So there seems to be a clear difference between 2015 Tizen and 2016+ Tizen.

I have couple of quetions that i do not know if they have been answered already, sorry if they have…

  1. Can we have show which app is running ? For example if i watch youtube to show youtube on home assistant, if i have spotify to show spotify etc

2)can we use voice command through google assistant to change between apps for example if i want to tell google to change the source from youtube to spotify or from turned off tv to open it on youtube or plex etc?

Thanks in advance… Keep up the good work guys!

I switched back to the official integration which is working fine but misses a lot of functionalities.
No idea why jarubas improved integration does not work for me even with a 2016 SUHD TV.

  1. Yes, you can do that
  2. Probably… but not how you imagine, Google Assistant has many limitations. You can tell it to turn on / off your TV, but if you want to change the input to something (be it a different HDMI source, to TV or an app), then the input source name has to be set to one of the google assistant supported words, which can be found on this list:
    https://web.archive.org/web/20181218120801/https://developers.google.com/actions/reference/smarthome/traits/modes#mode-settings

So, if i understood correctly i will have to change for example “PLEX” to “LEVEL” and then tell something like "hey google, open “LEVEL” on main TV.

Maybe is better to use IFTTT and call scripts for the things i want to control/do.
Alexa has the same problem? Is it worthy to use Alexa instead of Google? If only google change they “hey goo goo” keyword and start using something easier and shorter…

Yes, you understood correctly. Although the voice command is something like “hey google, set input source to level on …”, I’ve tested this command with changing between Chromecast, TV and Manual (i use “manual” for PC as that’s a supported word). But it should work with changing apps too, if the word is supported, as they go through the same method as far as i remember. Other supported voice commands are setting volume to a percent, volume up / down, mute…

IFTTT is also an option, ofc.

Alexa might be even more retarded, i think that it might only support voice commands for turn on / off and volume. Not sure, I don’t have an Alexa device, but if there is such a limitation, it’s in how HA handles Alexa, as this module exposes all commands, they just aren’t used there.

1 Like

Ok, thanks for the clarification. I think i will go with the IFTTT option even if it’s more complicate/boring to set it up it will be easier to use as i won’t have to remember how i named the specific app or interface i want to use and also it will be easier for any guests. No girl so no WAF to consider for now :stuck_out_tongue:

than you for your nice Component.
I have a question: how do you find the app’s code number in your app_list? like “11101200001”

hi, this night my Q70 auto started at around 1:00 AM. Frightening because was playing X-Files, :grimacing: and this is not the first time, but usually it switch on maybe some seconds after switching off, when I launch my automation that switch off my Yamaha, TV, and switch on lights when movie session is over. Any ideas? What can I provide to help?

Did you read this component’s README? There are links there to lists of app IDs:

If the app you want the ID for is not in those lists, then no, currently there’s no way to find an ID for a specific app.

1 Like

Auch, that never happened to me, nobody else here reported anything of the sort either. So it’s highly likely that some other automation of your’s is somehow doing this.

But I can tell you that the turn on / off functionality changes depending on if you set the mac property in your config, so you can tinker with that if you want.

If mac is set, then it will use WOL to wake up the TV, otherwise it uses the turn off and turn on keys for the TV. If you did set mac, and there’s no other automation interfering, I guess it could also be possible that something else on your LAN is sending WOL commands to your TV IP?

strange, now I use MAC, so you recommend to remove it?

action:
  - entity_id: switch.aeonzw075_smart_switch_gen5_switch
    service: switch.turn_off
  - delay: '4'
  - data:
      entity_id: media_player.yamaha_receiver
    service: media_player.turn_off
  - delay: '2'
  - entity_id: media_player.samsung_tv_remote
    service: media_player.turn_off

And looking at my automation, I’ve seen that I handle different way my Yamaha and my Samsung, what’s the best way?

No, i recommend using mac, but there’s clearly something somewhere in ur automations that’s starting the TV, this is not the component’s fault. And if ur simply unable to find what’s messing with it, try other options, like removing mac.

no, no, I didn’t say it was component fault, my goal was just to know if anybody else encountered this problem. I do not any other code in my automations that’s concern TV.

Well something’s sending WOL commands to your TV. Do you use IFTTT? I’ve seen that thing glitch a lot of times, ending in sending it’s commands hours later.

Regardless, unless there are other users that have this issue too, then this discussion is going out of scope of the component.

Ok, seems related to Q70R, some people complains about that. Seems not good to me… https://us.community.samsung.com/t5/Qled-and-Frame/Samsung-Q70R-TV-turns-on-by-itself/td-p/827155