NEWS
Planung neuer Adapter: Smart Control
-
@Mic Ich habe gestern den Adapter nur installiert und keinerlei Einstellungen vorgenommen.
Lediglich einmal alle Reiter geöffnet.
Das kommt als Fehlermeldung in der "Grundeinstellung":smartcontrol.0 2020-07-03 17:42:00.033 error (2778) Trigger activation 'Every hour at minute 42' failed: no schedules found in schedule table. smartcontrol.0 2020-07-03 17:42:00.016 error (2778) Trigger activation 'Every hour at minute 42' failed: no schedules found in schedule table.Danke fĂŒr deinen Test. Ich zitiere mal :-)
@Mic sagte in Planung neuer Adapter: Smart Control:
ich muss da noch debuggen usw. Es sind/waren in den bisherigen Versionen auch noch mehrere Bugs drin, auch die gilt es noch zu beheben. Bringt mir und euch ja nichts, wenn ich ein "buggy-Release" hier raus bringe
Daher verzögert es sich noch etwas, bis ich einen offiziellen Aufruf zum Testen mache.
Kommt aber die Tage, keine SorgeBitte noch etwas Geduld.
-
Danke fĂŒr deinen Test. Ich zitiere mal :-)
@Mic sagte in Planung neuer Adapter: Smart Control:
ich muss da noch debuggen usw. Es sind/waren in den bisherigen Versionen auch noch mehrere Bugs drin, auch die gilt es noch zu beheben. Bringt mir und euch ja nichts, wenn ich ein "buggy-Release" hier raus bringe
Daher verzögert es sich noch etwas, bis ich einen offiziellen Aufruf zum Testen mache.
Kommt aber die Tage, keine SorgeBitte noch etwas Geduld.
-
@Chaot
Hab ich auch null als Kritik, sondern vielmehr als wichtigen Hinweis verstanden, danke noch mal fĂŒr dein Feedback. Das obige Zitat soll vielmehr implizit darstellen, dass mir bewusst ist, dass noch mehrere Fehler drin sind, und ich aktiv erst darauf eingehen kann, sobald ich die offizielle Testversion veröffentliche. Dein Fehler (und einige andere) sollte in meiner aktuellen lokalen Testumgebung nicht mehr vorhanden sein ;)
DafĂŒr andere
die es noch zu beheben gilt. -
@Chaot
Hab ich auch null als Kritik, sondern vielmehr als wichtigen Hinweis verstanden, danke noch mal fĂŒr dein Feedback. Das obige Zitat soll vielmehr implizit darstellen, dass mir bewusst ist, dass noch mehrere Fehler drin sind, und ich aktiv erst darauf eingehen kann, sobald ich die offizielle Testversion veröffentliche. Dein Fehler (und einige andere) sollte in meiner aktuellen lokalen Testumgebung nicht mehr vorhanden sein ;)
DafĂŒr andere
die es noch zu beheben gilt.@Mic Na wenn das so ist...
.. habe ich nochwas das beim Test aufgefallen ist.
Wenn du ALLE Haken deaktivierst kommt:smartcontrol.0 2020-07-03 20:27:25.412 info (19122) Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason smartcontrol.0 2020-07-03 20:27:25.411 info (19122) terminating smartcontrol.0 2020-07-03 20:27:25.410 error at processImmediate (internal/timers.js:456:21) smartcontrol.0 2020-07-03 20:27:25.410 error at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/states/statesInRedis.js:234:41) smartcontrol.0 2020-07-03 20:27:25.410 error at change (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5215:29) smartcontrol.0 2020-07-03 20:27:25.410 error at stop (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:8270:22) smartcontrol.0 2020-07-03 20:27:25.410 error at SmartControl.emit (events.js:315:20) smartcontrol.0 2020-07-03 20:27:25.410 error at SmartControl._onUnload (/opt/iobroker/node_modules/iobroker.smartcontrol/main.js:275:32) smartcontrol.0 2020-07-03 20:27:25.410 error (19122) Error while stopping adapter â TypeError: Cannot read property 'cancel' of null smartcontrol.0 2020-07-03 20:27:25.404 info (19122) Got terminate signal TERMINATE_YOURSELF host.ioBroker 2020-07-03 20:27:25.402 info stopInstance system.adapter.smartcontrol.0 send kill signal host.ioBroker 2020-07-03 20:27:25.397 info stopInstance system.adapter.smartcontrol.0 (force=false, process=true) host.ioBroker 2020-07-03 20:27:25.391 info "system.adapter.smartcontrol.0" disabled smartcontrol.0 2020-07-03 20:26:53.006 error (19122) Error â Message: Adapter admin configuration validation failed --> Please check your configuration. You will not be able to use this adapter without fixing the issues. smartcontrol.0 2020-07-03 20:26:53.005 warn (19122) [Config Verification] 4 error(s) found while verifying your adapter configuration. smartcontrol.0 2020-07-03 20:26:53.003 warn (19122) No active and valid trigger defined in any trigger table. smartcontrol.0 2020-07-03 20:26:53.002 warn (19122) [Config Table 'Schedules'] No rows defined. smartcontrol.0 2020-07-03 20:26:53.001 warn (19122) [Config Table 'Rooms/Areas'] No rows defined. smartcontrol.0 2020-07-03 20:26:52.999 warn (19122) [Config Table 'Target Devices'] No rows defined.Der obere Teil ist nach der ersten Fehlerwarnung der manuelle Shutdown des Adapters.

-
Hey Mic,
ich nutze dein aqara motion control script (mit einigen Anpassungen) seit Version 0.1 und bin super zufrieden mit dem Funktionsumfang und ZuverlÀssigkeit.
Das Einzige, was bei mir nie so richtig funktioniert hat (hat Nichts mit deinem Script zu tun :) ) ist die helligkeitsbezogene Steuerung.
Ich habe Aqara RTCGQ11LM Sensoren, welche ich mittels zigbee2mqtt und ein Paar Zeilen Code ins iobroker eingebunden habe. Das Problem, das im Zusammenhang mit deinem Script auftritt ist Folgendes:
Die Lux-Datenpunkte werden etwas spĂ€ter geschrieben als Occupancy. Das Script prĂŒft den Lux-Wert, jedoch nicht sein Timestamp, was in meinem Fall zur Verarbeitung nicht aktueller im Script Lux-Werte fĂŒhrt.
Eine mögliche Lösung wÀre die Timestamps zu vergleichen. Sollte Lux-Timestamp um mehr als x (Milli)Sekunden in der Vergangenheit liegen, wird maximal y (Milli)Sekunden auf Aktualisierung des Lux-Datenpunkts gewartet, oder so Àhnlich...
Des Weiteren wĂ€re ein gewisses "misbehaviour-handling" wĂŒnschenswert, wenn zum Beispiel der Occupancy-Datenpunkt nicht auf False gesetzt wird. Hier könnte man zwischen "nichts tun" und "in z Minuten ausschalten" wĂ€hlen.
Und zum Schluss: wird die Konfiguration nur statisch im Adapter vorgenommen oder auch mittels Datenpunkte?Viele GrĂŒĂe,
Max -
Hey Mic,
ich nutze dein aqara motion control script (mit einigen Anpassungen) seit Version 0.1 und bin super zufrieden mit dem Funktionsumfang und ZuverlÀssigkeit.
Das Einzige, was bei mir nie so richtig funktioniert hat (hat Nichts mit deinem Script zu tun :) ) ist die helligkeitsbezogene Steuerung.
Ich habe Aqara RTCGQ11LM Sensoren, welche ich mittels zigbee2mqtt und ein Paar Zeilen Code ins iobroker eingebunden habe. Das Problem, das im Zusammenhang mit deinem Script auftritt ist Folgendes:
Die Lux-Datenpunkte werden etwas spĂ€ter geschrieben als Occupancy. Das Script prĂŒft den Lux-Wert, jedoch nicht sein Timestamp, was in meinem Fall zur Verarbeitung nicht aktueller im Script Lux-Werte fĂŒhrt.
Eine mögliche Lösung wÀre die Timestamps zu vergleichen. Sollte Lux-Timestamp um mehr als x (Milli)Sekunden in der Vergangenheit liegen, wird maximal y (Milli)Sekunden auf Aktualisierung des Lux-Datenpunkts gewartet, oder so Àhnlich...
Des Weiteren wĂ€re ein gewisses "misbehaviour-handling" wĂŒnschenswert, wenn zum Beispiel der Occupancy-Datenpunkt nicht auf False gesetzt wird. Hier könnte man zwischen "nichts tun" und "in z Minuten ausschalten" wĂ€hlen.
Und zum Schluss: wird die Konfiguration nur statisch im Adapter vorgenommen oder auch mittels Datenpunkte?Viele GrĂŒĂe,
Max@frostnatt sagte in Planung neuer Adapter: Smart Control:
Datenpunkte w
Nur ein Gedankenansatz: Ich kenne jetzt das Script nicht, aber wenn der Lux Datenpunkt immer nach dem Occupacy geschrieben wird, kann man nicht den Trigger auf Lux setzen und dann erst im Trigger auf den Occupacy Wert (if occ = true) prĂŒfen?
-
@Chaot sagte in Planung neuer Adapter: Smart Control:
Wenn du ALLE Haken deaktivierst kommt:
Danke fĂŒrs testen. Gerade in meiner aktuellen Entwicklungsversion getestet:
Sieht gut aus:2020-07-07 20:36:20.030 - info: smartcontrol.0 (18328) starting. Version 0.1.0-alpha.2 in C:/iobroker/node_modules/iobroker.smartcontrol, node: v12.16.2 2020-07-07 20:36:20.154 - warn: smartcontrol.0 (18328) [Config Table 'Target Devices'] No rows defined. 2020-07-07 20:36:20.159 - warn: smartcontrol.0 (18328) [Config Table 'Zones'] No rows defined. 2020-07-07 20:36:20.160 - warn: smartcontrol.0 (18328) [Config Table 'Schedules'] No rows defined. 2020-07-07 20:36:20.162 - warn: smartcontrol.0 (18328) No active and valid trigger defined in any trigger table. 2020-07-07 20:36:20.166 - warn: smartcontrol.0 (18328) [Config Verification] 4 error(s) found while verifying your adapter configuration. 2020-07-07 20:36:20.189 - error: smartcontrol.0 (18328) Error â Message: Adapter admin configuration validation failed --> Please check your configuration. You will not be able to use this adapter without fixing the issues.@frostnatt
Danke fĂŒr deine VorschlĂ€ge.Die Lux-Datenpunkte werden etwas spĂ€ter geschrieben als Occupancy. Das Script prĂŒft den Lux-Wert, jedoch nicht sein Timestamp, was in meinem Fall zur Verarbeitung nicht aktueller im Script Lux-Werte fĂŒhrt.
Ich verstehe deinen Use-Case nicht ganz, also z.B.
- 0 ms: Bewegung löst aus (
zigbee.0.XXX.occupancy-> true). Derzeitige Helligkeit (lt.zigbee.0.XXX.illuminancez.B. 30) - 5 ms: Der Adapter liest die Helligkeit (30) und stellt fest, sie ist unterhalb von z.B. 60 --> also soll geschaltet werden.
- 10 ms: Licht wird eingeschaltet.
- 500 ms: Helligkeit (
zigbee.0.XXX.illuminance) ist jetzt 500
WĂŒsste jetzt nicht, warum man hier einen Timestamp zum Vergleich brĂ€uchte? Helligkeit wird ja ermittelt, bevor geschaltet wird, daher ist doch die Verzögerung hier egal.
Des Weiteren wĂ€re ein gewisses "misbehaviour-handling" wĂŒnschenswert, wenn zum Beispiel der Occupancy-Datenpunkt nicht auf False gesetzt wird. Hier könnte man zwischen "nichts tun" und "in z Minuten ausschalten" wĂ€hlen.
Guter Punkt, ist auf der ToDo-Liste.
Und zum Schluss: wird die Konfiguration nur statisch im Adapter vorgenommen oder auch mittels Datenpunkte?
Aktuell ist die Konfigurations-Ănderung nur in den Adapter-Optionen vorgesehen. Aber es gibt schon folgende Datenpunkte in meiner Entwicklungsversion fĂŒr jede Tabelle und Tabellenzeile:

Hiermit kann also eine Tabellenzeile aktiviert/deaktivert werden per Datenpunkt (und z.B. VIS). Zum Beispiel, um Schedules an- und auszuschalten, etc.Ebenso diese Tabelle:

