-
Notifications
You must be signed in to change notification settings - Fork 48
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
Support for current playback state #39
Comments
I'm interested in this too. I have a rooted TV and was playing around and seems like I can monitor the state of the video using ls-monitor:
The interesting payload is this JSON: {
"foregroundAppInfo": [
{
"appId": "netflix",
"windowType": "_WEBOS_WINDOW_TYPE_CARD",
"acbs": [
{
"pipelineId": "_lpPnaAWWEgYetM",
"playerType": "direct audio",
"playStateNow": "playing",
"playStateNext": "playing",
"isFullScreen": false,
"positionX": -1,
"positionY": -1,
"width": -1,
"height": -1
},
{
"pipelineId": "_kfZdZS2etj5ydM",
"playerType": "video",
"playStateNow": "playing",
"playStateNext": "paused",
"isFullScreen": true,
"positionX": 0,
"positionY": 0,
"width": 1920,
"height": 1080
}
]
}
]
} "playerType": "video" and "playStateNow" seem to represent whether the TV is outputting video independent of what application it is, "appId" represents the current app. Not sure if this is something that can be subscribed to via the API? Understand root access is not something everyone has. edit: Seems if we can subscribe to com.webos.service.acb/getForegroundAppInfo it might be possible to monitor video state.
|
@poroping Did you create a mvp by chance? Im currently looking to resolve this issue aswell. |
@bashbers I tried hard to get this info but this is only available from inside the TV and not exposed over the network at all. My next step is to create a simple backgroud app for webos that publishes such info to MQTT. The app should not need root and should be installable with dev-manager-desktop . Hope to have a crack at it this week. |
You can find all of them here: https://www.webosose.org/docs/reference/ |
@MindFreeze thats great news! If you want you could link the repository here so I can help. Don't have much dev experience for WebOS (read: none), but I do know JS. |
I am also new to WebOS development and it is terrible so far. Half the things simply don't work and no one seems to care. The latest emulator is broken but I managed to get going with v5. Now my latest problem is that service debugging doesn't work. I know what I have to do but it is quite difficult without any debugging or even logging. |
I haven't had time to work on this further. Was kinda just hoping someone else could do the legwork ;) My approach was going to add some API endpoint that could subscribe and poll to these media events. |
Ill look into extending the existing SSAP server in order for HA to automatically discover the new luna endpoint. |
I give up on the app idea. My TV from 2018 only has WebOS 3.9, which runs nodejs 0.12.2 . Nothing works for such old versions, even the build tools, like babel, don't support them anymore. On top of that there seems to be no reliable way to auto start the service when the TV turns on. LG's own docs are trash and don't care about older versions. Guess my next TV is not going to be LG. |
HI there! I've found out a way to get updates for the play/pause state from my LG TV: https://github.com/SLG/tv-service |
Link is broken? |
Nope, it was private. Changed to public! |
There is no way AFAIK to get the current state of the TV. Is it playing or paused.
This is very useful for automations. Also when my oled tv is in screensaver mode on a puased video, I have to call PLAY up to 3 times to get it to resume the video, but there is no way to know if any of the calls actually worked or just woke up the TV.
Is this doable?
P.S. knowing if the screensaver is on would be great too.
The text was updated successfully, but these errors were encountered: