Get all App IDs of all installed Apps on LG webOS TV

末鹿安然 提交于 2021-02-08 10:55:40

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!