LG WebOS Binding - List of Apps

Hi @sprehn and others,

I’ve been using the LG WebOS Binding since the early days where it was named ConnectSDK Binding… an back in the days as i’ve set up my sitemaps, i was able to get a list of Apps for the application Item via the REST API… I’m pretty sure I was getting the list there, but cant remember how…

Since i’m setting up my UI to HabPanel… i was searching again… but i cant get the list of apps via REST API…

Did something changed or if not, can someone guide my the the right part of the Rest API where i can get the list?

I’m running on the latest snapshot build of OH…

this is a Old list which i got from a backup of my sitemap file… but mybe the list is longer… or the application names changed…

	        Selection item=LG_TV0_Application mappings=[
				"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",
	            "com.webos.app.hdmi1" = "HDMI 1",
	            "com.webos.app.hdmi2" = "HDMI 2",
	            "com.webos.app.hdmi3" = "HDMI 3"]

Is there a possibility to send parameters along with the Application channel?
It should be possible to control the com.webos.app.brower from parameters, eg. go to url.
http://webostv.developer.lge.com/api/webos-service-api/application-manager/?wos_flag=launch#launch

yes, likely with the next release

Hi,

not sure what rest api would return those values. but you can enable debug logging for the binding and switch channels. You will find a list of all ids and their names in your log… watch out for: “AppInfo” in the log statements. btw. With the next release this will only happen once the TV goes online.

log:set debug org.openhab.binding.lgwebos

Any timeline on that ? :wink:

Cannot tell, but you can follow the discussion here: https://github.com/openhab/openhab2-addons/pull/2926

Ah great!.. yes now i can remember… thats what i did a while ago… thanks for pointing me there…

Pull Request #2926 was just merged. With the new 2.5 version you can use classic rules to fetch a list of applications available on the TV and launch apps as well.

	 val actions = getActions("lgwebos","lgwebos:WebOSTV:3aab9eea-953b-4272-bdbd-f0cd0ecf4a46")
	 if(null === actions) {
	        logInfo("actions", "Actions not found, check thing ID")
	        return
	 }

	 // list of applications
	 val apps = actions.getApplications
	 apps.forEach[a| logInfo("action",a.toString)]

	 // launch applications
	 actions.launchApplication("com.webos.app.tvguide") // TV Guide
	 actions.launchApplication("com.webos.app.livetv") // TV
	 actions.launchApplication("com.webos.app.hdmi1") // HDMI1
	 actions.launchApplication("com.webos.app.hdmi2") // HDMI2
	 actions.launchApplication("com.webos.app.hdmi3") // HDMI3	

1 Like

Thank you @sprehn for adding these actions… i’ll give it a try soon…

Hi there,
after upgrading from 2.5.5 to 2.5.7 I get this error message

21:43:37.082 [ERROR] [untime.internal.engine.RuleEngineImpl] - Rule 'Switch Scene Netflix': 'getApplications' is not a member of 'org.eclipse.smarthome.core.thing.binding.ThingActions'; line 1220, column 13, length 23

Did something change in the 'org.eclipse.smarthome.core.thing.binding.ThingActions'?

Thanks a lot!

yes. getapplications was removed. a the karaf console command was introduced instead to query the apps

Hi Sebastian, thanks for the quick reply!

Hi all,
Any chance to call full screen browser on WebOS?

actions.launchApplication(“com.webos.app.browser”, “{“key”:“value”}”)