Hi zusammen, ich beschäftige mich seit diesem Jahr mit iobroker/Zigbee und wollte auch etwas beisteuern.
Ich wollte meine Tuya Raummelder benutzen, um per Test- Knopf (linkstest) eine Meldung heraus zu schicken. Quasi als Panic Knopf oder ähnliches. Auch herauslesen ob 2x oder 3x hintereinander gedrückt wird habe ich per timeout Schlaufe hin gekriegt. Zuerst hatte ich es statisch auf nur einen Melder programmiert. Danach wollte ich es über "Trigger auf mehrere Datenpunkte" umprogrammieren. Nun fehlte aber das auslesen der jeweiligen werte, nur vom Trigger Objekt. Ich habe nichts dazu gefunden und selber irgendwie hingebracht. Vielleicht können andere das auch gebrauchen.
Gruss Martin
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="YCO5wUyDZEjSzQ4U5l+w">event001</variable>
<variable type="timeout" id="timeout">timeout</variable>
</variables>
<block type="variables_set" id="RFu(/oN^0yLxY~y37~)l" x="288" y="-112">
<field name="VAR" id="YCO5wUyDZEjSzQ4U5l+w">event001</field>
<value name="VALUE">
<block type="math_number" id="dZLAv#=Y9T0h,kcWGh4r">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="on_ext" id="UbD$mmKRYb([HC#-h=rd">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="4"></mutation>
<field name="CONDITION">any</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="/[3+5fX}Md31UoU6%PZ5">
<field name="oid">zigbee.0.00158d000488b1f9.battery</field>
</shadow>
</value>
<value name="OID1">
<shadow type="field_oid" id="r)Go3O5YV:]-J=xC%ueG">
<field name="oid">zigbee.0.00158d0004859604.battery</field>
</shadow>
</value>
<value name="OID2">
<shadow type="field_oid" id="F0x_CV[m!/Rjdp3i+5=B">
<field name="oid">zigbee.0.00158d0004855f5d.battery</field>
</shadow>
</value>
<value name="OID3">
<shadow type="field_oid" id="t6_KvWT(xSOp)f)3bPil">
<field name="oid">zigbee.0.00158d00053eb788.battery</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="math_change" id="tc*$JQc#a4..FBe/yQ*w">
<field name="VAR" id="YCO5wUyDZEjSzQ4U5l+w">event001</field>
<value name="DELTA">
<shadow type="math_number" id="!zvU/Msd5cLY,k[%B},n">
<field name="NUM">1</field>
</shadow>
</value>
<next>
<block type="timeouts_settimeout" id="LU-SWD;X`Y!psI^HH64z">
<field name="NAME">timeout</field>
<field name="DELAY">3000</field>
<field name="UNIT">ms</field>
<statement name="STATEMENT">
<block type="comment" id=";?]*jV)H3qj:#sHa)3[}">
<field name="COMMENT">case 2 weil Aktualiesierung 2x rein kommen</field>
<next>
<block type="logic_switch_case" id="A|(y}I6laI$JYHUjMh2K">
<mutation xmlns="http://www.w3.org/1999/xhtml" case="2"></mutation>
<value name="CONDITION">
<block type="variables_get" id="RF~-h?:U@t`n2|[9Pn$v">
<field name="VAR" id="YCO5wUyDZEjSzQ4U5l+w">event001</field>
</block>
</value>
<value name="CASECONDITION0">
<block type="math_number" id="6Pvjq;]$=iG{gzlV@`m)">
<field name="NUM">2</field>
</block>
</value>
<statement name="CASE0">
<block type="telegram" id="[IyaL!(JU60=fg#U2~`p">
<field name="INSTANCE">.1</field>
<field name="LOG"></field>
<field name="SILENT">FALSE</field>
<field name="PARSEMODE">default</field>
<value name="MESSAGE">
<shadow type="text">
<field name="TEXT">text</field>
</shadow>
<block type="text_join" id="vlvYpd1[F7ZOAKL4ds#J">
<mutation items="11"></mutation>
<value name="ADD0">
<block type="on_source" id="Jj=tBQe%4s{:zXNLS-rt">
<field name="ATTR">channelName</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="j(x)8oo5Fh2iP{-_YMny">
<field name="TEXT"> SelfTest 1x, Bat:</field>
</block>
</value>
<value name="ADD2">
<block type="get_value_var" id="Zo1rZ|aoDn%0b(i~L@kc">
<field name="ATTR">val</field>
<value name="OID">
<shadow type="text">
<field name="TEXT"></field>
</shadow>
<block type="text_join" id="_#rDiw|qAd,S`Hd@{!IO">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="on_source" id="$~;^!W;PpH*2fh!4x/0+">
<field name="ATTR">channelId</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="aD=;:368zMK1jLZ*G-L-">
<field name="TEXT">.battery</field>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="ADD3">
<block type="text" id="Q7iC%0wFL?_6D.sL{(?+">
<field name="TEXT">%, Smoke:</field>
</block>
</value>
<value name="ADD4">
<block type="get_value_var" id="1|~OoZ7ol3z5G%[[?isp">
<field name="ATTR">val</field>
<value name="OID">
<shadow type="text">
<field name="TEXT"></field>
</shadow>
<block type="text_join" id="~C[[+tU6mZt2Vrsmw#N.">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="on_source" id="5tv.zK#HR[+CECukk9sj">
<field name="ATTR">channelId</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="^dS*{#oQsDw.~V5b;3^^">
<field name="TEXT">.density</field>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="ADD5">
<block type="text" id=":?)xN:1{-wUL)+6z?c}2">
<field name="TEXT">%, link:</field>
</block>
</value>
<value name="ADD6">
<block type="get_value_var" id="LWE!{ohL2RYmI~{+:T~p">
<field name="ATTR">val</field>
<value name="OID">
<shadow type="text" id="{IwiSC-;{q5v,.VNeV8@">
<field name="TEXT"></field>
</shadow>
<block type="text_join" id="Af/08-NbP?#C:pu|]{-m">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="on_source" id="2Sv,JvZjZX,(/pJkC4X#">
<field name="ATTR">channelId</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="KxGoUOzywaG~o^Z=Hb4J">
<field name="TEXT">.link_quality</field>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="ADD7">
<block type="text" id="bH3w].8[;~3yY3$o?*o9">
<field name="TEXT">, Bat:</field>
</block>
</value>
<value name="ADD8">
<block type="get_value_var" id="9H8Yoy9,=(+y6iLn(|de">
<field name="ATTR">val</field>
<value name="OID">
<shadow type="text">
<field name="TEXT"></field>
</shadow>
<block type="text_join" id="9_vgXzIAgpUOY*YrZ0cr">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="on_source" id="XUcadx5uRdo;8V/Lyz56">
<field name="ATTR">channelId</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="Kz-0[@wIhf~z_pjoT@%,">
<field name="TEXT">.voltage</field>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="ADD9">
<block type="text" id="},4QYx|s_Ni{fRi4`Cl+">
<field name="TEXT">V, Smoke?:</field>
</block>
</value>
<value name="ADD10">
<block type="get_value_var" id="[]VLUHnr*Z7CHks)TB0H">
<field name="ATTR">val</field>
<value name="OID">
<shadow type="text">
<field name="TEXT"></field>
</shadow>
<block type="text_join" id="F;^7;Os^#zyU^5{5{28M">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="on_source" id="_WP6h0[m]BaZFw64h0fs">
<field name="ATTR">channelId</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="A5_osm`Jke8A7r!g1SqY">
<field name="TEXT">.detected</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="USERNAME">
<block type="text" id="ZrGzQ)7`xSLChQg:m8a!">
<field name="TEXT">martinwi</field>
</block>
</value>
</block>
</statement>
<value name="CASECONDITION1">
<block type="math_number" id="5h7^F4#:6W8lf4nLh}^r">
<field name="NUM">4</field>
</block>
</value>
<statement name="CASE1">
<block type="telegram" id="=(u:M.U1a.v{$T!..)lq">
<field name="INSTANCE">.1</field>
<field name="LOG"></field>
<field name="SILENT">FALSE</field>
<field name="PARSEMODE">default</field>
<value name="MESSAGE">
<shadow type="text">
<field name="TEXT">text</field>
</shadow>
<block type="text_join" id=":W]6},uR#C1Rk?@$L?;0">
<mutation items="3"></mutation>
<value name="ADD0">
<block type="on_source" id="PKu%AeUperJ}^94hdenP">
<field name="ATTR">channelName</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="!S}j8Gs0lI[?KBB5.#JX">
<field name="TEXT"> SelfTest 2x, no: </field>
</block>
</value>
<value name="ADD2">
<block type="text_join" id="-kLpADKn8FjRNjQ.E?,n">
<mutation items="1"></mutation>
<value name="ADD0">
<block type="variables_get" id="S!8+6|X%6PPX7sNGa{aW">
<field name="VAR" id="YCO5wUyDZEjSzQ4U5l+w">event001</field>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="USERNAME">
<block type="text" id="u.{$g05A}EFETfMG~f!_">
<field name="TEXT">martinwi</field>
</block>
</value>
</block>
</statement>
<value name="CASECONDITION2">
<block type="math_number" id="6DHfM8n9_ST/u*X!c/0k">
<field name="NUM">6</field>
</block>
</value>
<statement name="CASE2">
<block type="telegram" id=",{;!t3rVvq;a!v]7d}vz">
<field name="INSTANCE">.1</field>
<field name="LOG"></field>
<field name="SILENT">FALSE</field>
<field name="PARSEMODE">default</field>
<value name="MESSAGE">
<shadow type="text">
<field name="TEXT">text</field>
</shadow>
<block type="text_join" id="nCbo^:Uk:(Y}Ljb+3pHf">
<mutation items="3"></mutation>
<value name="ADD0">
<block type="on_source" id="Cxo[lVQp-mEBgU#Ji#dx">
<field name="ATTR">channelName</field>
</block>
</value>
<value name="ADD1">
<block type="text" id=".A0}Aa,S|Tk,9bbc|4U=">
<field name="TEXT"> SelfTest 3x, no: </field>
</block>
</value>
<value name="ADD2">
<block type="text_join" id="fg,C*ojp*R#jtfM~LcPf">
<mutation items="1"></mutation>
<value name="ADD0">
<block type="variables_get" id="*XF||NlV/oANs{S$|/!=">
<field name="VAR" id="YCO5wUyDZEjSzQ4U5l+w">event001</field>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="USERNAME">
<block type="text" id="rMdXINbU=Td4!`I.WfV7">
<field name="TEXT">martinwi</field>
</block>
</value>
</block>
</statement>
<next>
<block type="variables_set" id="dv!pC.^ERz?CLhw#cn_i">
<field name="VAR" id="YCO5wUyDZEjSzQ4U5l+w">event001</field>
<value name="VALUE">
<block type="math_number" id="/Olez9YxbG^g`r3V%uBk">
<field name="NUM">0</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</xml>