NEWS
Alexa mit Bewegungsmelder Steuern
-
Hallo
Ich würde gerne über einen Bewegungsmelder Alexa ansteuern das sie eine Playlist oder Radio spielt.
Das darf sie aber nur wenn Alexa nicht schon etwas ausführt (Radio, Playlist).Könnte mir jemand bei diesen Blockly helfen?
Ich finde keinen Parameter der dem Script sagen würde das Alexa bereist etwas macht, bzw. weis ich nicht mal wie ich anfangen soll.
Bin noch Anfänger in dem Gebiet.Danke schon mal
-
Hallo Dirni,
ist zwar etwas älter das ganze aber ich habe nach einer ähnlichen Lösung gesucht.
Das Blocky erkennt ob Alexa bereits läuft und stoppt somit das Timeout.Vielleicht hilft es ja noch.
BlocklyJavascriptTypeScript Skript läuft nicht Protokoll Ausgewählte Blöcke exportieren <xml xmlns="http://www.w3.org/1999/xhtml"> <variables> <variable type="undefined" id="timeout">timeout</variable> </variables> <block type="on" id="78GjmCDP=3RcYE4wg6[W" x="313" y="163"> <field name="OID">zigbee.0.00158d0004470b7f.occupancy</field> <field name="CONDITION">true</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="timeouts_settimeout" id="iQr@YI*16Gj_OpB;@n^L"> <field name="NAME">timeout</field> <field name="DELAY">2</field> <field name="UNIT">ms</field> <statement name="STATEMENT"> <block type="controls_if" id=":qkXo1Q$.oXaKg0#A^Wr"> <value name="IF0"> <block type="logic_operation" id="N*vA|Amk@gd+zZ%9EVV_"> <field name="OP">AND</field> <value name="A"> <block type="time_compare" id="2xy9WWDx.!4#7@CjqkPV"> <mutation end_time="false"></mutation> <field name="OPTION">></field> <field name="START_TIME">05:00</field> </block> </value> <value name="B"> <block type="time_compare" id=".*n@#:NRrlQE9zri$xQ~"> <mutation end_time="false"></mutation> <field name="OPTION"><</field> <field name="START_TIME">07:30</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="DB^9Wb|#2BadiGRgJtOG"> <mutation delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.b0b7bba184694ed59cfcb0830632a9b7.Player.TuneIn-Station</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="D(~VB9g*q`a%3fe(KQ=b"> <field name="TEXT">1Live</field> </block> </value> </block> </statement> </block> </statement> <next> <block type="controls_if" id="=~_^a*rgfsyar4nzM)k:"> <value name="IF0"> <block type="logic_compare" id="NNxN=h.y5f`^L,qx!l_U"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="ZkJW6I%?MpkXfaK)WbzY"> <field name="ATTR">val</field> <field name="OID">alexa2.0.Echo-Devices.b0b7bba184694ed59cfcb0830632a9b7.Player.currentState</field> </block> </value> <value name="B"> <block type="logic_boolean" id="_q!{3$dm~0R^g`$?Q8sk"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_cleartimeout" id="^UZga${3XFZ3@O(yN$ey"> <field name="NAME">timeout</field> </block> </statement> </block> </next> </block> </statement> </block> </xml> <xml xmlns="http://www.w3.org/1999/xhtml"> <variables> <variable type="undefined" id="timeout">timeout</variable> </variables> <block type="on" id="78GjmCDP=3RcYE4wg6[W" x="313" y="163"> <field name="OID">zigbee.0.00158d0004470b7f.occupancy</field> <field name="CONDITION">true</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="timeouts_settimeout" id="iQr@YI*16Gj_OpB;@n^L"> <field name="NAME">timeout</field> <field name="DELAY">2</field> <field name="UNIT">ms</field> <statement name="STATEMENT"> <block type="controls_if" id=":qkXo1Q$.oXaKg0#A^Wr"> <value name="IF0"> <block type="logic_operation" id="N*vA|Amk@gd+zZ%9EVV_"> <field name="OP">AND</field> <value name="A"> <block type="time_compare" id="2xy9WWDx.!4#7@CjqkPV"> <mutation end_time="false"></mutation> <field name="OPTION">></field> <field name="START_TIME">05:00</field> </block> </value> <value name="B"> <block type="time_compare" id=".*n@#:NRrlQE9zri$xQ~"> <mutation end_time="false"></mutation> <field name="OPTION"><</field> <field name="START_TIME">07:30</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="DB^9Wb|#2BadiGRgJtOG"> <mutation delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.b0b7bba184694ed59cfcb0830632a9b7.Player.TuneIn-Station</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="D(~VB9g*q`a%3fe(KQ=b"> <field name="TEXT">1Live</field> </block> </value> </block> </statement> </block> </statement> <next> <block type="controls_if" id="=~_^a*rgfsyar4nzM)k:"> <value name="IF0"> <block type="logic_compare" id="NNxN=h.y5f`^L,qx!l_U"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="ZkJW6I%?MpkXfaK)WbzY"> <field name="ATTR">val</field> <field name="OID">alexa2.0.Echo-Devices.b0b7bba184694ed59cfcb0830632a9b7.Player.currentState</field> </block> </value> <value name="B"> <block type="logic_boolean" id="_q!{3$dm~0R^g`$?Q8sk"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_cleartimeout" id="^UZga${3XFZ3@O(yN$ey"> <field name="NAME">timeout</field> </block> </statement> </block> </next> </block> </statement> </block> </xml>
-
Super natürlich ist diese Thema für mich noch Aktuell ich danke dir werde das mal Testen