Announcement

Collapse
No announcement yet.

Plugin API?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Plugin API?

    Is there an API for the plugin? I am trying to integrate SageTV control via HSTouch and I need access to some of the commands.

    #2
    I think I found it in the version change logs

    Is there formal documentation for the capabilities of the plugin?

    Comment


      #3
      OK, the Sage API is quite voluminous and complicated. I have figured out how to send the play or pause command, etc. but the HomeSeer InControl device doesn't seem to update properly with status (playing, paused, etc.). Not sure why because it works fine if I use a remote to pause / play.

      Also, I can't seem to find out how to do UI navigation (Home, Guide, etc.). I am guessing I can use SageCommand() for this but can't seem to get it to work.

      What might be simpler (for the user) is to have something similar to the Http commands from the Web Server SageTV plugin. Basically recreate the commands in simple language for the user. Something like...

      SendUICommand("Player Name", "UICommand")

      Where "UICommand" is any of the remote button names.

      Comment


        #4
        OK any response?

        Also, there seems to be an issue with HS tracking the correct player status. If I play or pause using your InControl API, status does not update. If I use the SageTV webserver plugin http commands, status updates but incorrectly (playing when paused, paused when playing). I think there may be a bug in the code somewhere.

        Comment


          #5
          Heatvent,

          Sorry for the delay in response. Between the holidays and vacation (we went on a cruise), things have been very hectic.

          I am working on getting all of the documentation updated, as usual that seems to always take a back seat, but is absolutly critical.

          The two commands to look at for this plugin are the following. They both do the same thing, except one uses the "Device ID" and one uses the "Description" listed at the plugin page - http://<homeseer server>/InControl_Sage.

          - hs.plugin("InControl_Sage").SendSageCommandByID "<Sage Device id or All Device>","<Sage Command>"

          - hs.plugin("InControl_Sage").SendSageCommandByName "<Sage Device Description in HomeSeer>","<Sage Command>"

          The <Sage Command> is actually the Sage UI commands. If you check Page 219 in the Sage User Manual (section titled "List of All Sage TV Commands"), the InControl Plugin will accept any of the "Commands" listed. For example, my kids always leave something paused on my extender, so I have an event that executes the following each evening:

          - hs.plugin("InControl_Sage").SendSageCommandByName "1000_0","Stop"
          - hs.plugin("InControl_Sage").SendSageCommandByName "1000_0","Home"

          This will stop any currently playing program and return the system to the home screen. Obviously, some commands may not make sense to execute in a script (i.e. Left), but they are all available.

          In addition, there are two that are not in the manual but are custom to my plugin "Extender Off" and "Extender On". Sage does not support these (the Power Off, simply puts the Sage extender into sleep), so I built custom commands that actually telnet into the extender and tells it to turn off.

          These commands are all also available to perform from a HS Event Action. If you go to the event action, you will see a new one listed as "Sage Command". After selecting that, you can then select any of the Sage commands referenced above and execute these as part of an event.

          There is a lot of power here, so I will be certain to start on better documenting the capabilities.




          Originally posted by heatvent View Post
          OK, the Sage API is quite voluminous and complicated. I have figured out how to send the play or pause command, etc. but the HomeSeer InControl device doesn't seem to update properly with status (playing, paused, etc.). Not sure why because it works fine if I use a remote to pause / play.

          Also, I can't seem to find out how to do UI navigation (Home, Guide, etc.). I am guessing I can use SageCommand() for this but can't seem to get it to work.

          What might be simpler (for the user) is to have something similar to the Http commands from the Web Server SageTV plugin. Basically recreate the commands in simple language for the user. Something like...

          SendUICommand("Player Name", "UICommand")

          Where "UICommand" is any of the remote button names.

          Comment


            #6
            Heatvent,

            If you start/stop something directly through Sage is the status getting updated correctly in HomeSeer? Also, where are you looking at the status, through the InControl plugin page or through a HS device set up for InControl?

            Thanks.

            Originally posted by heatvent View Post
            OK any response?

            Also, there seems to be an issue with HS tracking the correct player status. If I play or pause using your InControl API, status does not update. If I use the SageTV webserver plugin http commands, status updates but incorrectly (playing when paused, paused when playing). I think there may be a bug in the code somewhere.

            Comment


              #7
              I am using HSTouch as a custom TV remote on a tablet. I have a textbox that tracks the InControl device in HS. So the latter, a HS device setup for InControl. I have not checked the InControl plugin page. I just noticed that the HSTouch object got out of sync with what was happening. Using an actual remote to change my extender seemed to change play/stop status but using commands via the API did not so it got out of sync.

              Re: the documentation. I guess there is a lot of stuff in the SageTV API that is more advanced. I guess I was thinking maybe just a table with some of the simple/common stuff to make it easier on an average user who is not a programmer.

              Comment

              Working...
              X