Announcement

Collapse
No announcement yet.

IFTTT and XBMC plugin - Sports Scores

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • IFTTT and XBMC plugin - Sports Scores

    I do not know if this is the easiest solution but it's all I can think of right now.

    IFTTT
    ESPN-->Dropbox Get sports score update

    HS3
    Create an event that reads the dropbox file and sends a message through the XBMC plugin to all XBMC devices of the text in the message.


    Does this sounds doable or is there an easier solution? I guess I'll need a way to read the file created in dropbox and parse that data. I found the following XBMC plugin but seems like it has not been worked on in years. Wish I could find the code for it.

    http://forum.xbmc.org/showthread.php?tid=63171

  • #2
    There's an example script in the help file for Spud's IFTTT plugin that shows how to parse out contents of a drop-box file, which his plugin will pick up for you.

    http://board.homeseer.com/showthread.php?t=166058

    Whilst I am using the plugin simplistically to set home/away status (iOS Location to Dropbox recipe), I have not tried parsing the contents of a DB file, though it does look feasible.
    cheeryfool

    Comment


    • #3
      Working on that now. I tried to pass the variables directly to the xbmc plugin action but that was a no go. Guess I'll have to create a script to get the variables then use json url to send the notification.

      Comment


      • #4
        In the XBMC plugin, I'm going to add the "GUI Show Notification" action as a function available from scripting, that will probably help you.

        Comment


        • #5
          I was trying to use a script to get the variables from the dropbox file and then type in the global variables into xbmc gui notification action. Only thing that displaced was the global variable names. So I guess that will not work.

          Comment


          • #6
            I have added the GUIShowNotification scripting function in the XBMC plugin version 3.0.0.22 available here

            And then I have created a IFTTT rule to display soccer news as XBMC notifications. (see screenshots below). It works great!

            Click image for larger version

Name:	ifttt_soccernews.jpg
Views:	1
Size:	104.0 KB
ID:	1174204


            Click image for larger version

Name:	soccernewsevent.jpg
Views:	1
Size:	69.9 KB
ID:	1174205

            Comment


            • #7
              I am getting the following error while running the event.

              Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\ifttt.vb: Bounds can be specified only for the top-level array when initializing an array of arrays.

              Script:

              Sub Main(ByVal parm as Object)
              Dim content as String = hs.GetVar("ifttt_content")

              hs.PluginFunction("XBMC", "", "GUIShowNotification", new Object() ("", "Sports News", content, 5000))
              End Sub


              Dropbox file content:

              $ifttt_content=TestMessage

              Comment


              • #8
                Figured it out.

                Public Sub Main(parms as object)
                Dim content as String = hs.GetVar("ifttt_content")

                hs.PluginFunction("XBMC", "", "GUIShowNotification", new Object() {"", "Sports News", "Test", 5000})
                End Sub

                Comment

                Working...
                X