NEWS
Alexa 2.0 Datenpunkte um Musik abzuspielen
-
Hallo, ich bekomme es nicht sauber hin, eine Playlist auf meinem Echo Dot abzuspielen. Welche Datenpunkte sollten alle gesetzt werden, damit das zuverlässig funktioniert? Ergänzung: In unserem Haushalt ist es so, dass der Dot dann entweder durchs Script aus iobroker geschaltet wird oder durch ein Sprachkommando.
Danke für Eure Hilfe!
Christian -
Um mal meine aktuelle vorgehensweise zu zeigen, hier ist mein script:
<xml xmlns="http://www.w3.org/1999/xhtml"> <variables> <variable type="" id="%9q;PVe^3y|GlJc1A`Nm">kaminläuft</variable> </variables> <block type="variables_set" id="ycG5HcVQN~xiJnuLxzP1" x="-812" y="-351"> <field name="VAR" id="%9q;PVe^3y|GlJc1A`Nm" variabletype="">kaminläuft</field> <value name="VALUE"> <block type="logic_boolean" id="I3Ht7LVg5R^=m?)Rly=x"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="on_ext" id=")rMR#JJ[F?c;ia5Boocb"> <mutation items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="fYF-yFnB|BImI^5{!C:]"> <field name="oid">sonoff.0.DVES_232BA0.ENERGY_Factor</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="wI^iVI:pvsH{,+PoJ+hG"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_operation" id="Zg)uMv@cXt:3vTj-Nf``" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="g@7ZDRh}Nur]oI5Egkc|"> <field name="OP">GT</field> <value name="A"> <block type="get_value" id="oe@9Q5W:ggN]rM5,v#zg"> <field name="ATTR">val</field> <field name="OID">sonoff.0.DVES_232BA0.ENERGY_Factor</field> </block> </value> <value name="B"> <block type="math_number" id="{kP_!eD9rNh9`r`s]Q3A"> <field name="NUM">0.4</field> </block> </value> </block> </value> <value name="B"> <block type="logic_negate" id="-j=S0rP6|r}ujoP8erf{"> <value name="BOOL"> <block type="variables_get" id="Fmh4d5c.9Y}L:VM1CXQd"> <field name="VAR" id="%9q;PVe^3y|GlJc1A`Nm" variabletype="">kaminläuft</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="[FR!5UZ4]yvA-kp|%o-["> <mutation delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G090XG06924100G9.Music-Provider.Amazon-Music-Playlist</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="Ynn7x|fzdIYU#T$53}Uf"> <field name="TEXT">Kamin</field> </block> </value> <next> <block type="control" id="YSDay@)bA*~|/8!-|~eJ"> <mutation delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G090XG06924100G9.Player.controlPause</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="bTtfMTq*A-iM1@HB;4Dq"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="control" id="~tL7nFE2sHWw9c^8ZeZe"> <mutation delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G090XG06924100G9.Player.controlPlay</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="do`9-)],3lV$m?(jm%+h"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="control" id="4^,ch2y5+$;!CZ${7gu;"> <mutation delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G090XG06924100G9.Player.currentState</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="jlNx#P$m0Z2=0y:%%_C2"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="control" id="vcQ2@*e,RAM.W#Lj(Mdk"> <mutation delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G090XG06924100G9.Player.muted</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="tz$r~f$}YP|KU-sACuqH"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="control" id="`_7tCkbm#Tw@]#LY9voq"> <mutation delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G090XG06924100G9.Player.volume</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="Fo{L{Un[5eL[xR(hCW|J"> <field name="NUM">15</field> </block> </value> <next> <block type="variables_set" id="oMF]TV~olH+5hwpM?aB3"> <field name="VAR" id="%9q;PVe^3y|GlJc1A`Nm" variabletype="">kaminläuft</field> <value name="VALUE"> <block type="logic_boolean" id="y};:JiCEKftvLzpi9udj"> <field name="BOOL">TRUE</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_operation" id=",|1S-}C0Y!a~!QhkbLtB" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="Uvu#c}mt27h!c^nepsP_"> <field name="OP">LTE</field> <value name="A"> <block type="get_value" id="l8@.?0=kc[2B43Mw1bmy"> <field name="ATTR">val</field> <field name="OID">sonoff.0.DVES_232BA0.ENERGY_Factor</field> </block> </value> <value name="B"> <block type="math_number" id="hbEd/lw-DDi35V]Ai!Pz"> <field name="NUM">0.4</field> </block> </value> </block> </value> <value name="B"> <block type="variables_get" id="8|BVPh;IHw;Hyn$B6h?h"> <field name="VAR" id="%9q;PVe^3y|GlJc1A`Nm" variabletype="">kaminläuft</field> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="Pw60(qvo9TRb|yY44@h~"> <mutation delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G090XG06924100G9.Player.controlPause</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="!ei)4_4P7D}}hS30YB/F"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="variables_set" id="p4PHyE!5@~x3HJ]Q{Ur?"> <field name="VAR" id="%9q;PVe^3y|GlJc1A`Nm" variabletype="">kaminläuft</field> <value name="VALUE"> <block type="logic_boolean" id="ByCs,;By^*N#{A)beq-3"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </xml>
hier noch als Bild:
WIe oben beschrieben klappt der Turnaround Kamin an --> Playlist läuft und umgekehrt nicht immer. (Datenpunkt der Steckdose wird absolut zuverlässig geschrieben, sobald der Kamin eingeschaltet wird und das gleiche beim ausschalten...)
Sieht jemand einen Fehler?
VG
Christian -
@chrbo80 ich frage mich, warum du beim Starten die Werte zum steuern setzt?
Ansonsten schaut dein Skript soweit in Ordnung aus.
Du kannst ja auch einfach mal ein paar Debug Nachrichten einbauen und dir die Werte zur Laufzeit ausgeben lassen um zu schauen, ob dir immer "richtig" sind.
-
Hallo, kannst du mir kurz erklären, wie du das meinst? Bin noch relativ neu auf dem gebiet. Habe aber ein weiteres script, in dem ich via DP, der vom iot adapter geschaltet wird, homematic und hue schalte und auch hier habe ich manchmal den fall, dass nicht alle geräte sauber geschaltet werden... kann das damit zu tun haben, dass zu viele befehle auf einmal rausgehen?
-
@chrbo80
eine Sache die mir auffällt. Die Control Play und Pause sind Button. Du drückst diese Button nacheinander. (Du schaltest alles nacheinander ohne die kleinste Verzögerung) Auch wenn Du Pause mit "falsch steuerst" wird der Button gedrückt, weil es eben ein Button ist und der kennt kein wahr und falsch, der wird nur aktualisiert, auch beim "steuern mit falsch". -
Hi, deine Enpfehlung wäre also, zwischen die steuerung der buttons verzögerungen einzubauen? dazu dann in dem element den haken auf verzögerung und eine entsprechende zeit rein, richtig?
Blöde frage: muss ich buttons stop und pause eigtl „drücken“, wenn ich was abspielen will? Oder reicht in dem fall der druck auf den „play“-button?
-
@chrbo80 wenn du die Playlist eingibst, wird die eigentlich automatisch abgespielt, da brauchst du nicht noch die Controls zu betätigen.
-
@J-A-R-V-I-S Ok - war mir nicht bekannt. Danke! Gilt das für favorite_set genauso?
-