Das sind ja die zu schaltenden ZielgerĂ€te (Lampen, Radio, usw.) die unterschiedliche Datenpunkte fĂŒr "an" und "aus" erlauben.
Diese sind jetzt durch den Adapter "verlinkt". Es gibt folgende Datenpunkte. Eine Ănderung der Datenpunkte bewirkt eine Ănderung der voreingestellten Datenpunkte, und umgekehrt.
Ist eine nette Zusatzfunktion des Adapters. Man kann auch GerÀte in der Tabelle anlegen, die man im Adapter nicht nutzt, aber vielleicht die Funktion so auch braucht.
- 0 ms: Bewegung löst aus (
-
Hallo @Mic ,
mal sehen ob ich etwas ĂŒbersehen habe:
Kann man mit dem Adapter SmartControl auf einen Taster steuern? Also Taster benutzen -> Licht an, Taster nochmal benutzen -> Licht aus?
Ich habe es so wenigstens nicht geschafft das Licht auszubekommen.
grĂŒĂe
-
Sehr cool das endlich jemand einen Adapter dafĂŒr baut!! Ich hab ewig an meinem Bewegungsmelder Script getĂŒftelt bis es halbwegs lief und ich freu mich darauf deinen Adapter zu testen.
Ich hĂ€nge dir mal meine Blockly Funktion dafĂŒr an. Vielleicht gibt das ja noch Inspirationen dafĂŒr.
GrundsÀtzlich habe ich folgendes drin:
- Globaler DP "AutoLight" falls "false" wird kein Licht mehr automatisch geschaltet
- Globaler DP "NightLightMode" falls "true" wird nicht geschaltet oder ein anderes Lichtszenario
- Globaler DP "AtHome" falls "false" Alle Lichter ausschalten
- Globaler DP LuxLimit Grenzwert fĂŒr schalten von Licht
- Je Raum gibt es weitere weitere Einstellungen (Schaltzeit, IgnoreNightMode,KeepOn (if true), KeepOff (if true), ExtraOffSwitches (GerĂ€te zusĂ€tzlich abgeschaltet werden aber keinen Trigger fĂŒr ON haben), LuxLimit (individuell)
- Funktion fĂŒr das Schalten verschiedener Lichter in dem Raum je nach Bedingung.
- Debug Ausgabe
Was mir bei Blockly am Anfang sehr viele Probleme gemacht hat war, dass die Verwendung von Timeouts in einer Funktion beim Aufruf von mehreren RĂ€umen ĂŒberschrieben werden. Das habe ich letztendlich mit einem Timer gelöst, der an den DP gehĂ€ngt wird und beim neu schreiben gelöscht wird.
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="xjjCO3x]~#p7S0:#%i0_">switches</variable> <variable id="N=.oocr,|f!EjH[T#m4W">TurnON</variable> <variable id=".vDs7L59v=fy*rrUz[gY">OFFTime</variable> <variable id="IX/gU^R_Zpb]{vD5A]Sn">RoomName</variable> <variable id="@Bz823N{#FDtr?!utT_^">pir_01</variable> <variable id="0I[}CDRB#1t;RiBC2c!N">pir_02</variable> <variable id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</variable> <variable id="vS_F0r}]%+GePgY3vks8">pir_lux_02</variable> <variable id="l;ilJ`6Z6%G5EJ2clI_)">pir_lux_limit</variable> <variable id="v5r*F/J_D*#a2B^L/XDs">extraOFFswitches</variable> <variable id="VpvRaw-o{?h#_.0;LXn;">KeepOn</variable> <variable id="dt+.dW.Wy09/+7%X.I|+">KeepOff</variable> <variable id="(5n|JY/|pl^WYG41i],:">IgnoreNightMode</variable> <variable id="#DF~YDx#7HA~2_~c}$P?">switch</variable> <variable id=":#q3xGH!O9R*~b!?qxmd">counter</variable> <variable id="UFl:*B!P.|vFu=[uU3T/">return</variable> <variable id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</variable> <variable id="Z}*@ZQ],86inGv;ML!G/">GlobalLuxLimit</variable> </variables> <block type="procedures_defreturn" id="ME|_L*VJRiX!B)!0O7?j" x="13" y="13"> <field name="NAME">wz_select_device</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion âŠ</comment> <statement name="STACK"> <block type="controls_if" id="l@l1b(]$~rI~T]PtFCck"> <mutation elseif="1" else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="cs-2Q(5s^2mYurlgJ%IE" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_operation" id="b02ov67EMjyk~?LmK[TG" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_operation" id="Acq#6xiNAjQ76BM%;-8%" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="ix3U/jZb=T(ku}juSZnR"> <field name="OP">GTE</field> <value name="A"> <block type="time_get" id=".5N6%Z#/3hY=:$B|~NaO"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">wd</field> </block> </value> <value name="B"> <block type="math_number" id="pDE#FhTH~mt`S[0zb_||"> <field name="NUM">6</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="w/-BADhf0d5cMO.$wH^q"> <field name="OP">LTE</field> <value name="A"> <block type="time_get" id="~Jq=3I?Is=1)GJd17c+q"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">wd</field> </block> </value> <value name="B"> <block type="math_number" id="#v}=gS`Y]=O%]cz#G#jc"> <field name="NUM">7</field> </block> </value> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="ULgxMsVMe_]tA]Fsly[$" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="time_compare" id="0!GQRrVZYt:T:lTJyJgl"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation> <field name="OPTION">between</field> <field name="START_TIME">12:00</field> <field name="END_TIME">14:00</field> </block> </value> <value name="B"> <block type="time_compare" id="aQEM|C(l^s7,5JV@`^B;"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation> <field name="OPTION">between</field> <field name="START_TIME">18:00</field> <field name="END_TIME">20:00</field> </block> </value> </block> </value> </block> </value> <value name="B"> <block type="logic_negate" id="[I6Mx+jpR[AKmmmXoxWv"> <value name="BOOL"> <block type="get_value_var" id="l@za~3?OhxT$Fo#=c)Wx"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text"> <field name="TEXT"></field> </shadow> <block type="field_oid" id="DqdZ(z^Eu3wpe1!CoGSA"> <field name="oid">0_userdata.0.GlobalVars.Wohnzimmer_TV</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="|o-y%I+j~uij@H,-{AdA"> <field name="VAR" id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</field> <value name="VALUE"> <block type="lists_create_with" id="r`WR05*_(l~!0%}P8dyO"> <mutation items="1"></mutation> <value name="ADD0"> <block type="field_oid" id="p?t*.kHQgbbg-P1}L:],"> <field name="oid">scene.0.Szene_wohnzimmer-essen</field> </block> </value> </block> </value> <next> <block type="debug" id=":a:ZL|ZKs-wm8Q;T^M%?"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="M;/vC3q?i$VcB0{[N#_A"> <field name="TEXT">wz essen</field> </shadow> </value> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_operation" id="_k0k~kNq2Ce,UYgh;mqi" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="get_value_var" id="(pebLF9+cQ7,^ifb==,6"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="U/S$)3xsk-3;8#~.*hJ2"> <field name="TEXT"></field> </shadow> <block type="field_oid" id="=a4%;97[zTAEkm+ujijj"> <field name="oid">0_userdata.0.GlobalVars.Wohnzimmer_TV</field> </block> </value> </block> </value> <value name="B"> <block type="time_compare" id="Jp4c.~(5PKa:]iIs#QLk"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation> <field name="OPTION">between</field> <field name="START_TIME">18:00</field> <field name="END_TIME">00:30</field> </block> </value> </block> </value> <statement name="DO1"> <block type="variables_set" id="L@}i_6o.rb2dA0Mh9zVP"> <field name="VAR" id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</field> <value name="VALUE"> <block type="lists_create_with" id="qwZKDCG9dtX!Y[CfqU`x"> <mutation items="1"></mutation> <value name="ADD0"> <block type="field_oid" id="Mk^tguqoO%!UdMC_uaO-"> <field name="oid">scene.0.Szene_wohnzimmer-gemuetlich</field> </block> </value> </block> </value> <next> <block type="debug" id="2Xc+Q8zQ*KyLt{LGbHM!"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="Doe2PlebWaPQx`@}YqiF"> <field name="TEXT">wz gemĂŒtlich</field> </shadow> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="variables_set" id="USp?u8vp6Mfq;65wHEz6"> <field name="VAR" id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</field> <value name="VALUE"> <block type="lists_create_with" id="ke72Y:uae96cIQ6VA#$G"> <mutation items="1"></mutation> <value name="ADD0"> <block type="field_oid" id="4+{(idsPPS`v${5x;K?O"> <field name="oid">scene.0.Szene_pir-wohnzimmer</field> </block> </value> </block> </value> <next> <block type="debug" id="M%)Ez?.pywI6}bbth`Vx"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="x((%Rv2R;44c_sv`g2nS"> <field name="TEXT">wz pir</field> </shadow> </value> </block> </next> </block> </statement> </block> </statement> <value name="RETURN"> <block type="variables_get" id="WmE)4):S{xnzH$T+yOSQ"> <field name="VAR" id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</field> </block> </value> </block> <block type="procedures_defreturn" id="Uq+c:7kOmR1R|/)C-~iW" x="13" y="588"> <mutation> <arg name="RoomName" varid="IX/gU^R_Zpb]{vD5A]Sn"></arg> <arg name="pir_01" varid="@Bz823N{#FDtr?!utT_^"></arg> <arg name="pir_02" varid="0I[}CDRB#1t;RiBC2c!N"></arg> <arg name="pir_lux_01" varid=",RO*rmH)Gb7=:?$7ny,."></arg> <arg name="pir_lux_02" varid="vS_F0r}]%+GePgY3vks8"></arg> <arg name="pir_lux_limit" varid="l;ilJ`6Z6%G5EJ2clI_)"></arg> <arg name="switches" varid="xjjCO3x]~#p7S0:#%i0_"></arg> <arg name="extraOFFswitches" varid="v5r*F/J_D*#a2B^L/XDs"></arg> <arg name="OFFTime" varid=".vDs7L59v=fy*rrUz[gY"></arg> <arg name="KeepOn" varid="VpvRaw-o{?h#_.0;LXn;"></arg> <arg name="KeepOff" varid="dt+.dW.Wy09/+7%X.I|+"></arg> <arg name="IgnoreNightMode" varid="(5n|JY/|pl^WYG41i],:"></arg> </mutation> <field name="NAME">PIROnOff</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion âŠ</comment> <statement name="STACK"> <block type="controls_if" id="[O7.(Z@={-u+:!D79Gz%"> <value name="IF0"> <block type="logic_compare" id="jlr_x$?NA^WZomQtcw#5"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="F=+u75K9%VDi8G/n|D8k"> <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field> </block> </value> <value name="B"> <block type="logic_null" id="Sh,:KvsF[rusl~@}EMqY"></block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="whX@Da6CE@|naMUw;N8~"> <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field> <value name="VALUE"> <block type="variables_get" id="6rDG8,DskG60`#/v/8mv"> <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field> </block> </value> </block> </statement> <next> <block type="controls_if" id="I[hD8l1p/IA;zpe?h|UC"> <value name="IF0"> <block type="logic_compare" id="~)koIzn#%8#nG.hQ2r4w"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id=",|L(K7dZVR%t;!_rN$Lh"> <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field> </block> </value> <value name="B"> <block type="logic_null" id="W%bpS%eSC]264c{ywR]f"></block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="U[5P1LV5cgm)K(sdn+T)"> <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field> <value name="VALUE"> <block type="variables_get" id="S=$NF3KdW#f|mCa_Is.$"> <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field> </block> </value> </block> </statement> <next> <block type="debug" id="13({Y~ad[1lz?(?.I:8s"> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="jJ`TpoG`qlcAh?|:PC!V"> <field name="TEXT">etwas erkannt</field> </shadow> <block type="text_join" id="zzz|U{L6aADQM6wC=`Dw"> <mutation items="8"></mutation> <value name="ADD0"> <block type="text" id="FpG~%IV|WdP}+zffCI-w"> <field name="TEXT">PIR: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="8~Do34ZHjM/ehND*@x}H"> <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field> </block> </value> <value name="ADD2"> <block type="text" id="UQ6$1$e!x0vW2VMG$^%n"> <field name="TEXT"> hat Wert - </field> </block> </value> <value name="ADD3"> <block type="get_value_var" id="aM`8)xK*ukDYKs(Q^iD["> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="{aui]%Z@m*m=!^M`#XS9"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="ozTuQEY[4$%5^%RXh-@g"> <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field> </block> </value> </block> </value> <value name="ADD4"> <block type="text" id="h^0tVD{s|6(nm~@3uSfO"> <field name="TEXT"> - </field> </block> </value> <value name="ADD5"> <block type="variables_get" id="2k{1r:Z$*Jk{fQYZ0hvv"> <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field> </block> </value> <value name="ADD6"> <block type="text" id=".8YO}6ABP*HDMGU^1$,P"> <field name="TEXT"> hat Wert - </field> </block> </value> <value name="ADD7"> <block type="get_value_var" id="3IIJGJ3XEK8fV0.c_0Vl"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="{aui]%Z@m*m=!^M`#XS9"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="PeBl3q,Yiuq6kwlkcJS`"> <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field> </block> </value> </block> </value> </block> </value> <next> <block type="debug" id="m$k.v~~pRKsfF#2rGjXW"> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="jJ`TpoG`qlcAh?|:PC!V"> <field name="TEXT">etwas erkannt</field> </shadow> <block type="text_join" id="A.Yww;)O(D?h8Sr4CUO8"> <mutation items="8"></mutation> <value name="ADD0"> <block type="text" id="6Js:%RU{%E1rE0ie3O=Y"> <field name="TEXT">PIR_LUX: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="8pcxW~%+x5HIJ5:kQD_X"> <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field> </block> </value> <value name="ADD2"> <block type="text" id="y:)7;uyP|i,=qBJ?/940"> <field name="TEXT"> hat Wert - </field> </block> </value> <value name="ADD3"> <block type="get_value_var" id="?jc{.no|7@Ox}M*3Yiy="> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="{aui]%Z@m*m=!^M`#XS9"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="AB#BN4sUMf1_zVuW(5AD"> <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field> </block> </value> </block> </value> <value name="ADD4"> <block type="text" id="zLrVDg5V7`Jy|NUNf`89"> <field name="TEXT"> - </field> </block> </value> <value name="ADD5"> <block type="variables_get" id="RYUXo|IpuVD31K6d}E)("> <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field> </block> </value> <value name="ADD6"> <block type="text" id="E(roxUb_{AJQE1[!k~Or"> <field name="TEXT"> hat Wert - </field> </block> </value> <value name="ADD7"> <block type="get_value_var" id="|{-zrh)6pw7)U2flh#WT"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="{aui]%Z@m*m=!^M`#XS9"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="249q+VQJ1tc`_z|^QKw$"> <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field> </block> </value> </block> </value> </block> </value> <next> <block type="controls_if" id="Uv[/#yCo:db^kgX|;k#H"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="6FH^Rk2p_]%Y2(K/PyPd"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="?!x8nVCyZfBkPYEG~Az?"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.GlobalVars.AutoLight</field> </block> </value> <value name="B"> <block type="logic_boolean" id="mZ;i7U3C#%kFJmTC+jkZ"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="09?,,2EP+_g3qIdzKQ9!"> <mutation elseif="1" else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="zuG2C2rk:;Za}.Lrj-pi" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id=")O-7|;y09npok-y_s;xi"> <field name="OP">EQ</field> <value name="A"> <block type="get_value_var" id="[Kk:Cgtf21QQI591Ga/Z"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="l!pgo+GlmzwwC]_HI91`"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="!|RO+tg}lwGLL-Pej?4p"> <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id="s=N^7s!QM8EZ!(mqVN|p"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="-!zo65PRFGd6$*tak9@2"> <field name="OP">EQ</field> <value name="A"> <block type="get_value_var" id="SN;`|g13#K`Jza}JAJ[D"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="l!pgo+GlmzwwC]_HI91`"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="FD5QuQkT/qYQlMe*NKaZ"> <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id="A]D?RX],u~M!S5N%S:N{"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id=";UN%Cl)(@D=Y,KA}2Nmv"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="GjUv+]z0Msa=Pi4,I:oV" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="+yk,-(9trX?JsdI[AT|:"> <field name="OP">LTE</field> <value name="A"> <block type="get_value_var" id="OXD;U1Q;-9Q7.!Djz`D;"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="l!pgo+GlmzwwC]_HI91`"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="SXXoJ_W7}7hHfR6dtN:O"> <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field> </block> </value> </block> </value> <value name="B"> <block type="variables_get" id="#WWg!0nb[;hd2BjXuxyU"> <field name="VAR" id="l;ilJ`6Z6%G5EJ2clI_)">pir_lux_limit</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="eTUQ*ww|/ed@9;S%s}-j"> <field name="OP">LTE</field> <value name="A"> <block type="get_value_var" id="YK(7;gzM6dVPS:A73yEM"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="l!pgo+GlmzwwC]_HI91`"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="7m_{g`_/[MXWAl-`DC#."> <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field> </block> </value> </block> </value> <value name="B"> <block type="variables_get" id="0%tca!9u76jk}{6-?%gU"> <field name="VAR" id="l;ilJ`6Z6%G5EJ2clI_)">pir_lux_limit</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="my:jHuH-uZ[heLt5odjN"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="2@Oub9,o`$uLYKd#ike;" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="fDk/.),o=!;r%8}@Oj(("> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="MLk5m2`)K$Ln,8X1nzY,"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.GlobalVars.NightLightMode</field> </block> </value> <value name="B"> <block type="logic_boolean" id="QU=Z,j)pD7B2@NT8DZT3"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="|DV~^IlJv:Ox0YnUc(BZ"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="/4K81(B*=/]_T^fFEX!p"> <field name="VAR" id="(5n|JY/|pl^WYG41i],:">IgnoreNightMode</field> </block> </value> <value name="B"> <block type="logic_boolean" id="vhBU1H5MlSZkTK|)_(M4"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="bd`D]$NJk`XfFoJR)D(9"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="foMR6tBoUz!~0uvQ!h)/"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="c{KA+=Oqc=kiOQpE$h^b"> <field name="VAR" id="dt+.dW.Wy09/+7%X.I|+">KeepOff</field> </block> </value> <value name="B"> <block type="logic_boolean" id="F8Y;KnErl}VAcHtBaqV*"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="{XM_Z[.V#$`fKe=q6]pi"> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="g1ueDh_2oKR+gkXL:9pO"> <field name="TEXT">Schalte Licht AN</field> </shadow> <block type="procedures_callreturn" id="OT^6G[h;^:Iaf!H3(sI("> <mutation name="SetSwitchlist"> <arg name="switches"></arg> <arg name="TurnON"></arg> <arg name="OFFTime"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="j]:ZsWiNYrm{qG~5`8FR"> <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field> </block> </value> <value name="ARG1"> <block type="logic_boolean" id="Xm$Z%t5Txvj2h*3@(z/d"> <field name="BOOL">TRUE</field> </block> </value> <value name="ARG2"> <block type="math_number" id="rM2-%6M0Aws#{Yq}[fW#"> <field name="NUM">0</field> </block> </value> </block> </value> </block> </statement> <statement name="ELSE"> <block type="debug" id="KGn4QdU`T-)yKwG+iNN^"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="Mie1Y-G5Qe_DU9A]RORD"> <field name="TEXT">KeepOff aktiv</field> </shadow> </value> </block> </statement> </block> </statement> <statement name="ELSE"> <block type="debug" id="$[}zC!R!}1DzHgyjg]7Y"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="oj7c6l7Jo.9P?{BQn]bz"> <field name="TEXT">NightMode ist aktiviert</field> </shadow> </value> </block> </statement> </block> </statement> <statement name="ELSE"> <block type="debug" id=",Ym^I`tBP[(f/~}UUyvZ"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="5p]hJo6He4uf],!kf/f1"> <field name="TEXT">Lux-Limit nicht erreicht</field> </shadow> </value> </block> </statement> </block> </statement> <value name="IF1"> <block type="logic_operation" id="Y9HcpuFnRwAcU+DRYnzs" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="}fhd$Qugm+Y_NZAUow?L"> <field name="OP">EQ</field> <value name="A"> <block type="get_value_var" id="EA}#b?R`A;Z9O]1ifL/U"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="..N%+1lwIwm=r.aG-acQ"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="w,;R}@a)@_pkf$S(4pL!"> <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id="B04@`]HK4baj1{WnXJ@R"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="Aj1mhM#}c4:VCVxv`wf!"> <field name="OP">EQ</field> <value name="A"> <block type="get_value_var" id="77)-SO(|n.sYV?!*uk-v"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="..N%+1lwIwm=r.aG-acQ"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="wWyw1M_Qu-i{]+ZB1:y2"> <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id="B1cUqzunb:@p4kyyFAQc"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="controls_if" id="gP1*@4yos%O0lP;b}pNB"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="%6q}y6+`0U.pq2g#.2]d"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="veC@9j2mM%s%VV6699[["> <field name="VAR" id="VpvRaw-o{?h#_.0;LXn;">KeepOn</field> </block> </value> <value name="B"> <block type="logic_boolean" id="/O~8zybjznA@dt-c@aOL"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="K_%4zoRRL,YF:}lvWA=P"> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="EEDPy`ac^p!TSLb$aq::"> <field name="TEXT">warte einen moment bis aus</field> </shadow> <block type="text_join" id="D;c]Ryf7si+PeeL0=!N^"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="Z/70*s;axS=/Id:=X^q8"> <field name="TEXT">Warte </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="O4TW=,f+N0AaVd*MiNvO"> <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field> </block> </value> <value name="ADD2"> <block type="text" id="wiGGDqtwX]z#pXf%mdvW"> <field name="TEXT"> Minuten bis OFF</field> </block> </value> </block> </value> <next> <block type="debug" id="15rPv#n#;3jitxTUDEIT"> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="g1ueDh_2oKR+gkXL:9pO"> <field name="TEXT">Schalte Licht AN</field> </shadow> <block type="procedures_callreturn" id="*k?WNwCJ0aPyUlzN#a+w"> <mutation name="SetSwitchlist"> <arg name="switches"></arg> <arg name="TurnON"></arg> <arg name="OFFTime"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="ZX.1a@SjH4vzl@:UEBd4"> <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field> </block> </value> <value name="ARG1"> <block type="logic_boolean" id="7iFP3(LXB6rzjk!lsYqP"> <field name="BOOL">FALSE</field> </block> </value> <value name="ARG2"> <block type="variables_get" id="|_#g|ZY2ShK[%eT-/nR8"> <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field> </block> </value> </block> </value> <next> <block type="debug" id="!xYW,+B]Db9[aIwPo,C!"> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="g1ueDh_2oKR+gkXL:9pO"> <field name="TEXT">Schalte Licht AN</field> </shadow> <block type="procedures_callreturn" id="/fW6EVniBm487}BR6x$N"> <mutation name="SetSwitchlist"> <arg name="switches"></arg> <arg name="TurnON"></arg> <arg name="OFFTime"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="dWrb*+`1}G$e|Dtk}lSg"> <field name="VAR" id="v5r*F/J_D*#a2B^L/XDs">extraOFFswitches</field> </block> </value> <value name="ARG1"> <block type="logic_boolean" id="?Q]jg}0S{r1=6qR?QVBy"> <field name="BOOL">FALSE</field> </block> </value> <value name="ARG2"> <block type="variables_get" id="ZHEfb=L^*DR$G~S,aaUU"> <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="debug" id="RoF6h7sWR!@iX!pzB:PJ"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="e)Z3x84fp]xeIVE$kQyL"> <field name="TEXT">KeepOn aktiv</field> </shadow> </value> </block> </statement> </block> </statement> <statement name="ELSE"> <block type="debug" id="YqWeRdU|(Tbc6l?nx)rT"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="7R:0S=+L;a~6g,e@izq."> <field name="TEXT">Diese Ausgabe sollte nie kommen</field> </shadow> </value> <next> <block type="debug" id="AcmL]1^kiJ?y63QM+{WT" collapsed="true" disabled="true"> <field name="Severity">warn</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="i1Fbtc$Ax`kx:je)u(z?"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="rpCEJ)?!!49X)k0/*i/!"> <mutation items="19"></mutation> <value name="ADD0"> <block type="variables_get" id="c,qbd7Q(nCTXLaHb4OU%"> <field name="VAR" id="IX/gU^R_Zpb]{vD5A]Sn">RoomName</field> </block> </value> <value name="ADD1"> <block type="text_newline" id="%Ik4z(5$X/?J+jQubsu4"> <field name="Type">\n</field> </block> </value> <value name="ADD2"> <block type="text_join" id="2XGYG631?#H6eU%]_CR*"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="hG7Wb)xULJV+|Lg0of%r"> <field name="TEXT">pir1: </field> </block> </value> <value name="ADD1"> <block type="get_value_var" id=":[^;#--,=6lsmqN5syA7"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="KWLPWGd)pP|x?)+`Fpf]"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="6+zw,fJ7?_~ju*Z;%of@"> <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field> </block> </value> </block> </value> </block> </value> <value name="ADD3"> <block type="text_newline" id="I=LXvd%[2Pk6i/X[u;0*"> <field name="Type">\n</field> </block> </value> <value name="ADD4"> <block type="text_join" id="c{QG4zZ?l~4*1^wok/pQ"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="M{GSL,`(~}pQ#2U67wOa"> <field name="TEXT">pir2: </field> </block> </value> <value name="ADD1"> <block type="get_value_var" id=")!UYW.hyznN:gQ;SdzE#"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="(VS#ar)mX#FH0??a`YpE"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="%;,.b-1n3Q`x=i_P[4vm"> <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field> </block> </value> </block> </value> </block> </value> <value name="ADD5"> <block type="text_newline" id="Q{AczwXB+2+H_GY^V!^n"> <field name="Type">\n</field> </block> </value> <value name="ADD6"> <block type="text_join" id="32C,uF1^t#{UHw0][q93"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="dFa:8_P}IR^_:nz_z_dO"> <field name="TEXT">globallux: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id=",Or5XiX-3X^JCPc$TZXR"> <field name="VAR" id="Z}*@ZQ],86inGv;ML!G/">GlobalLuxLimit</field> </block> </value> </block> </value> <value name="ADD7"> <block type="text_newline" id="9=A#2My=k/T0#yX4}O3N"> <field name="Type">\n</field> </block> </value> <value name="ADD8"> <block type="text_join" id="!pl#DxkwBOo[#FmhEU]["> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="Q3h@!@QF_[k]vWzB5_2."> <field name="TEXT">pirlux1: </field> </block> </value> <value name="ADD1"> <block type="get_value_var" id="[,6n}%mfloy_0]eXm:Gq"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="D1(g!9bHQJTuB3|[v(_c"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="1NDs=?3k6Cyr`FPFfx3%"> <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field> </block> </value> </block> </value> </block> </value> <value name="ADD9"> <block type="text_newline" id="JNAUqM;Cc/t[Nw^,glSw"> <field name="Type">\n</field> </block> </value> <value name="ADD10"> <block type="text_join" id="swNic27o0_au*F^3ZCKd"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="vr}:sf4i]:8k!nl:T}:,"> <field name="TEXT">pirlux2: </field> </block> </value> <value name="ADD1"> <block type="get_value_var" id="#AuZ%*phOL2fIynrTg+V"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="ZJ|8Hav~G`]Cw(k/cChq"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="U^gz2:[g-S*=I`i)3O~m"> <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field> </block> </value> </block> </value> </block> </value> <value name="ADD11"> <block type="text_newline" id="tQp]vzu1j),1zqnA=%kI"> <field name="Type">\n</field> </block> </value> <value name="ADD12"> <block type="text_join" id="6`CpDnDEH3fD$y$Tr.3`"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="hvc9H|$dYS/([AXNBRu8"> <field name="TEXT">keepoff: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="9Cu!b{}G1U%p%_cAT]8{"> <field name="VAR" id="dt+.dW.Wy09/+7%X.I|+">KeepOff</field> </block> </value> </block> </value> <value name="ADD13"> <block type="text_newline" id="Xh.~^jNAi8vQfu,XBwY/"> <field name="Type">\n</field> </block> </value> <value name="ADD14"> <block type="text_join" id="PIJsihRA^q^8=b^R[iQ9"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="VRS.ox6#^x38buHk*P8["> <field name="TEXT">keepon: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="0ysKwoLmG^d{,=-Kh4C:"> <field name="VAR" id="VpvRaw-o{?h#_.0;LXn;">KeepOn</field> </block> </value> </block> </value> <value name="ADD15"> <block type="text_newline" id="}0CIvBLSU)hH!zF)*Cr@"> <field name="Type">\n</field> </block> </value> <value name="ADD16"> <block type="text_join" id="qZ5C%ICEMmGMSwQVpzkF"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="UG`[U$3_0K}:PCnWdN7y"> <field name="TEXT">offtime: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="gK{}F7N:?$FLcHumKGSD"> <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field> </block> </value> </block> </value> <value name="ADD17"> <block type="text_newline" id="jfKTL$`gU)~]mK(.q|l9"> <field name="Type">\n</field> </block> </value> <value name="ADD18"> <block type="text_join" id="|{:o[_0#lDt!rr++hzFw"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="OH5gl[1+!/]+TT+I+)]X"> <field name="TEXT">switches: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="{7JOz9JWX{|Kgb2i[]m}"> <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field> </block> </value> </block> </value> </block> </value> </block> </next> </block> </statement> </block> </statement> <statement name="ELSE"> <block type="debug" id="4w2|1F,M`I5e77zwa.ns"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="bbxou~4]2_z*wGe#{4[k"> <field name="TEXT">AutoLight ist deaktiviert</field> </shadow> </value> </block> </statement> <next> <block type="comment" id="hoxnMLgQ2aNN0m=5Y:}m"> <field name="COMMENT">AtHomeTimer</field> <next> <block type="controls_if" id="v*U[9UI_|4@c)yiirCvb"> <value name="IF0"> <block type="logic_compare" id="}W#E1zCXZitL.S|r_*u,"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id=",Nlb[/RysL/LlIrpQ+e."> <field name="ATTR">val</field> <field name="OID">0_userdata.0.GlobalVars.AtHome</field> </block> </value> <value name="B"> <block type="logic_boolean" id="sOIRl}w5*9@4|Cu}Qa?F"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="vcPx3~z~f}j@TgeL8)8S"> <field name="Severity">debug</field> <value name="TEXT"> <shadow type="text" id="{V%?2,E+`DP%Jt6u@jBz"> <field name="TEXT">Schalte OFF in 10 Minuten weil nicht zuhause</field> </shadow> </value> <next> <block type="comment" id="RVtp!r)ays=b{:K7RYxJ"> <field name="COMMENT">AtHomeTimer</field> <next> <block type="debug" id="jQU}W-zBlE`x1UT+%n.v"> <field name="Severity">debug</field> <value name="TEXT"> <shadow type="text" id="397}R%`ouk+n%Ab}WH%%"> <field name="TEXT">Schalte OFF weil nicht zuhause</field> </shadow> </value> <next> <block type="debug" id="zFy.s;7+hO@}w7+K1uY["> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="g1ueDh_2oKR+gkXL:9pO"> <field name="TEXT">Schalte Licht AN</field> </shadow> <block type="procedures_callreturn" id="~mNhEHA+,LT?rX%eZ2lR"> <mutation name="SetSwitchlist"> <arg name="switches"></arg> <arg name="TurnON"></arg> <arg name="OFFTime"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="_Yf;JY5.:8UL{r9*yAn;"> <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field> </block> </value> <value name="ARG1"> <block type="logic_boolean" id="f%n5w^9=kBCnrPPhJn;="> <field name="BOOL">FALSE</field> </block> </value> <value name="ARG2"> <block type="math_number" id="i_ImUcS(?61s*B~NN-39"> <field name="NUM">10</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <value name="RETURN"> <block type="text_join" id="!bwM/xMn9lV`jZFwfsa/"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="NjBm7Pn=DYJEAIm@_6UC"> <field name="TEXT">PIR Done: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="u_!p(H,3VMjs5mEvL+43"> <field name="VAR" id="IX/gU^R_Zpb]{vD5A]Sn">RoomName</field> </block> </value> </block> </value> </block> <block type="on_ext" id=";^LGVCUKOD;aGmWXc=c6" x="13" y="3188"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="4"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="field_oid" id="=Z_mw^?rB%bQC7u}kx|%"> <field name="oid">deconz.0.Sensors.40.presence</field> </shadow> <block type="field_oid" id="JsYO^Vgi0)-y|F+^oviC"> <field name="oid">0_userdata.0.GlobalVars.AtHome</field> </block> </value> <value name="OID1"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="field_oid" id="$nQiwk=`v3y=fQ]PvUN0"> <field name="oid">default</field> </shadow> <block type="field_oid" id="[}`A:Y9U/u;5q,+v,W48"> <field name="oid">deconz.0.Sensors.25.presence</field> </block> </value> <value name="OID2"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="field_oid" id="]e+nkTtwhknTJrrtFP4I"> <field name="oid">default</field> </shadow> <block type="field_oid" id="N#U0xQObgj/`[$L^lonm"> <field name="oid">deconz.0.Sensors.12.presence</field> </block> </value> <value name="OID3"> <shadow type="field_oid" id="O;xK`Y0:=Myj8klNmIBi"> <field name="oid">default</field> </shadow> <block type="field_oid" id="A{Zk{I]]+wwcj:MI]+He"> <field name="oid">0_userdata.0.GlobalVars.Wohnzimmer_TV</field> </block> </value> <statement name="STATEMENT"> <block type="debug" id="u8|~_n$bA:aWJ`UqCTFC"> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="ynfu|Z|NikvpCQ:1o:BB"> <field name="TEXT">test</field> </shadow> <block type="procedures_callreturn" id="nLv0b%CGK37Z)cY~zw/z"> <mutation name="PIROnOff"> <arg name="RoomName"></arg> <arg name="pir_01"></arg> <arg name="pir_02"></arg> <arg name="pir_lux_01"></arg> <arg name="pir_lux_02"></arg> <arg name="pir_lux_limit"></arg> <arg name="switches"></arg> <arg name="extraOFFswitches"></arg> <arg name="OFFTime"></arg> <arg name="KeepOn"></arg> <arg name="KeepOff"></arg> <arg name="IgnoreNightMode"></arg> </mutation> <value name="ARG0"> <block type="text" id="}I(7Bqqm)_X~_X|bEiB1"> <field name="TEXT">Wohnzimmer</field> </block> </value> <value name="ARG1"> <block type="field_oid" id="d`u(D,@Raq%;fP4CKEJt"> <field name="oid">deconz.0.Sensors.25.presence</field> </block> </value> <value name="ARG2"> <block type="field_oid" id="NUjj.[urXP,8St`J=il:"> <field name="oid">deconz.0.Sensors.12.presence</field> </block> </value> <value name="ARG3"> <block type="field_oid" id="c4R}~dbft8bbBgzDj3|r"> <field name="oid">deconz.0.Sensors.26.lux</field> </block> </value> <value name="ARG4"> <block type="field_oid" id="{^ndJH5O0Hu5[@t(aCqz"> <field name="oid">deconz.0.Sensors.11.lux</field> </block> </value> <value name="ARG5"> <block type="variables_get" id="vO{DatzV5%jA(Um]`XI*"> <field name="VAR" id="Z}*@ZQ],86inGv;ML!G/">GlobalLuxLimit</field> </block> </value> <value name="ARG6"> <block type="procedures_callreturn" id="4b:WqC9H[=9`.[Ojfj?}"> <mutation name="wz_select_device"></mutation> </block> </value> <value name="ARG7"> <block type="lists_create_with" id="c*D~`u7fuL5XaFK,!dJj"> <mutation items="7"></mutation> <value name="ADD0"> <block type="field_oid" id="l;tyX^aUS_sSz%qL*TA)"> <field name="oid">deconz.0.Lights.21.on</field> </block> </value> <value name="ADD1"> <block type="field_oid" id="t30:yg6P5=n3yIO$o^JK"> <field name="oid">deconz.0.Lights.22.on</field> </block> </value> <value name="ADD2"> <block type="field_oid" id="mTIp`Y(Qt[?)#9bwPzRW"> <field name="oid">deconz.0.Lights.25.on</field> </block> </value> <value name="ADD3"> <block type="field_oid" id="8ERU2+Cpj6jc128qe|Y!"> <field name="oid">deconz.0.Lights.26.on</field> </block> </value> <value name="ADD4"> <block type="field_oid" id="F.g)-!0lCT):XZgMp@y,"> <field name="oid">milight-smart-light.2.wz_tv.fullColor-1.on</field> </block> </value> <value name="ADD5"> <block type="field_oid" id="-Pi@+Lq]TB1.=9-_3Bdk"> <field name="oid">deconz.0.Lights.2.on</field> </block> </value> <value name="ADD6"> <block type="field_oid" id="#t5{77?jGUrm/b@71+d]"> <field name="oid">scene.0.Szene_pir-wohnzimmer</field> </block> </value> </block> </value> <value name="ARG8"> <block type="math_number" id="DpGu,O=HhqM~YNvwYd(q"> <field name="NUM">15</field> </block> </value> <value name="ARG9"> <block type="get_value_var" id="`0Sf$59Dvioli#0BigAu"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="clv1]niZbc4686`koi;*"> <field name="TEXT"></field> </shadow> <block type="field_oid" id="[aYgpU8$]POx,/._r.ZL"> <field name="oid">0_userdata.0.GlobalVars.Wohnzimmer_TV</field> </block> </value> </block> </value> <value name="ARG10"> <block type="logic_boolean" id="RwUt,vY#EAiFlDjIpHC1"> <field name="BOOL">FALSE</field> </block> </value> <value name="ARG11"> <block type="logic_boolean" id="hD~{MtehXnYitYJ:{oei"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> </block> </statement> </block> <block type="procedures_defreturn" id="97)riRpuhw.aXAyJOQ#[" x="13" y="3913"> <mutation> <arg name="switches" varid="xjjCO3x]~#p7S0:#%i0_"></arg> <arg name="TurnON" varid="N=.oocr,|f!EjH[T#m4W"></arg> <arg name="OFFTime" varid=".vDs7L59v=fy*rrUz[gY"></arg> </mutation> <field name="NAME">SetSwitchlist</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion âŠ</comment> <statement name="STACK"> <block type="controls_forEach" id="?W@B=92zUWf^!ER$H:2S"> <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field> <value name="LIST"> <block type="variables_get" id="cFsXd};PL_5F@w6(c(Qg"> <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field> </block> </value> <statement name="DO"> <block type="controls_if" id="~kwRL!VPw_s!Z|Lw:Y=t"> <mutation else="1"></mutation> <value name="IF0"> <block type="variables_get" id="~Hs{Nb8!2FayVhlmP{_o"> <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field> </block> </value> <statement name="DO0"> <block type="debug" id="gjY2qE}KLN:vNc$SoY~/"> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="6Lv/kM);m|r--.+Hld*_"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="N7@;X%^/S.U5nHl*eN=T"> <mutation items="6"></mutation> <value name="ADD0"> <block type="text" id="yG%!Tu:2Cm3+)#s)HGga"> <field name="TEXT">Schalte: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="|Wz|g-AiGzZSF(sbV,7L"> <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field> </block> </value> <value name="ADD2"> <block type="text" id="gTBof0-WEUX0K|/%@NqH"> <field name="TEXT"> - </field> </block> </value> <value name="ADD3"> <block type="variables_get" id="SF|0p5(O[YcG%OBo}h3w"> <field name="VAR" id="N=.oocr,|f!EjH[T#m4W">TurnON</field> </block> </value> <value name="ADD4"> <block type="text" id=".y0Iqt1N6.gIv/P9fYSd"> <field name="TEXT"> - delay </field> </block> </value> <value name="ADD5"> <block type="variables_get" id="-3KJjwlYCU;SI:}WNZz@"> <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field> </block> </value> </block> </value> <next> <block type="control_ex" id="79VIhFd[8OR7W~)]+Q7u"> <field name="TYPE">false</field> <field name="CLEAR_RUNNING">TRUE</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="field_oid" id=",6QIA.:kmqHzLpOpp8{;"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="G:^~pH88w+vU!!SqMNx^"> <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field> </block> </value> <value name="VALUE"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="logic_boolean" id="M)y7lc35WCOB-sP@0.+Y"> <field name="BOOL">TRUE</field> </shadow> <block type="variables_get" id="CRtJGnM(7mlyCrjtAS#2"> <field name="VAR" id="N=.oocr,|f!EjH[T#m4W">TurnON</field> </block> </value> <value name="DELAY_MS"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="*6fVY^7+fvHLGB^6ICUb"> <field name="NUM">0</field> </shadow> <block type="math_arithmetic" id="pM[;2Up_AS8vj(_EDMK)"> <field name="OP">ADD</field> <value name="A"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="bVbb!f6+5,f}Wl`KX4^f"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="JrRlB#cNt~OPNxUEH.;#"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="G{^vO}H,^Q{6{Y#)%NQE"> <field name="NUM">10</field> </shadow> <block type="variables_get" id="bZmmlv;6v=s;zh!Gb/h0"> <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field> </block> </value> <value name="B"> <shadow type="math_number" id="``T4@SD7}ao:1:$~a5?R"> <field name="NUM">60000</field> </shadow> </value> </block> </value> <value name="B"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="*61~~OTr35.DVn~j@84c"> <field name="NUM">1</field> </shadow> <block type="math_random_int" id="Dvdm;BUT|h?pR6|d8Ncr"> <value name="FROM"> <shadow type="math_number" id="My|V/L|ec}ckrD)G)|2n"> <field name="NUM">1</field> </shadow> </value> <value name="TO"> <shadow type="math_number" id="xKoCsxqCSQp{q${^Y**t"> <field name="NUM">500</field> </shadow> </value> </block> </value> </block> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="debug" id="=.|w?9nf5~~PyKL5=g46"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="G=+l93Z8O{D|r+-TKizq"> <field name="TEXT">Switches Eintrag ist leer</field> </shadow> </value> </block> </statement> </block> </statement> </block> </statement> <value name="RETURN"> <block type="text" id="(U$(5asPxY/vxdWptKjo"> <field name="TEXT">SetSwitches</field> </block> </value> </block> <block type="procedures_defreturn" id="Ly=3A3kJj[%)$pL1Y*Js" x="13" y="4513"> <mutation> <arg name="switches" varid="xjjCO3x]~#p7S0:#%i0_"></arg> </mutation> <field name="NAME">GetSwitches</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion âŠ</comment> <statement name="STACK"> <block type="variables_set" id="XFx8yOAtiL4G[Z;-r39M"> <field name="VAR" id=":#q3xGH!O9R*~b!?qxmd">counter</field> <value name="VALUE"> <block type="math_number" id="A}w2Qz(.Sb}.d_=K[)kV"> <field name="NUM">0</field> </block> </value> <next> <block type="controls_forEach" id="OYbqZv/z,%U*6pycO0Ia"> <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field> <value name="LIST"> <block type="variables_get" id="?2SsKISMzWqd/!ldagRl"> <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field> </block> </value> <statement name="DO"> <block type="controls_if" id="*)}3??[G]V$)lT*Dc(kl"> <value name="IF0"> <block type="variables_get" id="qsq)yI{bGs5rs35sMFev"> <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field> </block> </value> <statement name="DO0"> <block type="controls_if" id="-Rxingu-2hBJ?hm)NC8r"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="%R@E-(.[4?QEQ(XUEkUU"> <field name="OP">EQ</field> <value name="A"> <block type="get_value_var" id="6RXvDhz[f3Nc+|--=VEN"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="O:I4V1*pY/CJ6le4+IP@"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="5tn`VgHa5Ba+g^i3hn]1"> <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id="-l?E7{+i:c.,=!NAAvc*"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="math_change" id="sbUQ?-Q!Dkk~Ppqv{a_m"> <field name="VAR" id=":#q3xGH!O9R*~b!?qxmd">counter</field> <value name="DELTA"> <shadow type="math_number" id="cl$?.u]-:?xmJw8Ai!_Q"> <field name="NUM">1</field> </shadow> </value> </block> </statement> <statement name="ELSE"> <block type="variables_set" id="Ip0ZYg-1)*0N9c0Avxhp"> <field name="VAR" id=":#q3xGH!O9R*~b!?qxmd">counter</field> <value name="VALUE"> <block type="math_number" id=":]i@+YY1zf=2pmyk940O"> <field name="NUM">0</field> </block> </value> </block> </statement> </block> </statement> </block> </statement> <next> <block type="controls_if" id=",mB*mcs]MX,^99pPJUa{"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="|pnl;7.yklmYt**dQ(^0"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="}IuVQ4.8q2.^[k6ZDPEO"> <field name="VAR" id=":#q3xGH!O9R*~b!?qxmd">counter</field> </block> </value> <value name="B"> <block type="lists_length" id="}:5;_`YuLk6Hg3HVw[@d"> <value name="VALUE"> <block type="variables_get" id="e!:Q`NRUF#W.,-{8(^Oe"> <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="P9{2K[xAC7^JZaWZ;V~P"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="AD(k:Pz|uh5edFFT2Q*W"> <field name="TEXT">Switches sind AN</field> </shadow> </value> <next> <block type="variables_set" id="6QcH=2!04EY?p9o/ChzL"> <field name="VAR" id="UFl:*B!P.|vFu=[uU3T/">return</field> <value name="VALUE"> <block type="logic_boolean" id="NMtD{*YcoYw9zD@Z2WDp"> <field name="BOOL">TRUE</field> </block> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="debug" id="~CIg6id=8ds{FM[;#Udk"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="gE$ehZm~b8}1t7Kr6+9E"> <field name="TEXT">Switches sind AUS</field> </shadow> </value> <next> <block type="variables_set" id="3OFGY-djS_YMS$;~.+s]"> <field name="VAR" id="UFl:*B!P.|vFu=[uU3T/">return</field> <value name="VALUE"> <block type="logic_boolean" id="ym(,6;S:c{KTq-}6A2In"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> <value name="RETURN"> <block type="variables_get" id="F6:BVND*:t/WUU}QVqc3"> <field name="VAR" id="UFl:*B!P.|vFu=[uU3T/">return</field> </block> </value> </block> </xml> -
Sehr cool das endlich jemand einen Adapter dafĂŒr baut!! Ich hab ewig an meinem Bewegungsmelder Script getĂŒftelt bis es halbwegs lief und ich freu mich darauf deinen Adapter zu testen.
Ich hĂ€nge dir mal meine Blockly Funktion dafĂŒr an. Vielleicht gibt das ja noch Inspirationen dafĂŒr.
GrundsÀtzlich habe ich folgendes drin:
- Globaler DP "AutoLight" falls "false" wird kein Licht mehr automatisch geschaltet
- Globaler DP "NightLightMode" falls "true" wird nicht geschaltet oder ein anderes Lichtszenario
- Globaler DP "AtHome" falls "false" Alle Lichter ausschalten
- Globaler DP LuxLimit Grenzwert fĂŒr schalten von Licht
- Je Raum gibt es weitere weitere Einstellungen (Schaltzeit, IgnoreNightMode,KeepOn (if true), KeepOff (if true), ExtraOffSwitches (GerĂ€te zusĂ€tzlich abgeschaltet werden aber keinen Trigger fĂŒr ON haben), LuxLimit (individuell)
- Funktion fĂŒr das Schalten verschiedener Lichter in dem Raum je nach Bedingung.
- Debug Ausgabe
Was mir bei Blockly am Anfang sehr viele Probleme gemacht hat war, dass die Verwendung von Timeouts in einer Funktion beim Aufruf von mehreren RĂ€umen ĂŒberschrieben werden. Das habe ich letztendlich mit einem Timer gelöst, der an den DP gehĂ€ngt wird und beim neu schreiben gelöscht wird.
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="xjjCO3x]~#p7S0:#%i0_">switches</variable> <variable id="N=.oocr,|f!EjH[T#m4W">TurnON</variable> <variable id=".vDs7L59v=fy*rrUz[gY">OFFTime</variable> <variable id="IX/gU^R_Zpb]{vD5A]Sn">RoomName</variable> <variable id="@Bz823N{#FDtr?!utT_^">pir_01</variable> <variable id="0I[}CDRB#1t;RiBC2c!N">pir_02</variable> <variable id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</variable> <variable id="vS_F0r}]%+GePgY3vks8">pir_lux_02</variable> <variable id="l;ilJ`6Z6%G5EJ2clI_)">pir_lux_limit</variable> <variable id="v5r*F/J_D*#a2B^L/XDs">extraOFFswitches</variable> <variable id="VpvRaw-o{?h#_.0;LXn;">KeepOn</variable> <variable id="dt+.dW.Wy09/+7%X.I|+">KeepOff</variable> <variable id="(5n|JY/|pl^WYG41i],:">IgnoreNightMode</variable> <variable id="#DF~YDx#7HA~2_~c}$P?">switch</variable> <variable id=":#q3xGH!O9R*~b!?qxmd">counter</variable> <variable id="UFl:*B!P.|vFu=[uU3T/">return</variable> <variable id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</variable> <variable id="Z}*@ZQ],86inGv;ML!G/">GlobalLuxLimit</variable> </variables> <block type="procedures_defreturn" id="ME|_L*VJRiX!B)!0O7?j" x="13" y="13"> <field name="NAME">wz_select_device</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion âŠ</comment> <statement name="STACK"> <block type="controls_if" id="l@l1b(]$~rI~T]PtFCck"> <mutation elseif="1" else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="cs-2Q(5s^2mYurlgJ%IE" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_operation" id="b02ov67EMjyk~?LmK[TG" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_operation" id="Acq#6xiNAjQ76BM%;-8%" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="ix3U/jZb=T(ku}juSZnR"> <field name="OP">GTE</field> <value name="A"> <block type="time_get" id=".5N6%Z#/3hY=:$B|~NaO"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">wd</field> </block> </value> <value name="B"> <block type="math_number" id="pDE#FhTH~mt`S[0zb_||"> <field name="NUM">6</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="w/-BADhf0d5cMO.$wH^q"> <field name="OP">LTE</field> <value name="A"> <block type="time_get" id="~Jq=3I?Is=1)GJd17c+q"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">wd</field> </block> </value> <value name="B"> <block type="math_number" id="#v}=gS`Y]=O%]cz#G#jc"> <field name="NUM">7</field> </block> </value> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="ULgxMsVMe_]tA]Fsly[$" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="time_compare" id="0!GQRrVZYt:T:lTJyJgl"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation> <field name="OPTION">between</field> <field name="START_TIME">12:00</field> <field name="END_TIME">14:00</field> </block> </value> <value name="B"> <block type="time_compare" id="aQEM|C(l^s7,5JV@`^B;"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation> <field name="OPTION">between</field> <field name="START_TIME">18:00</field> <field name="END_TIME">20:00</field> </block> </value> </block> </value> </block> </value> <value name="B"> <block type="logic_negate" id="[I6Mx+jpR[AKmmmXoxWv"> <value name="BOOL"> <block type="get_value_var" id="l@za~3?OhxT$Fo#=c)Wx"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text"> <field name="TEXT"></field> </shadow> <block type="field_oid" id="DqdZ(z^Eu3wpe1!CoGSA"> <field name="oid">0_userdata.0.GlobalVars.Wohnzimmer_TV</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="|o-y%I+j~uij@H,-{AdA"> <field name="VAR" id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</field> <value name="VALUE"> <block type="lists_create_with" id="r`WR05*_(l~!0%}P8dyO"> <mutation items="1"></mutation> <value name="ADD0"> <block type="field_oid" id="p?t*.kHQgbbg-P1}L:],"> <field name="oid">scene.0.Szene_wohnzimmer-essen</field> </block> </value> </block> </value> <next> <block type="debug" id=":a:ZL|ZKs-wm8Q;T^M%?"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="M;/vC3q?i$VcB0{[N#_A"> <field name="TEXT">wz essen</field> </shadow> </value> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_operation" id="_k0k~kNq2Ce,UYgh;mqi" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="get_value_var" id="(pebLF9+cQ7,^ifb==,6"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="U/S$)3xsk-3;8#~.*hJ2"> <field name="TEXT"></field> </shadow> <block type="field_oid" id="=a4%;97[zTAEkm+ujijj"> <field name="oid">0_userdata.0.GlobalVars.Wohnzimmer_TV</field> </block> </value> </block> </value> <value name="B"> <block type="time_compare" id="Jp4c.~(5PKa:]iIs#QLk"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation> <field name="OPTION">between</field> <field name="START_TIME">18:00</field> <field name="END_TIME">00:30</field> </block> </value> </block> </value> <statement name="DO1"> <block type="variables_set" id="L@}i_6o.rb2dA0Mh9zVP"> <field name="VAR" id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</field> <value name="VALUE"> <block type="lists_create_with" id="qwZKDCG9dtX!Y[CfqU`x"> <mutation items="1"></mutation> <value name="ADD0"> <block type="field_oid" id="Mk^tguqoO%!UdMC_uaO-"> <field name="oid">scene.0.Szene_wohnzimmer-gemuetlich</field> </block> </value> </block> </value> <next> <block type="debug" id="2Xc+Q8zQ*KyLt{LGbHM!"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="Doe2PlebWaPQx`@}YqiF"> <field name="TEXT">wz gemĂŒtlich</field> </shadow> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="variables_set" id="USp?u8vp6Mfq;65wHEz6"> <field name="VAR" id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</field> <value name="VALUE"> <block type="lists_create_with" id="ke72Y:uae96cIQ6VA#$G"> <mutation items="1"></mutation> <value name="ADD0"> <block type="field_oid" id="4+{(idsPPS`v${5x;K?O"> <field name="oid">scene.0.Szene_pir-wohnzimmer</field> </block> </value> </block> </value> <next> <block type="debug" id="M%)Ez?.pywI6}bbth`Vx"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="x((%Rv2R;44c_sv`g2nS"> <field name="TEXT">wz pir</field> </shadow> </value> </block> </next> </block> </statement> </block> </statement> <value name="RETURN"> <block type="variables_get" id="WmE)4):S{xnzH$T+yOSQ"> <field name="VAR" id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</field> </block> </value> </block> <block type="procedures_defreturn" id="Uq+c:7kOmR1R|/)C-~iW" x="13" y="588"> <mutation> <arg name="RoomName" varid="IX/gU^R_Zpb]{vD5A]Sn"></arg> <arg name="pir_01" varid="@Bz823N{#FDtr?!utT_^"></arg> <arg name="pir_02" varid="0I[}CDRB#1t;RiBC2c!N"></arg> <arg name="pir_lux_01" varid=",RO*rmH)Gb7=:?$7ny,."></arg> <arg name="pir_lux_02" varid="vS_F0r}]%+GePgY3vks8"></arg> <arg name="pir_lux_limit" varid="l;ilJ`6Z6%G5EJ2clI_)"></arg> <arg name="switches" varid="xjjCO3x]~#p7S0:#%i0_"></arg> <arg name="extraOFFswitches" varid="v5r*F/J_D*#a2B^L/XDs"></arg> <arg name="OFFTime" varid=".vDs7L59v=fy*rrUz[gY"></arg> <arg name="KeepOn" varid="VpvRaw-o{?h#_.0;LXn;"></arg> <arg name="KeepOff" varid="dt+.dW.Wy09/+7%X.I|+"></arg> <arg name="IgnoreNightMode" varid="(5n|JY/|pl^WYG41i],:"></arg> </mutation> <field name="NAME">PIROnOff</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion âŠ</comment> <statement name="STACK"> <block type="controls_if" id="[O7.(Z@={-u+:!D79Gz%"> <value name="IF0"> <block type="logic_compare" id="jlr_x$?NA^WZomQtcw#5"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="F=+u75K9%VDi8G/n|D8k"> <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field> </block> </value> <value name="B"> <block type="logic_null" id="Sh,:KvsF[rusl~@}EMqY"></block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="whX@Da6CE@|naMUw;N8~"> <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field> <value name="VALUE"> <block type="variables_get" id="6rDG8,DskG60`#/v/8mv"> <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field> </block> </value> </block> </statement> <next> <block type="controls_if" id="I[hD8l1p/IA;zpe?h|UC"> <value name="IF0"> <block type="logic_compare" id="~)koIzn#%8#nG.hQ2r4w"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id=",|L(K7dZVR%t;!_rN$Lh"> <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field> </block> </value> <value name="B"> <block type="logic_null" id="W%bpS%eSC]264c{ywR]f"></block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="U[5P1LV5cgm)K(sdn+T)"> <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field> <value name="VALUE"> <block type="variables_get" id="S=$NF3KdW#f|mCa_Is.$"> <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field> </block> </value> </block> </statement> <next> <block type="debug" id="13({Y~ad[1lz?(?.I:8s"> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="jJ`TpoG`qlcAh?|:PC!V"> <field name="TEXT">etwas erkannt</field> </shadow> <block type="text_join" id="zzz|U{L6aADQM6wC=`Dw"> <mutation items="8"></mutation> <value name="ADD0"> <block type="text" id="FpG~%IV|WdP}+zffCI-w"> <field name="TEXT">PIR: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="8~Do34ZHjM/ehND*@x}H"> <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field> </block> </value> <value name="ADD2"> <block type="text" id="UQ6$1$e!x0vW2VMG$^%n"> <field name="TEXT"> hat Wert - </field> </block> </value> <value name="ADD3"> <block type="get_value_var" id="aM`8)xK*ukDYKs(Q^iD["> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="{aui]%Z@m*m=!^M`#XS9"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="ozTuQEY[4$%5^%RXh-@g"> <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field> </block> </value> </block> </value> <value name="ADD4"> <block type="text" id="h^0tVD{s|6(nm~@3uSfO"> <field name="TEXT"> - </field> </block> </value> <value name="ADD5"> <block type="variables_get" id="2k{1r:Z$*Jk{fQYZ0hvv"> <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field> </block> </value> <value name="ADD6"> <block type="text" id=".8YO}6ABP*HDMGU^1$,P"> <field name="TEXT"> hat Wert - </field> </block> </value> <value name="ADD7"> <block type="get_value_var" id="3IIJGJ3XEK8fV0.c_0Vl"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="{aui]%Z@m*m=!^M`#XS9"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="PeBl3q,Yiuq6kwlkcJS`"> <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field> </block> </value> </block> </value> </block> </value> <next> <block type="debug" id="m$k.v~~pRKsfF#2rGjXW"> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="jJ`TpoG`qlcAh?|:PC!V"> <field name="TEXT">etwas erkannt</field> </shadow> <block type="text_join" id="A.Yww;)O(D?h8Sr4CUO8"> <mutation items="8"></mutation> <value name="ADD0"> <block type="text" id="6Js:%RU{%E1rE0ie3O=Y"> <field name="TEXT">PIR_LUX: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="8pcxW~%+x5HIJ5:kQD_X"> <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field> </block> </value> <value name="ADD2"> <block type="text" id="y:)7;uyP|i,=qBJ?/940"> <field name="TEXT"> hat Wert - </field> </block> </value> <value name="ADD3"> <block type="get_value_var" id="?jc{.no|7@Ox}M*3Yiy="> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="{aui]%Z@m*m=!^M`#XS9"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="AB#BN4sUMf1_zVuW(5AD"> <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field> </block> </value> </block> </value> <value name="ADD4"> <block type="text" id="zLrVDg5V7`Jy|NUNf`89"> <field name="TEXT"> - </field> </block> </value> <value name="ADD5"> <block type="variables_get" id="RYUXo|IpuVD31K6d}E)("> <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field> </block> </value> <value name="ADD6"> <block type="text" id="E(roxUb_{AJQE1[!k~Or"> <field name="TEXT"> hat Wert - </field> </block> </value> <value name="ADD7"> <block type="get_value_var" id="|{-zrh)6pw7)U2flh#WT"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="{aui]%Z@m*m=!^M`#XS9"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="249q+VQJ1tc`_z|^QKw$"> <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field> </block> </value> </block> </value> </block> </value> <next> <block type="controls_if" id="Uv[/#yCo:db^kgX|;k#H"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="6FH^Rk2p_]%Y2(K/PyPd"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="?!x8nVCyZfBkPYEG~Az?"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.GlobalVars.AutoLight</field> </block> </value> <value name="B"> <block type="logic_boolean" id="mZ;i7U3C#%kFJmTC+jkZ"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="09?,,2EP+_g3qIdzKQ9!"> <mutation elseif="1" else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="zuG2C2rk:;Za}.Lrj-pi" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id=")O-7|;y09npok-y_s;xi"> <field name="OP">EQ</field> <value name="A"> <block type="get_value_var" id="[Kk:Cgtf21QQI591Ga/Z"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="l!pgo+GlmzwwC]_HI91`"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="!|RO+tg}lwGLL-Pej?4p"> <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id="s=N^7s!QM8EZ!(mqVN|p"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="-!zo65PRFGd6$*tak9@2"> <field name="OP">EQ</field> <value name="A"> <block type="get_value_var" id="SN;`|g13#K`Jza}JAJ[D"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="l!pgo+GlmzwwC]_HI91`"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="FD5QuQkT/qYQlMe*NKaZ"> <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id="A]D?RX],u~M!S5N%S:N{"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id=";UN%Cl)(@D=Y,KA}2Nmv"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="GjUv+]z0Msa=Pi4,I:oV" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="+yk,-(9trX?JsdI[AT|:"> <field name="OP">LTE</field> <value name="A"> <block type="get_value_var" id="OXD;U1Q;-9Q7.!Djz`D;"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="l!pgo+GlmzwwC]_HI91`"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="SXXoJ_W7}7hHfR6dtN:O"> <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field> </block> </value> </block> </value> <value name="B"> <block type="variables_get" id="#WWg!0nb[;hd2BjXuxyU"> <field name="VAR" id="l;ilJ`6Z6%G5EJ2clI_)">pir_lux_limit</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="eTUQ*ww|/ed@9;S%s}-j"> <field name="OP">LTE</field> <value name="A"> <block type="get_value_var" id="YK(7;gzM6dVPS:A73yEM"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="l!pgo+GlmzwwC]_HI91`"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="7m_{g`_/[MXWAl-`DC#."> <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field> </block> </value> </block> </value> <value name="B"> <block type="variables_get" id="0%tca!9u76jk}{6-?%gU"> <field name="VAR" id="l;ilJ`6Z6%G5EJ2clI_)">pir_lux_limit</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="my:jHuH-uZ[heLt5odjN"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="2@Oub9,o`$uLYKd#ike;" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="fDk/.),o=!;r%8}@Oj(("> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="MLk5m2`)K$Ln,8X1nzY,"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.GlobalVars.NightLightMode</field> </block> </value> <value name="B"> <block type="logic_boolean" id="QU=Z,j)pD7B2@NT8DZT3"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="|DV~^IlJv:Ox0YnUc(BZ"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="/4K81(B*=/]_T^fFEX!p"> <field name="VAR" id="(5n|JY/|pl^WYG41i],:">IgnoreNightMode</field> </block> </value> <value name="B"> <block type="logic_boolean" id="vhBU1H5MlSZkTK|)_(M4"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="bd`D]$NJk`XfFoJR)D(9"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="foMR6tBoUz!~0uvQ!h)/"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="c{KA+=Oqc=kiOQpE$h^b"> <field name="VAR" id="dt+.dW.Wy09/+7%X.I|+">KeepOff</field> </block> </value> <value name="B"> <block type="logic_boolean" id="F8Y;KnErl}VAcHtBaqV*"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="{XM_Z[.V#$`fKe=q6]pi"> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="g1ueDh_2oKR+gkXL:9pO"> <field name="TEXT">Schalte Licht AN</field> </shadow> <block type="procedures_callreturn" id="OT^6G[h;^:Iaf!H3(sI("> <mutation name="SetSwitchlist"> <arg name="switches"></arg> <arg name="TurnON"></arg> <arg name="OFFTime"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="j]:ZsWiNYrm{qG~5`8FR"> <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field> </block> </value> <value name="ARG1"> <block type="logic_boolean" id="Xm$Z%t5Txvj2h*3@(z/d"> <field name="BOOL">TRUE</field> </block> </value> <value name="ARG2"> <block type="math_number" id="rM2-%6M0Aws#{Yq}[fW#"> <field name="NUM">0</field> </block> </value> </block> </value> </block> </statement> <statement name="ELSE"> <block type="debug" id="KGn4QdU`T-)yKwG+iNN^"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="Mie1Y-G5Qe_DU9A]RORD"> <field name="TEXT">KeepOff aktiv</field> </shadow> </value> </block> </statement> </block> </statement> <statement name="ELSE"> <block type="debug" id="$[}zC!R!}1DzHgyjg]7Y"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="oj7c6l7Jo.9P?{BQn]bz"> <field name="TEXT">NightMode ist aktiviert</field> </shadow> </value> </block> </statement> </block> </statement> <statement name="ELSE"> <block type="debug" id=",Ym^I`tBP[(f/~}UUyvZ"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="5p]hJo6He4uf],!kf/f1"> <field name="TEXT">Lux-Limit nicht erreicht</field> </shadow> </value> </block> </statement> </block> </statement> <value name="IF1"> <block type="logic_operation" id="Y9HcpuFnRwAcU+DRYnzs" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="}fhd$Qugm+Y_NZAUow?L"> <field name="OP">EQ</field> <value name="A"> <block type="get_value_var" id="EA}#b?R`A;Z9O]1ifL/U"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="..N%+1lwIwm=r.aG-acQ"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="w,;R}@a)@_pkf$S(4pL!"> <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id="B04@`]HK4baj1{WnXJ@R"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="Aj1mhM#}c4:VCVxv`wf!"> <field name="OP">EQ</field> <value name="A"> <block type="get_value_var" id="77)-SO(|n.sYV?!*uk-v"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="..N%+1lwIwm=r.aG-acQ"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="wWyw1M_Qu-i{]+ZB1:y2"> <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id="B1cUqzunb:@p4kyyFAQc"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="controls_if" id="gP1*@4yos%O0lP;b}pNB"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="%6q}y6+`0U.pq2g#.2]d"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="veC@9j2mM%s%VV6699[["> <field name="VAR" id="VpvRaw-o{?h#_.0;LXn;">KeepOn</field> </block> </value> <value name="B"> <block type="logic_boolean" id="/O~8zybjznA@dt-c@aOL"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="K_%4zoRRL,YF:}lvWA=P"> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="EEDPy`ac^p!TSLb$aq::"> <field name="TEXT">warte einen moment bis aus</field> </shadow> <block type="text_join" id="D;c]Ryf7si+PeeL0=!N^"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="Z/70*s;axS=/Id:=X^q8"> <field name="TEXT">Warte </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="O4TW=,f+N0AaVd*MiNvO"> <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field> </block> </value> <value name="ADD2"> <block type="text" id="wiGGDqtwX]z#pXf%mdvW"> <field name="TEXT"> Minuten bis OFF</field> </block> </value> </block> </value> <next> <block type="debug" id="15rPv#n#;3jitxTUDEIT"> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="g1ueDh_2oKR+gkXL:9pO"> <field name="TEXT">Schalte Licht AN</field> </shadow> <block type="procedures_callreturn" id="*k?WNwCJ0aPyUlzN#a+w"> <mutation name="SetSwitchlist"> <arg name="switches"></arg> <arg name="TurnON"></arg> <arg name="OFFTime"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="ZX.1a@SjH4vzl@:UEBd4"> <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field> </block> </value> <value name="ARG1"> <block type="logic_boolean" id="7iFP3(LXB6rzjk!lsYqP"> <field name="BOOL">FALSE</field> </block> </value> <value name="ARG2"> <block type="variables_get" id="|_#g|ZY2ShK[%eT-/nR8"> <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field> </block> </value> </block> </value> <next> <block type="debug" id="!xYW,+B]Db9[aIwPo,C!"> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="g1ueDh_2oKR+gkXL:9pO"> <field name="TEXT">Schalte Licht AN</field> </shadow> <block type="procedures_callreturn" id="/fW6EVniBm487}BR6x$N"> <mutation name="SetSwitchlist"> <arg name="switches"></arg> <arg name="TurnON"></arg> <arg name="OFFTime"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="dWrb*+`1}G$e|Dtk}lSg"> <field name="VAR" id="v5r*F/J_D*#a2B^L/XDs">extraOFFswitches</field> </block> </value> <value name="ARG1"> <block type="logic_boolean" id="?Q]jg}0S{r1=6qR?QVBy"> <field name="BOOL">FALSE</field> </block> </value> <value name="ARG2"> <block type="variables_get" id="ZHEfb=L^*DR$G~S,aaUU"> <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="debug" id="RoF6h7sWR!@iX!pzB:PJ"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="e)Z3x84fp]xeIVE$kQyL"> <field name="TEXT">KeepOn aktiv</field> </shadow> </value> </block> </statement> </block> </statement> <statement name="ELSE"> <block type="debug" id="YqWeRdU|(Tbc6l?nx)rT"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="7R:0S=+L;a~6g,e@izq."> <field name="TEXT">Diese Ausgabe sollte nie kommen</field> </shadow> </value> <next> <block type="debug" id="AcmL]1^kiJ?y63QM+{WT" collapsed="true" disabled="true"> <field name="Severity">warn</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="i1Fbtc$Ax`kx:je)u(z?"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="rpCEJ)?!!49X)k0/*i/!"> <mutation items="19"></mutation> <value name="ADD0"> <block type="variables_get" id="c,qbd7Q(nCTXLaHb4OU%"> <field name="VAR" id="IX/gU^R_Zpb]{vD5A]Sn">RoomName</field> </block> </value> <value name="ADD1"> <block type="text_newline" id="%Ik4z(5$X/?J+jQubsu4"> <field name="Type">\n</field> </block> </value> <value name="ADD2"> <block type="text_join" id="2XGYG631?#H6eU%]_CR*"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="hG7Wb)xULJV+|Lg0of%r"> <field name="TEXT">pir1: </field> </block> </value> <value name="ADD1"> <block type="get_value_var" id=":[^;#--,=6lsmqN5syA7"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="KWLPWGd)pP|x?)+`Fpf]"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="6+zw,fJ7?_~ju*Z;%of@"> <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field> </block> </value> </block> </value> </block> </value> <value name="ADD3"> <block type="text_newline" id="I=LXvd%[2Pk6i/X[u;0*"> <field name="Type">\n</field> </block> </value> <value name="ADD4"> <block type="text_join" id="c{QG4zZ?l~4*1^wok/pQ"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="M{GSL,`(~}pQ#2U67wOa"> <field name="TEXT">pir2: </field> </block> </value> <value name="ADD1"> <block type="get_value_var" id=")!UYW.hyznN:gQ;SdzE#"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="(VS#ar)mX#FH0??a`YpE"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="%;,.b-1n3Q`x=i_P[4vm"> <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field> </block> </value> </block> </value> </block> </value> <value name="ADD5"> <block type="text_newline" id="Q{AczwXB+2+H_GY^V!^n"> <field name="Type">\n</field> </block> </value> <value name="ADD6"> <block type="text_join" id="32C,uF1^t#{UHw0][q93"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="dFa:8_P}IR^_:nz_z_dO"> <field name="TEXT">globallux: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id=",Or5XiX-3X^JCPc$TZXR"> <field name="VAR" id="Z}*@ZQ],86inGv;ML!G/">GlobalLuxLimit</field> </block> </value> </block> </value> <value name="ADD7"> <block type="text_newline" id="9=A#2My=k/T0#yX4}O3N"> <field name="Type">\n</field> </block> </value> <value name="ADD8"> <block type="text_join" id="!pl#DxkwBOo[#FmhEU]["> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="Q3h@!@QF_[k]vWzB5_2."> <field name="TEXT">pirlux1: </field> </block> </value> <value name="ADD1"> <block type="get_value_var" id="[,6n}%mfloy_0]eXm:Gq"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="D1(g!9bHQJTuB3|[v(_c"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="1NDs=?3k6Cyr`FPFfx3%"> <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field> </block> </value> </block> </value> </block> </value> <value name="ADD9"> <block type="text_newline" id="JNAUqM;Cc/t[Nw^,glSw"> <field name="Type">\n</field> </block> </value> <value name="ADD10"> <block type="text_join" id="swNic27o0_au*F^3ZCKd"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="vr}:sf4i]:8k!nl:T}:,"> <field name="TEXT">pirlux2: </field> </block> </value> <value name="ADD1"> <block type="get_value_var" id="#AuZ%*phOL2fIynrTg+V"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="ZJ|8Hav~G`]Cw(k/cChq"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="U^gz2:[g-S*=I`i)3O~m"> <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field> </block> </value> </block> </value> </block> </value> <value name="ADD11"> <block type="text_newline" id="tQp]vzu1j),1zqnA=%kI"> <field name="Type">\n</field> </block> </value> <value name="ADD12"> <block type="text_join" id="6`CpDnDEH3fD$y$Tr.3`"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="hvc9H|$dYS/([AXNBRu8"> <field name="TEXT">keepoff: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="9Cu!b{}G1U%p%_cAT]8{"> <field name="VAR" id="dt+.dW.Wy09/+7%X.I|+">KeepOff</field> </block> </value> </block> </value> <value name="ADD13"> <block type="text_newline" id="Xh.~^jNAi8vQfu,XBwY/"> <field name="Type">\n</field> </block> </value> <value name="ADD14"> <block type="text_join" id="PIJsihRA^q^8=b^R[iQ9"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="VRS.ox6#^x38buHk*P8["> <field name="TEXT">keepon: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="0ysKwoLmG^d{,=-Kh4C:"> <field name="VAR" id="VpvRaw-o{?h#_.0;LXn;">KeepOn</field> </block> </value> </block> </value> <value name="ADD15"> <block type="text_newline" id="}0CIvBLSU)hH!zF)*Cr@"> <field name="Type">\n</field> </block> </value> <value name="ADD16"> <block type="text_join" id="qZ5C%ICEMmGMSwQVpzkF"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="UG`[U$3_0K}:PCnWdN7y"> <field name="TEXT">offtime: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="gK{}F7N:?$FLcHumKGSD"> <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field> </block> </value> </block> </value> <value name="ADD17"> <block type="text_newline" id="jfKTL$`gU)~]mK(.q|l9"> <field name="Type">\n</field> </block> </value> <value name="ADD18"> <block type="text_join" id="|{:o[_0#lDt!rr++hzFw"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="OH5gl[1+!/]+TT+I+)]X"> <field name="TEXT">switches: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="{7JOz9JWX{|Kgb2i[]m}"> <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field> </block> </value> </block> </value> </block> </value> </block> </next> </block> </statement> </block> </statement> <statement name="ELSE"> <block type="debug" id="4w2|1F,M`I5e77zwa.ns"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="bbxou~4]2_z*wGe#{4[k"> <field name="TEXT">AutoLight ist deaktiviert</field> </shadow> </value> </block> </statement> <next> <block type="comment" id="hoxnMLgQ2aNN0m=5Y:}m"> <field name="COMMENT">AtHomeTimer</field> <next> <block type="controls_if" id="v*U[9UI_|4@c)yiirCvb"> <value name="IF0"> <block type="logic_compare" id="}W#E1zCXZitL.S|r_*u,"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id=",Nlb[/RysL/LlIrpQ+e."> <field name="ATTR">val</field> <field name="OID">0_userdata.0.GlobalVars.AtHome</field> </block> </value> <value name="B"> <block type="logic_boolean" id="sOIRl}w5*9@4|Cu}Qa?F"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="vcPx3~z~f}j@TgeL8)8S"> <field name="Severity">debug</field> <value name="TEXT"> <shadow type="text" id="{V%?2,E+`DP%Jt6u@jBz"> <field name="TEXT">Schalte OFF in 10 Minuten weil nicht zuhause</field> </shadow> </value> <next> <block type="comment" id="RVtp!r)ays=b{:K7RYxJ"> <field name="COMMENT">AtHomeTimer</field> <next> <block type="debug" id="jQU}W-zBlE`x1UT+%n.v"> <field name="Severity">debug</field> <value name="TEXT"> <shadow type="text" id="397}R%`ouk+n%Ab}WH%%"> <field name="TEXT">Schalte OFF weil nicht zuhause</field> </shadow> </value> <next> <block type="debug" id="zFy.s;7+hO@}w7+K1uY["> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="g1ueDh_2oKR+gkXL:9pO"> <field name="TEXT">Schalte Licht AN</field> </shadow> <block type="procedures_callreturn" id="~mNhEHA+,LT?rX%eZ2lR"> <mutation name="SetSwitchlist"> <arg name="switches"></arg> <arg name="TurnON"></arg> <arg name="OFFTime"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="_Yf;JY5.:8UL{r9*yAn;"> <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field> </block> </value> <value name="ARG1"> <block type="logic_boolean" id="f%n5w^9=kBCnrPPhJn;="> <field name="BOOL">FALSE</field> </block> </value> <value name="ARG2"> <block type="math_number" id="i_ImUcS(?61s*B~NN-39"> <field name="NUM">10</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <value name="RETURN"> <block type="text_join" id="!bwM/xMn9lV`jZFwfsa/"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="NjBm7Pn=DYJEAIm@_6UC"> <field name="TEXT">PIR Done: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="u_!p(H,3VMjs5mEvL+43"> <field name="VAR" id="IX/gU^R_Zpb]{vD5A]Sn">RoomName</field> </block> </value> </block> </value> </block> <block type="on_ext" id=";^LGVCUKOD;aGmWXc=c6" x="13" y="3188"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="4"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="field_oid" id="=Z_mw^?rB%bQC7u}kx|%"> <field name="oid">deconz.0.Sensors.40.presence</field> </shadow> <block type="field_oid" id="JsYO^Vgi0)-y|F+^oviC"> <field name="oid">0_userdata.0.GlobalVars.AtHome</field> </block> </value> <value name="OID1"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="field_oid" id="$nQiwk=`v3y=fQ]PvUN0"> <field name="oid">default</field> </shadow> <block type="field_oid" id="[}`A:Y9U/u;5q,+v,W48"> <field name="oid">deconz.0.Sensors.25.presence</field> </block> </value> <value name="OID2"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="field_oid" id="]e+nkTtwhknTJrrtFP4I"> <field name="oid">default</field> </shadow> <block type="field_oid" id="N#U0xQObgj/`[$L^lonm"> <field name="oid">deconz.0.Sensors.12.presence</field> </block> </value> <value name="OID3"> <shadow type="field_oid" id="O;xK`Y0:=Myj8klNmIBi"> <field name="oid">default</field> </shadow> <block type="field_oid" id="A{Zk{I]]+wwcj:MI]+He"> <field name="oid">0_userdata.0.GlobalVars.Wohnzimmer_TV</field> </block> </value> <statement name="STATEMENT"> <block type="debug" id="u8|~_n$bA:aWJ`UqCTFC"> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="ynfu|Z|NikvpCQ:1o:BB"> <field name="TEXT">test</field> </shadow> <block type="procedures_callreturn" id="nLv0b%CGK37Z)cY~zw/z"> <mutation name="PIROnOff"> <arg name="RoomName"></arg> <arg name="pir_01"></arg> <arg name="pir_02"></arg> <arg name="pir_lux_01"></arg> <arg name="pir_lux_02"></arg> <arg name="pir_lux_limit"></arg> <arg name="switches"></arg> <arg name="extraOFFswitches"></arg> <arg name="OFFTime"></arg> <arg name="KeepOn"></arg> <arg name="KeepOff"></arg> <arg name="IgnoreNightMode"></arg> </mutation> <value name="ARG0"> <block type="text" id="}I(7Bqqm)_X~_X|bEiB1"> <field name="TEXT">Wohnzimmer</field> </block> </value> <value name="ARG1"> <block type="field_oid" id="d`u(D,@Raq%;fP4CKEJt"> <field name="oid">deconz.0.Sensors.25.presence</field> </block> </value> <value name="ARG2"> <block type="field_oid" id="NUjj.[urXP,8St`J=il:"> <field name="oid">deconz.0.Sensors.12.presence</field> </block> </value> <value name="ARG3"> <block type="field_oid" id="c4R}~dbft8bbBgzDj3|r"> <field name="oid">deconz.0.Sensors.26.lux</field> </block> </value> <value name="ARG4"> <block type="field_oid" id="{^ndJH5O0Hu5[@t(aCqz"> <field name="oid">deconz.0.Sensors.11.lux</field> </block> </value> <value name="ARG5"> <block type="variables_get" id="vO{DatzV5%jA(Um]`XI*"> <field name="VAR" id="Z}*@ZQ],86inGv;ML!G/">GlobalLuxLimit</field> </block> </value> <value name="ARG6"> <block type="procedures_callreturn" id="4b:WqC9H[=9`.[Ojfj?}"> <mutation name="wz_select_device"></mutation> </block> </value> <value name="ARG7"> <block type="lists_create_with" id="c*D~`u7fuL5XaFK,!dJj"> <mutation items="7"></mutation> <value name="ADD0"> <block type="field_oid" id="l;tyX^aUS_sSz%qL*TA)"> <field name="oid">deconz.0.Lights.21.on</field> </block> </value> <value name="ADD1"> <block type="field_oid" id="t30:yg6P5=n3yIO$o^JK"> <field name="oid">deconz.0.Lights.22.on</field> </block> </value> <value name="ADD2"> <block type="field_oid" id="mTIp`Y(Qt[?)#9bwPzRW"> <field name="oid">deconz.0.Lights.25.on</field> </block> </value> <value name="ADD3"> <block type="field_oid" id="8ERU2+Cpj6jc128qe|Y!"> <field name="oid">deconz.0.Lights.26.on</field> </block> </value> <value name="ADD4"> <block type="field_oid" id="F.g)-!0lCT):XZgMp@y,"> <field name="oid">milight-smart-light.2.wz_tv.fullColor-1.on</field> </block> </value> <value name="ADD5"> <block type="field_oid" id="-Pi@+Lq]TB1.=9-_3Bdk"> <field name="oid">deconz.0.Lights.2.on</field> </block> </value> <value name="ADD6"> <block type="field_oid" id="#t5{77?jGUrm/b@71+d]"> <field name="oid">scene.0.Szene_pir-wohnzimmer</field> </block> </value> </block> </value> <value name="ARG8"> <block type="math_number" id="DpGu,O=HhqM~YNvwYd(q"> <field name="NUM">15</field> </block> </value> <value name="ARG9"> <block type="get_value_var" id="`0Sf$59Dvioli#0BigAu"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="clv1]niZbc4686`koi;*"> <field name="TEXT"></field> </shadow> <block type="field_oid" id="[aYgpU8$]POx,/._r.ZL"> <field name="oid">0_userdata.0.GlobalVars.Wohnzimmer_TV</field> </block> </value> </block> </value> <value name="ARG10"> <block type="logic_boolean" id="RwUt,vY#EAiFlDjIpHC1"> <field name="BOOL">FALSE</field> </block> </value> <value name="ARG11"> <block type="logic_boolean" id="hD~{MtehXnYitYJ:{oei"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> </block> </statement> </block> <block type="procedures_defreturn" id="97)riRpuhw.aXAyJOQ#[" x="13" y="3913"> <mutation> <arg name="switches" varid="xjjCO3x]~#p7S0:#%i0_"></arg> <arg name="TurnON" varid="N=.oocr,|f!EjH[T#m4W"></arg> <arg name="OFFTime" varid=".vDs7L59v=fy*rrUz[gY"></arg> </mutation> <field name="NAME">SetSwitchlist</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion âŠ</comment> <statement name="STACK"> <block type="controls_forEach" id="?W@B=92zUWf^!ER$H:2S"> <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field> <value name="LIST"> <block type="variables_get" id="cFsXd};PL_5F@w6(c(Qg"> <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field> </block> </value> <statement name="DO"> <block type="controls_if" id="~kwRL!VPw_s!Z|Lw:Y=t"> <mutation else="1"></mutation> <value name="IF0"> <block type="variables_get" id="~Hs{Nb8!2FayVhlmP{_o"> <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field> </block> </value> <statement name="DO0"> <block type="debug" id="gjY2qE}KLN:vNc$SoY~/"> <field name="Severity">log</field> <value name="TEXT"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="6Lv/kM);m|r--.+Hld*_"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="N7@;X%^/S.U5nHl*eN=T"> <mutation items="6"></mutation> <value name="ADD0"> <block type="text" id="yG%!Tu:2Cm3+)#s)HGga"> <field name="TEXT">Schalte: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="|Wz|g-AiGzZSF(sbV,7L"> <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field> </block> </value> <value name="ADD2"> <block type="text" id="gTBof0-WEUX0K|/%@NqH"> <field name="TEXT"> - </field> </block> </value> <value name="ADD3"> <block type="variables_get" id="SF|0p5(O[YcG%OBo}h3w"> <field name="VAR" id="N=.oocr,|f!EjH[T#m4W">TurnON</field> </block> </value> <value name="ADD4"> <block type="text" id=".y0Iqt1N6.gIv/P9fYSd"> <field name="TEXT"> - delay </field> </block> </value> <value name="ADD5"> <block type="variables_get" id="-3KJjwlYCU;SI:}WNZz@"> <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field> </block> </value> </block> </value> <next> <block type="control_ex" id="79VIhFd[8OR7W~)]+Q7u"> <field name="TYPE">false</field> <field name="CLEAR_RUNNING">TRUE</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="field_oid" id=",6QIA.:kmqHzLpOpp8{;"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="G:^~pH88w+vU!!SqMNx^"> <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field> </block> </value> <value name="VALUE"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="logic_boolean" id="M)y7lc35WCOB-sP@0.+Y"> <field name="BOOL">TRUE</field> </shadow> <block type="variables_get" id="CRtJGnM(7mlyCrjtAS#2"> <field name="VAR" id="N=.oocr,|f!EjH[T#m4W">TurnON</field> </block> </value> <value name="DELAY_MS"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="*6fVY^7+fvHLGB^6ICUb"> <field name="NUM">0</field> </shadow> <block type="math_arithmetic" id="pM[;2Up_AS8vj(_EDMK)"> <field name="OP">ADD</field> <value name="A"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="bVbb!f6+5,f}Wl`KX4^f"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="JrRlB#cNt~OPNxUEH.;#"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="G{^vO}H,^Q{6{Y#)%NQE"> <field name="NUM">10</field> </shadow> <block type="variables_get" id="bZmmlv;6v=s;zh!Gb/h0"> <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field> </block> </value> <value name="B"> <shadow type="math_number" id="``T4@SD7}ao:1:$~a5?R"> <field name="NUM">60000</field> </shadow> </value> </block> </value> <value name="B"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="*61~~OTr35.DVn~j@84c"> <field name="NUM">1</field> </shadow> <block type="math_random_int" id="Dvdm;BUT|h?pR6|d8Ncr"> <value name="FROM"> <shadow type="math_number" id="My|V/L|ec}ckrD)G)|2n"> <field name="NUM">1</field> </shadow> </value> <value name="TO"> <shadow type="math_number" id="xKoCsxqCSQp{q${^Y**t"> <field name="NUM">500</field> </shadow> </value> </block> </value> </block> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="debug" id="=.|w?9nf5~~PyKL5=g46"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="G=+l93Z8O{D|r+-TKizq"> <field name="TEXT">Switches Eintrag ist leer</field> </shadow> </value> </block> </statement> </block> </statement> </block> </statement> <value name="RETURN"> <block type="text" id="(U$(5asPxY/vxdWptKjo"> <field name="TEXT">SetSwitches</field> </block> </value> </block> <block type="procedures_defreturn" id="Ly=3A3kJj[%)$pL1Y*Js" x="13" y="4513"> <mutation> <arg name="switches" varid="xjjCO3x]~#p7S0:#%i0_"></arg> </mutation> <field name="NAME">GetSwitches</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion âŠ</comment> <statement name="STACK"> <block type="variables_set" id="XFx8yOAtiL4G[Z;-r39M"> <field name="VAR" id=":#q3xGH!O9R*~b!?qxmd">counter</field> <value name="VALUE"> <block type="math_number" id="A}w2Qz(.Sb}.d_=K[)kV"> <field name="NUM">0</field> </block> </value> <next> <block type="controls_forEach" id="OYbqZv/z,%U*6pycO0Ia"> <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field> <value name="LIST"> <block type="variables_get" id="?2SsKISMzWqd/!ldagRl"> <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field> </block> </value> <statement name="DO"> <block type="controls_if" id="*)}3??[G]V$)lT*Dc(kl"> <value name="IF0"> <block type="variables_get" id="qsq)yI{bGs5rs35sMFev"> <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field> </block> </value> <statement name="DO0"> <block type="controls_if" id="-Rxingu-2hBJ?hm)NC8r"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="%R@E-(.[4?QEQ(XUEkUU"> <field name="OP">EQ</field> <value name="A"> <block type="get_value_var" id="6RXvDhz[f3Nc+|--=VEN"> <field name="ATTR">val</field> <value name="OID"> <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="O:I4V1*pY/CJ6le4+IP@"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="5tn`VgHa5Ba+g^i3hn]1"> <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id="-l?E7{+i:c.,=!NAAvc*"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="math_change" id="sbUQ?-Q!Dkk~Ppqv{a_m"> <field name="VAR" id=":#q3xGH!O9R*~b!?qxmd">counter</field> <value name="DELTA"> <shadow type="math_number" id="cl$?.u]-:?xmJw8Ai!_Q"> <field name="NUM">1</field> </shadow> </value> </block> </statement> <statement name="ELSE"> <block type="variables_set" id="Ip0ZYg-1)*0N9c0Avxhp"> <field name="VAR" id=":#q3xGH!O9R*~b!?qxmd">counter</field> <value name="VALUE"> <block type="math_number" id=":]i@+YY1zf=2pmyk940O"> <field name="NUM">0</field> </block> </value> </block> </statement> </block> </statement> </block> </statement> <next> <block type="controls_if" id=",mB*mcs]MX,^99pPJUa{"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="|pnl;7.yklmYt**dQ(^0"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="}IuVQ4.8q2.^[k6ZDPEO"> <field name="VAR" id=":#q3xGH!O9R*~b!?qxmd">counter</field> </block> </value> <value name="B"> <block type="lists_length" id="}:5;_`YuLk6Hg3HVw[@d"> <value name="VALUE"> <block type="variables_get" id="e!:Q`NRUF#W.,-{8(^Oe"> <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="P9{2K[xAC7^JZaWZ;V~P"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="AD(k:Pz|uh5edFFT2Q*W"> <field name="TEXT">Switches sind AN</field> </shadow> </value> <next> <block type="variables_set" id="6QcH=2!04EY?p9o/ChzL"> <field name="VAR" id="UFl:*B!P.|vFu=[uU3T/">return</field> <value name="VALUE"> <block type="logic_boolean" id="NMtD{*YcoYw9zD@Z2WDp"> <field name="BOOL">TRUE</field> </block> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="debug" id="~CIg6id=8ds{FM[;#Udk"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="gE$ehZm~b8}1t7Kr6+9E"> <field name="TEXT">Switches sind AUS</field> </shadow> </value> <next> <block type="variables_set" id="3OFGY-djS_YMS$;~.+s]"> <field name="VAR" id="UFl:*B!P.|vFu=[uU3T/">return</field> <value name="VALUE"> <block type="logic_boolean" id="ym(,6;S:c{KTq-}6A2In"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> <value name="RETURN"> <block type="variables_get" id="F6:BVND*:t/WUU}QVqc3"> <field name="VAR" id="UFl:*B!P.|vFu=[uU3T/">return</field> </block> </value> </block> </xml>@Christoph1337 Fettschrift super đđœđđœ
-
@Christoph1337 Fettschrift super đđœđđœ
@ilovegym =)
Ich hoffe das hilft!
-
@Mic erstmal ein groĂes Kompliment! Solch ein Adapter ist ĂŒberfĂ€llig und wie du die Thematik umsetzt ist wirklich super! Danke dafĂŒr! Bin sehr gespannt und freue mich schon auf die nĂ€chsten Versionen. :-)
Ich nutze im Bad eine Yeelight Deckenlampe, die ich mit einem Bewegungsmelder ein und wieder ausschalte. Allerdings werden bei mir im Skript jedes Mal vorm Einschalten diverse Attribute gesetzt. In AbhĂ€ngigkeit der Astrozeit eine bestimmte Farbtemperatur und auĂerdem in AbhĂ€ngigkeit der Tageszeit, Wochentag und/oder Feiertag die Helligkeit, die Ausschaltverzögerung und der Lichtmodus (dunkles "Moonlight" oder normales Licht.)
Ich vermute, dass man das mit deinem Adapter auch umsetzen könnte, indem man mit ihm einfach einen Datenpunkt "Badlampe" ein und aus schaltet und dann sĂ€mtliche zusĂ€tzliche Logik (nĂ€mlich die Lampenattribute berechnen und die Lampe einschalten) ĂŒber ein eigenes Skript löst, welches bei Ănderung des "Badlampen"-Datenpunktes triggert. Das mĂŒsste gehen, oder?
Was dann aber noch nicht funktionieren wĂŒrde ist folgendes: Ich lasse die Lampe nicht sofort ausgehen, wenn fĂŒr einen bestimmten Zeitraum keine Bewegung mehr festgestelt wurde, sondern ich dimme sie erst fĂŒr 5 Sekunden runter. Wenn also dann noch jemand im Bad ist, kann man durch hektische Armbewegungen dafĂŒr sorgen, dass das Licht nicht ausgeht... ;-)
Ob man sowas mit dem Adapter hinbekommt, mĂŒsste man mal ausprobieren.Werde ich mir in den nĂ€chsten Tagen mal anschauen.
-
@Mic erstmal ein groĂes Kompliment! Solch ein Adapter ist ĂŒberfĂ€llig und wie du die Thematik umsetzt ist wirklich super! Danke dafĂŒr! Bin sehr gespannt und freue mich schon auf die nĂ€chsten Versionen. :-)
Ich nutze im Bad eine Yeelight Deckenlampe, die ich mit einem Bewegungsmelder ein und wieder ausschalte. Allerdings werden bei mir im Skript jedes Mal vorm Einschalten diverse Attribute gesetzt. In AbhĂ€ngigkeit der Astrozeit eine bestimmte Farbtemperatur und auĂerdem in AbhĂ€ngigkeit der Tageszeit, Wochentag und/oder Feiertag die Helligkeit, die Ausschaltverzögerung und der Lichtmodus (dunkles "Moonlight" oder normales Licht.)
Ich vermute, dass man das mit deinem Adapter auch umsetzen könnte, indem man mit ihm einfach einen Datenpunkt "Badlampe" ein und aus schaltet und dann sĂ€mtliche zusĂ€tzliche Logik (nĂ€mlich die Lampenattribute berechnen und die Lampe einschalten) ĂŒber ein eigenes Skript löst, welches bei Ănderung des "Badlampen"-Datenpunktes triggert. Das mĂŒsste gehen, oder?
Was dann aber noch nicht funktionieren wĂŒrde ist folgendes: Ich lasse die Lampe nicht sofort ausgehen, wenn fĂŒr einen bestimmten Zeitraum keine Bewegung mehr festgestelt wurde, sondern ich dimme sie erst fĂŒr 5 Sekunden runter. Wenn also dann noch jemand im Bad ist, kann man durch hektische Armbewegungen dafĂŒr sorgen, dass das Licht nicht ausgeht... ;-)
Ob man sowas mit dem Adapter hinbekommt, mĂŒsste man mal ausprobieren.Werde ich mir in den nĂ€chsten Tagen mal anschauen.
@MarkusMac Colle Idee mit dem hektischen winken und dimmen :D:D:D:D:D:D
-
-
@Mic, zu erst einmal vielen Dank fĂŒr die Entwicklung Deines Adapters, dieser ist ziemlich gut gelungen.
Ich habe ihn mal installiert und nach einigen "Stolperfallen" habe ich es tatsĂ€chlich geschafft meinen Rolladen mit einem Aqara Opple zu öffnen und zu schlieĂen. Um einen Rolladen zu steuern ist er sicherlich nicht wirklich konzipiert, aber es funktioniert.Folgende Fehler sind mir aufgefallen,
- beim öffnen der DropDown MenĂŒs sind diese nicht vollstĂ€ndig zu sehen und es erscheint rechts ein Scrollbalken, siehe Screenshot.
- um die Checkboxen in den DropDown MenĂŒs aktivieren zu können muss ich links neben die Checkbox klicken. Klicke ich direkt in die Checkbox wird diese nicht aktiviert, allerdings werden "speichern" und "Speichern und schliessen" wieder aktiv.
- im Log ist mir aufgefallen das dort die EintrÀge immer doppelt geschrieben werden, siehe Log.
Fragen, Anregungen und Verbesserungen,
- da Du den Adpater so gestaltet hast das immer ein Schedule angelegt werden muss, hier die Frage ob Du bei den Zeiten eine "immer" oder "ganztĂ€gig" Checkbox hinzufĂŒgen kannst, eventuell auch eine "TĂ€glich" Checkbox bei den Wochentagen.
- besteht die Möglichkeit unter "Target Devices" ein Toggle einzufĂŒgen, um mit einem Trigger der nur "true" kann einen Aktor von true auf false und wieder true schalten zu können. Dies wĂ€re fĂŒr meine Rolladensteuerung sehr praktisch und vielleicht auch fĂŒr andere Dinge. Und in diesem Zug auch das Delay herabsetzen fĂŒr das nochmalige betĂ€tigen des Triggers.
Vielen Dank, das wars wohl erstmal
2020-07-08 19:07:44.300 - info: smartcontrol.0 (10721) Trigger 'Rolladen terrassentĂŒr auf' activated for 'Rolladen TerrassentĂŒr auf'. Turned on 'Rolladen TerrassentĂŒr auf'. 2020-07-08 19:07:44.843 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'true' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:07:44.855 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'true' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:08:15.355 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:08:15.370 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:11:46.973 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:11:47.038 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true. 2020-07-08 19:16:47.016 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:16:47.023 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true. 2020-07-08 19:21:46.948 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:21:46.994 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true. 2020-07-08 19:26:47.060 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:26:47.070 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true. 2020-07-08 19:31:47.021 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:31:47.073 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true. 2020-07-08 19:36:46.918 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:36:46.943 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true. 2020-07-08 19:38:04.569 - info: smartcontrol.0 (10721) Trigger 'Rolladen terrassentĂŒr zu' activated for 'Rolladen TerrassentĂŒr zu'. Turned on 'Rolladen TerrassentĂŒr zu'. 2020-07-08 19:38:05.147 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'true' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true. 2020-07-08 19:38:05.169 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'true' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true. 2020-07-08 19:38:10.587 - info: smartcontrol.0 (10721) Trigger 'Rolladen terrassentĂŒr zu' activated for 'Rolladen TerrassentĂŒr zu'. However, devices 'Rolladen TerrassentĂŒr zu' not turned on as these are already on. 2020-07-08 19:38:16.371 - info: smartcontrol.0 (10721) Trigger 'Rolladen terrassentĂŒr auf' activated for 'Rolladen TerrassentĂŒr auf'. Turned on 'Rolladen TerrassentĂŒr auf'. 2020-07-08 19:38:16.474 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true. 2020-07-08 19:38:16.492 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true. 2020-07-08 19:38:17.048 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'true' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:38:17.089 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'true' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:38:28.938 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:38:28.945 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:41:46.966 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:41:46.972 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true. 2020-07-08 19:46:46.885 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:46:46.893 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true. 2020-07-08 19:51:46.997 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:51:47.043 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true. 2020-07-08 19:56:47.010 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 19:56:47.017 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true. 2020-07-08 20:01:47.006 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 20:01:47.013 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true. 2020-07-08 20:06:46.909 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 20:06:46.913 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true. 2020-07-08 20:11:46.931 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 20:11:46.941 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true. 2020-07-08 20:16:46.952 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER1' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr auf' set to true. 2020-07-08 20:16:47.001 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie TerrassentĂŒr.POWER2' changed to 'false' -> 'targetDevices.Rolladen TerrassentĂŒr zu' set to true.
-
Kann man mit dem Adapter SmartControl auf einen Taster steuern? Also Taster benutzen -> Licht an, Taster nochmal benutzen -> Licht aus?
In die Wunschliste aufgenommen.
Ich hĂ€nge dir mal meine Blockly Funktion dafĂŒr an.
Danke, aber da bin ich leider raus, ich entwickle nicht mit Blockly und ist mir viel zu simplifiziert, ich brauche sauberes JavaScript ;)
Zu den "globalen Datenpunkten" (true/false): Das kannst du dann hier einpflegen:

