hobbyquaker/lgtv2

switchInput example

rooi opened this issue · 3 comments

rooi commented

Hi,

Create project! I would like to use switchInput to change the hdmi, but can't seem to find the right command. Could you please give an example on how to use this command? I've found some other sources that use the same api, but no official documentation. Do you have a link for that as well?

Thanks!

Roy

I was able to get all main menu launch points using

lgtv.request('ssap://com.webos.applicationManager/listLaunchPoints', function (err, res) {
   var launchPoints = res.launchPoints;
});

The object also contains all of the ids. To switch to hdmi2, I use:
lgtv.request('ssap://system.launcher/launch', {id: 'com.webos.app.hdmi2'});

rooi commented

Nice! That was exactly what I needed. Works on my 55e6

rooi commented

One more question... is there a command to request the current active hdmi source (or app)?

Thanks!