- Home
- Deutsch
- Skripten / Logik
- Blockly
- Blockly Skript führt sich selber aus
Blockly Skript führt sich selber aus
-
Einen guten zusammen.
Ich habe ein Blockly Skript, was über einen Funk Aktor aus dem Innogy System getriggert wird.
Nun ist es so, das dieses Skript scheinbar zu undefinierten Zeitpunkten einfach ausgeführt wird - teilweise 10 - 20 mal pro Tag. Entweder in dem Skript ist irgend was falsch, oder da es ein Funk Aktor ist, wird hier zufällig ein gleiches Signal an die Basisstation gesendet, was als vermeintlicher Trigger die Ausführung des Skripts anstößt.
Ich persönlich halte das allerdings für schwer vorstellbar, da Innogy im 868 Mhz Band mit einer 128bit Verschlüsselung funkt.
Hat jemand eine Idee, was dieses Skript ggf. über die ioB Ebene noch zu Auslösung bringen könnte?
Hier mal das exportierte Skript.
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="comment" id="qr2g/C)NYubk9H@IyjJ" x="-162" y="88">
<field name="COMMENT">Steuert alle Verbraucher auf AUS</field>
<next>
<block type="on_ext" id="ROLhzWK_(B;G/gq2ckm4">
<mutation items="1"></mutation>
<field name="CONDITION">any</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="6@n5qQ+R8:_#!+b)NDt">
<field name="oid">innogy-smarthome.0.Flur.PanikSchalter.LastPressedButtonIndex</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="+EM]0{kyNb}l-i!v5of"> <value name="IF0"> <block type="logic_compare" id="o*IGlNobkLi(P7jPu?C9"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id=":}:r
CQ1B,7a6(T!u{O4">
<field name="ATTR">val</field>
<field name="OID">innogy-smarthome.0.Flur.PanikSchalter.LastPressedButtonIndex</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="_1WcuacbnrrwfQWDd1g">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="oxLp#)Mj.dre^Oo=P/yg">
<mutation delay_input="false"></mutation>
<field name="OID">sonoff.0.DEKO_3.POWER1</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="@Yc!fng@j8zAoo2jB78">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="control" id="?IdHUW][8l}m(FS]ZR#">
<mutation delay_input="false"></mutation>
<field name="OID">sonoff.0.DEKO_4.POWER1</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="{pqe9tpR4!d48q8zf?X"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="control" id="]38^#[+diM+SRmWH{Soj"> <mutation delay_input="false"></mutation> <field name="OID">sonoff.0.DEKO_5.POWER1</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="_,=3r0KdG7OI_k.osR7c"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="comment" id="Dw0RE.WO,v^/FMUSF=_0"> <field name="COMMENT">Innogy Steckdose</field> <next> <block type="control" id="p;aWX0O4Pi-)4iP*CeQj" disabled="true"> <mutation delay_input="false"></mutation> <field name="OID">innogy-smarthome.0.Garten.Aussenbeleuchtung.OnState</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="4j;EHleaW#
c,KdqH,ZK">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="comment" id=",dD(xTbB,[iLL,)xC;lh">
<field name="COMMENT">FritzDECT Ultimaker</field>
<next>
<block type="control" id="J,~}b|}6:nj3M-%;7sz" disabled="true">
<mutation delay_input="false"></mutation>
<field name="OID">fritzdect.0.DECT200_087610236923.state</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="?hvEq.PDU/o}LrW%{~{">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="control" id=",uN)z:NxyN?fWeo2vl=6">
<mutation delay_input="false"></mutation>
<field name="OID">sonoff.0.Garderobe.POWER1</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="I^LZKNu#CT5oDNU1FThc">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="control" id="D%}]%M8)wQNqew|f1j#6">
<mutation delay_input="false"></mutation>
<field name="OID">sonoff.0.Kellerlicht.POWER1</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="qkY@grwoHjesgm}).b:^">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="control" id=")0n@OM9k0)WB5E4pBs2[">
<mutation delay_input="false"></mutation>
<field name="OID">sonoff.0.Kuechenlicht.POWER1</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="c=O7jeF+b{0jcPjm#yS4">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="control" id="4a7z}y~AYXS):gT/op}-" disabled="true">
<mutation delay_input="false"></mutation>
<field name="OID">sonoff.0.Stube.POWER1</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="O}rEjh%cgM:.O+)N^5si">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="control" id="6DZ4X9r:7/2i8;RSq^RO">
<mutation delay_input="false"></mutation>
<field name="OID">sonoff.0.Terrasse.POWER1</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="z)yzkMA:AbQtUqtT|:g">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="comment" id="lj)+I!b}=eEu?t3G:Ces">
<field name="COMMENT">Stube Esstisch</field>
<next>
<block type="control" id="d]6TD9}wWq@5QbL(;X"> <mutation delay_input="false"></mutation> <field name="OID">tradfri.0.G-131078.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="j*e7r9f};CC*Go=iS1O9"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="comment" id="0DBw)6#guq|ixjQ:k)P3"> <field name="COMMENT">Schreibtischlampe</field> <next> <block type="control" id="O6!@Fgm39#IGqFz?F5t:"> <mutation delay_input="false"></mutation> <field name="OID">tradfri.0.G-131080.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="a%7G.7DEq;tiixg;lb6o"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="comment" id="5kRoc6wsNek8~OH|BHm9"> <field name="COMMENT">Ambiente</field> <next> <block type="control" id="qaVwhDzwTA**6E#b@J(I"> <mutation delay_input="false"></mutation> <field name="OID">alexa2.0.Smart-Home-Devices.d3841198-1c6c-439b-b553-5bcd28e86cfa.powerState</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="n.O:B~qmgAQ@Mw5%3EYD"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="comment" id="Ku!5P!l7NEGhrcyTsE
m">
<field name="COMMENT">Thermostat Flur - Sollwert 19°C</field>
<next>
<block type="control" id="WyjBu|}HxN%5a%#.VGM}" disabled="true">
<mutation delay_input="false"></mutation>
<field name="OID">innogy-smarthome.0.Flur.Heizkörper-Flur.PointTemperature</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="3YMvNWd3Ct5I2eD]v:Q}">
<field name="NUM">19</field>
</block>
</value>
<next>
<block type="comment" id="8.(2dRy/Rrd/#Ck8p:V">
<field name="COMMENT">Thermostat Stube vorne - Sollwert 19°C</field>
<next>
<block type="control" id="yBGkX#XxVH~jL#;6N!{c" disabled="true">
<mutation delay_input="false"></mutation>
<field name="OID">innogy-smarthome.0.Stube-1.Heizkörper-Stube.PointTemperature</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="Y9mAJL0om4wvNbGQfrPe">
<field name="NUM">19</field>
</block>
</value>
<next>
<block type="comment" id="t1h9PQVSYjr%s23hei^^">
<field name="COMMENT">Thermostat Stube hinten - Sollwert 19°C</field>
<next>
<block type="control" id="}}E@5M/=~:r@KIA?/8wr" disabled="true">
<mutation delay_input="false"></mutation>
<field name="OID">innogy-smarthome.0.Stube-1.Heizkörper-Stube-1.PointTemperature</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="[:4SYd@1Aj3=@oi|+U3b">
<field name="NUM">19</field>
</block>
</value>
<next>
<block type="control" id="/Rt/KVzj_Ob9m+eRBn*/">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G090U61091855EMG.Commands.speak</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="~PgLjYyNj3T9pMK!/!a#">
<field name="TEXT">Gute Nacht</field>
</block>
</value>
<next>
<block type="comment" id="V]H%4Z/Pxh{:C*,jb1-h">
<field name="COMMENT">Radio AUS Büro</field>
<next>
<block type="control" id="2+kl1TS_/1:-oF)j:k#O">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G070RQ13813305NG.Player.controlPause</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="DI!7WImNlsi}|fT1QWH">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="comment" id="9Qi9jS]INmQnU03nciLb">
<field name="COMMENT">Radio AUS Küche</field>
<next>
<block type="control" id="]B_zDK-pU|=W8=p+p;J:">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G090U61091855EMG.Player.controlPause</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="`THKLBbdR8r-WgCf2L{q">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="comment" id="n-$G0oK4mQE_.F}(T+=m">
<field name="COMMENT">Radio AUS Stube</field>
<next>
<block type="control" id="-Ln06{qa?bbqPY%;M)8">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G090L91072450LMC.Player.controlPause</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="6i:%pjXUE)gzRiR%%1tN">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</xml>
-
Versuch mal was anderes als "wurde aktualisiert", z.B.: "wurde geändert" -
Wenn ich es auf "wurde geändert" umstelle, funktioniert das Skript nicht mehr. "Wurde aktualisiert" ist die einzige Möglichkeit den Funk Aktor auszuwerten, da es sich um einen Taster mit zwei Schaltrichtungen handelt.
Taste ich nach oben bzw. nach unten werden zwei unterschiedliche Zähler hochgezählt. Mit nach oben Tasten schalte ich EIN, mit nach unten Tasten, schalte ich AUS.
Es gibt noch ein zweites Skript, was auf diesen Aktor mit einer Einschaltung diverser Verbraucher reagiert.
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="comment" id="pV%#^{80U6w(Cv2F%Me" x="-462" y="38">
<field name="COMMENT">Guten Morgen</field>
<next>
<block type="on_ext" id="ROLhzWK_(B;G/gq2ckm4">
<mutation items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="6@n5qQ+R8:_#!+b)NDt">
<field name="oid">innogy-smarthome.0.Flur.PanikSchalter.LastPressedButtonIndex</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="+EM]0{kyNb}l-i!v5of"> <value name="IF0"> <block type="logic_compare" id="o*IGlNobkLi(P7jPu?C9"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id=":}:r
CQ1B,7a6(T!u{O4">
<field name="ATTR">val</field>
<field name="OID">innogy-smarthome.0.Flur.PanikSchalter.LastPressedButtonIndex</field>
</block>
</value>
<value name="B">
<block type="math_number" id="JTXgK4ZB~OF]T.^^Wp6">
<field name="NUM">1</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="wXltEKG!4J3j:jbVk%[R">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G070RQ13813305NG.Player.volume</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="nmamt:mHpdjJ@/0^#BNy">
<field name="NUM">50</field>
</block>
</value>
<next>
<block type="control" id=",uN)z:NxyN?fWeo2vl=6">
<mutation delay_input="false"></mutation>
<field name="OID">sonoff.0.Garderobe.POWER1</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="I^LZKNu#CT5oDNU1FThc">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="control" id=")0n@OM9k0)WB5E4pBs2[">
<mutation delay_input="true"></mutation>
<field name="OID">sonoff.0.Kuechenlicht.POWER1</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">500</field>
<field name="UNIT">ms</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="c=O7jeF+b{0jcPjm#yS4">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="control" id="p;aWX0O4Pi-)4iPCeQj" disabled="true">
<mutation delay_input="true"></mutation>
<field name="OID">innogy-smarthome.0.Garten.Aussenbeleuchtung.OnState</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">1000</field>
<field name="UNIT">ms</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="4j;EHleaW#c,KdqH,ZK"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="control" id="oxLp#)Mj.dre^Oo=P/yg" disabled="true"> <mutation delay_input="true"></mutation> <field name="OID">sonoff.0.DEKO_3.POWER1</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">1500</field> <field name="UNIT">ms</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="@Y*c!fng@j8zAoo2jB78"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="control" id="Ey8NFu]}|W6%Rrzi-2?6"> <mutation delay_input="true"></mutation> <field name="OID">alexa2.0.Echo-Devices.G090U61091855EMG.Commands.speak</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">1500</field> <field name="UNIT">ms</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="c]3~fyK{_0;BsHd*Nt%w"> <field name="TEXT">Guten Morgen</field> </block> </value> <next> <block type="control" id="oXrL|To-et/IT9PUO7Ia"> <mutation delay_input="true"></mutation> <field name="OID">alexa2.0.Echo-Devices.G090U61091855EMG.Commands.weather</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">3000</field> <field name="UNIT">ms</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="k/8gT+ORe5j9p2LoF+,c"> <field name="TEXT">mein Ort</field> </block> </value> <next> <block type="control" id="ZhNsAyfCS5P~xg:3!I3x" disabled="true"> <mutation delay_input="true"></mutation> <field name="OID">alexa2.0.Echo-Devices.G090L91072450LMC.Music-Provider.TuneIn</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">5000</field> <field name="UNIT">ms</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="AuQ^H?/mq@WaYJe|g7nL"> <field name="TEXT">radio-ffn</field> </block> </value> <next> <block type="comment" id="j/Kl[(saB^%aWYpZJM7q"> <field name="COMMENT">Thermostat Flur - Sollwert 21°C</field> <next> <block type="control" id="P3y;hFo4]p|
}s72@[z0" disabled="true">
<mutation delay_input="false"></mutation>
<field name="OID">innogy-smarthome.0.Flur.Heizkörper-Flur.PointTemperature</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="vIa(%yl;j-76KNU*O-%B">
<field name="NUM">21</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
<block type="control" id="WyjBu|}HxN%5a%#.VGM}" x="399" y="865">
<mutation delay_input="false"></mutation>
<field name="OID">innogy-smarthome.0.Flur.Heizkörper-Flur.PointTemperature</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="3YMvNWd3Ct5I2eD]v:Q}">
<field name="NUM">19</field>
</block>
</value>
</block>
</xml>
Interessanter Weise wird dieses Skript NIE zufällig angesteuert. Es wird immer nur das "Ausschalt Skript" zu wahrlosen Zeitpunkten ausgeführt.
-
Vielleicht mit "ist größer als als letztes" aber eigentlich bin ich da raus, leider keine Ahnung.
-
@JB_Sullivan
Versuch bitte an statt den Wert neu abzufragen direkt auf den aktuellen sowie den vorherigen Wert zuzugreifen. Diese findest du als einzelne Versatzstücke im Trigger (siehe 2. Bild). Zusätzlich solltest du auch mal debug ausgaben mit einbauen, so das du sehen kannst wann/wie der Trigger aktiviert wird.Deine Abfrage sollte dann so aussehen:
Aktualisiert kann öfter getriggert werden - Aus verschiedenen Gründen dazu kommen kann das der Wert aktualisiert wird ohne das dafür der Knopf gedrückt wird, z.Bsp. bei einem Reconnect zum Innogy-Gateway