Add a source to TV?

image

I’ve got these two things going. When I try to select the source on the TV, it doesn’t list OwnTone. I’ve tried to add it to the dlna integration, but that only sees my SiliconDust tuner. The top card seems to be a “cast to” thing, as it opens the SmartCast input on my TV and displays the Welcome to Home Assistant background. I’m sorry, I feel confused by media sources and media players…

It might help if you mention which make and model of TV and which integration you are using to create the media player.

@tom_l :smiley: sure, not a bad idea! Looks like google cast integration. I also have the Vizio integration, but I don’t think anything is using that. It’s only there because HA keeps auto detecting it and not respecting the Ignore button.

I was thinking it was also related to the hard coded connection I have set up for the firemote rest calls for power and volume.

vizio:
  - host: "192.168.1.19:7345"
    access_token: Zdrfmm4cxu
    name: FamilyTV
    device_class: tv
    volume_step: 1

rest_command:
  vizio_processkey:
    url: "https://192.168.1.19:7345/key_command/"
    method: put
    content_type: "application/json"
    headers:
      AUTH: "Zdrfmm4cxu"
    payload: '{"KEYLIST": [{"CODESET": {{ codeset | int }},"CODE": {{ code | int }},"ACTION":"KEYPRESS"}]}'
    verify_ssl: false

Sounds like you need to set up the Visio integration correctly to have a media player that controls your TV sources.

Well I did at one point, but it didn’t provide a mechanism for the rest calls for volume control. Actually, the direct Vizio integration is working…

But, you got me looking deeper and I found I had some other entities related to the OwnTone setup I didn’t realize were there, specifically these two with Output in the name:


One of them is related to the Chromecast integration while the other is related to the Vizio integration.

I was thinking that on the cast card I should be able to click the little selector button on the right of the chromecast tBand select a source “player”,

but it just pulls up part of what’s in the media page:

image

I would have thought I’d see OwnTone in here.

Maybe I should change the subject to Add a source to Cast?

That’s because you don’t need to use restful commands. The media_player integration provides services for volume control.

@tom_l I’m learning something every day in HA! Thanks.

I got the script / rest call thing from another thread. It seems that method is still handy, as I don’t see a media_player service for selecting the input. I occasionally need to cycle through the available inputs, from a firestick on hdmi3 to something on hdmi1 or the built in smarttv ‘input’. Maybe there’s another way?

I also need to figure out a toggle automation for power, as I don’t want to have separate buttons for on and off. Off to search about!

The android debug bridge shows me the most sources.

It is there: https://www.home-assistant.io/integrations/media_player/#service-media_playerselect_source

Also available:
Screenshot 2024-06-17 at 11-43-21 Media player

Cripes, that toggle is for power? I saw it, but it didn’t dawn on me that it was for power… but now that you say it, what else would you toggle other than mute? (and that’s already covered). So dope slap to me. Thanks, it’s now working.

Finally, I originally saw only the sources noted by SMARTCAST feature of the TV, such as AMC+, Apple TV+, At Home with Family Handyman, Bob Ross, Bon Appétit, BritBox, CBS News, etc. But after digging into the pyvizio code I see that this INCLUDES the physical sources, not just the “apps”.

### Input sources

You can get current source (if the value is SMARTCAST, then an app is currently runniing)

```bash
pyvizio --ip={ip:port} --device_type={device_type} --auth={auth_code} get-current-input

What I really want to do to start is cycle through the physical inputs: HDMI-1, HDMI-2, HDMI-3, HDMI-4, COMP, TV, SMARTCAST. This creates positive WAF or SAF in the short term.

The pyvizio source behind the integration and such seems to have a way to do this.

Other options is to circle through all inputs
```bash
pyvizio --ip={ip:port} --device_type={device_type} --auth={auth_code} next-input

For now I can use the rest call because it works. But I’d like to find an example of how I might at each input button press recall the current input and then cycle to the next, or directly call this pyvizio cli item. Any hints would be super!

@Wheemer I’m only using ADB for the fireTV because that’s the only option. Here I want to go direct to the TV if I can.

So the Visio TV media player includes unwanted streaming sources as well as hardware sources?

You should be able to exclude the streaming sources using apps: exclude: in your config: https://www.home-assistant.io/integrations/vizio/#apps

Also just FYI we discourage the use of this term here:

See the second article here: https://newsletter.openhomefoundation.org/open-home-approval-factor/

Ah, good idea.

Also thanks for the heads up. It had been around so long I kinda forgot the w in waf was for wife.