-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
WebOS TV doesn't report media playback status #91709
Comments
The endpoint you linked is not exposed from the outside, it is only available for applications running directly on the TV - bendavid/aiopylgtv#39 (comment) I have tested this endpoint in the past with no success. If you have a working version please create a PR to add it to https://github.com/home-assistant-libs/aiowebostv |
OK, did some more testing. It looks like it's only available on newer versions. On my C2 with the latest firmware (webOS 7.3.0-2402) it's accessible remotely, but on my older tv running webOS 3.9.0, it just 404s. |
I went ahead and got it working in home assistant now. If needed, I can make a PR for it as well, if home-assistant-libs/aiowebostv#178 is merged. |
I'm interested in try this solution. Would it be possible to test it somehow? Thanks in advance! |
Sure, you'll need to replace the aiowebostv package with my version here: https://github.com/rale/aiowebostv/tree/main and patch webostv/media_player.py something like this: dev...rale:core:webos_media_state |
Old version tv run: |
Based on the above, it turned out to create a pause sensor:
|
Looking forward for release |
For older (and maybe newer?) tv's this might work as well: https://github.com/SLG/tv-service |
@SLG you can test the endpoint |
I was able to test and confirm it's also working on another TV, a QNED85 with latest firmware, webOS 7.3.1-37. |
@rale it is worth rewriting the code to use endpoint |
Sorry, I was referring to com.webos.media/getForegroundAppInfo working. As far as I can tell, you can only access com.webos.service.acb/getForegroundAppInfo from locally on the tv, not through the remote API. |
I didn't understand where to patch, so I wasn;t able to test it. Do you know if this upgrade will be released in home assistant? Thanks!! |
|
When is this expected to be merged? |
My understanding is that this needs to be merged first, but it is waiting for testers. If you have a TV with a webos version older than 7.3.1 you can help the merge process by testing what happens on your tv. |
My tv is at version 5.4.3-36, how can I test that? I'm new to HA so I'm not sure where to begin with testing a pre-release version |
You need at least First check out the code from the PR:
Then you need to open the folder containing the code
In this folder create a file with the following code (let's call the file
The TV should ask you whether you want to let the mobile device connect (mine did, at least, idk how it is with lower version numbers). Then start playing something, pause it, stop it, and so on. You should see new lines flying down your computer screen. Copy let's say 10 lines of that output and paste them in the PR I linked so they know what happens on lower versions. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
Since this is waiting for a pr to be merged i don't think this should be considered stale. |
Hi,
Only tested remotely with @rale fork. I did not test locally with |
I set up a custom component repo for anyone who wants to test or just wants to use media player status. You should be able to just add it as a custom repo in HACS and install it, then add the LG TV integration. |
But it reports just on / off state isnt it? It does not report playing... |
What model tv / webos version do you have? It should show playing or paused for any newer TVs with the api available. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
The pr isn't merged yet. |
@thecode I'm eager to use this feature 😃. Do you know when it will be released? |
The problem
The webostv integration isn't currently able to display media playing state.
From the previous discussion at #67681 (comment)_ it looks like the problem was that no one knew how to query it.
The required webos endpoint is "com.webos.media/getForegroundAppInfo", which you can request or subscribe to for updates, and the response looks like this:
{'subscribed': False, 'returnValue': True, 'foregroundAppInfo': [{'appId': 'com.webos.app.mediadiscovery', 'playState': 'paused', 'type': 'media', 'mediaId': '_xxxxxxx', 'windowId': '_Window_Id_3'}]}
What version of Home Assistant Core has the issue?
2023.4.5
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
Integration causing the issue
webostv
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: