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

Sony Bravia media player volume slider not working #26351

Closed
maartenpaauw opened this issue Sep 2, 2019 · 13 comments · Fixed by #31234
Closed

Sony Bravia media player volume slider not working #26351

maartenpaauw opened this issue Sep 2, 2019 · 13 comments · Fixed by #31234
Assignees

Comments

@maartenpaauw
Copy link

Home Assistant release with the issue:

0.98.2

Last working Home Assistant release (if known):

Operating environment (Hass.io/Docker/Windows/etc.):

Docker on Synology NAS

Component/platform:

Sony Bravia TV media player
https://www.home-assistant.io/components/braviatv/

Description of problem:

I can't set the volume via the slider. It doesn't do anything.

media_player

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

media_player
  - platform: braviatv
    name: tv
    host: !secret media_player_tv_host

Traceback (if applicable):


Additional information:

The TV: Sony Bravia KDL-42W805A

@probot-home-assistant
Copy link

Hey there @robbiet480, mind taking a look at this issue as its been labeled with a integration (braviatv) you are listed as a codeowner for? Thanks!

@schmittx
Copy link
Contributor

schmittx commented Oct 15, 2019

@maartenpaauw If you have an amp connected, the slider won't work. Refer to the braviatv_psk custom component configuration.

@maartenpaauw
Copy link
Author

@schmittx I don't have an amp connected. I use the speakers from the television.

@Hrupek
Copy link

Hrupek commented Nov 11, 2019

@maartenpaauw have you resole the issue? I have the same

@maartenpaauw
Copy link
Author

No, unfortunately not.

@itn3rd77
Copy link
Contributor

I can't set the volume nor switch the program. The rest is working fine. Any way to debug whats going on?

@Extreme79
Copy link

I have the same issue. Slider isn't working to set volume.
Tapping on 🔊 change the volume instead.
I've a pioneer amp (integrated as onkyo) connected to the TV (the slider for that device is working).

@Siytek
Copy link

Siytek commented Jan 18, 2020

I also have the same problem, +/- buttons work but the slider doesn't.

@dcnielsen90
Copy link
Contributor

dcnielsen90 commented Jan 25, 2020

The problem resides in braviarc.py. We are sending a float and the tv is expecting an integer in string.
Here is a fix:

247     def set_volume_level(self, volume):
248         """Set volume level, range 0..1."""
249         self.bravia_req_json("sony/audio", self._jdata_build("setAudioVolume", {"target": "speaker",
- 250                                                                                 "volume": volume * 100}))
+ 250                                                                                 "volume": str(int(volume * 100))}))

Now because of this #30964, I don't know how to submit a PR for this. It appears @balloob and @andrey-git are maintainers of this fork based off of this -- maybe they'll be able to implement the fix.

In the mean time you can implement the fix yourself if you're feeling ambitious.

@balloob
Copy link
Member

balloob commented Jan 27, 2020

Bravia is unmaintained. I am only on the package because I run Home Assistant. I am not involved.

If someone wants to fork the original package at https://github.com/aparraga/braviarc, figure out what is different in the braviarc-homeassistant package on pypi, add those changes and start maintaining it, that would be great.

Until then, all Bravia RC bugs will remain unsolved.

@dcnielsen90
Copy link
Contributor

I'm looking into it now. We are currently at adac2af Based on my testing, everything looks good up to commit 28b431a. It appears 2719869 broke something with toggling the TV on/off. Regardless -- this will fix this issue and some other erroneous logs. I'll see if I can get a PR in.

dcnielsen90 added a commit to dcnielsen90/core that referenced this issue Jan 30, 2020
    BraviaRC is currently unmaintained for home-assistant. This commit
    swaps it out with a new fork of BraviaRC called python-bravia-tv.
    This captures all bug fixes from BraviaRC release 3.7 (previously
    linked backend) to right before BraviaRC breaks when used by home-assistant.
    The intent of forking is to be able to continue supporting home-assistant.
    This is not intended to be a one off solution; this new fork will have
    future updates and be maintain as needed.

    This initial commit of python-bravia-tv improves the import process,
    however overall preserves the original API.
    Other fixes include:

    * Fix set-volume slider
    * Better error handling
    * Increase input options

    Resolves: home-assistant#26351, home-assistant#30964
    See also: home-assistant#12577, home-assistant#14843, home-assistant#17345, home-assistant#18245
springstan pushed a commit that referenced this issue Feb 1, 2020
BraviaRC is currently unmaintained for home-assistant. This commit
    swaps it out with a new fork of BraviaRC called python-bravia-tv.
    This captures all bug fixes from BraviaRC release 3.7 (previously
    linked backend) to right before BraviaRC breaks when used by home-assistant.
    The intent of forking is to be able to continue supporting home-assistant.
    This is not intended to be a one off solution; this new fork will have
    future updates and be maintain as needed.

    This initial commit of python-bravia-tv improves the import process,
    however overall preserves the original API.
    Other fixes include:

    * Fix set-volume slider
    * Better error handling
    * Increase input options

    Resolves: #26351, #30964
    See also: #12577, #14843, #17345, #18245
@Extreme79
Copy link

I'm experiencing the same issue on my bravia XG series android tv.
Using volume buttons the volume change perfectly, but using the slider there's no volume change: tv receive the command (volum bar is shown on screen), but without changes. Probably the same issue described here

@dcnielsen90
Copy link
Contributor

@Extreme79 can you open a new issue? Please answer all the questions with the new issue form; it gives us a starting point to start troubleshooting. This particular issue your posting in has been resolved. If your running Home Assistant 0.112.3 or later your issue can't be caused by this because this particular line has been fixed.

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

Successfully merging a pull request may close this issue.

10 participants