@patrick039212 sagte in [gelöst] blockly musikplayer - VIS:
@dslraser
Vielen, vielen, vielen dank, es funktioniert perfekt!
mach mal so, dann geht es auch wenn die Mediathek gewechselt wird.(weil da wechselt auch currentState von true auf false und umgekehrt.
Bildschirmfoto 2020-04-11 um 08.01.28.png
Blockly Export
<xml xmlns="http://www.w3.org/1999/xhtml">
<variables>
<variable type="undefined" id="warten">warten</variable>
<variable type="undefined" id="warten1">warten1</variable>
</variables>
<block type="on_ext" id="n[L!|Z3-!2M2`/YI1VLc" x="-462" y="-88">
<mutation items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="[;8D5{yn~A$[uJ)r,M5U">
<field name="oid">hm-rpc.0.xxx.3.STATE</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="timeouts_cleartimeout" id="f#iR]GJ8lUs`EK5?1]3l">
<field name="NAME">warten</field>
<next>
<block type="controls_if" id="r4;C-s:gJHryisv4KGb`">
<value name="IF0">
<block type="on_source" id="X2ey^e9~Ky=hL=ap+Ig7">
<field name="ATTR">state.val</field>
</block>
</value>
<statement name="DO0">
<block type="controls_if" id=")CPaSYFnC1BV=@+uY.4I">
<value name="IF0">
<block type="logic_compare" id="Da9}Q3WGE1O0_Uh~2WE;">
<field name="OP">NEQ</field>
<value name="A">
<block type="on_source" id="4R.`#-r4WQ+bCL~c5MO2">
<field name="ATTR">state.from</field>
</block>
</value>
<value name="B">
<block type="text" id="ZcgMybnh-RIZZdizL}k$">
<field name="TEXT">system.adapter.javascript.0</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="comment" id="g}TuHbtrA6O!-t0!C#q;">
<field name="COMMENT">NDR2</field>
<next>
<block type="control" id="pdP4]j.R]sG|Kbv{UAOu">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.xxx.Player.TuneIn-Station</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="s,iZ/qZ?P?P|Z_$-J}W[">
<field name="TEXT">NDR 2</field>
</block>
</value>
</block>
</next>
</block>
</statement>
</block>
</statement>
<next>
<block type="timeouts_settimeout" id="l]}8z`u4$EnTQ+56jS:;">
<field name="NAME">warten</field>
<field name="DELAY">3000</field>
<field name="UNIT">ms</field>
<statement name="STATEMENT">
<block type="controls_if" id="uQ[6Vx)A8^f[_`ZWBo-I">
<value name="IF0">
<block type="logic_negate" id="zK`x%(ZQA8k#?-Z!t@^t">
<value name="BOOL">
<block type="on_source" id="NC?ijjP{R3-qto[S*:Y?">
<field name="ATTR">state.val</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="0+z[`l2Zz,^W07pFcVwI">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.xxx.Player.controlPause</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="^IkG(Ro4UR:bdnfAd[tl">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="on_ext" id="/?mYxi#6K*C8f~d*4Z}3">
<mutation items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="A%x#r]gw28kiogk%rbXz">
<field name="oid">alexa2.0.Echo-Devices.xxx.Player.currentState</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="timeouts_cleartimeout" id="]zZY~`R|cK#JUQ?o[mcR">
<field name="NAME">warten1</field>
<next>
<block type="controls_if" id="]xyP-o,QmN)`)*i$=/Kj">
<value name="IF0">
<block type="on_source" id="I8m%eC7^e~Q6|A3?l/Ns">
<field name="ATTR">state.val</field>
</block>
</value>
<statement name="DO0">
<block type="control" id="--TW.4D{Cr^MBX!}hh|%">
<mutation delay_input="false"></mutation>
<field name="OID">hm-rpc.0.xxx.3.STATE</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="XMyhv9A6+QU6tDZk(m|a">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</statement>
<next>
<block type="timeouts_settimeout" id=")$,Bovlq;z5du7z6G*!_">
<field name="NAME">warten1</field>
<field name="DELAY">3000</field>
<field name="UNIT">ms</field>
<statement name="STATEMENT">
<block type="controls_if" id="X7W43%DS?aL~;O6`)/{(">
<value name="IF0">
<block type="logic_negate" id="M.wEb-V%;8ecnBf[^(i7">
<value name="BOOL">
<block type="on_source" id="*Vex#qEb+mF{LKh@#u|T">
<field name="ATTR">state.val</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="6a`dv{_S9_whBP:BcUp.">
<mutation delay_input="false"></mutation>
<field name="OID">hm-rpc.0.xxx.3.STATE</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="#p|drbt/hX)T-sjS)[oR">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</xml>