[SOLVED] How to use “kodi:kodi:myKodi:shownotification” channel?

Hi
The Kodi binding / thing has a “kodi:kodi:myKodi:shownotification" channel

I’m I correct in assuming that OpenHAB can send text messages to Kodi while watching a movie?
For instants doorbell ring, washing machine ready?

Anybody know how to use this /example

The only thing I found so far is this post Sitemap Questions First try

1 Like

Haven’t tried by myself. But I would expect, that you just have to write your message on the String item bound to that channel…

Hi Michiel,

You can send commands (Strings) to the channel which will be shown in Kodi UI. It should work like this:

demo.items:

String kodiLivingRoomShowNotification "Show Notification" { channel="kodi:kodi:myKodi:shownotification" }

demo.rules:

rule "My Notification"
when
     ...
then
    kodiLivingRoomShowNotification.sendCommand("Hi there")
end
5 Likes

Hi curlyel, cweitkamp
Thanks for your response

@cweitkamp
That sounds easy, I will try that

it works like a charm Christoph,

Your the best!!

o yes, for the sake of clarity I have used the item instead of the channel name

If I use the channel, I get errors in my rule because there is : in my channel names and that the rule engine apparently doesn’t like it.

I’m also using this channel now and it’s working perfect. I was wondering if it’s possible to send extra arguments with it, like the title of the messagebox, a custom icon.

I’m also using some shell scripts on my Kodi pi, and here I use curl to show notifications:

curl -v -H “Accept: application/json” -H “Content-type: application/json” POST -d ‘{“id”:1,“jsonrpc”:“2.0”,“method”:“GUI.ShowNotification”,“params”:{“title”:“Hyperion”,“message”:"‘enabled’ config",“image”:"/storage/.kodi/userdata/scripts/hyperion.png"}}’ http://aaa:aaa@127.0.0.1:8080/jsonrpc 2> /dev/null

Yes, it is. According to the docs the shownorification channel type has three configuration parameters. Note: the icon parameter accepts one of the openHAB icons (as listed here).

What is your preferred way of configuration? This is a short how-to in Paper UI:

  1. Click on “Show more” button
  2. Link an item to the Channel

  1. Click on the top “Edit” button (pencil)

grafik

  1. Change the configuration for your needs.

But I am afraid there is no dynamic way to change the configuration during runtime. If you need different types of notification you rather have different kinds of notifications that you want to process and with the current solution you can nicely define one channel for each notification type. IIRC this in only possible in textual configuration.

I will add a small update to the documentation to clarify how it is working.

hi

thanks for the reply. I missed that part in the docs, sorry.
I do everything in textual config, so I will figure it out this evening.

Here you an find some help:

thanks for the extra info. It’s already working :slight_smile:

Hello,

sorry for hijacking this thread. :wink: But the topic is related.

At the moment I am using XBMC Action 1.x to send on screen messages to my Kodi boxes. This works great, but I am looking into my configuration to remove as many 1.x actions and bindings and replace these with 2.x stuff.

Along other parameters I have three content paramenters for the XBMC Action 1.x: title, message, image. So I can send a message with a custom title and also display a custom image (which need so be available through http).

After reading this thread this does not seem to be possible with the Kodi Binding 2.x, is that correct? I understood that I only have a message and can display a standard image from openHAB, no custom image. Or did I miss something?

Thank you and regards,
Roi

It is not possible to dynamically set title and icon with Kodi binding.
It is possible to have a number of pre-defined channels, each with different title and icon, where you can send arbitrary message text to the linked Item.

Thank you. Sounds ok for me. And can I somehow use custom images in these channels?

Use images in what way? Is there some part you don’t understand about use of the channel"s
icon parameter?

Sorry, I was not aware that I can use own icons as well as the default icons from the icon set. I am aware now. :wink:

Tried to add a notification channel and then another one. I do not see the channels in Paper UI, but the channels are there in the jsondb things file. Restarting and clearing the cache did not work. Any idea? Also about deleting these channels again?

/EDIT: “Show more” did it. Did not notice it before. Sorry…