问题
i am trying to get some information about LG webOS TVs. For some home automation i would need these two information. Maybe someone can tell me where I should look for that or how to get these information:
1) I would need all the app ids from all apps which are installed on the tv. I do have some already but not all of them.
2) I also would need all the button bindings of the remote. Same as for the app ids, i know a few but not all.
Please have a look at the codes. It would be really nice if someone can provide a list or tell me how to get these.
Thank you very much!
App ID list:
"com.webos.app.hdmi1" = "HDMI-1",
"com.webos.app.hdmi2" = "HDMI-2",
"com.webos.app.hdmi3" = "HDMI-3",
"com.webos.app.hdmi4" = "HDMI-4",
"com.webos.app.today" = "Heute",
"lovefilm.de" = "Amazon Prime Video",
"googleplaymovieswebos" = "Google Play Filme",
"youtube.leanback.v4" = "YouTube",
"com.webos.app.browser" = "Webbrowser",
"com.webos.app.connectionwizard" = "Geräteanschluss",
"com.webos.app.smartshare" = "SmartShare",
"com.webos.app.miracast" = "Screen Share",
"com.webos.app.notificationcenter" = "Benachrichtigungen",
"com.palm.app.settings" = "Einstellungen",
"com.webos.app.softwareupdate" = "Software-Update",
"de.2kit.castbrowserlg" = "TV Cast"]
"com.webos.app.livetv"="TV",
"com.webos.app.tvguide"="TV Guide",
"youtube.leanback.v4" = "Youtube",
"googleplay" = "googleplay"
Commands:
audioStatus
audioVolume
closeApp appid
getTVChannel
input3DOff
input3DOn
inputChannelDown
inputChannelUp
inputMediaFastForward
inputMediaPause
inputMediaPlay
inputMediaRewind
inputMediaStop
listApps
listChannels
listInputs
listServices
mute muted
notification message
off
on
openAppWithPayload payload
openBrowserAt url
openYoutubeId videoid
openYoutubeURL url
setInput input_id
setTVChannel channel
setVolume level
startApp appid
swInfo
volumeDown
volumeUp
回答1:
Assuming you have a websocket port 3000 open on your TV, you can list apps using LGWebOSRemote:
$ lgtv listApps | jq '.payload.launchPoints[] | .id + ": " + .title'
"com.webos.app.hdmi3: HDMI 3 - PC"
"youtube.leanback.v4: YouTube"
... or simply run lgtv listApps
for unfiltered JSON.
Tested on an LG UK6750PLD with webOS 4.1.0.
In the libraries i've seen, button codes were hard-coded as commands.
来源:https://stackoverflow.com/questions/55898625/get-all-app-ids-of-all-installed-apps-on-lg-webos-tv