Update WebOSTV Component to be more fully featured

Hi guys, I’m currently working on a project to integrate universal remote functionality with home assistant. The webostv media component currently uses the pylgtv module, which can only access a limited subset of the web based control functionality.

I’ve found a python module called PyWebOSTV which implements more of the complete functionality, especially the input stuff (left, right, up, down, mouse, click, keyboard, home, back).

I propose we take a look at this module and implement the extra functionality into a webostv remote component either by updating the pylgtv module or swapping over to this PyWebOSTV module.

I’m interested in doing the work myself, just wondering if any one else is interested in this functionality?

Quite interested in this! Still find it sad that the functionality is so limited to my LG 55c7v.
Would love to be able to start xplay/youtube/doorcam etc

I’m not the best coder, but good @ debugging and very willing to test if you’ll have me :slight_smile:

Yes, interested!

I’m definatly interested as I have an LG B7 Oled TV. Would be great to be able to upen Netflix, change sources and so on.

I believe the functionality to change apps/sources is already present in thr current webostv media player component. The feature set I’m looking to add is remote functionality like the arrow keys and magic mouse

Yes, you can already change the source!
Check the docs https://www.home-assistant.io/components/media_player.webostv/

I can change the HDMI source, start apps and even open my favorite websites with one click.

can the open_url method be implemented in the component ?

I can help (though my skills aren’t great) and am VERY interested in this!

I would love to have the remote functionality.

I currently use my LG TV with Homekit and it’s great to turn it on an off and change source. The AppleTV/Homekit remote build into iOS can see the TV and adjust the volume but that’s about all.

It would be great to support similar more functionality akin to the LG app:

  • Home
  • Back
  • Select
  • Up/Down/Left/Right

It seems like a mouse cursor would also be possible.

The holy grail would be search.

Hi @bezmi
The local polling of the webOS component is a horrible solution. Therefore I searched for a better solution and found your post. I’m interested if you got the webOS component up and running with the PyWebOSTV lib?
Do you have code which I maybe can reuse?
Best greetings!

I’d be all over this, did you ever have any luck?

Unfortunately not. I moved shortly after this post was made and no longer use an LG TV for my main viewing.

See LG Magic remote arrow buttons

for my extension for button usage for LG webostv

Since the pylgtv library is no longer maintained, it has been forked and replaced by aiopylgtv, which implements the additional input command functionality and non-polling based state updates. Home assistant 0.104 includes the migration to the new library and support for the additional features.

1 Like

Thanks for the new integration. It seems like a much better basis going forward with a lot more potential.

Do you know how it might integrate better with Homekit?

The old version supported volume, play/pause. The new one supports volume, but play/pause is very inconsistent. None of the direction arrows or the back button work.

I’m not very familiar with homekit, sorry.

Play/pause toggle will probably never work reliably, because the TV only really supports discrete play and pause commands, and does not have any mechanism for retrieving the playing vs paused state.

Direction arrows and the back button should work fine (but again, I’m not familiar with homekit or how this is integrated there.)

Also it would be great to have progress information inside HA from TV.
I found sime kind of old PR https://github.com/home-assistant/core/pull/12166/files

Anybody tried to implement this?

Component has many commands, but you have to go to github to see all commands. Please, proxy this commands to component, to make autocomple when writting command work