I’m using the custom mini media player to control LG TV, vizio soundbar, and other associated AV electronics. I have webos connected and working fine. I can turn the tv on and off as well as control volume and source. However, I’d like to go ahead and replace the remote for a good portion of my interactions, but to do that, I have to be able to use the arrow and select keys. I have tried to use the "content-card-remote-control’, but can’t seem to get it to work at all (although I’m not sure it performs the functions I need anyways). I’d tried to emulate the kodi remote control (found here), but also to no avail.
I’ve implmented keys in my code and what I can’t figure out is how to send over the correct commands. As indicated here, I’ve found what I believe to be the codes that should tell the tv to move left, right, up, down and enter (0x25, 0x26, 0x27, 0x28, 0x0D) respectively, but I’m not sure how to send those commands over. I’ve searched, but not found an example where someone did this and I’ve tried my own code, but so far nothing is working.
Here’s my current yaml for the mini remote:
entity: media_player.living_room_lg_oled
hide:
power_state: false
hide_controls: true
idle_view: true
shortcuts:
buttons:
- id: DIRECTV
name: DirecTV
type: source
- icon: 'mdi:netflix'
id: Netflix
name: Netflix
type: source
- icon: 'mdi:youtube'
id: YouTube
name: YouTube
type: source
- icon: 'mdi:alpha-r-circle-outline'
id: 'RightNow Media :: All Kids Episodes'
name: RightNow
type: source
- icon: 'mdi:plex'
id: Plex
name: Plex
type: source
- icon: 'mdi:google-play'
id: Google Play Movies & TV
name: G Play
type: source
- icon: 'mdi:hulu'
id: Hulu
name: Hulu
type: source
- icon: 'mdi:arrow-up-bold'
id: Up
type: source
- icon: 'mdi:youtube-tv'
id: YouTube TV
name: YouTube TV
type: source
- data:
entity_id: media_player.living_room_lg_oled
media_content_id: 1
media_content_type: channel
icon: 'mdi:arrow-left-bold'
id: media_player.play_media
type: service
- icon: 'mdi:enter'
id: Enter
type: source
- icon: 'mdi:arrow-right-bold'
id: Right
type: source
- id: ' '
type: source
- icon: 'mdi:arrow-down-bold'
id: Down
type: source
- id: ' '
type: source
columns: 3
type: 'custom:mini-media-player'
volume_stateless: true
Credit
Credit to poroping for his changes the pylgtv library #18.
There are proposed architectural improvements to HA’s media_player that could make the need for this remote addition unnecessary. Also proposed updates to pylgtv to use async #19 by @bendavid
But until those changes progress, this should do the trick
I’ve had problems installing custom components previously. I downloaded your entire webostv folder, placed all the contents into my own config/custom_components/webostv folder then reloaded the core and restarted hass. Then I added the remote component to configuration.yaml (I already had the media_player configured correctly). Restarted again. Now when I add the component, it won’t let me save the mini-media-player card. The save button disappears and is replaced with a swirling icon as if it’s thinking. This never changes. I can’t even save my previous mini-media-player card which worked previously. I get the same swirling icon in place of the save button when I edit the card. Any thoughts as to what I might have done to cause this? My suspicion is that I’m not loading the custom components correctly somehow.
Please excuse my ignorance here, but how do I tell if your long term solution (above) was implemented in the 0.103 release (or in any release for that matter)? I read the release docs, but didn’t see any mention of your specific PR and I’m guessing where it says open on the top, that means it was not merged yet, but I’m not certain of that.
Presuming it was included, I see the example in github shows an integration w/ the harmony remote that shows to use “service: webostv.button”. I don’t have that available as a service. How do I get that set up?
I don’t know specifically where he has put his, but mine is very similar. You CAN put it in a custom (manual) card or whatever type of card you might like to use. I have a few devices I want to control, so I made an input select button card that has the devices at the top and allows me to select one at at time to control. The attached pic is the LG part of the card.
I’m curious, is it possible to add the media player above the remote only if its power on for multiple media_player devices?
My use case is that my media_player device changes depending on if we are watching an app on the TV vs casting from our phone.
If I’m understanding the question correctly, it should be possible if you have a sensor that recognizes the states (on vs off) of your devices. Just make the media player card that you were placing above as shown when the power is on and hidden when the power is off.