Ankündigung

Einklappen
Keine Ankündigung bisher.

- √ - Neues Plugin: Logitech Squeezebox - Anregungen?

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

    #31
    Zitat von Robert Beitrag anzeigen
    Fix für das Problem mit den Umlauten und fix dass die Spielzeit nicht auf 0 gesetzt wurde:
    Spitze ...... läuft. Danke

    Zitat von JuMi2006 Beitrag anzeigen
    Anleitung für den LMS auf dem Pi:
    All Things Pi
    Ja. Hatte ich auch 2 mal versucht. Aber immer wieder Probleme.

    Kommentar


      #32
      Da das Multimedia-widget nicht gerade optimal für den Sqeezebox-Player ist (z.B. Song zurück), bastel ich gerade einen angepassten.
      Dabei ist mir aufgefallen das es doch schön wäre, wenn man noch "Repeat Song", "Repeat Playlist", "Zufall Song", "Zuafall Album" in das Plugin einbauen könnte.

      Kommentar


        #33
        https://knx-user-forum.de/smartvisu/...te-widget.html !!!!!

        Da ist alles drin, inkl. widget_squeezebox und einer Demoeinbindung inkl. Signalstärke etc. Bitte lesen und mithelfen - am besten wäre wenn wir gemeinsam ein richtig "dicker" Squeezebox"-Widget bauen, was auch Playlisten kann!

        Kommentar


          #34
          Zitat von macflei Beitrag anzeigen
          [...] schön wäre, wenn man noch "Repeat Song", "Repeat Playlist", "Zufall Song", "Zuafall Album" in das Plugin einbauen könnte.
          Das kann man schon. Einfach mit squeezebox_send/squeezebox_recv spielen.

          Wiederholungsmodus per Nummer setzen/lesen
          Code:
          [Repeat]
             type = num
             force_updates = yes
             squeezebox_send = <playerid> playlist repeat {}
             squeezebox_recv = <playerid> playlist repeat
          Wiederholen des aktuellen Songs per Bool
          Code:
          [Repeat_Song]
             type = bool
             force_updates = yes
             squeezebox_send = <playerid> playlist repeat 1
          Wiederholen der aktuellen Playlist per Bool
          Code:
          [Repeat_Playlist]
             type = bool
             force_updates = yes
             squeezebox_send = <playerid> playlist repeat 2
          Wiederholen ausschalten per Bool
          Code:
          [Repeat_None]
             type = bool
             force_updates = yes
             squeezebox_send = <playerid> playlist repeat 0
          analog für "shuffle"

          Wenn das nicht wie gewünscht funktioniert -> Bug melden

          Motto: so wenig Quirks wie möglich...

          Grüße
          Robert

          Kommentar


            #35
            Hallo Robert,

            ich würde gerne ein Squeezebox Radio nutzen um Aktionen auszuführen.
            Wenn ich z.B. das Radio auf Play stelle, dann soll per KNX der Verstärker eingeschaltet werden.

            Geht das mit dem Plugin? Bekommt das Plugin mit, wenn Musik abgespielt wird (klar, wenn ich per Plugin auf Play gehe geht das, aber was ist, wenn ich den Knopf am Gerät drücke?)

            Gruß,
            Hendrik

            Kommentar


              #36
              Ja, wenn du dem Item auch ein knx_send etc gibts - warum nicht?

              Du kannst auch mit dem Lautstärkeregler deine Raffstores steuern... ;-)

              Ausprobieren - wenn es nicht klappt -> Bug melden

              Kommentar


                #37
                Hallo Robert,
                wie sieht Dein Time-Eintarg im item aus?
                Meins mag er scheinbar nicht.

                Code:
                  [[Time]]
                    type = str
                    visu = yes
                    squeezebox_recv = <playerid> time {}
                    squeezebox_init = <playerid> time
                Und um die Sache noch etwas abzurunden, eine Abfrage des Strings welche Titelzahl gerade gespilet wird. Also z.B Titel 7 von 10 (7/10)

                Kommentar


                  #38
                  1) type = num
                  2) <playerid> playlist index

                  Guck mal in die <serverip>:9000/html/docs/cli-api.html ! Da stehen alle Befehle drin. Diese dann ausprobieren und wenn es nicht funktioniert -> Bug melden

                  Kommentar


                    #39
                    Hi!

                    Seit eben ist das Plugin samt README im "develop-branch" des GIT-Repos: https://github.com/mknx/smarthome/tr...ins/squeezebox

                    Neu sind:
                    • der "Mute" Zustand wird bei einem "Play" neu abgefragt, statt ihn hart per "mixer muting 0" zu updaten.
                    • werden boolsche Items für Shuffle und Repeat angelegt, kann per "False" wieder Ausgeschaltet werden

                    Weitere Änderungen gibt es erst mal nicht mehr, es sein denn Playlisten werden irgendwann möglich (Aufbereitung der Daten).

                    Grüße
                    Robert

                    @Marcus: kannst du evtl. den Eingangspost um einen dicken Hinweis ergänzen, dass das Plugin in der aktuellsten Version jetzt im GIT ist?

                    Kommentar


                      #40
                      Hallo Robert,

                      danke dafür! Ich habe es gerade runter geladen (die __init__.py ins /plugins/squeezebox Verzeichnis).

                      Hier meine items.conf:
                      Code:
                      cat /usr/local/smarthome/items/squeezebox.conf
                      [Squeezebox]
                        squeezebox_playerid = 00:04:20:27:a7:28
                      
                        [[Name]]
                          type = str
                          visu = yes
                          knx_send=9/2/0
                          knx_dpt=16.001
                          squeezebox_send = <playerid> name {}
                          squeezebox_recv = <playerid> name
                        [[IP]]
                          type = str
                          visu = yes
                          squeezebox_recv = player ip <playerid>
                        [[Signal_Strength]]
                          type = num
                          visu = yes
                          squeezebox_recv = <playerid> signalstrength
                      
                        [[Power]]
                          type = bool
                          visu = yes
                          knx_send=9/2/1
                          knx_recv=9/2/1
                          knx_init=9/2/1
                          knx_dpt=1
                          squeezebox_send = <playerid> power {}
                          squeezebox_recv = <playerid> prefset server power
                          squeezebox_init = <playerid> power
                      
                        [[Mute]]
                          type = bool
                          visu = yes
                          knx_send=9/2/2
                          knx_recv=9/2/2
                          knx_init=9/2/2
                          knx_dpt=1
                          squeezebox_send = <playerid> mixer muting {}
                          squeezebox_recv = <playerid> prefset server mute
                          squeezebox_init = <playerid> mixer muting
                        [[Volume]]
                          type = num
                          visu = yes
                          squeezebox_send = <playerid> mixer volume {}
                          squeezebox_recv = <playerid> prefset server volume
                          squeezebox_init = <playerid> mixer volume
                        [[Volume_Up]]
                          type = bool
                          enforce_updates = true
                          visu = yes
                          knx_recv=9/2/3
                          knx_dpt=1
                          squeezebox_send = <playerid> button volup
                        [[Volume_Down]]
                          type = bool
                          enforce_updates = true
                          visu = yes
                          knx_recv=9/2/4
                          knx_dpt=1
                          squeezebox_send = <playerid> button voldown
                      
                        [[Play]]
                          type = bool
                          visu = yes
                          squeezebox_send = <playerid> play
                          squeezebox_recv = <playerid> play
                          squeezebox_init = <playerid> mode
                          knx_send=9/2/5
                          knx_recv=9/2/5
                          knx_init=9/2/5
                          knx_dpt=1
                      
                        [[Stop]]
                          type = bool
                          visu = yes
                          squeezebox_send = <playerid> stop
                          squeezebox_recv = <playerid> stop
                          squeezebox_init = <playerid> mode
                          knx_send=9/2/6
                          knx_recv=9/2/6
                          knx_init=9/2/6
                          knx_dpt=1
                      
                      
                        [[Pause]]
                          type = bool
                          visu = yes
                          squeezebox_send = <playerid> pause {}
                          squeezebox_recv = <playerid> pause
                          squeezebox_init = <playerid> mode
                          knx_send=9/2/7
                          knx_recv=9/2/7
                          knx_init=9/2/7
                          knx_dpt=1
                      
                      
                        [[Current_Title]]
                          type = str
                          visu = yes
                          knx_send=9/2/9
                          knx_dpt=16.001
                          squeezebox_recv = <playerid> playlist newsong
                          squeezebox_init = <playerid> current_title
                      Wenn ich jetzt sende, sehe ich dies im Debug output:
                      2013-07-01 22:06:09,878 SmartHome.py DEBUG Squeezebox.Power = True via KNX 0.0.0 -- item.py:_update:219
                      Aber am Squeezebox-Radio sehe ich keinen Effekt.

                      Habe ich etwas falsch verstanden? Die playerid muss ich ja nur oben einmal setzen, oder? Und: ist das Format richtig, oder brauche ich noch ein ' oder "?

                      ich habe das jetzt auch mal per telnet server:9090 getestet:
                      Code:
                      00:04:20:27:a7:28 power 1
                      00%3A04%3A20%3A27%3Aa7%3A28 power 1
                      
                      00:04:20:27:a7:28 power 0
                      00%3A04%3A20%3A27%3Aa7%3A28 power 0
                      funktioniert.

                      Edit:
                      Code:
                      2013-07-01 22:16:25,353 SmartHome.py DEBUG    Plugin: squeezebox -- plugin.py:__init__:42
                      2013-07-01 22:16:25,354 SmartHome.py WARNING  Plugin squeezebox exception: invalid syntax (__init__.py, line 3) -- plugin.py:__init__:56
                      Das wird's sein. Aber wie finde ich raus, was ihm nicht schmeckt?

                      Gruß und nochmal Danke!
                      Hendrik

                      Kommentar


                        #41
                        Inhalt der /etc/plugin.conf? Tippe auf Fehler darin

                        Ansonsten erstmal alle knx-Sachen raus und dann nur Power mit KNX verbinden.

                        Bei mir funktionierts einwandfrei (gerade frisch getestet)!?

                        Du werkelst aber auch momentan an zehn Baustellen gleichzeitig... ;-)

                        Kommentar


                          #42
                          Hallo Robert,
                          danke für deine Antwort
                          Zitat von Robert Beitrag anzeigen
                          Inhalt der /etc/plugin.conf? Tippe auf Fehler darin
                          Code:
                          [squeezebox]
                              class_name = Squeezebox
                              class_path = plugins.squeezebox
                          #    host = <server>
                          #    port = <port>
                          (läuft auf dem gleichen Rechner und auf 9090)

                          Ansonsten erstmal alle knx-Sachen raus und dann nur Power mit KNX verbinden.
                          Ok. Mache ich. Der Teil ist aber so weit richtig, ja?


                          Du werkelst aber auch momentan an zehn Baustellen gleichzeitig... ;-)
                          Ja, muss! ;-)

                          Gruß,
                          Hendrik

                          Kommentar


                            #43
                            Sowas blödes!

                            Wenn die __init__.py so aussieht, dann darf man sich nicht wundern:
                            Code:
                            <!DOCTYPE html>
                            <html>
                              <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# githubog: http://ogp.me/ns/fb/githubog#">
                                <meta charset='utf-8'>
                                <meta http-equiv="X-UA-Compatible" content="IE=edge">
                                    <title>smarthome/plugins/squeezebox/__init__.py at develop · mknx/smarthome · GitHub</title>
                                <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub" />
                                <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub" />
                                <link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-114.png" />
                                <link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114.png" />
                                <link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-144.png" />
                                <link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144.png" />
                                <link rel="logo" type="image/svg" href="https://github-media-downloads.s3.amazonaws.com/github-logo.svg" />
                                <meta property="og:image" content="https://a248.e.akamai.net/assets.github.com/images/modules/logos_page/Octocat.png">
                                <link rel="assets" href="https://a248.e.akamai.net/assets.github.com/">
                                <link rel="xhr-socket" href="/_sockets" />
                            
                            
                            
                            
                                <meta name="msapplication-TileImage" content="/windows-tile.png" />
                                <meta name="msapplication-TileColor" content="#ffffff" />
                                <meta name="selected-link" value="repo_source" data-pjax-transient />
                                <meta content="collector.githubapp.com" name="octolytics-host" /><meta content="github" name="octolytics-app-id" />
                            Hatte sie per wget geholt...

                            Jetzt klappt's schonmal mit Play und Power!

                            Was noch nicht klappt ist das Lesen von Strings.

                            Erstmal aus dem log beim init:
                            Code:
                            2013-07-02 19:17:17,024 sh.con       DEBUG    squeezebox: init read -- __init__.py:handle_connect:204
                            2013-07-02 19:17:17,024 sh.con       DEBUG    Sending request: 00:04:20:27:a7:28 name ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,026 sh.con       DEBUG    Sending request: player ip 00:04:20:27:a7:28 ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,027 sh.con       DEBUG    Sending request: 00:04:20:27:a7:28 signalstrength ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,028 sh.con       DEBUG    Sending request: 00:04:20:27:a7:28 power ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,029 sh.con       DEBUG    Sending request: 00:04:20:27:a7:28 mixer muting ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,030 sh.con       DEBUG    Sending request: 00:04:20:27:a7:28 mixer volume ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,031 sh.con       DEBUG    Sending request: 00:04:20:27:a7:28 mode ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,032 sh.con       DEBUG    Sending request: 00:04:20:27:a7:28 current_title ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,032 sh.con       DEBUG    Sending request: 00:04:20:27:a7:28 genre ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,034 sh.con       DEBUG    Sending request: 00:04:20:27:a7:28 artist ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,035 sh.con       DEBUG    Sending request: 00:04:20:27:a7:28 album ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,035 sh.con       DEBUG    Sending request: 00:04:20:27:a7:28 title ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,035 sh.con       DEBUG    Sending request: 00:04:20:27:a7:28 duration ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,035 sh.con       DEBUG    Sending request: 00:04:20:27:a7:28 time ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,035 sh.con       DEBUG    Sending request: 00:04:20:27:a7:28 playlist index ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,035 sh.con       DEBUG    Sending request: 00:04:20:27:a7:28 playlist name ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,035 sh.con       DEBUG    Sending request: 00:04:20:27:a7:28 playlist repeat ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,035 sh.con       DEBUG    Sending request: 00:04:20:27:a7:28 playlist shuffle ? -- __init__.py:_send:127
                            2013-07-02 19:17:17,035 sh.con       INFO     Squeezebox: connected to 192.168.177.3:9090 -- my_asynchat.py:connect:69
                            2013-07-02 19:17:17,036 sh.gc        DEBUG    Garbage collector: collected 551 objects. -- smarthome.py:_garbage_collection:345
                            2013-07-02 19:17:17,206 Scheduler    DEBUG    sh.gc next time: 2013-07-03 02:04:00+02:00 -- scheduler.py:_next_time:238
                            2013-07-02 19:17:17,862 SmartHome.py DEBUG    Got: ['listen', '1'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,863 SmartHome.py INFO     Listen-mode enabled -- __init__.py:_parse_response:137
                            2013-07-02 19:17:17,863 SmartHome.py DEBUG    Got: ['00:04:20:27:a7:28', 'name', 'Radio K\xc3\xbcche'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,863 SmartHome.py DEBUG    Squeezebox.Name = Radio Küche via LMS 192.168.177.3:9090 -- item.py:_update:219
                            2013-07-02 19:17:17,864 SmartHome.py DEBUG    Got: ['player', 'ip', '00:04:20:27:a7:28', '192.168.177.27:42536'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,864 SmartHome.py DEBUG    Squeezebox.IP = 192.168.177.27:42536 via LMS 192.168.177.3:9090 -- item.py:_update:219
                            2013-07-02 19:17:17,864 SmartHome.py DEBUG    Got: ['00:04:20:27:a7:28', 'signalstrength', '100'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,865 SmartHome.py DEBUG    Squeezebox.Signal_Strength = 100 via LMS 192.168.177.3:9090 -- item.py:_update:219
                            2013-07-02 19:17:17,865 SmartHome.py DEBUG    Got: ['00:04:20:27:a7:28', 'power', '1'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,865 SmartHome.py DEBUG    Squeezebox.Power = True via LMS 192.168.177.3:9090 -- item.py:_update:219
                            2013-07-02 19:17:17,866 SmartHome.py DEBUG    Got: ['00:04:20:27:a7:28', 'mixer', 'muting', '0'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,866 SmartHome.py DEBUG    Got: ['00:04:20:27:a7:28', 'mixer', 'volume', '84'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,866 SmartHome.py DEBUG    Squeezebox.Volume = 84 via LMS 192.168.177.3:9090 -- item.py:_update:219
                            2013-07-02 19:17:17,867 SmartHome.py DEBUG    Got: ['00:04:20:27:a7:28', 'mode', 'play'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,867 SmartHome.py DEBUG    Squeezebox.Play = True via LMS 192.168.177.3:9090 -- item.py:_update:219
                            2013-07-02 19:17:17,868 SmartHome.py DEBUG    Got: ['00:04:20:27:a7:28', 'current_title', 'Rolling In the Deep'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,868 SmartHome.py DEBUG    Squeezebox.Current_Title = Rolling In the Deep via LMS 192.168.177.3:9090 -- item.py:_update:219
                            2013-07-02 19:17:17,869 SmartHome.py DEBUG    Got: ['00:04:20:27:a7:28', 'genre', 'Pop'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,869 SmartHome.py DEBUG    Squeezebox.Genre = Pop via LMS 192.168.177.3:9090 -- item.py:_update:219
                            2013-07-02 19:17:17,869 SmartHome.py DEBUG    Got: ['00:04:20:27:a7:28', 'artist', 'ADELE'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,870 SmartHome.py DEBUG    Squeezebox.Artist = ADELE via LMS 192.168.177.3:9090 -- item.py:_update:219
                            2013-07-02 19:17:17,870 SmartHome.py DEBUG    Got: ['00:04:20:27:a7:28', 'album', '21'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,870 SmartHome.py DEBUG    Squeezebox.Album = 21 via LMS 192.168.177.3:9090 -- item.py:_update:219
                            2013-07-02 19:17:17,871 SmartHome.py DEBUG    Got: ['00:04:20:27:a7:28', 'title', 'Rolling In the Deep'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,871 SmartHome.py DEBUG    Squeezebox.Title = Rolling In the Deep via LMS 192.168.177.3:9090 -- item.py:_update:219
                            2013-07-02 19:17:17,872 SmartHome.py DEBUG    Got: ['00:04:20:27:a7:28', 'duration', '228.159'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,872 SmartHome.py DEBUG    Squeezebox.Duration = 228.159 via LMS 192.168.177.3:9090 -- item.py:_update:219
                            2013-07-02 19:17:17,872 SmartHome.py DEBUG    Got: ['00:04:20:27:a7:28', 'time', '78.2417131958008'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,872 SmartHome.py DEBUG    Squeezebox.Time = 78.2417131958 via LMS 192.168.177.3:9090 -- item.py:_update:219
                            2013-07-02 19:17:17,873 SmartHome.py DEBUG    Got: ['00:04:20:27:a7:28', 'playlist', 'index', '0'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,873 SmartHome.py DEBUG    Got: ['00:04:20:27:a7:28', 'playlist', 'name'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,873 SmartHome.py DEBUG    Got: ['00:04:20:27:a7:28', 'playlist', 'repeat', '2'] -- __init__.py:_parse_response:132
                            2013-07-02 19:17:17,874 SmartHome.py DEBUG    Squeezebox.Repeat = 2 via LMS 192.168.177.3:9090 -- item.py:_update:219
                            2013-07-02 19:17:17,874 SmartHome.py DEBUG    Got: ['00:04:20:27:a7:28', 'playlist', 'shuffle', '0'] -- __init__.py:_parse_response:132
                            Das sieht ja schonmal gut aus!

                            Aber beim Lesen sehe ich nur dies im Log und auf dem Bus kommt keine Antwort:
                            Code:
                            2013-07-02 19:20:17,589 SmartHome.py DEBUG    0.0.0 read 9/2/9 -- __init__.py:parse_telegram:198
                            2
                            Gruß,
                            Hendrik

                            Kommentar


                              #44
                              Das ist klar...

                              9/2/9 ist "Current_Title" - wie soll auch "Rolling In the Deep" (19 Zeichen!) in einem Satz über den KNX gebracht werden (DPT 16.xxx, 14 Zeichen)?

                              Ergo: Eine Logik die das zerhackt - jedoch: Wofür? Es gibt kein KNX Gerät was damit etwas anfangen kann. Und alle anderen werden besser per IP bedient...

                              Kommentar


                                #45
                                Ah, ok. Die SmartVisu würde dann aber den Titel bekommen?
                                Per KNX wären mir die ersten 14 Zeichen lieber als nix. Meinst du nicht, es würde Sinn machen, das im Plugin zu berücksichtigen?
                                Edit
                                Code:
                                Squeezebox.Title = Happy (Live) via LMS 192.168.177.3:9090 -- item.py:_update:219
                                wird auch nicht gesendet.

                                Gruß,
                                Hendrik

                                Kommentar

                                Lädt...
                                X