Giter Site home page Giter Site logo

sony_bravia_psk's Introduction

sony_bravia_psk's People

Contributors

gerard33 avatar knapoc avatar rchl avatar rogerselwyn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mm7d rchl troykelly

sony_bravia_psk's Issues

'source' is not a 'user-friendly' name

return_value['source'] = playing_content_data.get('source')

Seems like the source name returned from get_playing_info is an internal one as opposed to one returned from load_source_list which seems more user friendly.
More precisely, former is extInput:hdmi while latter is HDMI 1, for example.

Noticed that on a higher level, when using your braviatv_psk component in home assistant where source_list of entity returns nice and clean source names while source returns internal one. See resoai/TileBoard#94

Add external input status

Please can you add the ability to retrieve information from the endpoint sony/avContent with method "getCurrentExternalInputsStatus". This pulls back Information such as:

{ "uri": "extInput:hdmi?port=1", "title": "HDMI 1", "connection": true, "label": "Sky Q", "icon": "meta:hdmi", "status": "false" },

I do see on my TV which is a few years old that this will return 500 status code when my HDMI 1 receives input from my Sky box, but until that point it provides information on any label the user may have provided.

If you prefer, I can take a look at creating a PR for it.

It doesn't work after update to 0.94

Hello

It doesn't work on all 3 of my tv. Do I need to change anything?

Thanks

2019-06-06 12:25:41 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform braviatv_psk
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/braviatv_psk/media_player.py", line 89, in setup_platform
[BraviaTVDevice(host, psk, mac, name, amp, android, source_filter)])
File "/config/custom_components/braviatv_psk/media_player.py", line 98, in init
from braviapsk import sony_bravia_psk
ModuleNotFoundError: No module named 'braviapsk'
2019-06-06 12:25:41 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform braviatv_psk
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/braviatv_psk/media_player.py", line 89, in setup_platform
[BraviaTVDevice(host, psk, mac, name, amp, android, source_filter)])
File "/config/custom_components/braviatv_psk/media_player.py", line 98, in init
from braviapsk import sony_bravia_psk
ModuleNotFoundError: No module named 'braviapsk'
2019-06-06 12:25:41 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform braviatv_psk
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/braviatv_psk/media_player.py", line 89, in setup_platform
[BraviaTVDevice(host, psk, mac, name, amp, android, source_filter)])
File "/config/custom_components/braviatv_psk/media_player.py", line 98, in init
from braviapsk import sony_bravia_psk
ModuleNotFoundError: No module named 'braviapsk'

Can not request commands from TV in standby

When requesting _refresh_commands (line) from get_command_code (line) to turn On the TV - an error is generated if the TV is in standby (as would be expected).

{
    "error": [
        7,
        "not power-on"
    ],
    "id": 102
}

If the TV is in Standby it's useless calling get_command_code anyway as the PowerOn command is not returned for most models of Bravia AFAIK.
The command for supporting TV's would just simply be (turning On a TV in standby)

{
  "method": "setPowerStatus",
  "version": "1.0",
  "params": [
    {
      "status": true
    }
  ],
  "id": 102
}

Error in log - getVolumeInformation

I've had the following errors in my log, I think twice. I suspect it is because of a race condition between checking for whether the TV is switched on or not, and then checking for volume information. I noticed that the TV had just been switched off, when the errors were logged.

I haven't looked into the code, but I'm happy to try and debug and create a PR. I suspect that it isn't easily replicable, but I'd be pretty sure I can fake the situation so I can trigger the error, so it can be handle better. My suggestion would be to ignore the error (since as the message says, it is an error because the TV is switched off), or at worst put out a single warning message, rather than two errors.

2022-03-06 08:01:20 ERROR (SyncWorker_1) [braviapsk.sony_bravia_psk] Invalid response: {'error': [40005, 'Display Is Turned off'], 'id': 1}
request path: sony/audio
request params: {"method": "getVolumeInformation", "params": [], "id": 1, "version": "1.0"}
2022-03-06 08:01:20 ERROR (SyncWorker_1) [braviapsk.sony_bravia_psk] JSON request error:{
"error": [
40005,
"Display Is Turned off"
],
"id": 1
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.