RĂ€ume pflegst du in Zones:

Was mir bei Blockly am Anfang sehr viele Probleme gemacht hat war, dass die Verwendung von Timeouts in einer Funktion beim Aufruf von mehreren RĂ€umen ĂŒberschrieben werden.
Der Adapter macht nicht nur einen Timer, sondern viele pro Szenario ;)
Das mĂŒsste gehen, oder?
Sollte es. Muss dann auch getestet werden. Ich kann und werde hier ĂŒbrigens nicht jeden individuellen Anwenderwunsch abbilden. Sondern versuche zu sammeln, und wo die meisten "Schmerzen" sind, wird als erstes eingebunden ;)
Ich lasse die Lampe nicht sofort ausgehen, wenn fĂŒr einen bestimmten Zeitraum keine Bewegung mehr festgestelt wurde, sondern ich dimme sie erst fĂŒr 5 Sekunden runter.
Klingt erst mal sehr speziell, die wenigsten Anwender haben in jedem Raum Dimmer. Bitte melde dich mit diesem Request noch mal in einigen Wochen nach Veröffentlichung des Adapters. Ich möchte erst mal nur möglichst generisch abbilden. AuĂerdem nutze ich selbst keine Dimmer, sondern steuere diese bei Bedarf mit JavaScript-Adapter....
Aber Use Case habe ich verstanden.https://github.com/ioBroker/AdapterRequests/issues/439#issuecomment-655728824 ;)
beim öffnen der DropDown MenĂŒs sind diese nicht vollstĂ€ndig zu sehen und es erscheint rechts ein Scrollbalken, siehe Screenshot.
Kann ich nicht nachvollziehen, aber hab hier lokal auch eine neuere Version und fixe, wie ich dazu komme. Upload zu Github mache ich dann erst spÀter.
um die Checkboxen in den DropDown MenĂŒs aktivieren zu können muss ich links neben die Checkbox klicken. Klicke ich direkt in die Checkbox wird diese nicht aktiviert, allerdings werden "speichern" und "Speichern und schliessen" wieder aktiv.
Liegt am ioBroker Admin, und nicht diesem Adapter. https://github.com/ioBroker/ioBroker.admin/issues/590
Problem wurde behoben und kommt mit dem nĂ€chsten ioBroker Adapter Admin release.besteht die Möglichkeit unter "Target Devices" ein Toggle einzufĂŒgen, um mit einem Trigger der nur "true" kann einen Aktor von true auf false und wieder true schalten zu können.
Siehe oben, ist in die zukĂŒnftige Wunschliste aufgenommen.
-
@Mic, vielen Dank fĂŒr Deine schnelle RĂŒckmeldung. Den Beitrag von @EdgarM habe ich wohl ĂŒbersehen

