Announcement

Collapse
No announcement yet.

SonosController Feature Requests

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

    #31
    Originally posted by Flame View Post
    Dirk,
    There is only one user account set on the pc and it is administrator, "Require password" is OFF. I can't check the individual plugins security permissions right now. I'll check them tonight. If the permissions are the problem, why it works after restarting the service.
    I'm assuming (and I could be very wrong .. not a MicroSoft expert) that running it at start-up as a service requires it to run in a different "group" or "username" than when you are logged in like group "Adminstrators" versus "Users". As you can see, I'm just guessing here a bit. There are postings out there where a DLL couldn't be registered (had it myself) when UAC is turned on in Vista/Win7 (http://board.homeseer.com/showthread...250#post926250). Do you have User Account Controller On, if so, turn it off and see if it makes a difference.

    Dirk

    Comment


      #32
      Dirk,

      I found the problem. Avast antivirus is taking time to initialize and is not enabling the network until is done. During that time HS service is trying to validate the plug-ins, and is failing to do it with the SonosControler, because the network is not available yet. To solve it , I changed the HS Service option for "Startup Type:" from "Automatic" to "Automatic (Delayed Start)". This new option for windows services is available only in Win 7 and WS 2008. Now it's working. It initializes the Sonoscontroler plug-in correctly.

      Regards,
      Plamen

      Comment


        #33
        Originally posted by Flame View Post
        Dirk,

        I found the problem. Avast antivirus is taking time to initialize and is not enabling the network until is done. During that time HS service is trying to validate the plug-ins, and is failing to do it with the SonosControler, because the network is not available yet. To solve it , I changed the HS Service option for "Startup Type:" from "Automatic" to "Automatic (Delayed Start)". This new option for windows services is available only in Win 7 and WS 2008. Now it's working. It initializes the Sonoscontroler plug-in correctly.

        Regards,
        Plamen

        Great! Thanks for posting an update.
        Enjoy the plug-in
        Dirk

        Comment


          #34
          Hi Dirk

          Would it be possible to add a way to dynamically select the zones to be linked for making announcements. Having to create static configurations for all the possibilities is not ideal for me

          Thanks

          Kent

          Comment


            #35
            Originally posted by PosterBoy View Post
            Hi Dirk

            Would it be possible to add a way to dynamically select the zones to be linked for making announcements. Having to create static configurations for all the possibilities is not ideal for me

            Thanks

            Kent
            Hi Kent,

            what would you use to dynamically select zones? Are we talking about using scripting or can you give an example of what you have in mind. You can call the plug-in methods directly from a script, I'd be more then happy to post an example if you tell me what you want to achieve. I have published all the methods that are part of the HS MusicAPI and a bit reluctant to publish every method, as they tend to change, but the few methods to link/unlink are very simple and I can add them to the API documentation if that's what you have in mind.

            Dirk

            Comment


              #36
              I am making the calls from a script. An example would be very helpful, and adding the link/unlink calls to the API documentation would be perfect.

              Thanks for the fast response

              Kent
              Last edited by PosterBoy; December 29, 2010, 07:14 PM.

              Comment


                #37
                Originally posted by PosterBoy View Post
                I am making the calls from a script. An example would be very helpful, and adding the link/unlink calls to the API documentation would be perfect.

                Thanks for the fast response

                Kent
                You need to be a bit more specific in what you plan to do. Is this for an announcement that comes from an audio line input or is this to link zones to play music? Is there an expectation that you should "revert" to previous state, if so, the only way to do that properly is to go to pre-populate them. Even pre-populating 20 different configurations can be done within a few minutes ......

                Here is an example to Link one player to the input of another player. It doesn't store state and not sure what you want to do to unlink

                Sub LinkAZoneToAudioInput(ByVal SourceZoneName As String, ByVal DestinationZoneName As String)
                Dim pi As Object
                pi = hs.Plugin("SONOSCONTROLLER")
                If pi Is Nothing Then
                hs.writelog("Script", "empty")
                Exit Sub
                End If
                Dim MusicApi
                Try
                MusicApi = pi.GetMusicAPI(DestinationZoneName) ' specify here which Zone you want to use as stream the input to
                Catch ex As Exception
                hs.writelog("Script", "Music API not found")
                Exit Sub
                End Try
                Try
                MusicApi.PlayLineInput(SourceZoneName) ' specify here which Zone you want to use the audio input from
                Catch ex As Exception
                hs.writelog("Script", "Error in calling PlayLineInput with error = " & ex.message)
                Exit Sub
                End Try
                End Sub

                Dirk

                Comment


                  #38
                  It is for an announcement that comes from a line input. I want each zone to go back to it's old state after the script completes. I have 6 zones, and the number of permutations to cover all of that gets a little ugly. I already have a script that parses a | separated list of zone names working with one of the older Sonos control packages. I guess I can take my parsing code and just create a look up table to the configurations I make and issue an error to any of the combos I hit that I am too lazy to make.

                  Kent

                  Comment


                    #39
                    Originally posted by PosterBoy View Post
                    It is for an announcement that comes from a line input. I want each zone to go back to it's old state after the script completes. I have 6 zones, and the number of permutations to cover all of that gets a little ugly. I already have a script that parses a | separated list of zone names working with one of the older Sonos control packages. I guess I can take my parsing code and just create a look up table to the configurations I make and issue an error to any of the combos I hit that I am too lazy to make.

                    Kent
                    I guess in order to do what I need, we would need some sort of GetZoneState, and RestoreZoneState functions. I will certainly work around it, but this is the suggestion thread, so I figured I would add it.

                    Kent

                    Comment


                      #40
                      How to Link from scripts

                      Originally posted by PosterBoy View Post
                      It is for an announcement that comes from a line input. I want each zone to go back to it's old state after the script completes. I have 6 zones, and the number of permutations to cover all of that gets a little ugly. I already have a script that parses a | separated list of zone names working with one of the older Sonos control packages. I guess I can take my parsing code and just create a look up table to the configurations I make and issue an error to any of the combos I hit that I am too lazy to make.

                      Kent
                      Hi Kent,

                      here is my suggestion. There are methods to add your own Linkgroup to the .ini file from scripts. Assuming you don't have overlapping Link events, you can just use the same name, if you have overlapping Link event, you would need different LinkgroupNames. Here is the code example, you can also find it in the SonosController.vb file which you can find in the scripts subdirectory.


                      PHP Code:
                      Sub LinkAGroupOfZones(ByVal LinkGroupName As StringByVal SourceZoneName As StringByVal DestinationZonesString As String)
                          
                      'Sub LinkAGroupOfZones(ByVal SourceZoneName As String)

                          Dim pi As Object
                          '
                      Example Dim LinkgroupName As String "Test"
                          'Example Dim SourceZoneName As String = "Family Room"
                          '
                      Example Dim DestinationZonesString As String "Master Bedroom;20;1|Kitchen;20;1"
                          
                      pi hs.Plugin("SONOSCONTROLLER")
                          If 
                      pi Is Nothing Then
                              hs
                      .writelog("Script""empty")
                              Exit 
                      Sub
                          End 
                      If
                          Try
                              
                      pi.SetLinkgroupZoneSource(LinkgroupNameSourceZoneName' store the zone source info
                          Catch ex As Exception
                              hs.writelog("Script", "Error in calling SetLinkgroupZoneSource with error = " & ex.message)
                              Exit Sub
                          End Try
                          Try
                              pi.SetLinkgroupZoneDestination(LinkgroupName, DestinationZonesString) ' 
                      store the zone destination info
                          
                      Catch ex As Exception
                              hs
                      .writelog("Script""Error in calling DestinationZonesString with error = " ex.message)
                              Exit 
                      Sub
                          End 
                      Try
                          Try
                              
                      pi.HandleLinking(LinkgroupNameTrue' Link!
                          Catch ex As Exception
                              hs.writelog("Script", "Error in calling HandleLinking with error = " & ex.message)
                              Exit Sub
                          End Try
                      End Sub

                      Sub UnLinkAGroupOfZones(ByVal LinkGroupName As String)
                          Dim pi As Object
                          pi = hs.Plugin("SONOSCONTROLLER")
                          If pi Is Nothing Then
                              hs.writelog("Script", "empty")
                              Exit Sub
                          End If
                          Try
                              pi.HandleLinking(LinkgroupName, False) ' 
                      UnLink!
                          Catch 
                      ex As Exception
                              hs
                      .writelog("Script""Error in calling HandleLinking with error = " ex.message)
                              Exit 
                      Sub
                          End 
                      Try
                      End Sub 
                      You would call the procedure with your own LinkgroupName, the second parameter would be the zone name from the Sonos Player you use to stream the announcement from and the third parameter would be a string representing the zones you want to stream it to.

                      Note the DestinationZonesString should be of the format:

                      - ZoneName
                      - Separator ";"
                      - Volume as integer between 0 and 100
                      - Separator ";"
                      - Mute overwrite indicator where "0" means false

                      Because the "HandleLinking" method was declared Private, I had to recompile and post version .49

                      Let me know if this meets your requirement

                      Dirk

                      Comment


                        #41
                        Hi Dirk

                        Looks good. I will test it out this weekend. I have already implemented my code using the predefined groups but this would make it more flexible.

                        Edit1: One question though... Where did you post version .49? I tried the updater and It shows that I have the most recent version (.47).

                        Edit2: Nevermind I found it


                        Thanks for the support

                        Kent
                        Last edited by PosterBoy; December 31, 2010, 02:35 PM. Reason: couldn't find version .49... found it.

                        Comment


                          #42
                          Originally posted by dcorsus View Post
                          Option to override mute for announcements was added in latest beta.

                          Cheers,

                          Dirk
                          I was just doing some TTS testing and the only thing I can't get working is the "mute override" function. If the test zone is not muted I get the announcement fine regardless if music is playing or the player is paused but if the player is muted I do not get the announcement. I have tried it with Mute Overide both checked and unchecked in Sonos setup and it does not make any difference.
                          Last edited by upstatemike; January 16, 2011, 01:49 PM.

                          Comment


                            #43
                            The plug-in is working great for me, I just purchased after running the trial for a couple of weeks.

                            A new feature I would like would to be able to turn Sonos alarms off and on. I don't care about the alarm settings so much, I can set them within the Sonos system.

                            Here is a usage example... I have a Sonos alarm set for the morning, If I get up early, I would like to "cancel" the Sonos alarm automatically when I disarm the security system alarm.

                            Comment


                              #44
                              Originally posted by gerlin View Post
                              The plug-in is working great for me, I just purchased after running the trial for a couple of weeks.

                              A new feature I would like would to be able to turn Sonos alarms off and on. I don't care about the alarm settings so much, I can set them within the Sonos system.

                              Here is a usage example... I have a Sonos alarm set for the morning, If I get up early, I would like to "cancel" the Sonos alarm automatically when I disarm the security system alarm.
                              Hi Gerlin,

                              an interesting idea and I can clearly see the benefit. Had a quick look at the existing API, it is doable but biggest issue I see is how to identify the one you want to activate or cancel. The sonos player can set multiple alarms and maintains those with an internal ID. Implementing this in the plug-in is almost equal to 100% supporting all alarm functions in order to make a user friendly implementation that allow you to navigate to the right player, display the alarms and pick out the alarm that you want to toggle. Implementing an ALL ON/OFF is something which would have quite a lot of limitations.

                              Any bright ideas how to simplify? Easiest way would be for me to expose the Alarm API and you write scripts to do your thing. Would that work?

                              Dirk

                              Comment


                                #45
                                Thanks for the quick response.

                                I am already scripting using your plug-in, so I am very open to that approach. In fact that is probably my preference.

                                Would you be able to provide the API routine list (like you have with the existing functionality) so I would know what API calls are available? Or if these are standard Sonos API calls, are there Sonos docs available?

                                FYI...

                                I have had my Sonos system for a few years, and I use it constantly, though my wife doesn't really like messing with the controller/computer and has pretty much ignored it. I wrote some scripts and have added the ability to cycle through a list of play lists /start/stop the Sonos system just using the F1 key on our Elk alarm keypads (each keypad controls the Sonos zone in that room). My wife is now putting on the music almost everyday. Your plug-in and the ability to script it has definitely increased the WAF and prevented me from getting in more trouble for the $$ I have spent on my "hobby".

                                Thanks again.

                                Comment

                                Working...
                                X