Announcement

Collapse
No announcement yet.

Unlink not working?

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

    Unlink not working?

    This line of code doesn't seem to be working.

    Code:
    hs.PluginFunction("Sonos", "RINCON_000E5870173601400", "Unlink", {})
    I've verified the rincon# is correct in the sonos config

    I turned on debug and there were no errors.

    But the speaker does not unlink.


    Code:
    Jan-31 3:05:47 PM         myTest    myTest ended
    Jan-31 3:05:47 PM         Sonos    Unlink called for Zone - Kitchen
    Jan-31 3:05:47 PM         Sonos    PluginFunction called for instance = RINCON_000E5870173601400 and proc = Unlink
    Jan-31 3:05:47 PM         myTest    myTest beginning ...
    Jan-31 3:05:47 PM         Event    Running script in background: C:/Program Files (x86)/HomeSeer HS3/scripts/hall_custom.vb("myTest")
    Jan-31 3:05:47 PM         Event    Event Trigger "Test test 1"
    Jan-31 3:05:47 PM         Event    Event Test test 1 triggered by the event page 'Run' button.
    Jan-31 3:05:42 PM         Sonos    BuildButtonStringRef Found LinkgroupZoneSource = Main

    #2
    Are you sure the player is a slave and not the master? This is not a paired player is it?

    Comment


      #3
      Neither are paired players.

      In this case, there are two players linked, master bedroom, and kitchen.

      If I try to unlink master bedroom I get:

      Code:
      Jan-31 4:20:52 PM         myTest    myTest ended
      Jan-31 4:20:52 PM         Sonos    Unlink called for Zone - Master Bedroom
      Jan-31 4:20:52 PM         Sonos    PluginFunction called for instance = RINCON_000E58502D9A01400 and proc = Unlink
      Jan-31 4:20:52 PM         myTest    myTest beginning ...
      Jan-31 4:20:51 PM         Event    Running script in background: C:/Program Files (x86)/HomeSeer HS3/scripts/hall_custom.vb("myTest")
      Jan-31 4:20:51 PM         Event    Event Trigger "Test test 1"
      Jan-31 4:20:51 PM         Event    Event Test test 1 triggered by the event page 'Run' button.
      But the speakers are still linked.

      If I try unlinking kitchen I get:

      Code:
      Jan-31 4:23:19 PM         myTest    myTest ended
      Jan-31 4:23:19 PM         Sonos    Unlink called for Zone - Kitchen
      Jan-31 4:23:19 PM         Sonos    PluginFunction called for instance = RINCON_000E5870173601400 and proc = Unlink
      Jan-31 4:23:19 PM         myTest    myTest beginning ...
      Jan-31 4:23:19 PM         Event    Running script in background: C:/Program Files (x86)/HomeSeer HS3/scripts/hall_custom.vb("myTest")
      Jan-31 4:23:19 PM         Event    Event Trigger "Test test 1"
      Jan-31 4:23:19 PM         Event    Event Test test 1 triggered by the event page 'Run' button.
      But the speakers are still linked.

      Comment


        #4
        I had a quick look at the code, there should be a few more log entries unless the PI doesn't think the players are linked. If you go to the player page, does it show status linked?
        Are these players "on-line" in the PI? Perhaps post a screenshot of your players? Is everything else working properly (status updates, issuing commands ...)?

        Comment


          #5
          Yes, they are linked and online. I can use the desktop app to unlink them and play them. Just a thought, but the master bedroom is the old Play5. Not sure if that matters.

          Comment


            #6
            I meant on line in the plugin and status in the PI.
            It being an old player could only be better as some of the new players are sometime a bit different

            Comment


              #7
              Sorry for the delay, the Play5 was out of date and I updated with a ONE, so the issue isn't the player. It my be in my code but this one is bizarre.

              Here is a bit more info.

              If I link kitchen + living room and unlink with code it works

              If I link master bedroom with living room and unlink with code it works

              If I link master bedroom and kitchen and unlink with code it does not work

              Here is the code

              Code:
              Public Sub myTest (ByVal params As String)
                      hs.PluginFunction("Sonos", RINCON_B8E937B4A74001400, "Unlink", {})
                      hs.waitsecs(1)
                      hs.PluginFunction("Sonos", RINCON_000E5870173601400, "Unlink", {})
                      hs.WriteLog("myTest", "myTest ended")
              End Sub

              Comment


                #8
                Perhaps try increasing the wait time between the function calls ?

                Comment


                  #9
                  Thanks for the suggestion. I've went up to 5 seconds. I'll try something like 30 just for testing

                  Comment


                    #10
                    Changing the wait to 45 seconds didn't change anything.

                    While playing around I also noticed that if I link living room + kitchen + master bedroom and try to unlink code on all 3 only the living room unlinks.

                    What could it be about the kitchen and master bedroom that when ever these two are linked I can't unlink them in code. Even if others are included in the link.

                    Comment


                      #11
                      Can you please post a screenshot of your player table (table at bottom of the config page)

                      Comment


                        #12
                        I can eliminate the code. Unlink doesn't work on these two speakers when using the event builder either

                        Comment


                          #13
                          Click image for larger version

Name:	playertable.PNG
Views:	101
Size:	67.2 KB
ID:	1363242

                          Comment


                            #14
                            Thanks for the player table. For the players you don't seem to be able to unlink, can you take a screenshot of the player config page (that's the one that shows what is playing, navigate content etc). I'm interested in what the PI shows as it state (linked, paired to, ...) If the player for some reason doesn't know the player is linked, it won't do anything. Maybe we have issues with some corruption somewhere or some other minute issue that prevents us from given you what you are looking for.
                            Do this when you have grouped players for your test and you fail to unlink one of the grouped players.

                            Comment


                              #15
                              Just to verify, this page?

                              Click image for larger version

Name:	liviingroom.PNG
Views:	97
Size:	336.3 KB
ID:	1363258

                              Comment

                              Working...
                              X