LG WebOS better integration

Installed 3.0.1 this morning. Works great on hp23!

I have the app new installed and it looks like it is allright, only homey “feels” a little slower.
After a reboot of homey the app doesn’t work anymore.
In the app-list on the homey i see no symbol in the red cirkel from the Web-OS app.
My tv is a oled65cx6la.

Seems the integration is working for newest models but is broken for older ones…
Today I tried to add the TV again and it always failed. Every-time I added TV via LG WebOS from Athom , it works. For now I’m switching to this version then ;-(

I might have figured out what the problem was. I found two bugs since the SDK3 version. TV’s were registered as unavailable when they could not be reached; as in turned off. A bit weird this was causing issues all of the sudden but okay. So whenever a TV is no longer reachable I now will force it to ‘available’. Furthermore, I found an issue with some flows using special web sockets. They would reject the secured connection and needed some extra love :wink: Anyway fix is incoming today.

PS: I was also working on something else you all might find interesting.


New version 3.0.2 is available in the store and via Github


New version 3.1.0 is available in the store and Github. New version includes an action card to create an alert instead of a toast. Alerts have buttons! You can do stuff with buttons, crazy right. Do you want to watch a series each evening at 19h and don’t feel like looking through all the apps? Create an alert with buttons to launch those apps.

Buttons should be defined as a valid JSON array. See com.webos.notification | webOS Open Source Edition for the button definition.

        "label": "Netflix",
        "onclick": "luna://com.webos.applicationManager/launch",
        "params": {"id": "netflix"},
        "buttonType": "confirm",
        "focus": true
      }, {
        "label": "Got to website",
        "onclick": "luna://com.webos.applicationManager/launch",
        "params": {"id": "com.webos.app.browser", "target": "https://example.org"},
        "buttonType": "confirm"

Per default, there will always be a Close button that does nothing but cancelling the alert.

Each app has a different ID and parameters. I don’t know all ID’s, I don’t know all possible parameters :man_shrugging:. Maybe we should create a list somewhere so we can share them.


@MaxvandeLaar Really cool! Unfortunately I can’t make the buttons work.

When I copy-paste your example, I get error:

Unexpected token } in JSON at position 202

When I leave the field empty, the default message (with only the close button) works perfectly fine.

Also tried just one button:

      "label":"Got to website",

But that gives me this error:

Message is not parsed

Support might be really flaky in this. Maybe the browser or your tv has a different ID? Or different params. Try adding a button with just a label and nothing else. See if that works.

I mean I have 2 lg tvs and one doesn’t support create alert at all. For the one that does work, the timeout does not work :smiling_face_with_tear: so it’s a very tricky thing to implement and get it working

Fiddled around for a bit. This works for me. Also, the timeout works without any problems.

My alert doesn’t show a title tho, but that’s not that big of an issue.

      "label":"Netflix Test",
      "label":"Live TV",
1 Like

Very neat, it works here with your example JSON, Max.
LG webOS UJ630V (4 to 5 yrs old)

The last JSON of @basvanderploeg show the messagebox, but the buttons act like ‘cancel’. Bas has a newer model I guess?

Yeah, I’ve got a C2 OLED from last year.

1 Like

Max, I have WebOS version 2.3.0 installed on my Homey. I checked your website and installed version 3.1.0 but it seems that it wont install on my Homey? I just clicked the button “Installeer” and it says that it wil be instellaed but nothing happened. What do I do wrong?

I just stumbled upon this app and it works so much better than the one from Athom, so thanks a lot!

Will try to fiddle around a bit with the alerts later this week. I have an OLED77G1RLA (I think from 2021).
Would it be possible to send an http request to Homey’s IP address when clicking a button on an alert? Preferably without opening up the browser on screen.

@Peter_Kawa I also have an older LG tv (maybe even the same model I can’t remember) but the buttons work for me. But as with everything with LG WebOS. Your millage may vary.

@Janbuijs91 I wanted to actually do the same thing. Or even trigger a flow or something via an Alert. I could not figure it out, the only option I see is to create an LG WebOS app for the TV itself which you can call and that would be able to ‘do Homey stuff’. I already have a prototype app for my team.

Yeah they do work for me as well, with your JSON.
I only wanted to note the JSON posted by Bas is probably for a newer model than I have :wink:

Yeah triggering a flow through the alert button was exactly what I want it to do, but I thought sending an http request would be the simplest way of doing that. Any other way would be just as good.
I would gladly test out any TV app that can communicate with Homey in some way if you have one.

I also just read an article that claims that LG WebOS TV’s can run most Android TV apps? Tbh, I didn’t think that was possible. This might make it easier to do🤔
The article:

Guess I’ll be spending my weekend looking at this stuff.

The JSON from Bas also works for me and the notifications don’t show a title either.

To which ‘Store’ is being referred to?
As I cannot find a specific webos app in the homey app store that has your name @MaxvandeLaar to it.

Maybe someone can steer me in the right direction.

Otherwise I will try the GitHub version.

The community store. But it’s still in a rebuild phase atm, so unavailable for now