madmicio / LG-WebOS-Remote-Control

Remote Control for LG TV WebOS
395 stars 73 forks source link

Remote control works but only for very limited commands #42

Closed fradaxx closed 3 years ago

fradaxx commented 3 years ago

Hi,

I need some help with LG-WebOS-Remote-Control.

I managed to install LG-WebOS-Remote-Control via HACS in my HA configured as follows:

System Health

version 2021.1.0
installation_type Home Assistant OS
dev false
hassio true
docker true
virtualenv false
python_version 3.8.7
os_name Linux
os_version 5.4.79-v7
arch armv7l
timezone Europe/Rome
Home Assistant Community Store GitHub API | ok -- | -- Github API Calls Remaining | 4881 Installed Version | 1.9.0 Stage | running Available Repositories | 773 Installed Repositories | 4
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Hass.io host_os | Home Assistant OS 5.9 -- | -- update_channel | stable supervisor_version | 2020.12.7 docker_version | 19.03.13 disk_total | 28.6 GB disk_used | 3.8 GB healthy | true supported | true board | rpi3 supervisor_api | ok version_api | ok installed_addons | File editor (5.2.0), Duck DNS (1.12.4), Terminal & SSH (8.10.0), ESPHome (1.15.3)
Lovelace dashboards | 1 -- | -- mode | storage views | 6 resources | 2

During first installation of HA on my RaspberryPi 3B+ it automatically discovered my LG TV 43UM7000PLA and installed the LG HomeKit Controller named "LG webOS TV 9DAE" and the entity media_player.lg_webos_tv_9dae; with this entity I was already able to control only the video source of the TV.

After the installation of LG-WebOS-Remote-Control and of the other required add-ons (browser_mod and channel_pad), I was able to view the image of the enhanced remote control adding a custom card with the following code:

type: 'custom:lg-remote-control'
entity: media_player.lg_webos_tv_9dae
sources:
  - name: Netflix
    icon: 'mdi:netflix'
  - name: Plex
    icon: 'mdi:plex'
  - name: YouTube Kids
    icon: 'mdi:youtube'
  - name: YouTube
    icon: 'mdi:youtube-tv'
  - name: Amazon Prime Video
    icon: 'mdi:amazon'
  - name: HDMI1
    icon: 'mdi:video-input-hdmi'
  - name: HDMI2
    icon: 'mdi:video-input-hdmi'
  - name: HDMI3
    icon: 'mdi:video-input-hdmi'
channels:
  - image: /local/config/www/community/channel-pad/tv_logo/channel_1.png
    number: '1'
  - image: /local/config/www/community/channel-pad/tv_logo/channel_2.png
    number: '2'
dimensions:
  scale: 0.8
  border_width: 3px
colors:
  buttons: var(--deactive-background-button-color)
texts: null

However the only working button on this remote control is the "source" one; pressing it a drop-down list with all alternative sources appears and they work correctly. Any other available button on the remote control image react but nothing happens on the TV and for some of them an error "Failed to call service webostv/command. Service not found" is displayed on the bottom left corner of the browser window.

If I press the individual "sources" keys the displayed error is "Failed to call service media_player/select_source. Could not find source Youtube (or Plex or Amazon Prime Video, etc.).

Please, can someone address me on how to solve this problem?

fradaxx commented 3 years ago

OK, I managed to solve the problem by myself. The problem was that I had omitted to correctly configure the media_player section in configuration.yaml. Following the instruction available here: https://www.home-assistant.io/integrations/webostv/, I added the following section in my configuration.yaml file:

webostv:
  host: x.x.x.x
  name: Living Room TV
  customize:
    sources:
      - LiveTV
      - YouTube
      - AirPlay
      - Movies
      - Amazon Prime
      - Netflix
      - HDMI 1
      - HDMI 2
      - HDMI 3
      - AV
      - Component

media_player: