NEWS
Blockly: Tradfri Online-Status Abfragen
-
Hallo zusammen.
Ich suche nach einer Möglichkeit den Status meiner Tradfri Leuchtmittel (Alive) mit einem Sammelbefehl abzufragen. Bei Ausfall soll eine Rückmeldung via Telegram erfolgen.
Das beigefügte Script nutze ich für die Statusmeldungen der Adapter. Wie kann ich das Script umschreiben um auf die Alive-ID zu triggern?<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="timeout">timeout</variable> </variables> <block type="on_ext" id="D#QhpOV_miH:uj_{u,DE" x="38" y="62"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">lt</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="xZ==FS2Oh$WxdQ)1UT+Y"> <field name="oid">default</field> </shadow> <block type="selector" id="p?7tAD5U2PKjHA?uUJgu"> <field name="TEXT">state[id=system.*.*.*.*connected]</field> </block> </value> <statement name="STATEMENT"> <block type="timeouts_cleartimeout" id="hv1O92SwA)Q#n3=HQpX_"> <field name="NAME">timeout</field> <next> <block type="timeouts_settimeout" id=";Ye@zc;UNOPj2PnKCKOT"> <field name="NAME">timeout</field> <field name="DELAY">3</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="controls_if" id="W65=CHl1M!Fn:nK%9$kS"> <value name="IF0"> <block type="logic_negate" id="p^k+`EL%.L:gcq6gdit1"> <value name="BOOL"> <block type="get_value_var" id="kD2enT~b:O{9~yTQWvyF"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="DH=Y[ZseJJ7+CH:A2XI."> <field name="TEXT"></field> </shadow> <block type="on_source" id="+p~]{S$+V{j7H3IZQ%Lo"> <field name="ATTR">id</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="telegram" id="8wSf[#7D:/-/E{ftHVK*"> <field name="INSTANCE"></field> <field name="LOG"></field> <field name="SILENT">FALSE</field> <field name="PARSEMODE">default</field> <value name="MESSAGE"> <shadow type="text" id="A]4mLd|}Yy`2AGc9Tg_T"> <field name="TEXT">text</field> </shadow> <block type="text_join" id="]M8,RLtdq1;l#WSjw9]p"> <mutation items="2"></mutation> <value name="ADD0"> <block type="on_source" id="=Q.}P.W-ICGGFj)/=e6="> <field name="ATTR">channelName</field> </block> </value> <value name="ADD1"> <block type="text" id="leD^vitc/?CG}q`%S)T!"> <field name="TEXT"> ist nicht erreichbar!</field> </block> </value> </block> </value> <value name="USERNAME"> <block type="text" id=";_b@T/qV=W+9U_J$yk36"> <field name="TEXT">Lucas</field> </block> </value> </block> </statement> </block> </statement> </block> </next> </block> </statement> </block> </xml>