Announcement

Collapse
No announcement yet.

linking

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

    linking

    Sorry for the bizarre request. I'm trying to link sonos players in code.

    In version 2 I used this:

    Code:
    MusicApi = pi.GetMusicAPI("Living Room")
    MusicApi.link("Master Bedroom")
    Using visual studio and browsing the object HSPI_sonos it looks like the code I am wanting looks like

    Code:
    HSPI_Sonos.HSPI.LinkAZone(String, String) As Boolean
    But I'm not able to implement this.

    #2
    You could use the plugin config screen to set up a link table entry with the devices you want linked, and then just issue a CAPI command to perform the link. Something like:
    Code:
    hs.CAPIControlHandler(hs.CAPIGetSingleControl(hs.GetDeviceRefByName("Sonos Master Master"),True,"Link-AlexaSpeak",False,False))
    Code brought to you by tenScriptAid

    tenholde
    tenholde

    Comment


      #3
      Perfect! Thank you!

      BTW - TenScriptAid is great!

      Comment

      Working...
      X