Hallo! Dies ist mein erster Beitrag - ich hoffe, ich werde nicht gleich zerrupft
Mit diesem blockly könnt ihr die Restzeit eines Alexa-Timers in Eurer Vis anzeigen lassen:
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable type="timeout" id="timeout">timeout</variable>
<variable type="interval" id="Intervall">Intervall</variable>
</variables>
<block type="on_ext" id="T7/$E_TMR]Ft)lGF*QSa" x="63" y="88">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="`X/0dBlSdIaJVO$c_{nH">
<field name="oid">alexa2.0.Echo-Devices.xxxxxxxxx.Timer.nextTimerDate</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="7m*Ek{nBTw=aRVr:m(;0">
<mutation else="1"></mutation>
<value name="IF0">
<block type="logic_operation" id="b}N;7b$=+F+zfz^F7vmy">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="]SB?gFDqi~]seZLnRAla">
<field name="OP">NEQ</field>
<value name="A">
<block type="on_source" id="%0Vk6e?+s7Hto7_kl}kH">
<field name="ATTR">id</field>
</block>
</value>
<value name="B">
<block type="math_number" id="FSn$#dDy[fN/K#i*lAZ:">
<field name="NUM">0</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="ckAV!T1(Yvt%Ii[,YW!+">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="Iw-wz/bk|[i7ms#ont6p">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Testtimer.Testtimer_aktuelleUhrzeit</field>
</block>
</value>
<value name="B">
<block type="math_number" id="b%M~uddv$Wa!3*I[v#1j">
<field name="NUM">0</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id=")!1:JW_:1]f6^C_^4gc[">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Testtimer.Testtimer_aktuelleUhrzeit</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="uP3t*;6rU/]xi!2.$*YM">
<field name="NUM">1</field>
</block>
</value>
<next>
<block type="update" id="^U7XD$H}n`A;qyYqsyx{">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Testtimer.restliche_zeit</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_round" id="fynMOuh/fm0YK1_J]FD3">
<field name="OP">ROUND</field>
<value name="NUM">
<shadow type="math_number" id="o%:ViF#qmJm){DMJWT=6">
<field name="NUM">3.1</field>
</shadow>
<block type="math_arithmetic" id="FEQ%tK]2M1ZEXogiYI)H">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow type="math_number" id="sw4=OhSosIO7jg`b=:I?">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="1;v9qHSxj{ms+Q,aweWz">
<field name="OP">MINUS</field>
<value name="A">
<shadow type="math_number" id="8wB-o]ryeT]rA[:OU1tr">
<field name="NUM">1</field>
</shadow>
<block type="get_value" id="kHbSQOv7tnm0x=.ZCi7/">
<field name="ATTR">val</field>
<field name="OID">alexa2.0.Echo-Devices.xxxxxxxxxxx.Timer.nextTimerDate</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="?]F6QXIMNlX}!90yAX]u">
<field name="NUM">1</field>
</shadow>
<block type="time_get" id="9_3faet4H*],lWH(PFjU">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">object</field>
</block>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number" id="A5s4-(+g4(.@W5PLup|+">
<field name="NUM">1000</field>
</shadow>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="update" id="}209owLi%=7tu6|[Iqg`">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Testtimer.testimer_endzeit</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_round" id="@(/]snKQq*1?T}dFs?z?">
<field name="OP">ROUND</field>
<value name="NUM">
<shadow type="math_number">
<field name="NUM">3.1</field>
</shadow>
<block type="math_arithmetic" id=";5|=jPPlujq!XpVF%Vq@">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="`!JZFw(037UUnnaK8j1m">
<field name="OP">MINUS</field>
<value name="A">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="get_value" id="tD2W_P+o#jyj-(u=BG|Q">
<field name="ATTR">val</field>
<field name="OID">alexa2.0.Echo-Devices.xxxxxxxxx.Timer.nextTimerDate</field>
</block>
</value>
<value name="B">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="time_get" id="Pyw;1R0FwVFZ2Vo,8LiH">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">object</field>
</block>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number" id="i,4sph2J}qgc)|U!wD`/">
<field name="NUM">1000</field>
</shadow>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="timeouts_settimeout" id="#EGK=(xA,M^==]9SPL3q">
<field name="NAME">timeout</field>
<field name="DELAY">1</field>
<field name="UNIT">sec</field>
<statement name="STATEMENT">
<block type="timeouts_setinterval" id="P^3h-U{Vq:,]*Xg+8+rV">
<field name="NAME">Intervall</field>
<field name="INTERVAL">1</field>
<field name="UNIT">sec</field>
<statement name="STATEMENT">
<block type="controls_if" id="?u$Ne4Nk=#7HUlEXYm.e">
<value name="IF0">
<block type="logic_compare" id="Z.o)xM~In8f?HU2pL/r#">
<field name="OP">GT</field>
<value name="A">
<block type="get_value" id="qqKN..,_RU/MB)Qbqjuf">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Testtimer.restliche_zeit</field>
</block>
</value>
<value name="B">
<block type="math_number" id="|dOon+Bb8iuA@_O^m65T">
<field name="NUM">0</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id=".L45z4z%yCW9pcHh8jhK">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Testtimer.restliche_zeit</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_arithmetic" id="Yj~gO,$rZ|p!Rj~Cy^sr">
<field name="OP">MINUS</field>
<value name="A">
<shadow type="math_number" id=")Y-SxM@C%owPF+p]g|{l">
<field name="NUM">1</field>
</shadow>
<block type="get_value" id=",Zetah#)E7TI]wY3HV|Z">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Testtimer.restliche_zeit</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="4Z!xe6/qsIcZubXM9x^Y">
<field name="NUM">1</field>
</shadow>
</value>
</block>
</value>
</block>
</statement>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<statement name="ELSE">
<block type="timeouts_cleartimeout" id="UBL7]y1jAFKY_}d~qzFr">
<field name="NAME">timeout</field>
<next>
<block type="timeouts_clearinterval" id="*[{@A-k]l@Z1;NbR[J|3">
<field name="NAME">Intervall</field>
<next>
<block type="update" id="hljr6QUGJ!%lQTXG^[/j">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Testtimer.restliche_zeit</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="5-y[($4]w5S_W11B03_@">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="update" id=":i@mFSg6dW/%m+0HMGIX">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Testtimer.Testtimer_aktuelleUhrzeit</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="h%+/~rt^XT|[58%od}_6">
<field name="NUM">0</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</xml>
Ihr müßt natürlich Eure Alexa-Datenpunkte noch anpassen. Die Restzeit ist nur sichtbar, solange der Timer läuft. Derzeit ist auch nur ein Timer mit einer Alexa möglich. Getestet mit einem Dot3. Ob die Datenpunkte für andere Alexas identisch sind, weiß ich nicht.