bendavid / aiopylgtv

Library to control webOS based LG Tv devices
MIT License
143 stars 47 forks source link

LG webOS SmartTV (LG 32LM6350) - YouTube content doesn't launch #41

Open DivanX10 opened 2 years ago

DivanX10 commented 2 years ago

I use webos integration in Home Assistant. There is the latest version of Home Assistant 2021.10.4

This code does not run on a TV with webOS 4.5. I have two TVs, one LG 43UK6750 with webOS 4, and the second LG 32LM6350 with webOS 4.5. If I run this code for the LG 43UK6750 TV, then everything works, and if I run the code for the LG 32LM6350 TV, then it doesn't work there.

service: webostv.command
data:
  command: system.launcher/launch
  entity_id: media_player.tv_lg_na_kukhne
  payload:
    id: youtube.leanback.v4
    contentId: DKM9d5CZUxk
geoffoxholm commented 2 years ago

Sorry, if this is too obvious (it wasn't for me). I had to make sure Youtube was installed as an app on my TV. Launch Youtube manually, and try again to confirm.

DivanX10 commented 2 years ago

Checked it out. I launched youtube on TV and then launched the service, nothing happened. Then I turned on the TV and when I started, youtube just opened, but the channel itself did not open

service: webostv.command
data:
  command: system.launcher/launch
  entity_id: media_player.tv_lg_na_kukhne
  payload:
    id: youtube.leanback.v4
    contentId: cnV5mz515DI
geoffoxholm commented 2 years ago

i'm really not the right person to help, but i'm all you've got for now, so i'll keep going.

in my case i have v= in my contentId. full action below:

  - service: webostv.command
    data:
      entity_id: media_player.lg_basement_tv
      command: system.launcher/launch
      payload:
        id: youtube.leanback.v4
        contentId: v=6VB4bgiB0yA

you might confirm that any of this is working by calling another action like this:

  - service: webostv.button
    data:
      entity_id: media_player.lg_basement_tv
      button: ENTER
DivanX10 commented 2 years ago

Yes, all the commands LEFT, RIGHT, DOWN, UP, HOME, MENU, BACK, ENTER, INFO, EXT, MUTE work successfully, I can control the TV completely. The problem is different. I can't open a youtube channel in the built-in youtube app, also I can't start searching for the right channel in the built-in youtube app

Here in the video I show how channel search works through the voice assistant yandex alice, this is an analogue of your smart Alex column. As you can see in the video, the search for youtube channels is in the built-in browser on TV and does not work on the built-in youtube application. I use this code to search for channels on youtube, but the browser starts and youtube opens there with the desired channel

service: webostv.command
data:
  entity_id: media_player.tv_lg_na_kukhne
  command: system.launcher/open
  payload:
    target: >
      https://www.youtube.com/results?search_query={{
      trigger.event.data.book|replace(" ", "+") }}

Watch the video

Here I show how the voice control of TV works through the voice assistant yandex alice. Here I change the TV volume, launch plex, youtube and TV channels. Everything works fine

Watch the video

DivanX10 commented 2 years ago

now I checked again, I did not notice v= and indicated without, now I indicated v=6VB4bgiB0yA and it worked, but a window appears with the choice of an account from google. How do I make a video run without asking about a google account?

  - service: webostv.command
    data:
      entity_id: media_player.lg_basement_tv
      command: system.launcher/launch
      payload:
        id: youtube.leanback.v4
        contentId: v=6VB4bgiB0yA
geoffoxholm commented 2 years ago

Here's my Yule Log script that simply presses ENTER on the account selection screen (after waiting for it to appear).

sequence:
  - service: webostv.command
    data:
      entity_id: media_player.lg_basement_tv
      command: system.launcher/launch
      payload:
        id: youtube.leanback.v4
        contentId: v=6VB4bgiB0yA
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - service: webostv.button
    data:
      entity_id: media_player.lg_basement_tv
      button: ENTER
mode: single
alias: Yule Log
icon: mdi:fire
Dctigercc commented 9 months ago

Привет . Покажи как у тебя YouTube запускается . В текстовом редакторе -как выглядит команда .

DivanX10 commented 9 months ago

Привет . Покажи как у тебя YouTube запускается . В текстовом редакторе -как выглядит команда .

В текстовом редакторе

service: media_player.select_source
data:
  source: YouTube
target:
  entity_id: media_player.lg_tv_kitchen

Через веб интерфейс image

Dctigercc commented 9 months ago

Привет . Покажи как у тебя YouTube запускается . В текстовом редакторе -как выглядит команда .

В текстовом редакторе

service: media_player.select_source
data:
  source: YouTube
target:
  entity_id: media_player.lg_tv_kitchen

Через веб интерфейс image Блин вот я тупень. Так просто же .спасибо )