Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. [Vorlage] Spotify Skript

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    [Vorlage] Spotify Skript

    This topic has been deleted. Only users with topic management privileges can see it.
    • wendy2702
      wendy2702 last edited by

      @twonky:

      Ich meine nun endlich den Fehler gefunden zu haben.

      <list type="decimal">4. Zum einen wurde ein, wie ich finde, relativ aggressives Polling durchgeführt. Sollte eine Abfrage mal länger dauern, wird einfach die nächste gestellt ohne abzuwarten.

      1. Sollte die API mal der Meinung sein, mal stelle zu viele Anfragen, wurde dies einfach ignoriert.

      Beide Sachen habe ich überarbeitet. Und Version https://github.com/twonky4/ioBroker.spotify-premium ist nun verfügbar. Damit wechsel ich auch in den Beta Status.

      Da ich intern was umgebaut habe muss nach dem Update die Autorisation nochmal durchgeführt werden, also bitte nicht wundern. `

      Habe die Version gerade mal installiert.

      Jetzt mal beobachten.

      Habe bisher die neu zugekommenen Objekte nicht manuell eingerichtet. Kann man das nicht irgendwie lösen das diese Objekte bei einem Upgrade automatisch mit angelegt werden?

      Eine neu Installation finde ich etwas "ungünstig"

      Gruß

      1 Reply Last reply Reply Quote 0
      • E
        el-lutschi last edited by

        Hallo,

        ich habe meinen iobroker neu aufgesetzt und versuche nun den Sporify Adapter zu installieren.

        Leider bekomme ich folgende Fehlermeldung:

        host.SmartHome	2018-02-27 12:43:44.850	info	Update repository "default" under "http://download.iobroker.net/sources-dist.json"
        host.SmartHome	2018-02-27 12:43:44.357	info	iobroker exit 0
        host.SmartHome	2018-02-27 12:43:44.259	info	iobroker npm ERR! Please include the following file with any support request: npm ERR! /npm-debug.log
        host.SmartHome	2018-02-27 12:43:44.195	info	iobroker npm ERR! fetch failed with status code 404npm ERR! npm ERR! If you need help, you may report this error at: npm ERR!
        host.SmartHome	2018-02-27 12:43:44.181	info	iobroker
        host.SmartHome	2018-02-27 12:43:44.170	info	iobroker npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "https://github.com/twonky4/ioBroker.spotify-premium.git/tarball/master" "--production" "--prefix" "/opt/iobroker"npm ERR! node v6.13.0
        host.SmartHome	2018-02-27 12:43:44.169	info	iobroker npm ERR! Linux 4.9.59-v7+
        host.SmartHome	2018-02-27 12:43:44.132	info	iobroker npm ERR! fetch failed https://github.com/twonky4/ioBroker.spotify-premium.git/tarball/master
        iobroker	2018-02-27 12:42:43.608	info	npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 404
        iobroker	2018-02-27 12:42:43.597	info	ERR! fetch failed https://github.com/twonky4/ioBroker.spotify-premium.git/tarball/master
        iobroker	2018-02-27 12:42:43.594	info	npm
        iobroker	2018-02-27 12:42:33.434	info	npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 404
        iobroker	2018-02-27 12:42:33.409	info	npm ERR! fetch failed https://github.com/twonky4/ioBroker.spotify-premium.git/tarball/master
        iobroker	2018-02-27 12:42:20.788	info	npm install https://github.com/twonky4/ioBroker.spotify-premium.git/tarball/master --production --prefix "/opt/iobroker" (System call)
        iobroker	2018-02-27 12:42:20.375	info	install https://github.com/twonky4/ioBroker.spotify-premium.git/tarball/master
        iobroker	2018-02-27 12:42:19.131	info	url "https://github.com/twonky4/ioBroker.spotify-premium.git"
        
        

        Andere Adapter aus der Übersicht lassen sich Problemlos installieren.

        Was kann das nur sein?

        1 Reply Last reply Reply Quote 0
        • X
          xmace last edited by

          @twonky:

          @xmace: Du benutzt noch das Skript von Lucky. Es gibt mittlerweile einen Adapter, wo dieser Fehler bereits behoben ist: https://github.com/twonky4/ioBroker.spotify-premium `

          Japp ich weis, hab ich ja geschrieben gehabt.

          Hab seitdem den neuen Adapter erfolgreich in Benutzung.

          Hab ne Frage bzgl. dem Objekt "spotify-premium.0.Player.Volume" das wird bei mir nachdem ich die Lautstärke geändert hab immer wieder auf "null" gesetzt

          Im Skript von Lucky blieb der zuletzt eingestellte Wert erhalten.

          Wird nämlich jetzt dann nicht schön im Widget angezeit, Lautstärkeregler springt dann wieder auf 0 zurück.
          5044_unbenannt.png
          Any toughts?

          Außerdem heute folgende Meldungen im Log gehabt 2x

          spotify-premium.0	2018-02-27 19:30:17.426	info	terminating
          spotify-premium.0	2018-02-27 19:30:17.276	error	at emitOne (events.js:116:13)
          spotify-premium.0	2018-02-27 19:30:17.276	error	at TLSSocket.socketErrorListener (_http_client.js:387:9)
          spotify-premium.0	2018-02-27 19:30:17.276	error	at ClientRequest.emit (events.js:211:7)
          spotify-premium.0	2018-02-27 19:30:17.276	error	at emitOne (events.js:116:13)
          spotify-premium.0	2018-02-27 19:30:17.276	error	at Request.onRequestError (/opt/iobroker/node_modules/iobroker.spotify-premium/node_modules/request/request.js:878:8)
          spotify-premium.0	2018-02-27 19:30:17.276	error	at Request.emit (events.js:211:7)
          spotify-premium.0	2018-02-27 19:30:17.276	error	at emitOne (events.js:116:13)
          spotify-premium.0	2018-02-27 19:30:17.276	error	at self.callback (/opt/iobroker/node_modules/iobroker.spotify-premium/node_modules/request/request.js:186:22)
          spotify-premium.0	2018-02-27 19:30:17.276	error	at Request._callback (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:232:17)
          spotify-premium.0	2018-02-27 19:30:17.276	error	at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:415:43
          spotify-premium.0	2018-02-27 19:30:17.276	error	TypeError: Cannot read property 'hasOwnProperty' of null
          spotify-premium.0	2018-02-27 19:30:17.275	error	uncaught exception: Cannot read property 'hasOwnProperty' of null
          spotify-premium.0	2018-02-27 19:30:17.247	error	erron in Request
          
          1 Reply Last reply Reply Quote 0
          • E
            el-lutschi last edited by

            Habe mein problem von vorhin gelöst indem ich npm und den javascript adapter aktualisiert habe.

            Nun bekomme ich aber sobald ich die auth. URL einfüge immer wieder folgende Meldung

            host.SmartHome	2018-02-27 21:07:19.728	info	Restart adapter system.adapter.spotify-premium.0 because enabled
            host.SmartHome	2018-02-27 21:07:19.728	error	instance system.adapter.spotify-premium.0 terminated with code 0 (OK)
            Caught	2018-02-27 21:07:19.728	error	by controller[0]: at IncomingMessage. (/opt/iobroker/node_modules/request/request.js:1085:12)
            Caught	2018-02-27 21:07:19.728	error	by controller[0]: at Request.emit (events.js:188:7)
            Caught	2018-02-27 21:07:19.728	error	by controller[0]: at emitOne (events.js:96:13)
            Caught	2018-02-27 21:07:19.727	error	by controller[0]: at Request. (/opt/iobroker/node_modules/request/request.js:1163:10)
            Caught	2018-02-27 21:07:19.727	error	by controller[0]: at Request.emit (events.js:191:7)
            Caught	2018-02-27 21:07:19.727	error	by controller[0]: at emitTwo (events.js:106:13)
            Caught	2018-02-27 21:07:19.727	error	by controller[0]: at Request.self.callback (/opt/iobroker/node_modules/request/request.js:186:22)
            Caught	2018-02-27 21:07:19.727	error	by controller[0]: at Request._callback (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:140:25)
            Caught	2018-02-27 21:07:19.726	error	by controller[0]: at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:992:13
            Caught	2018-02-27 21:07:19.726	error	by controller[0]: at createPlaybackInfo (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:338:27)
            Caught	2018-02-27 21:07:19.725	error	by controller[0]: TypeError: Cannot read property 'id' of null
            

            Das alte Skript funktioniert noch ohne Probleme.

            EDIT: Ich nehme alles zurück und behaute das Gegenteil 😄

            Keine Ahnung warum, aber nun funktioniert es plötzlich. Und das sehr gut.

            Also an dieser Stelle ein großes Danke für den Adapter. Ich freue mich schon auf kommende Funktionen 🙂

            1 Reply Last reply Reply Quote 0
            • S
              schubi82 last edited by

              Wird bei Euch die Variable "is_active" der Devices aktualisiert? Ich wollte eine Grafik nur anzeigen lassen, wenn das Gerät auch online und anspielbar ist, aber die Variable bleibt immer auf TRUE stehen… Oder ist das Objekt falsch?

              1 Reply Last reply Reply Quote 0
              • E
                el-lutschi last edited by

                @schubi82:

                Wird bei Euch die Variable "is_active" der Devices aktualisiert? Ich wollte eine Grafik nur anzeigen lassen, wenn das Gerät auch online und anspielbar ist, aber die Variable bleibt immer auf TRUE stehen… Oder ist das Objekt falsch? `

                Hallo,

                ja, bei mir wird das aktualisiert. Wenn ich z.B. über den PC das Connect Gerät ändere, erscheint dies nach ein paar Sekunden auch so im Adapter.

                Habe den Wert selbst in einigen Scripts eingebaut.

                1 Reply Last reply Reply Quote 0
                • X
                  xmace last edited by

                  und nochmal:

                  spotify-premium.0	2018-03-01 17:33:45.257	info	starting. Version 0.1.0 in /opt/iobroker/node_modules/iobroker.spotify-premium, node: v8.9.4
                  host.iobrokerVM	2018-03-01 17:33:43.007	info	instance system.adapter.spotify-premium.0 started with pid 25017
                  host.iobrokerVM	2018-03-01 17:33:12.977	info	Restart adapter system.adapter.spotify-premium.0 because enabled
                  host.iobrokerVM	2018-03-01 17:33:12.977	error	instance system.adapter.spotify-premium.0 terminated with code 0 (OK)
                  Caught	2018-03-01 17:33:12.977	error	by controller[0]: at emitOne (events.js:116:13)
                  Caught	2018-03-01 17:33:12.976	error	by controller[0]: at TLSSocket.socketErrorListener (_http_client.js:387:9)
                  Caught	2018-03-01 17:33:12.976	error	by controller[0]: at ClientRequest.emit (events.js:211:7)
                  Caught	2018-03-01 17:33:12.976	error	by controller[0]: at emitOne (events.js:116:13)
                  Caught	2018-03-01 17:33:12.976	error	by controller[0]: at Request.onRequestError (/opt/iobroker/node_modules/iobroker.spotify-premium/node_modules/request/request.js:878:8)
                  Caught	2018-03-01 17:33:12.976	error	by controller[0]: at Request.emit (events.js:211:7)
                  Caught	2018-03-01 17:33:12.976	error	by controller[0]: at emitOne (events.js:116:13)
                  Caught	2018-03-01 17:33:12.976	error	by controller[0]: at self.callback (/opt/iobroker/node_modules/iobroker.spotify-premium/node_modules/request/request.js:186:22)
                  Caught	2018-03-01 17:33:12.976	error	by controller[0]: at Request._callback (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:232:17)
                  Caught	2018-03-01 17:33:12.975	error	by controller[0]: at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:415:43
                  Caught	2018-03-01 17:33:12.975	error	by controller[0]: TypeError: Cannot read property 'hasOwnProperty' of null
                  spotify-premium.0	2018-03-01 17:33:12.883	info	terminating
                  spotify-premium.0	2018-03-01 17:33:12.833	error	at emitOne (events.js:116:13)
                  spotify-premium.0	2018-03-01 17:33:12.833	error	at TLSSocket.socketErrorListener (_http_client.js:387:9)
                  spotify-premium.0	2018-03-01 17:33:12.833	error	at ClientRequest.emit (events.js:211:7)
                  spotify-premium.0	2018-03-01 17:33:12.833	error	at emitOne (events.js:116:13)
                  spotify-premium.0	2018-03-01 17:33:12.833	error	at Request.onRequestError (/opt/iobroker/node_modules/iobroker.spotify-premium/node_modules/request/request.js:878:8)
                  spotify-premium.0	2018-03-01 17:33:12.833	error	at Request.emit (events.js:211:7)
                  spotify-premium.0	2018-03-01 17:33:12.833	error	at emitOne (events.js:116:13)
                  spotify-premium.0	2018-03-01 17:33:12.833	error	at self.callback (/opt/iobroker/node_modules/iobroker.spotify-premium/node_modules/request/request.js:186:22)
                  spotify-premium.0	2018-03-01 17:33:12.833	error	at Request._callback (/opt/iobroker/node_modules/iobroker.spotify-premium/main.js:232:17)
                  spotify-premium.0	2018-03-01 17:33:12.833	error	at /opt/iobroker/node_modules/iobroker.spotify-premium/main.js:415:43
                  spotify-premium.0	2018-03-01 17:33:12.833	error	TypeError: Cannot read property 'hasOwnProperty' of null
                  spotify-premium.0	2018-03-01 17:33:12.833	error	uncaught exception: Cannot read property 'hasOwnProperty' of null
                  spotify-premium.0	2018-03-01 17:33:12.816	error	erron in Request
                  
                  1 Reply Last reply Reply Quote 0
                  • wendy2702
                    wendy2702 last edited by

                    @xmace:

                    und nochmal: `

                    Da du````
                    node: v8.9.4

                    
                    Hinweis:
                    
                    

                    Installation Node.js
                    Diese Anleitung bezieht sich auf nodejs 6.x

                    Die Nutzung von Nodejs 8.x wäre ebenfalls möglich, jedoch muss das dort mitgelieferte npm 5.x nach der Installation unbedingt auf v4.x downgegradet werden mit

                    sudo npm install -g npm@4

                    npm 5.x enthält noch einen Bug, der bei ioBroker zu massiven Problemen führt.

                    1 Reply Last reply Reply Quote 0
                    • T
                      tempestas last edited by

                      ich kriege den Adapter nicht installiert.

                      npm WARN enoent ENOENT: no such file or directory, open '/home/xxxxxxx/package.json'
                      npm WARN xxxxxxxx No description
                      npm WARN xxxxxxxxxxx No repository field.
                      npm WARN xxxxxx No README data
                      npm WARN xxxxx No license field.
                      xxxxx @iobrokerNUC:~$
                      
                      

                      ?? bin doch Linux Nichtkönner 😞

                      1 Reply Last reply Reply Quote 0
                      • wendy2702
                        wendy2702 last edited by

                        Wie hast du es denn versucht?

                        Gesendet von iPhone mit Tapatalk Pro

                        1 Reply Last reply Reply Quote 0
                        • T
                          tempestas last edited by

                          via admin katze von url installieren und via putty sudo npm install iobroker.spotify-premium

                          1 Reply Last reply Reply Quote 0
                          • wendy2702
                            wendy2702 last edited by

                            Du hast bei der Katze diesen Link rein kopiert:

                            https://github.com/twonky4/ioBroker.spotify-premium

                            ?

                            Kannst du davon mal das komplette Logfile posten bitte!

                            1 Reply Last reply Reply Quote 0
                            • T
                              tempestas last edited by

                              ich installiere gerade nochmal mit debug ausgänge. mal sehen

                              1 Reply Last reply Reply Quote 0
                              • T
                                tempestas last edited by

                                host.iobrokerNUC	2018-03-01 19:43:30.034	info	Update repository "default" under "http://download.iobroker.net/sources-dist.json"
                                iobroker	2018-03-01 19:43:29.565	info	exit 0
                                iobroker	2018-03-01 19:43:29.485	info	npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for xpc-connection@0.1.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
                                iobroker	2018-03-01 19:43:29.485	info	npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@~0.1.4 (node_modules/noble/node_modules/xpc-connection):
                                iobroker	2018-03-01 19:43:29.485	info	npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for xpc-connection@0.1.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
                                iobroker	2018-03-01 19:43:29.485	info	npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@~0.1.4 (node_modules/iobroker.radar/node_modules/noble/node_modules/xpc-connection):
                                iobroker	2018-03-01 19:43:29.485	info	npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
                                iobroker	2018-03-01 19:43:29.485	info	npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/iobroker.js2fs/node_modules/chokidar/node_modules/fsevents):
                                iobroker	2018-03-01 19:43:29.485	info	npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wa
                                iobroker	2018-03-01 19:43:29.470	info	iobroker@1.0.0 /opt/iobroker└── iobroker.spotify-premium@0.1.0
                                iobroker	2018-03-01 19:41:45.099	info	npm install https://github.com/twonky4/ioBroker.spotify-premium/tarball/master --production --prefix "/opt/iobroker" (System call)
                                iobroker	2018-03-01 19:41:44.840	info	install https://github.com/twonky4/ioBroker.spotify-premium/tarball/master
                                iobroker	2018-03-01 19:41:44.176	info	url "https://github.com/twonky4/ioBroker.spotify-premium" --debug
                                
                                1 Reply Last reply Reply Quote 0
                                • wendy2702
                                  wendy2702 last edited by

                                  Mach mal bitte

                                  node -v
                                  
                                  npm -v
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • T
                                    tempestas last edited by

                                    node 6.11.3

                                    npm 4.6.1

                                    1 Reply Last reply Reply Quote 0
                                    • fischi87
                                      fischi87 last edited by

                                      servus, habe auch gerade versucht den adapter zu starten, installation passt, ohne problem aber ich bekomme die autorisierung nicht hin, bekomme immer diesen Fehler:

                                      error	invalid session. You need to open the actual Authorization.Authorization_URL
                                      

                                      Mit freundlichen Grüßen

                                      1 Reply Last reply Reply Quote 0
                                      • wendy2702
                                        wendy2702 last edited by

                                        Hast du den neu installiert?

                                        Wenn ja nach welcher Anleitung und mit welchem OS?

                                        Ist der Adapter wirklich nicht installiert?

                                        1 Reply Last reply Reply Quote 0
                                        • wendy2702
                                          wendy2702 last edited by

                                          @fischi87:

                                          servus, habe auch gerade versucht den adapter zu starten, installation passt, ohne problem aber ich bekomme die autorisierung nicht hin, bekomme immer diesen Fehler:

                                          error	invalid session. You need to open the actual Authorization.Authorization_URL
                                          

                                          Mit freundlichen Grüßen `

                                          Du hast alle Schritte die im Adapter erklärt sind „Richtig“ ausgeführt?

                                          1 Reply Last reply Reply Quote 0
                                          • T
                                            tempestas last edited by

                                            edit:

                                            ich war wieder zu blöd

                                            iobroker add spotify-premium fehlte mir.

                                            gut, dass ich mir mal rainers posting dazu in die favs gespeichert habe. nun kann ich mir den adapter anschauen

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            317
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            javascript
                                            95
                                            745
                                            191192
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo