News:

HOT TIP! In the command editor, you can ctrl-click and drag an item to create a copy of it.

Main Menu

Kodi OSD Notifications made a little easier

Started by PegLegTV, June 25, 2015, 09:09:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PegLegTV

UPDATE: even simpler thanks to jitterjames

I know this is a simple one, but I got tired of having to enter all the information needed for Kodi OSD notifications so I made it so I only have to enter the basics

if you want to use an image with your Kodi OSD Notification you will need to create a new folder in your VC Folder called "XbmcImages" with out the quotes and then you can just place all your images in that folder (so far I only use .jpg and .png files)

then all you have to do is use VC.Triggerevent to use the new OSD, in the group below I have a sample of how to use VC.Triggerevent for your KODI OSD notification

VC.TriggerEvent:   Kodi Notification   {1}ImageName.jpg   {2}Title of OSD   {3}Message for OSD


<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.8-->
<commandGroup open="True" name="Kodi Notification" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="526" name="Kodi OSD Notification" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw/</cmdType>
      <params>
        <param>GUI.ShowNotification</param>
        <param>"image":"{Path.VC}\XbmcImages\{1}","title":" {2} ","message":" {3} "</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Kodi Notification</event>
  </command>
  <command id="527" name="Trigger Notification" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>Kodi Notification</param>
        <param>ImageName.jpg</param>
        <param>Title of OSD</param>
        <param>Your message here</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
</commandGroup>

jitterjames

#1
Thanks PegLeg.

Just wondering.  Wouldn't it be easier to put the images in one of your Kodi folders?  Then you would not need to worry about doubling up the backslashes.  Also, did you try to use forward slashes?  I can never really seem to remember what the rules are for that on Kodi.

jitterjames

for example, this works for me if I have a subfolder of VC named "icons" that contains an image named "fan.png":

<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.5.0-->
<command id="-1" name="Actions copied from LCB">
  <action>
    <cmdType>XJson.Raw/</cmdType>
    <params>
      <param>GUI.ShowNotification</param>
      <param>"image":"{Path.VC}\icons\fan.png","title":" Alert ","message":" The fan is now on "</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>


That is why I created the Raw/ action.

PegLegTV

#3
I could have sworn I tried that  :bonk , I'll update the command above, :bonk (1 bonk for my brain fart wasn't enough)

QuoteJust wondering.  Wouldn't it be easier to put the images in one of your Kodi folders?

I figured updating the folder in VC directory would be easier then having to navigate all the way down to Kodi when I added a new Caller ID image 

vulcanjedi

thanks PeglegTV, I'll have to give this a try, wouldnt mind if I could change the default behavior of KODI notifications to include the image vs calling this trigger on particular commands
I will mention that I believe some skins may not support this, as the other day I was playing with some of the other skins and my image didnt show up. I typically use "Transparency!"