Announcement

Collapse
No announcement yet.

SqueezeBox plugin V2.0.0 beta 1

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SqueezeBox plugin V2.0.0 beta 1

    Attached is version 2.0.0 beta 1 of the SqueezeBox plugin. The major goal for this release is HSTouch support, though it includes a few other enhancements. This is a first version toward HSTouch support and I am looking for feedback! I tried a few HSTouch screens but I am sure you will
    come up with other variations, library sizes and usage pattern that will provide valuable feedback.

    New features

    Bug Fixes

    This is Beta software! Backup before installing the attached beta update. This Beta software should be installed on top of the currently released plug-in available from the updater. Once installed, do not forget to update the SqueezeBox Server plugin using the Extension Downloader.

    NOTE 1: I updated the plug-in to version 2.0.0.2. This version creates MusicAPI instances for disconnected players and also uses a different approach to collect information about the current song and especially the artwork. Still some work to do regarding support of some character sets and noticed that HS Touch once a while does not update the arwork while the cached image has been updated.

    I also highly recommend you update to HSTouch server plugin 1.0.0.12 (see http://board.homeseer.com/showpost.p...16&postcount=1 for details).

    NOTE 2: I updated the plug-in to version 2.0.0.3. This version corrects a problem when new players are added and when searching the library when non ASCII characters are used (note that these searches are slower that others for now due to a SB Server query issue).
    Attached Files
    Last edited by pcp; January 23, 2010, 09:39 PM.

    #2
    I did the update and all seems to be working great. I like the power toggle

    I have another feature request for when you have the time: alarm integration!

    I just bought 2 SB Radio's and I would like to have a device per SB radio that shows the alarm status (enabled/disabled) and the next date/hour the alarm would go off. It would also be usefull to have a squeezebox alarm event trigger condition. When the alarm goes off I could open the blinds, start the boombox in the bathroom, etc...

    This way you can set your alarms on the radio before you go to sleep, and homeseer can fire all sorts of events to get you out of bed.

    Comment


      #3
      Hi,
      is this supposed to work as the mediaplayer plugin in HST?

      Can i use the standard "default" music browser. I can only chose the MediaPlayer or default.

      I might have misunderstood the integration....

      I also get this error on startup of HS

      PHP Code:
      22.12.2009 12:32:41  SqueezeBox Error An unexpected error occured in the RegisterCallback() function/subroutine:  [System.InvalidCastExceptionKonvertering fra strengen 1.0 til typen Double er ikke gyldig. ---> System.FormatExceptionInndatastrengen hadde ugyldig format.   ved Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String ValueNumberFormatInfo NumberFormat)   ved Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String ValueNumberFormatInfo NumberFormat)   --- Slutten på sporingen av intern unntaksstakk ---   ved Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String ValueNumberFormatInfo NumberFormat)   ved Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(Object ValueNumberFormatInfo NumberFormat)   ved Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(Object Value)   ved HSPI_SQUEEZEBOX.HSPI.RegisterCallback(Objectfrm)] 
      In english it says something about converting string to double is not legal

      Comment


        #4
        I don't know if it's gonna help you with my request for alarm clock integration, but I just created a little sample to read the alarms from a player and output them in a console application (vb.net):

        Code:
        Module Module1
        
            Sub Main()
        
                Dim client As System.Net.Sockets.TcpClient
                Dim reader As System.IO.StreamReader
                Dim writer As System.IO.StreamWriter
                Dim result As String
        
                Dim alarm As Hashtable
                Dim resultarray() As String
                Dim alarms() As Hashtable
                Dim alarmsCount As Integer = -1
        
                client = New System.Net.Sockets.TcpClient("10.111.0.4", 9090) 'connect to squeezebox server
                reader = New System.IO.StreamReader(client.GetStream, System.Text.Encoding.ASCII)
                writer = New System.IO.StreamWriter(client.GetStream, System.Text.Encoding.ASCII)
                writer.AutoFlush = True
        
                writer.WriteLine("00:04:20:26:56:6a alarms 0 5") 'send the get alarms cli command
                result = System.Web.HttpUtility.UrlDecode(reader.ReadLine) 'read the result
        
                Console.WriteLine("Result: " + result)
                Console.WriteLine("")
        
                result = result.Substring(result.IndexOf("id:")) 'cut of everyting before the id of the first alarm
                resultarray = result.Split(New Char() {" "c}) 'put results in an array per key:value
        
                'put the alarms into hashtables
                For i As Integer = 0 To resultarray.Length - 1
                    Dim str As String = System.Web.HttpUtility.UrlDecode(resultarray(i))
                    Dim index As Integer = str.IndexOf(":"c)
                    If (index <> -1) Then
                        Dim key As String = str.Substring(0, index)
                        Dim value As String = str.Substring((index + 1))
                        If key.Equals("id") Then
                            alarm = New Hashtable
                            alarmsCount += 1
                        End If
                        alarm.Add(key, value)
                        If key.Equals("url") Then
                            ReDim Preserve alarms(alarmsCount)
                            alarms(alarmsCount) = alarm
                        End If
                    End If
                Next
        
                'write the alarms
                For i As Integer = 0 To alarmsCount
                    Console.WriteLine("ID: " + alarms(i)("id"))
                    Console.WriteLine("Dow: " + alarms(i)("dow"))
                    Console.WriteLine("Enabled: " + alarms(i)("enabled"))
                    Console.WriteLine("Repeat: " + alarms(i)("repeat"))
                    Console.WriteLine("Time: " + alarms(i)("time") + " = " + getTime(alarms(i)("time").ToString).ToString)
                    Console.WriteLine("Volume: " + alarms(i)("volume"))
                    Console.WriteLine("Url: " + alarms(i)("url"))
                    Console.WriteLine("")
                Next
        
                Console.ReadLine()
        
            End Sub
        
            Private Function getTime(ByVal sTime As String) As TimeSpan
        
                'convert the time string to a real time
                Dim ihour As Integer
                Dim iMinutes As Integer
        
                ihour = CInt(sTime) / 3600
                iMinutes = (CInt(sTime) Mod 3600) / 60
        
                Return New TimeSpan(ihour, iMinutes, 0)
        
            End Function
        
        End Module
        I could go on with creating a script to add my desired functionality, but offcourse it would be nicer to have it integrated in the plugin.

        Comment


          #5
          The integration should work as does the Media player. i.e. via the Music APIs except that each player is a different zone. If you create a new screen, drop the Music overlay, you should see a selection of Music players and in the SB case, one per player (assuming the initialization did not fail of course). I am not sure how HSTouch desides what the Default Music source is; any idea?

          Note that in some cases, the first player/zone name was missing from my list of Music player choices in HSTouch. It does not seem to be a SB plug-in issue and reported it to HS for further analysis (see the know problem in the plug-in version section in the doc as well).

          What is the Locale on your HS2 computer? I will have to look the initialization problem tonight to find out what might be the cause. Not sure if this is related, but can you try to define an entry as follows in the plug-in INI file and in the settings sections?

          [Settings]
          PlayerMonitoringInterval=1


          Originally posted by markus.bergvoll View Post
          Hi,
          is this supposed to work as the mediaplayer plugin in HST?

          Can i use the standard "default" music browser. I can only chose the MediaPlayer or default.

          I might have misunderstood the integration....

          I also get this error on startup of HS

          PHP Code:
          22.12.2009 12:32:41  SqueezeBox Error An unexpected error occured in the RegisterCallback() function/subroutine:  [System.InvalidCastExceptionKonvertering fra strengen 1.0 til typen Double er ikke gyldig. ---> System.FormatExceptionInndatastrengen hadde ugyldig format.   ved Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String ValueNumberFormatInfo NumberFormat)   ved Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String ValueNumberFormatInfo NumberFormat)   --- Slutten på sporingen av intern unntaksstakk ---   ved Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String ValueNumberFormatInfo NumberFormat)   ved Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(Object ValueNumberFormatInfo NumberFormat)   ved Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(Object Value)   ved HSPI_SQUEEZEBOX.HSPI.RegisterCallback(Objectfrm)] 
          In english it says something about converting string to double is not legal
          Last edited by pcp; December 22, 2009, 08:33 AM.

          Comment


            #6
            Good suggestion and convinces me to look into it! I looked it once but then wasn't sure if HS2 should be the system generating alarms or SB. I can see others in the house would enjoy lights on and dimmed, etc... the side effect is that I will not be able to support as many players if I add additional devices per player. Thanks for the code you supplied.

            Originally posted by Droezel View Post
            I did the update and all seems to be working great. I like the power toggle

            I have another feature request for when you have the time: alarm integration!

            I just bought 2 SB Radio's and I would like to have a device per SB radio that shows the alarm status (enabled/disabled) and the next date/hour the alarm would go off. It would also be usefull to have a squeezebox alarm event trigger condition. When the alarm goes off I could open the blinds, start the boombox in the bathroom, etc...

            This way you can set your alarms on the radio before you go to sleep, and homeseer can fire all sorts of events to get you out of bed.

            Comment


              #7
              Is there any interest in having a music selection page in the plug-in HTML pages or do you all plan to either use HSTouch or the Squeezebox Server HTML pages?

              Comment


                #8
                I am perfectly satisfied with the squeezebox pages and the squeezebox controller to do music selections. Wouldnt need music selection in the homeseer webinterface since I rarely use it.

                Comment


                  #9
                  It must be christmass :-)

                  I recently bought a second SB and was silently waiting for HStouch support. Now it's here,....well in beta anyway

                  Can't wait to finish my music screen with this plug-in. It installed nicely and looks very promising.

                  Originally posted by pcp View Post
                  ...
                  Note that in some cases, the first player/zone name was missing from my list of Music player choices in HSTouch. It does not seem to be a SB plug-in issue and reported it to HS for further analysis (see the know problem in the plug-in version section in the doc as well).
                  It did also ran into the above issue though (with 2 players only 1 showing up). But I'm sure that can be solved.

                  Nice to see this plug-in being actively supported/developped... thanks !!

                  Comment


                    #10
                    Looks great.
                    Will add support for creating a HS Menu in SB Radio Device?
                    Best,
                    Jakob Sand, I automate everything!

                    Comment


                      #11
                      I uploaded a newer version that should resolve this issue.

                      Originally posted by markus.bergvoll View Post
                      Hi,
                      is this supposed to work as the mediaplayer plugin in HST?

                      Can i use the standard "default" music browser. I can only chose the MediaPlayer or default.

                      I might have misunderstood the integration....

                      I also get this error on startup of HS

                      PHP Code:
                      22.12.2009 12:32:41  SqueezeBox Error An unexpected error occured in the RegisterCallback() function/subroutine:  [System.InvalidCastExceptionKonvertering fra strengen 1.0 til typen Double er ikke gyldig. ---> System.FormatExceptionInndatastrengen hadde ugyldig format.   ved Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String ValueNumberFormatInfo NumberFormat)   ved Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String ValueNumberFormatInfo NumberFormat)   --- Slutten på sporingen av intern unntaksstakk ---   ved Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String ValueNumberFormatInfo NumberFormat)   ved Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(Object ValueNumberFormatInfo NumberFormat)   ved Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(Object Value)   ved HSPI_SQUEEZEBOX.HSPI.RegisterCallback(Objectfrm)] 
                      In english it says something about converting string to double is not legal

                      Comment


                        #12
                        Originally posted by Jakob.Sand View Post
                        Looks great.
                        Will add support for creating a HS Menu in SB Radio Device?
                        I haven't tried a SB Radio... the menus don't show up? Check http://board.homeseer.com/showpost.p...21&postcount=8 for some tips that may enable them.

                        Comment


                          #13
                          Originally posted by ewassink View Post
                          It did also ran into the above issue though (with 2 players only 1 showing up). But I'm sure that can be solved.
                          I suggest updating to HSTouch server plugin 1.0.0.12 that was released today. I just tried it (no extensive tests) and all players were displayed.

                          Comment


                            #14
                            I installed the latest beta build, and the startup error is gone

                            But the players are still not available to me in HST. No error messages.

                            I did add the settig in the ini file. In the updater i only find the HST 10.0.0.10 witch is allready installed..

                            My player count starts at 12 and runs to 16

                            Comment


                              #15
                              Originally posted by markus.bergvoll View Post
                              I installed the latest beta build, and the startup error is gone

                              But the players are still not available to me in HST. No error messages.

                              I did add the settig in the ini file. In the updater i only find the HST 10.0.0.10 witch is allready installed..

                              My player count starts at 12 and runs to 16
                              HSTouch is in Beta and to see the link I mentioned top of the page for more information and you can download it from (ftp://ftp.homeseer.com/updates/Beta/...h_1_0_0_12.msi).

                              I assume that when you mention that the players are not accessible in HST, you used the designer, dropped a Music overlay and when prompted for the Music source, your players are not visible. I also assume your players were connected, i.e. that you can see them in the SB plug-in status page. Can you run the attached script? It will access the Music APIs as HST does and will list the players/instances in the log file (search for 'Number of instances:' to find it) in addition will test a few additional APIs. This will help to determine if it is a SB plug-in or HST issue.
                              Attached Files

                              Comment

                              Working...
                              X