Announcement

Collapse
No announcement yet.

SonosController Plug-In Beta testing Forum

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

    #31
    Dirk,

    Thanks for all the changes. When I have a little time I will give it a test.

    This is how I call the voices.

    Code:
    ' This uses the default voice
    hs.SpeakEx(intZoneID,"Hello World")
    Code:
    ' This uses Kate from the old HomeSeer NeoSpeech CD add-on
    hs.SpeakEx(intZoneID,"<voice required='Name=VW Kate 16k'>Hello World</voice>")
    Code:
    ' This uses Paul from the old HomeSeer NeoSpeech CD add-on
    hs.SpeakEx(intZoneID,"<voice required='Name=VW Paul 16k'>Hello World</voice>")
    Lou

    Comment


      #32
      Originally posted by gerlin View Post
      This uses Kate from the old HomeSeer NeoSpeech CD add-on
      hs.SpeakEx(intZoneID,"<voice required='Name=VW Kate 16k'>Hello World</voice>")
      ah ... I get it now, another plug-in behinds the scene. Could probably built that function in as well, are there other tags that you can add or is it only the voice?

      Dirk

      Comment


        #33
        Actually I am not using any other plug-ins to control the voices. The command is just part of the Microsoft SAPI5 specification.

        I think I first learned this from this post from Rupp:

        http://board.homeseer.com/showpost.p...9&postcount=55

        Here is a link to a command reference I found much easier for me to "parse". I just tried a couple more (pitch and spell), they both worked as expected. I just changed the double quotes to single quotes (so I would not need to escape them).

        http://www.nextup.com/phpBB2/viewtop...451780418e98f0

        Lou

        Comment


          #34
          New beta .56 posted

          Changes to V1.0.0.56:
          • Fixed a bug where announcements are not scheduled anymore when the announcement file is not created properly. Also tested embedded tags for different voices.
          • The Volumestep option was only used in the MusicAPI.VolumeUp() and MusicApi.VolumeDown() methods. Using
            &hs.ExecX10 "]3" , "Value set" , 0 , 0 - for UP
            &hs.ExecX10 "]3" , "Value set" , 1 , 0 - for Down
            will increase/decrease volume by units as defined in the SonosControl page for "VolumeStep". You can also provide the volume step directly from the scrip in the following example the step = 10
            &hs.ExecX10 "]3" , "Value set" , 0 , 10 - for UP
            &hs.ExecX10 "]3" , "Value set" , 1 , 10 - for Down

          Comment


            #35
            New beta v.58 posted

            Changes to V1.0.0.58:

            • Fixed some issues with multiple concurrent announcements using the new "streaming" method for TTS
            • Plugin will now use UDNs behind the scenes so that you can change zone names without having to delete/create everything. As of version v58, all triggers/conditions/actions will be stored with a zone name and a hidden UDN. All your previously created events should work but it is only the new created events that will still work after you change zone names, so better to open all the previously created actions/triggers/conditions and save them again. Still need to test HSTouch apps.
            • Fixed a bug where title and artist are inverted for Rhapsody/LastFM/Panodora when you use HSTouch or the MusicApi.CurrentTrack and MusicApi.CurrentArtist methods.
            • Also added 4 more methods (NextTrack, NextArtist and NextAlbum and NextAlbumArtPath) so you can announce the next track info and/or display it on a HST Screen.
            • Made a small change on how albumart is downloaded. Had some albumart in .png format that showed up very dark
            • Added capability to Pair/Unpair S5 players and fixed issues with Zone Name changes when that happens. When the zones are paired, they will now show up with a (L) and (R) indication, with the zone marked (L) as the master, you will now also see PAIR and UNPAIR buttons in the web-config screen for S5 players.

            Comment


              #36
              Dirk,

              I just got time to try the new beta (V1.0.0.58) and am having some issues.

              I am using the "old-style" voice announcements at this point and they seem to be working (limited testing).

              I tried one of my scripts that calls playlists and it worked fine when calling a Sirius radio station. However, when it tries to call an imported playlist it does nothing.

              I also get the following error when I try to update the DB using the BuildDB button from the status screen:

              Code:
              2/27/2011 9:13:30 PM ~!~SONOSCONTROLLER~!~SupportsExtendedButtons called
              2/27/2011 9:13:30 PM ~!~SONOSCONTROLLER~!~ButtonPressEx called with BtnName = BuildDB and DeviceCode = [1
              2/27/2011 9:13:30 PM ~!~SONOSCONTROLLER~!~Error: ZonePlayer not found. ZoneName : uuid:RINCON_000E5821A94201400
              I am not sure what is going on, I have a script that lists all the playlists using the following function:

              Code:
              arrSonosPlaylists = objSonosZone.LibGetPlaylists()
              All I get listed are the radio stations (Sirius), not my Sonos or Imported Playlists.

              It seems that I may have more than one issue here, it does not see my playlists and does not want to rebuild the MusicDB.

              I am emailing you my complete HS log.

              I am holding off rolling back to my previous version, hoping you can help me get this working.

              Lou

              Comment


                #37
                Dirk,

                Just a little more info...

                It does let me set alarms using my script, so it does not act like it have any problem seeing the zones (except when I try to rebuild the DB).

                Also, if I examine the "SonosRadioStationsDB.mdb" filel I see my Sirius radio stations. However, the "SonosDB.mdb" sows no records when I open it, even though it is 216kb in size.

                I have also confirmed that I cannot play either regular Sonos playlists or "imported" playlists from my script.

                I see the same issue when I try to lists the playlists using the built in plug-in controller page. When I click on PLAYLISTS (not RADIOSTATIONS) , it just shows the radio stations (see below).

                Lou

                Comment


                  #38
                  Originally posted by dcorsus View Post

                  Also added 4 more methods (NextTrack, NextArtist and NextAlbum and NextAlbumArtPath) so you can announce the next track info and/or display it on a HST Screen.

                  How to access this methods in HSTouch. I can't find them. With each anounsment of current track and artist I'm poping a screen in HSTouch with CoverArt and track/artist info. With this new methods you implement I want to put a small info and coverArt of the upcoming track and if the song that is coming happens to be my favorite by clicking on the cover art triger got to next song.

                  Comment


                    #39
                    Originally posted by Flame View Post
                    How to access this methods in HSTouch. I can't find them. With each anounsment of current track and artist I'm poping a screen in HSTouch with CoverArt and track/artist info. With this new methods you implement I want to put a small info and coverArt of the upcoming track and if the song that is coming happens to be my favorite by clicking on the cover art triger got to next song.
                    Hi Flame,

                    you will have to call scripts from HST and you do that by sticking the call to the script either in the text field or for art work in the ImageURLNORMAL field.

                    An example:
                    This line you stick into the ImageURLNormal
                    [$SCRIPT=&hs.runex("SonosController.vb" , "GetNextArtWork" , "Office(L)")]

                    These lines you add to the SonosController.vb (better is to create your own because the installer will overwrite this file)

                    Public Function GetNextArtWork(ByVal parm) As String
                    Dim pi As Object 'As HSPI_SONOSCONTROLLER.HSPI
                    pi = hs.Plugin("SONOSCONTROLLER")
                    If pi Is Nothing Then
                    hs.writelog("Script", "empty")
                    Exit Function
                    End If
                    Dim MusicApi As Object 'As HSMusicAPI
                    Try
                    MusicApi = pi.GetMusicAPI(parm.tostring)
                    Return "http://Localhost" & MusicApi.NextAlbumArtPath()
                    Catch ex As Exception
                    End Try
                    End Function

                    The only problem you'll have is that HST is not updating these images automatically. So a long time ago, the way I would do it, is to drop a Textbox (not text!) on the screen, hide it, link it to the zone player title track (Status tracking Normal), add an event to Actionswhentextchange that each time it changes it generates an on-click event on your image and your image will update. I set the parameter EnterIsChange to false, IgnoreChange to false. You could use this element to update other elements such as Next track title and artist.

                    You may seek guidance for more HST experts in other parts of the forum on this.

                    Dirk

                    Comment


                      #40
                      Thank you Dirk.

                      The script work when I design the form. When in run time only getNextTrack and GetNextArtist work, GetNextAlbumArt Does not work. Tnen I used the direct address to the pictures http://HSPC-IP:Port/sonoscontroller/...nextcover1.jpg in the ImageURLNormal Property and it worked. It is working fine except, when you stop the player does not clear the images.

                      Plamen

                      Comment


                        #41
                        Originally posted by Flame View Post
                        Thank you Dirk.

                        The script work when I design the form. When in run time only getNextTrack and GetNextArtist work, GetNextAlbumArt Does not work. Tnen I used the direct address to the pictures http://HSPC-IP:Port/sonoscontroller/...nextcover1.jpg in the ImageURLNormal Property and it worked. It is working fine except, when you stop the player does not clear the images.

                        Plamen
                        Hi Plamen,

                        I suspect the reason the image doesn't show up might have to do with that you use a different port setting. Did you try to change the script from

                        Return "http://Localhost" & MusicApi.NextAlbumArtPath()

                        to

                        Return "http://HSPC-IP:Port" & MusicApi.NextAlbumArtPath()

                        It wouldn't surprise me that the info for next track doesn't get reset when stopped. Through UPnP, the plug-in receives events that are a pack of tags and the plug-in searches for the tags and when included it updates the information. When a player is stopped, the tag holding info on the current track is there (and empty) but most likely the tag for next track isn't and therefore the information doesn't get updated. If it bother you, I can have a look at it, just need to make sure I don't break other scenarios when I now start changing things I didn't receive information for.

                        Dirk

                        Comment


                          #42
                          New beta v.60 posted

                          Changes to v1.0.0.60:

                          • Broke "BUILDDB" function when changing from zone names to UDNs
                          • Issue with existing actions now ending up in error when zone name is converted to UDN and back
                          • re(un)doing some of the S5 pairing implementation, especially renaming the zones with an (L) and (R) extension appears to be problematic for HST screens
                          • fixed a problem in handling concurrent announcement in the "play to file" mode, where file errors appeared due to re-entrancy of the procedure

                          Comment


                            #43
                            TTS -&gt; &quot;track changed&quot; side effect

                            Dirk,

                            Using this &hs.SpeakEx(60 , "The time is $time") to anounce the time on the sonos players, it seem to speak fine , but it triggers "track changed" event few times. I have other actions on that event, and they are not relevant to TTS anounsments to sonos players. Look like it trigger on each word. Can you disable the event when it is TTS?

                            Plamen

                            Comment


                              #44
                              Originally posted by Flame View Post
                              Dirk,

                              Using this &hs.SpeakEx(60 , "The time is $time") to anounce the time on the sonos players, it seem to speak fine , but it triggers "track changed" event few times. I have other actions on that event, and they are not relevant to TTS anounsments to sonos players. Look like it trigger on each word. Can you disable the event when it is TTS?

                              Plamen
                              Hi Plamen,

                              I filter those out in the script in the following way:

                              Sub Main(ByVal ZoneName As String)

                              Dim MusicApi
                              Try

                              Dim pi As Object
                              pi = hs.Plugin("SONOSCONTROLLER")

                              If pi Is Nothing Then

                              hs.writelog("Script", "empty")
                              Exit Sub

                              End If

                              MusicApi = pi.GetMusicAPI(ZoneName)
                              If MusicAPI.CurrentArtist.IndexOf(".wav") = -1 Then
                              hs.writelog("Script", "Speak " & MusicApi.CurrentArtist & " " & MusicApi.CurrentTrack)
                              hs.Speak(MusicApi.CurrentArtist & " " & MusicApi.CurrentTrack, "True")
                              'hs.Speak(MusicApi.CurrentTrack, "True")
                              End If

                              Catch ex As Exception

                              hs.writelog("Script", "Music API not found")
                              Exit Sub

                              End Try

                              End Sub

                              Hope this helps

                              Dirk

                              Comment


                                #45
                                New beta v.63 posted

                                Changes to v1.0.0.63:

                                • Zones remained in status "Linked" in the plug-in after they were linked/unlinked, causing wrong track-info to be reported
                                • Zones which are linked to an audio Input will start playing, even if in stop state, after an announcement

                                Comment

                                Working...
                                X