@MichMein sagte in Planung neuer Adapter: Smart Control:
- da Du den Adpater so gestaltet hast das immer ein Schedule angelegt werden muss, hier die Frage ob Du bei den Zeiten eine "immer" oder "ganztĂ€gig" Checkbox hinzufĂŒgen kannst, eventuell auch eine "TĂ€glich" Checkbox bei den Wochentagen.
Wie sieht es damit aus?
-
Kann man mit dem Adapter SmartControl auf einen Taster steuern? Also Taster benutzen -> Licht an, Taster nochmal benutzen -> Licht aus?
In die Wunschliste aufgenommen.
Ich hĂ€nge dir mal meine Blockly Funktion dafĂŒr an.
Danke, aber da bin ich leider raus, ich entwickle nicht mit Blockly und ist mir viel zu simplifiziert, ich brauche sauberes JavaScript ;)
Zu den "globalen Datenpunkten" (true/false): Das kannst du dann hier einpflegen:

RĂ€ume pflegst du in Zones:

Was mir bei Blockly am Anfang sehr viele Probleme gemacht hat war, dass die Verwendung von Timeouts in einer Funktion beim Aufruf von mehreren RĂ€umen ĂŒberschrieben werden.
Der Adapter macht nicht nur einen Timer, sondern viele pro Szenario ;)
Das mĂŒsste gehen, oder?
Sollte es. Muss dann auch getestet werden. Ich kann und werde hier ĂŒbrigens nicht jeden individuellen Anwenderwunsch abbilden. Sondern versuche zu sammeln, und wo die meisten "Schmerzen" sind, wird als erstes eingebunden ;)
Ich lasse die Lampe nicht sofort ausgehen, wenn fĂŒr einen bestimmten Zeitraum keine Bewegung mehr festgestelt wurde, sondern ich dimme sie erst fĂŒr 5 Sekunden runter.
Klingt erst mal sehr speziell, die wenigsten Anwender haben in jedem Raum Dimmer. Bitte melde dich mit diesem Request noch mal in einigen Wochen nach Veröffentlichung des Adapters. Ich möchte erst mal nur möglichst generisch abbilden. AuĂerdem nutze ich selbst keine Dimmer, sondern steuere diese bei Bedarf mit JavaScript-Adapter....
Aber Use Case habe ich verstanden.https://github.com/ioBroker/AdapterRequests/issues/439#issuecomment-655728824 ;)
beim öffnen der DropDown MenĂŒs sind diese nicht vollstĂ€ndig zu sehen und es erscheint rechts ein Scrollbalken, siehe Screenshot.
Kann ich nicht nachvollziehen, aber hab hier lokal auch eine neuere Version und fixe, wie ich dazu komme. Upload zu Github mache ich dann erst spÀter.
um die Checkboxen in den DropDown MenĂŒs aktivieren zu können muss ich links neben die Checkbox klicken. Klicke ich direkt in die Checkbox wird diese nicht aktiviert, allerdings werden "speichern" und "Speichern und schliessen" wieder aktiv.
Liegt am ioBroker Admin, und nicht diesem Adapter. https://github.com/ioBroker/ioBroker.admin/issues/590
Problem wurde behoben und kommt mit dem nĂ€chsten ioBroker Adapter Admin release.besteht die Möglichkeit unter "Target Devices" ein Toggle einzufĂŒgen, um mit einem Trigger der nur "true" kann einen Aktor von true auf false und wieder true schalten zu können.
Siehe oben, ist in die zukĂŒnftige Wunschliste aufgenommen.
@Mic hehe. Mit dem blockly ging es auch nicht direkt um den Code sondern die Logik. Ich dachte das hilft vielleicht fĂŒr die eine oder andere Idee :)
-
@Mic ich hĂ€tte noch eine feature Idee. Wenn man schon so einen Adapter hat, wĂ€re es cool wenn dieser automatisch eine HTML Tabelle generiert wo alle Schalter mit Zuordnung enthalten sind. Das wĂ€re gerade fĂŒr den Start fĂŒr viele einfacher da man sich nicht in vis groĂartig einarbeiten muss. Am besten sogar responsive fĂŒr verschiedene Auflösungen
-
@Mic said in Planung neuer Adapter: Smart Control:
Ich verstehe deinen Use-Case nicht ganz, also z.B.
0 ms: Bewegung löst aus (zigbee.0.XXX.occupancy -> true). Derzeitige Helligkeit (lt. zigbee.0.XXX.illuminance z.B. 30)
5 ms: Der Adapter liest die Helligkeit (30) und stellt fest, sie ist unterhalb von z.B. 60 --> also soll geschaltet werden.
10 ms: Licht wird eingeschaltet.
500 ms: Helligkeit (zigbee.0.XXX.illuminance) ist jetzt 500WĂŒsste jetzt nicht, warum man hier einen Timestamp zum Vergleich brĂ€uchte? Helligkeit wird ja ermittelt, bevor geschaltet wird, daher ist doch die Verzögerung hier egal.
Der Aqara Sensor aktualisiert Lux-Wert nur wenn eine Bewegung erkannt wird. Mein Problem ist, dass das Script (in meinem Fall) nicht mit dem aktuellen Helligkeitswert arbeitet. Es wartet ja nicht, bis dieser aktualisiert wird, sondern prĂŒft einfach nur. Wenn der Lux-Datenpunkt aber erst nach dieser PrĂŒfung mit dem aktuellen Wert beschrieben wird (ist bei mir so, denn ich benutzte ein eigenes Script zum Beschreiben der Datenpunkte, die Werte werden aus einem Json Objekt geparst, welches ich ĂŒber mqtt empfange. Dieses Objekt ist so aufgebaut, dass Lux-Wert als letztes Element vorkommt) Die Zeitverzögerung zwischen Beschreiben von Occupancy und Lux habe ich nicht gemessen, bin mir aber ziemlich sicher, dass das aquara-motion-control Script die PrĂŒfung schneller ausfĂŒhrt...
Ich hoffe, ich habe mein Problem ausfĂŒhrlich beschrieben.
Ich könnte meinen Parser auch so abĂ€ndern, dass der Lux-Datenpunkt vor dem Occupancy beschrieben wird, finde aber dass eine Timestamp PrĂŒfung hier sinnvoll ist. Es wird bestimmt noch Leute mit Ă€hnlichen Timing Problemen geben...Viele GrĂŒĂe
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen BeitrĂ€ge zu scrollen? Wenn du dich fĂŒr ein Konto anmeldest, kommst du immer genau dorthin zurĂŒck, wo du zuvor warst, und kannst dich ĂŒber neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und BeitrĂ€ge positiv bewerten, um anderen Community-Mitgliedern deine WertschĂ€tzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden đ
Registrieren Anmelden