LG webOS Notifications w/icon: Problems

I found it, thanks to this post.

service: webostv.command
data:
  entity_id: media_player.lg_tv
  command: system.notifications/createAlert
  payload:
    message: It is working!
    buttons:
     - label: "Launch Jellyfin"
       onclick: "luna://com.webos.service.applicationmanager/launch"
       params:
         id: "org.jellyfin.webos"
     - label: "Launch Retroarch"
       onclick: "luna://com.webos.service.applicationmanager/launch"
       params:
         id: "com.retroarch"
    iconUrl: /home/root/gas-mask-100x100.png

Maybe not right topic to ask, but I would like to know in short: How HA WebOS integration is communicating with TV. I mean, I would like to be able to send webostv.command from Postman or with Curl, if they communicating this way. Wouldn’t like to make off topic here, but if somebody could point me on some documentation with endpoints (I didn’t find anything) or simply answer short if they communicate differently and if this is not possible. Thx

2 Likes

iconUrl in view? screenshot ?

Scroll few posts above.

Posting this for others that might need it.

I recently bought a new TV that’s running a newer version of webOS after my old LG TV started having issues (new TV webOS version is 03.30.71, the menu is now on the far left of the screen and notifications show up in the middle near the bottom of the screen instead of top right corner). I really loved the notifications that was available on my previous TV, when the WiFi worked that is, but the new one doesn’t seem to be working the same for me at least. I can’t get notify.lg_webos_smart_tv service call to work, might be due to the new version of webOS or the fact my old TV that I had previously connected to HA maybe has some lingering settings hidden somewhere, not sure, but webostv.command works great. Thanks to @stiw47 info above I was able to get images to show up as well on a non-rooted TV using a USB thumb drive.

service: webostv.command
data:
  command: system.notifications/createAlert
  payload:
    message: Testing with icon
    buttons:
      - label: DISMISS
    iconUrl: /tmp/usb/sda/sda1/test_icon_80x80.png
  entity_id: media_player.lg_webos_smart_tv

One thing I didn’t like is having to click on the remote “enter” button to get the notification to go away and since the automatically temporary “system.notifications/createToast” alert doesn’t allow icons, I did some testing using the service call for remote control buttons and now have my notifications with icons pop up using the above service call then wait 5-8 seconds inside the automation and then perform the following service call to dismiss the notification for me. Might help someone else in the future maybe.

service: webostv.button
data:
  button: ENTER
  entity_id: media_player.lg_webos_smart_tv
2 Likes

@stiw47 nice find with the icon, thanks for sharing it.
A question, the icon does not work on my TV, does it have to be a WebOS 6? My TV is on WebOS 5 (5.4.3-35 to be exact)

Tried both /tmp/usb/sda/sda1/some.png and /tmp/usb/sdb/sdb1/some.png with a 80x80 PNG image, but it only shows the alert.
Since it is Linux based, I don’t think the USB device path is different on WebOS5, so the path should be correct right?

Unfortunately, this is something I cannot tell. Vendor implementations of TV OSs very often knows to be ridiculous funny. Also, it is not mandatory that they keep same mount path from version to version. First thing funny for me was that they mounting removable device to /tmp directory. On Linux, /tmp is usually used for temporary stuff, because it being wiped on each reboot. We are usually using directory /media/<username> for mounting removable devices and other partitions. Ok, you can mount anything where ever you want, but this is just some good practice. So according that they choose /tmp for removable storage device mount on my TV, I really cannot imagine how creative they were with yours :joy:

If you don’t want to root your TV, you can try to enable Developer Mode. This is official, by LG, and you can turn it off when ever you want. It will anyway auto turn off after certain amount of hours. Developer Mode allows you to install applications manyally. LG webos app extension is .ipk. All manually installed apps being auto deinstalled once when dev mode is turned off. But what is more interesting for your question, if I remember correct, you can enable telnet from dev mode. Telnet supports ls command (and more commands which you would usually use from ssh), so you can explore your file system, and maybe find where and with what name is usb mounted.

1 Like

@stiw47 thanks for your time and explanation!
I enabled the Dev Mode and reach the TV with WebOS Dev Manager, from there I could browse to the USB, and the path is same as you mentioned.

EDIT: While I was there, I uploaded the png file to the root of the TV and that didn’t work either…

I think WebOs 5 does not support images in alerts and notifications, if anyone else with WebOs 5 manage to do so, please share with us.

2 Likes