Announcement

Collapse
No announcement yet.

Use immediate scripting work with Media Player?

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

    Use immediate scripting work with Media Player?

    Shouldn't the following work?

    Run script: &hs.Plugin("Media Player").scripting.VolumeDown(10)

    I am getting message that;

    2/17/2008 8:39:41 PM ~!~Info~!~Running script and waiting: &hs.Plugin("Media Player").scripting.VolumeDown 10
    2/17/2008 8:39:41 PM ~!~Error~!~Running script, init error: Object doesn't support this property or method: 'hs.Plugin(...).scripting'

    #2
    Try replacing ".scripting." with ".MusicAPI."
    I'm still trying to find the documentation for the MusicAPI, but so far: No luck..
    HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
    Running on Windows 10 (64) virtualized
    on ESXi (Fujitsu Primergy TX150 S8).
    WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

    Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

    Comment


      #3
      The documentation for the music API is in the HomeSeer SDK available via the HomeSeer updater.
      💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

      Comment


        #4
        Ah, so it is!

        How logical...
        HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
        Running on Windows 10 (64) virtualized
        on ESXi (Fujitsu Primergy TX150 S8).
        WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

        Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

        Comment


          #5
          Thanks, I was going by Epstein's thread in the Media Player forum that shows the functions and properties. No wonder .Scripting wouldn't work no matter how I tried it.

          Maybe that thread should be taken down and a pointer to the SDK be put in. Would have saved me a lot of frustration.

          Comment


            #6
            Actually those commands still work for the older Media Player plugin. The new .net plugin uses the Music API.

            Did you get this working?
            💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

            Comment


              #7
              You are referring to http://www.homeseer.com/pdfs/guides/...tion_Guide.pdf

              Correct?

              I am printing out the docs now and will read.

              Comment


                #8
                The new Music API would work like this in a vb.net script (script with a .vb extention).

                Sub Main(parm as object)
                Dim pi as HSPI_MEDIAPLAYER.HSPI
                pi = hs.Plugin("Media Player")
                Dim MusicApi As HSMusicAPI
                MusicApi = pi.GetMusicAPI(1)

                MusicApi.Play

                end sub
                💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                Comment


                  #9
                  Got my immediate script commands working. Except for one;

                  &hs.Plugin("Media Player").MusicAPI.Volume(0)

                  That one keeps saying wrong number of parameters. It is a valid command according to the documentation.

                  Guess I was looking at too many old documents.

                  Comment


                    #10
                    Does anyone know why this does not work, it is basically from Rupp's post above.

                    I have been chasing my tail all night trying to get this stuff to work.

                    I am glazing over looking at the latest SDK section for the MP plugin (Music API section from http://homeseer.com/support/homeseer...lug-In_SDK.htm )

                    I am running WMP HSPI_MEDIAPLAYER.dll2.4.0.18



                    PHP Code:
                    Sub Main(parm as object)
                    Dim pi as HSPI_MEDIAPLAYER.HSPI
                    pi 
                    hs.Plugin("Media Player")
                    Dim MusicApi As HSMusicAPI
                    MusicApi 
                    pi.GetMusicAPI(1)
                    MusicApi.Play
                    hs
                    .writelog ("MEDIA DEBUG" "SCRIPT COMPLETED")
                    End Sub 
                    The error comes back as: Script compile error: Type 'HSPI_MEDIAPLAYER.HSPI' is not defined.on line 15

                    Thanks!


                    ~Bill

                    Comment


                      #11
                      Me too

                      I'd be very interested in the answer to your problem too, Bill !

                      *bump*

                      Comment


                        #12
                        This should do it.
                        Sub Main(parm as object)
                        Dim pi as Object
                        pi = hs.Plugin("Media Player")
                        Dim MusicApi As Object
                        MusicApi = pi.GetMusicAPI(1)

                        MusicApi.UnMute

                        End Sub
                        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                        Comment


                          #13
                          Originally posted by Rupp View Post
                          This should do it.
                          Sub Main(parm as object)
                          Dim pi as Object
                          pi = hs.Plugin("Media Player")
                          Dim MusicApi As Object
                          MusicApi = pi.GetMusicAPI(1)

                          MusicApi.UnMute

                          End Sub
                          Is it possible to do this with a specified type, not just "Object"?
                          HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
                          Running on Windows 10 (64) virtualized
                          on ESXi (Fujitsu Primergy TX150 S8).
                          WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

                          Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

                          Comment


                            #14
                            Sure, look at post #8 The issue with this is you will have to add the references to your setting.ini file
                            💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                            Comment

                            Working...
                            X