Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom volume control device #85

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open

Conversation

Xinne
Copy link

@Xinne Xinne commented Feb 15, 2022

Hi all,

I experienced some problems while trying to change the volume of my soundbar (sonos playbar with optical cable to the TV). When configured correctly the playbar does change volume when using the physical remote, but i discovered that this behaviour is achieved by a little hack: when changing the volume the tv sends a command (RF) to the remote, and the remote transmits the IR command to the sonos bar.

This causes two problems. The first one is pretty clear: when changing the volume from the web remote control card while the physical remote is hiding in the couch or god knows where, the IR-command never reaches the sonos bar. Secondly a situation can arise where the TV 'thinks' it is muted whilst the sonos is unmuted. Since the TV does not stop outputting sound to the optical output when muted, this causes a mute icon when the sonos is unmuted and visa versa.

This pull request adds the possibility to add a custom media_player to control when a certain sound mode is selected or the device if off (control soundbar playing music when the tv is off).

Check the readme for details! Im planning to write a option to also control the host so the mute icon is displayed when the host is muted, but since the host sometimes unmutes the output device (when the remote is pointed at the soundbar) and the tv does not specify mute on/off but just toggles it this was a little more work then expected.

@shadsnz
Copy link

shadsnz commented Jan 5, 2023

Hi Xinne,

How can I try your change? I've downloaded the lg-remote-control.js file and replaced the existing one in my HA (/www/community/www/community/LG-WebOS-Remote-Control). Is this correct approach?

I've then configured the front end card:

type: custom:lg-remote-control
entity: media_player.lg_webos_tv_oled65c9pva
mac: ....
sources:

  • name: YouTube
    icon: mdi:youtube-tv
    sound_devices:
  • name: none
    entity: media_player.vtv
  • name: external_optical
    entity: media_player.vtv
  • name: tv_external_speaker
    entity: media_player.vtv

However, on clicking the mute button the TV itself responds.

Many thanks for your work on this change. The functionality will be a great addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Offer a way to select a different device to control the volume
2 participants