Beiträge von Schrader
-
-
-
-
Mein erstes Skript wo funktionierte jedoch mit sehr vielen Meldungen über Pushover und [definition='20','0'][definition='20','0']Alexa[/definition][/definition]
Code
Alles anzeigen<xml xmlns="http://www.w3.org/1999/xhtml"> <block type="on_ext" id="TO+Q%P:Kt{g3qSP^W+ri" x="-237" y="-162"> <mutation items="1"></mutation> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="CURBF})RP)kcmRY;xTUh"> <field name="oid">hm-rpc.0.LEQ0272298.2.POWER</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="~qBj1yr(vxy40U%t!o7-"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_compare" id="`uHM84L=o(|^!DhBDG}H"> <field name="OP">LTE</field> <value name="A"> <block type="get_value" id=";AnR?jMzM7b9GX;^xP#L"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.LEQ0272298.2.POWER</field> </block> </value> <value name="B"> <block type="math_number" id="M?#hN_6!);g~TGke?z`0"> <field name="NUM">15</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="1s7xKI0-ufLxU;hV=un@"> <mutation delay_input="false"></mutation> <field name="OID">alexa2.1.Echo-Devices.G090U50784240E51.Player.volume</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="j(STJQTPf^u-GWs9e%9a"> <field name="NUM">30</field> </block> </value> <next> <block type="control" id="Wh*v/`{~!ey0_!Bi./J%"> <mutation delay_input="false"></mutation> <field name="OID">hm-rpc.1.CUX2801001.3.LEVEL</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="B[E_9Fm*2+gY49zGNAoe"> <field name="NUM">0</field> </block> </value> <next> <block type="pushover" id=")#5EN|meC}R@Kcb/-iqQ"> <field name="INSTANCE"></field> <field name="SOUND"></field> <field name="PRIORITY">0</field> <field name="LOG"></field> <value name="MESSAGE"> <shadow type="text" id="*DUl,]8_z18E|LyP69Pt"> <field name="TEXT">Trockner ist fertig</field> </shadow> </value> <next> <block type="control" id="V)tA:1b=5mthlO4A10O@"> <mutation delay_input="false"></mutation> <field name="OID">alexa2.1.Echo-Devices.G090U50784240E51.Commands.ssml</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text_join" id="wf,=@[P-MX)`hd~LP~6@"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id=";px7BQ^~hi_y/)~EL,jU"> <field name="TEXT"><speak><voice name="Hans"></field> </block> </value> <value name="ADD1"> <block type="text" id="5uJ*DPH%8^)?C,8Bvq;B"> <field name="TEXT">Der Trockner ist fertig los geh in den Keller</field> </block> </value> <value name="ADD2"> <block type="text" id="?h#N#Tsod3Xj#Qa/to`{"> <field name="TEXT"></voice></speak></field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id="4sEd;-ijx:OJt[814o_`"> <field name="OP">GTE</field> <value name="A"> <block type="get_value" id="uL/SOUnm`AD,A[B-||CH"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.LEQ0272298.2.POWER</field> </block> </value> <value name="B"> <block type="math_number" id="[-69yv7.folHs6iUz7fA"> <field name="NUM">1500</field> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="}!s-{lBuWbUp:-N1nO/-"> <mutation delay_input="false"></mutation> <field name="OID">hm-rpc.1.CUX2801001.3.LEVEL</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="9Ot2HYt5vfkJpm|]CpQP"> <field name="NUM">100</field> </block> </value> <next> <block type="pushover" id="CaBnhq#B!Nz2}pHA48yj"> <field name="INSTANCE"></field> <field name="SOUND"></field> <field name="PRIORITY">0</field> <field name="LOG"></field> <value name="MESSAGE"> <shadow type="text" id="=:Q/7u0)OYg,doKLa/Lo"> <field name="TEXT">Trockner ist Gestartet</field> </shadow> </value> </block> </next> </block> </statement> </block> </statement> </block> </xml>
-
Neues Blockly Skript wo ich nicht weiter komme
Code
Alles anzeigen<xml xmlns="http://www.w3.org/1999/xhtml"> <block type="on_ext" id="r06=f?Jy[Nlw4@9FKK.D" x="-207" y="-113"> <mutation items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="}]{?ER3#C?]v3]CczUca"> <field name="oid">hm-rpc.0.LEQ0471547.2.POWER</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="16QGnrpn=^0|^V)9,K]z"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_compare" id="0Jo2xG]AQVK6on?-Pp.2"> <field name="OP">GT</field> <value name="A"> <block type="get_value" id="Rg,R#6et}necYe~I=}jn"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.LEQ0471547.2.POWER</field> </block> </value> <value name="B"> <block type="math_number" id="*CX)vsA97X#En6![c,g@"> <field name="NUM">50</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="=)=61{v~nfTs^(c}%wQ7"> <mutation delay_input="false"></mutation> <field name="OID">hm-rpc.0.Variablen.Status_WSM</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="tg_jwL@l9){8tR.%`)K["> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="control" id="=t-,|hCXIqT4t)X4Cm{?"> <mutation delay_input="false"></mutation> <field name="OID">hm-rpc.0.Variablen.Timer_WSM</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="0nx-i|U,!*aXi43b}?+3"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id="LA@wo/R]8wTKNUn6EJg8"> <field name="OP">LT</field> <value name="A"> <block type="get_value" id="1i9mAM%xGx#7_wsfrRdp"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.LEQ0471547.2.POWER</field> </block> </value> <value name="B"> <block type="math_number" id="ROyM3AW}Ftq+It^w,v@c"> <field name="NUM">15</field> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="J229p;5Z#KLu7UG[zK:w"> <mutation delay_input="false"></mutation> <field name="OID">hm-rpc.0.Variablen.Status_WSM</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="c}tUZXPZP/1b#XfrC]}["> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="control" id="jy~|NI+vbvMC943.`Yj)"> <mutation delay_input="false"></mutation> <field name="OID">hm-rpc.0.Variablen.Timer_WSM</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="4d:#Vt^k2Sjld?^)f2}i"> <field name="BOOL">TRUE</field> </block> </value> </block> </next> </block> </statement> <next> <block type="timeouts_settimeout" id="uOoeYnxX06t6Fo;nbxP#"> <field name="NAME">timeout</field> <field name="DELAY">2</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="controls_whileUntil" id="uQbjf[R^*pPp/.`BqVRd"> <field name="MODE">WHILE</field> <value name="BOOL"> <block type="logic_ternary" id="YBXbpq(,oI1cISl4|E-q"> <value name="IF"> <block type="logic_compare" id="Dk;smt=-.sL5ISY@yZ1w"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="iLTQvJ+)U,-w:_ZO7aw1"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.Variablen.Timer_WSM</field> </block> </value> <value name="B"> <block type="logic_boolean" id="dM7UT3{h)og-+8G(A@wj"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> </block> </statement> </block> </next> </block> </statement> </block> </xml>
-
Moin Leute
Ich bin neuling erst seit 3-4 Wochen aktiv mit ioBroker und Co.
Arbeite mit Blockly für die Skripte...laufen auch schon ein paar ohne Probleme jedoch an diesem komme ich nicht weiter
habe Probleme die Logik der Schleife zu verstehen.
Habe Probleme bei der Statusmeldung meines Trockners und meiner Waschmaschine.
"Ich Will Waschmaschine und Trockner "Smart" machen, d.h. will mir Statusmeldungen bzw. Ansagen von [definition='20','0']Alexa[/definition] machen.
Wenn das jeweilige Gerät gestartet ist und das "Waschprogramm" beendet ist.
Mein Problem ist das ich mehrfach die Meldung bekomme Fertig oder gestartet. Da ich für Fertig 5 Watt hinterlegt habe. Beim Kinderschutz Siehe "Bild" kommt die WSM oft drunter. Und im Standby betrieb schwankt die Leistungsaufnahme auch. Also auch wenn kein Programm gelaufen ist bekomme ich immer wieder mal Meldungen.
Wie bekomme ich dies Masse an Meldungen weg?"
Eine Lösung wurde mir schon vorgeschlagen....jedoch bleibe ich bei der Schleife hängen und komme nicht weiter.
"2 Variabelen selbst erstellen.
1 Variable (z.B. Maschine Aktiv) = ON / OFF oder true/false
2 Variable (Timer)= true/false
Dann ein Script
wenn grösser als 50 W Maschine Aktiv true
Timer false
wenn kleiner als 5 W Timer True
Dann eine Wiederholung Schleife 2 Minute -> check Timer
Und zum Schluss ... wenn Timer true und Maschine false dann ENDE Ansage.
Bedeutet Maschine läuft Timer ist aus.
Maschine ruht Timer geht auf true ... wenn sich das wieder ändert, weil sie nicht fertig ist geht der Timer wieder auf False. Solange bis der Wert dauerhaft unter 5 Watt bleibt. Dann wird nach ca. 2 Minuten deine Ansage aktiviert"
anbei mein Blockly Skript wie ich es ursprünglich hatte und jetzt neu aufgebaut habe aber komme mit der " schleife/Timeout" nicht weiter, wie es ein Kollege mir beschrieben hat