Ankündigung

Einklappen
Keine Ankündigung bisher.

- √ - Neues Plugin: Logitech Squeezebox - Anregungen?

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    #61
    "%B0" geht aber nicht ... wird im Display dann genau so angezeigt ... heute Nachmittag seh ich mir das nochmal an.
    Umgezogen? Ja! ... Fertig? Nein!
    Baustelle 2.0 !

    Kommentar


      #62
      Puuuh, versteh ich nicht ganz - dann probier bitte mal das ".replace('°','%B0')" bzw. mach eben einen GIT pull (develop!).

      Grüße
      Robert

      Kommentar


        #63
        So, habe gerade die Version für Python 3 in "develop" geschoben. Zudem etwas aufgeräumt und generell ein Verschlucken durch Exceptions aufgefangen.

        Leider habe ich - ohne jetzt testen zu wollen ob es vorher noch klappte - das Problem, dass ein "playlist index +1" nix bringt. "-1" hingegen klappt. Witzigerweise "+2" auch. Allerdings kriege ich das auch mit dem direkten Telnet-Interface nicht hin. Einen Workaround durch das setzen der absoluten Position möche ich nicht machen. Wer den Fehler/Trick rausfindet ist der gefeierte Held!

        Grüße
        Robert

        Kommentar


          #64
          Sieht gut aus!
          Danke!

          Kommentar


            #65
            Hallo,

            ich hätte eine Anregung:
            Ab ins nächste Release damit!
            :-)
            Edit:
            Müsste ja eigentlich automatisch kommen, laut
            https://knx-user-forum.de/325028-post39.html
            Aber gerade das aktuelle Develop gezogen und da ist nix mitgekommen..

            Gruß,
            Hendrik

            Kommentar


              #66
              Issue on squeezebox plugin for Time value

              Hello and sorry to speak english.
              I am new in smarthome.py.

              I made a working well configuration for severals squeeze box and it is OK.
              I can drive them and see the differents status and values on SmartVISU.

              I only have a problem with "Time" value in the song.
              Squeezeserver only send the duration value of the played song (not for streaming) but never the time. It is possible to ask the server to have it.
              I want to calculate the position value with time and duration. I made a logic script to do that. The script is started every 10 seconds.
              Code:
              #!/usr/bin/env python
              if sh.sqb.Play:
                  if sh.sqb.Duration() != 0:
                      sh.sqb.Position((sh.sqb.Time() / sh.sqb.Duration()) * 100)
              But the sh.sqb.Time() never re-asks the server to have the new value and keep the last received value.

              I try severals items attributs for sqb.Time item, but I not find the solution.
              I certainly missed something in my items configuration, but I don't know what.
              If somebody have a solution ?
              If you want, I can put the items and logic files to contribute to the plugin.
              Regards

              Kommentar


                #67
                Hallo Robert,

                vielen Dank für das Plugin. Ich habe es seit einige Tages mit einem Squeezebox Radio in betrieb. Im Wesentlichen zum Radio hören. Was mir im Moment fehlt (wahrscheinlich nur an Wissen) sind die Bedienung der Buttons auf dem Radio per Visu. Hier sind Die Sender abgelegt, das kennt hie jeder in der Familie, da wäre es super, wenn es einen Taste 1...6 gäbe, um die programmierten Sender auszuwählen.

                Was mir noch aufgefallen ist: Mute funktioniert bei mir nicht, das An/Aus habe ich auch nicht gefunden. Geht denn prinzipiell jeder Befehl, den der Server kann ?

                Grüße

                Michel

                Kommentar


                  #68
                  Sollte eigentlich alles gehen.
                  Favoriten sollte (ungetestet) so gehen:

                  Code:
                  <playerid> favorites playlist play item_id:{}
                  Umgezogen? Ja! ... Fertig? Nein!
                  Baustelle 2.0 !

                  Kommentar


                    #69
                    Zitat von Orion Beitrag anzeigen
                    da wäre es super, wenn es einen Taste 1...6 gäbe, um die programmierten Sender auszuwählen.
                    Ich habe das bei mir z.B. für den Player im Bad so gelöst ...... s.unten
                    Beispielcodes etc. kann ich jedoch erst morgen posten.

                    Zitat von Orion Beitrag anzeigen
                    Was mir noch aufgefallen ist: Mute funktioniert bei mir nicht, das An/Aus habe ich auch nicht gefunden.
                    Gehen aber beide. Beispielcodes leider frühestens morgen.

                    Zitat von Orion Beitrag anzeigen
                    Geht denn prinzipiell jeder Befehl, den der Server kann ?
                    Ich hab das Plugin bereits "extrem" getestet. Bisher ging jeder Befehl den ich gebraucht habe. Gehört "teilweise" etwas Zeit dazu.
                    Angehängte Dateien

                    Kommentar


                      #70
                      Autoplay on 'Power On' event

                      Hello,
                      I wrote a small logics script to start to play song directly when a squeezebox is powered on.
                      Here the sq_autoplay.py file placed in logics dir :
                      Code:
                      #!/usr/bin/env python
                      #*************************************************
                      #* sq_autoplay : logics for SmartHome.py to play *
                      #* the song directly when the power turn on      *
                      #* You need to add the logic.conf bloc to active *
                      #* it on Power event from all the squeezeboxes   *
                      #*************************************************
                      #* [sq_autoplay]                                 *
                      #*     filename = sq_autoplay.py                 *
                      #*     watch_item = *.Power                      *
                      #*************************************************
                      if trigger['value']:
                          # source format : item path <squeezebox>.Power
                          item = sh.return_item(trigger['source'])
                          # get parent to have all the squeezebox functions
                          parent = item.return_parent()
                          # change the Play value to start 
                          parent.Play('True');
                      As said in the sccript you need to add a bloc in logic.conf file to activate it :
                      Code:
                      [sq_autoplay]
                          filename = sq_autoplay.py
                          watch_item = *.Power
                      This is my first contribution. I hope that I used smarthome.py objects as we do.

                      Thanks for your feedback.

                      Regards

                      Kommentar


                        #71
                        Nice contribution, someone tested to send just the "play" string while Squeezebox is powered off? As far i remember from my perl code Squeezebox starts to play last playlist also.

                        Edit:
                        Tested just now with a Boom, this might also work with favorites.
                        Umgezogen? Ja! ... Fertig? Nein!
                        Baustelle 2.0 !

                        Kommentar


                          #72
                          Autoplay Logics script

                          Hello and thanks for your feedback.
                          The behaviour need is to have a autoplay everywhere you push the power button, physical on the box, on smartvisu or via knx GA. It always start to play the current song. The Logics script can be modified to test if play is not already on for example when the alarm starts. I working on it ...
                          I made a similar config on linknx and now I try to rebuild it on smarthome.py to learn and understand to product.

                          I have a question for Robert : is it possible to send or receive order to the LMS server via the plugin on Logics side ?

                          Regards

                          Kommentar


                            #73
                            Zitat von adm1024 Beitrag anzeigen
                            I have a question for Robert : is it possible to send or receive order to the LMS server via the plugin on Logics side ?
                            Hi.

                            Please elaborate more.

                            I just checked in 'squeezebox_recv' logic trigger - you should be able to use multiple "recv-strings" in the attribute - also you can use 'squeezebox_playerid' like with the items.

                            BR
                            Robert

                            Kommentar


                              #74
                              thanks Robert.
                              I will try it.

                              Regards

                              Kommentar


                                #75
                                Alarms notifications ...

                                Hello,

                                I add alarms notifications in the plugin.
                                Two new items are added :
                                alarm : set to '1' when an alarm starts and '0' when the alarm stops
                                snooze : set to '1' when the alarm is snoozed and '0' at the end of the snooze
                                Here the plugin code :
                                Code:
                                                elif (data[1] == 'stop'):
                                                    self._update_items_with_data([data[0], 'play', '0'])
                                                    self._update_items_with_data([data[0], 'stop', '1'])
                                                    self._update_items_with_data([data[0], 'pause', '0'])
                                                    return
                                [B]                elif (data[1] == 'alarm'):
                                                    if (data[2] == 'sound'):
                                                        self._update_items_with_data([data[0], 'alarm', '1'])
                                                    if (data[2] == 'end'):
                                                        self._update_items_with_data([data[0], 'alarm', '0'])
                                                    if (data[2] == 'snooze'):
                                                        self._update_items_with_data([data[0], 'snooze', '1'])
                                                    if (data[2] == 'snooze_end'):
                                                        self._update_items_with_data([data[0], 'snooze', '0'])
                                                    return[/B]
                                                elif (data[1] == 'pause'):
                                and for items side :
                                Code:
                                  [[Alarm]]
                                    type = bool
                                    visu = yes
                                    squeezebox_recv = <playerid> alarm
                                
                                  [[Snooze]]
                                    type = bool
                                    visu = yes
                                    squeezebox_recv = <playerid> snooze
                                Robert, you can commit this change if you want.

                                Thanks for feedback.

                                Regards

                                Kommentar

                                Lädt...
                                X