Announcement

Collapse
No announcement yet.

Getting Track #, Track Count and Music Source

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

    #16
    I downloaded it....will report back.

    Comment


      #17
      Originally posted by dcorsus View Post
      Added properties
      - ZoneIPAddress as String
      - ZoneMACAddress as String
      - ZoneThirdPartyMediaServices as string

      Added Methods
      - GetHouseHoldID returns string
      - Public Function ListAvailableServices(ByRef AvailableServiceDescriptorList As String, ByRef AvailableServiceTypeList As String, ByRef AvailableServiceListVersion As String) As String (returns empty or OK, all parameters are by REFERENCE)

      Dirk
      OK - I'm sure I'm being thick...but using the following code. only the HouseholdID works:

      Code:
      Dim householdID As String = hs.PluginFunction("Sonos", "RINCON_000E58A72F9601400", "GetHouseholdID", Nothing)
              Dim TPMS As String = hs.PluginPropertyGet("Sonos", "RINCON_000E58A72F9601400", "ZoneThirdPartyMediaServices", Nothing)
              Dim a, b, c, ret As String
              ret = hs.PluginFunction("Sonos", "RINCON_000E58A72F9601400", "ListAvailableServices", {a, b, c})
      Any pointers?

      Comment


        #18
        Originally posted by skavan View Post
        OK - I'm sure I'm being thick...but using the following code. only the HouseholdID works:

        Code:
        Dim householdID As String = hs.PluginFunction("Sonos", "RINCON_000E58A72F9601400", "GetHouseholdID", Nothing)
                Dim TPMS As String = hs.PluginPropertyGet("Sonos", "RINCON_000E58A72F9601400", "ZoneThirdPartyMediaServices", Nothing)
                Dim a, b, c, ret As String
                ret = hs.PluginFunction("Sonos", "RINCON_000E58A72F9601400", "ListAvailableServices", {a, b, c})
        Any pointers?
        Shoot, forgot we are not in HS2 anymore .....

        Do you need all 3 fields? Not sure how to return all 3 parameters, maybe I can return it as an array of strings, will that work?

        Dirk

        Comment


          #19
          So, from Music Services, I *think* I only need:
          • AvailableServiceDescriptionList

          So returning a string of that should be fine.

          As for, ZoneThirdPartyMediaServices...I'm not sure why that isn't returning anything. Perhaps, you could make it a function, just like HouseholdID?

          Then, while I'm jabbering, where would I grab:
          - CurrentMetaData XML block
          - NextTrackMetaData XML block
          - EnqueuedTransportURI XML block

          Closer and closer!

          Comment


            #20
            Originally posted by skavan View Post
            OK - I'm sure I'm being thick...but using the following code. only the HouseholdID works:

            Code:
            Dim householdID As String = hs.PluginFunction("Sonos", "RINCON_000E58A72F9601400", "GetHouseholdID", Nothing)
                    Dim TPMS As String = hs.PluginPropertyGet("Sonos", "RINCON_000E58A72F9601400", "ZoneThirdPartyMediaServices", Nothing)
                    Dim a, b, c, ret As String
                    ret = hs.PluginFunction("Sonos", "RINCON_000E58A72F9601400", "ListAvailableServices", {a, b, c})
            Any pointers?
            See if this works

            Public Function ListAvailableServices(By) As String()
            ' First returned parameter = AvailableServiceDescriptorList
            ' Second = AvailableServiceTypeList
            ' Third = AvailableServiceListVersion

            New .exe attached

            Dirk
            Last edited by dcorsus; November 18, 2015, 11:54 PM.

            Comment


              #21
              nope.

              Code:
              Dim ret() As String
              ret = hs.PluginFunction("Sonos", "RINCON_000E58A72F9601400", "ListAvailableServices", Nothing)
              Returns Nothing.

              Code:
              hs.PluginPropertyGet("Sonos", "RINCON_000E58A72F9601400", "ZoneThirdPartyMediaServices", Nothing)
              Also returns ""

              Comment


                #22
                Originally posted by skavan View Post
                So, from Music Services, I *think* I only need:
                • AvailableServiceDescriptionList

                So returning a string of that should be fine.

                As for, ZoneThirdPartyMediaServices...I'm not sure why that isn't returning anything. Perhaps, you could make it a function, just like HouseholdID?

                Then, while I'm jabbering, where would I grab:
                - CurrentMetaData XML block
                - NextTrackMetaData XML block
                - EnqueuedTransportURI XML block

                Closer and closer!
                hmm, I have the impression that ThirdPartyMediaServers is not supported anymore and it is now ThirdPartyMediaServersX, moreover you are asking for ThirdPartyMediaServices ... Where on the UPNP interface was that defined?

                CurrentData is property CurrentTrackMetaData

                I'll add NextTrackMetaData as another property

                No idea where or what you want to do with EnqueuedTransportURI

                Dirk

                Comment


                  #23
                  Originally posted by skavan View Post
                  nope.

                  Code:
                  Dim ret() As String
                  ret = hs.PluginFunction("Sonos", "RINCON_000E58A72F9601400", "ListAvailableServices", Nothing)
                  Returns Nothing.

                  Code:
                  hs.PluginPropertyGet("Sonos", "RINCON_000E58A72F9601400", "ZoneThirdPartyMediaServices", Nothing)
                  Also returns ""
                  Turn debug flag on. Do you see an error or at least this entry in the log file?

                  ListAvailableServices called for zoneplayer .......

                  Comment


                    #24
                    1. ThirdPartyMediaServicesX is returned after subscribing to ZoneGroupTopology. Sorry, I forgot the X!

                    2. If you could put CurrentTrackMetaData, NextTrackMetaData and EnqueuedTransportURI into separate methods (all of which are returned in an AVTransport Last Change Event) that would be great.

                    3. If you could just return AvailableServiceDescriptionList from a method ListAvailableServices.

                    Then, I *think* I'm all good. Thank you so much for your patience on this.

                    Comment


                      #25
                      Originally posted by skavan View Post
                      nope.

                      Code:
                      Dim ret() As String
                      ret = hs.PluginFunction("Sonos", "RINCON_000E58A72F9601400", "ListAvailableServices", Nothing)
                      Returns Nothing.

                      Code:
                      hs.PluginPropertyGet("Sonos", "RINCON_000E58A72F9601400", "ZoneThirdPartyMediaServices", Nothing)
                      Also returns ""
                      Have ThirdPartyMediaServicesX returned as I think there is no more ThirdPartyMediaServices. HOWEVER, I think the reason ThirdPartyMediaServices is gone, has to do with the fact that your password info was sent in plain text and ThirdPartyMediaServicesX looks encryped so I think you are out of luck.

                      May have made a type on ListAvailableServices, try attached.

                      Have added NextTrackMetaData

                      Dirk

                      Dirk
                      Last edited by dcorsus; November 19, 2015, 12:26 AM.

                      Comment


                        #26
                        Originally posted by dcorsus View Post
                        Turn debug flag on. Do you see an error or at least this entry in the log file?

                        ListAvailableServices called for zoneplayer .......
                        Hi,

                        Debug reports:
                        Error in PluginProc for instance = RINCON_000E58A72F9601400 : Parameter count mismatch.

                        s.

                        Comment


                          #27
                          Originally posted by skavan View Post
                          Hi,

                          Debug reports:
                          Error in PluginProc for instance = RINCON_000E58A72F9601400 : Parameter count mismatch.

                          s.
                          Tried again passing in a single empty string parameter:
                          hs.PluginPropertyGet("Sonos", "RINCON_000E58A72F9601400", "ZoneThirdPartyMediaServices", {ret})

                          Got a more verbose error:
                          ERROR in ListAvailableServices for zoneplayer = Family Room with UPNP Error = Read only tag / Transport is locked / Access denied. Error = MyUPnPService.InvokeAction for ServiceID = http://192.168.1.57:1400/xml/DeviceProperties1.xml while sending Action = ListAvailableServices for URI = http://192.168.1.57:1400/DeviceProperties/Control and Request = UPNP Error = faultcode = s:Client, faultstring = UPnPError, detail = 401 with error = The remote server returned an error: (500) Internal Server Error.

                          Comment


                            #28
                            Originally posted by skavan View Post
                            EnqueuedTransportURI into separate methods (all of which are returned in an AVTransport Last Change Event) that would be great.
                            EnqueuedTransportURI is a non-evented parameter as per the XML descriptor, so doesn't come with events. Have you seen it somewhere? When is it used?

                            Comment


                              #29
                              Originally posted by skavan View Post
                              Hi,

                              Debug reports:
                              Error in PluginProc for instance = RINCON_000E58A72F9601400 : Parameter count mismatch.

                              s.
                              That's the typo I referred to, try latest attachment

                              Comment


                                #30
                                Originally posted by dcorsus View Post
                                EnqueuedTransportURI is a non-evented parameter as per the XML descriptor, so doesn't come with events. Have you seen it somewhere? When is it used?
                                It is sent with a Last Change Event (subscribed to with AVTranport). here's an example extracted from Device SPY. It is directly after the r:NextTrackMetaData entry.

                                <r:EnqueuedTransportURI val="x-sonosapi-radio:custom_radio.f559_54d7dbbae992798d9c084b0d?sid=6&amp;f lags=8300&amp;sn=4"/>

                                Comment

                                Working...
                                X