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

      Passt jetzt nicht wirklich zum Spotify Thema aber mal egal… hoffe ich:

      Also wenn ich den markierten Wert bei mir ändere, habe ich sofort eine neue Lautstärke:

      999_musiccast_volume.jpg

      Und bei dir funktioniert das nicht?

      1 Reply Last reply Reply Quote 0
      • J
        jankir last edited by

        Doch der Wert da ändert sich, nur der Lautsprecher setzt es nicht um.

        Wenn ich dann am Lautsprecher selbst lauter drücke springt es auf den alten Wert+1 und wird natürlich etwas lauter.

        Ich teste es gleich mal mit einer anderen Quelle, evtl ist es nur bei Spotify so…

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

          @jankir:

          Doch der Wert da ändert sich, nur der Lautsprecher setzt es nicht um.

          Wenn ich dann am Lautsprecher selbst lauter drücke springt es auf den alten Wert+1 und wird natürlich etwas lauter. `

          Dann würde ich behaupten das mit deiner Musiccast, Musiccast Adapter Installation/Konfiguration nicht stimmt.

          Bei mir funktioniert das für beide Musiccast Geräte Problemlos.

          Hat allerdings nichts mit Spotify zu tun 😉

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

            BTW. Spotify unterstützt nicht bei allen Geräten das Volume Control. Ausgeschlossen sind z.B. Smartphones und FireTV

            1 Reply Last reply Reply Quote 0
            • J
              jankir last edited by

              Der Output Node muss kein Value sondern einen Command senden, dann geht es… Danke!

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

                Denke du redest vom Node Red Output ?

                Warum du das über NodeRed machst bleibt dein Geheimnis da wir die Gründe und deine Installation nicht kennen….

                aber mit einem Screenshot wäre man vielleicht eher darauf gekommen.

                1 Reply Last reply Reply Quote 0
                • J
                  jankir last edited by

                  Weil ich die Aktionen mit einem Loxone Taster auslösen will, gibt es denn eine einfachere Variante?

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

                    @jankir:

                    Weil ich die Aktionen mit einem Loxone Taster auslösen will, gibt es denn eine einfachere Variante? `

                    Habe kein Loxone aber es gibt einen Adapter und erste Suche ergab das:

                    http://forum.iobroker.net/viewtopic.php … lit=loxone

                    Bei weiteren Fragen solltest du ein eigenes Thema aufmachen. Hier geht es ja um Spotify.

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

                      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.

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

                        Hast du dich mal schlau gemacht wie man den Adapter veröffentlichen kann?

                        Macht es einfacher und man wird automatisch informiert wenn es Updates gibt.

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

                          @0018:

                          Hast du dich mal schlau gemacht wie man den Adapter veröffentlichen kann?

                          Macht es einfacher und man wird automatisch informiert wenn es Updates gibt. `

                          Ich habe geschaut, ich werde Ihn veröffentlichen wenn er ausreichend getestet ist.

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

                            Ja hallo hier hat sich ja einiges getan!

                            Ich hab immernoch das Skript in der Version "0.5.0" im Einsatz.

                            Wollte mich bzgl. dem folgenden Fehler mal melden. Keine Ahnung obs in der aktuellen Adapter Version gefixt wurde. Den installiere ich natürlich gleich mal.

                            Super arbeit von euch wieder!! Danke!

                            Anbei das Log mal zur Info

                            host.iobrokerVM	2018-02-24 21:02:43.073	info	Restart adapter system.adapter.javascript.0 because enabled
                            host.iobrokerVM	2018-02-24 21:02:43.073	error	instance system.adapter.javascript.0 terminated with code 0 (OK)
                            Caught	2018-02-24 21:02:43.071	error	by controller[0]: at TLSSocket.socketErrorListener (_http_client.js:387:9)
                            Caught	2018-02-24 21:02:43.071	error	by controller[0]: at ClientRequest.emit (events.js:211:7)
                            Caught	2018-02-24 21:02:43.071	error	by controller[0]: at emitOne (events.js:116:13)
                            Caught	2018-02-24 21:02:43.071	error	by controller[0]: at Request.onRequestError (/opt/iobroker/node_modules/request/request.js:878:8)
                            Caught	2018-02-24 21:02:43.071	error	by controller[0]: at Request.emit (events.js:211:7)
                            Caught	2018-02-24 21:02:43.070	error	by controller[0]: at emitOne (events.js:116:13)
                            Caught	2018-02-24 21:02:43.070	error	by controller[0]: at self.callback (/opt/iobroker/node_modules/request/request.js:186:22)
                            Caught	2018-02-24 21:02:43.070	error	by controller[0]: at Request._callback (script.js.Spotify.Spotify_script:206:16)
                            Caught	2018-02-24 21:02:43.070	error	by controller[0]: at script.js.Spotify.Spotify_script:690:31
                            Caught	2018-02-24 21:02:43.069	error	by controller[0]: at CreatePlaybackInfo (script.js.Spotify.Spotify_script:215:73)
                            Caught	2018-02-24 21:02:43.069	error	by controller[0]: TypeError: Cannot read property 'is_playing' of null
                            javascript.0	2018-02-24 21:02:43.024	error	at TLSSocket.socketErrorListener (_http_client.js:387:9)
                            javascript.0	2018-02-24 21:02:43.024	error	at ClientRequest.emit (events.js:211:7)
                            javascript.0	2018-02-24 21:02:43.024	error	at emitOne (events.js:116:13)
                            javascript.0	2018-02-24 21:02:43.024	error	at Request.onRequestError (/opt/iobroker/node_modules/request/request.js:878:8)
                            javascript.0	2018-02-24 21:02:43.024	error	at Request.emit (events.js:211:7)
                            javascript.0	2018-02-24 21:02:43.024	error	at emitOne (events.js:116:13)
                            javascript.0	2018-02-24 21:02:43.024	error	at self.callback (/opt/iobroker/node_modules/request/request.js:186:22)
                            javascript.0	2018-02-24 21:02:43.024	error	at Request._callback (script.js.Spotify.Spotify_script:206:16)
                            javascript.0	2018-02-24 21:02:43.024	error	at script.js.Spotify.Spotify_script:690:31
                            javascript.0	2018-02-24 21:02:43.024	error	at CreatePlaybackInfo (script.js.Spotify.Spotify_script:215:73)
                            javascript.0	2018-02-24 21:02:43.024	error	TypeError: Cannot read property 'is_playing' of null
                            javascript.0	2018-02-24 21:02:43.023	error	uncaught exception: Cannot read property 'is_playing' of null
                            javascript.0	2018-02-24 21:02:43.015	error	script.js.Spotify.Spotify_script: erron in Request
                            
                            1 Reply Last reply Reply Quote 0
                            • twonky
                              twonky last edited by

                              @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

                              1 Reply Last reply Reply Quote 0
                              • 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
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            904
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            javascript
                                            95
                                            745
                                            191025
                                            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