- Home
- Deutsch
- Skripten / Logik
- Blockly
- Rollos runterfahren über Lichtsensor
Rollos runterfahren über Lichtsensor
-
-
@Audidriver leg noch eine Variable an die beim Wert kleiner 3 Lux Sonnenuntergang auf True geht, und wenn beispielsweise der Wert wieder über 50 Lux geht heißt bei Sonnenaufgang wieder auf false, so schließt du mehrfaches triggern aus.
-
@Homer-J ok danke, dann muss ich mal kucken ob ich da was hin bekomm oder nee ähnliche Vorlage finde
-
@Audidriver
Du kannst auch den Adapter shuttercontrol nehmen. Der hat sehr viele Funktionen ... unter anderem auch deine Gewünschte -
@simatec Das muss ich mir auch mal Anschauen Danke evtl geht es damit leichter
-
@Audidriver welchen Sensor verwendest du?
-
@uSMr ich hab einen von Homematic.
Hab es aber noch nicht umgesetzt lass es über Temperatur grad laufen anstatt Lux
-
@Audidriver
ein zusätzlich UND Abfrage ob schon unten sollte schon vollkommen reichen -
@Audidriver Hi ich packe Dir mal mein Beschattungsskript hier rein. Vielleicht kannst Du Dir davon das ein oder andere ja abgucken. Das funktioniert bei mir wirklich sehr gut.
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="beschatten">beschatten</variable> <variable id="PEQ$[OwlwZpSJ?{bJ~^X">level_beschattung</variable> </variables> <block type="on_ext" id="BvAj%(0/zG^gpEa1aQ38" x="-2612" y="-1037"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">gt</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="Zk|+N;RG^@I;YvJs38$B"> <field name="oid">hm-rpc.0.0017D8A990A79C.1.ACTUAL_TEMPERATURE</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="q|p`,G(dAS0}s^#~.OD0"> <value name="IF0"> <block type="logic_operation" id="ff^A[g`Go7=3OnUN^3#:" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="time_compare_ex" id=",XCRGUZQG_y6c0`xG-gt"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation> <field name="USE_ACTUAL_TIME">TRUE</field> <field name="OPTION">between</field> <value name="START_TIME"> <shadow type="text" id="z?5cO%cOrCe[CLum=s9N"> <field name="TEXT">7:30</field> </shadow> </value> <value name="END_TIME"> <shadow type="text" id="K3*r.y/*du)N{/{x[T0A"> <field name="TEXT">14:00</field> </shadow> </value> </block> </value> <value name="B"> <block type="logic_operation" id="vJcK3|H2stpbJ6T-#{J1" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="I[3R(+R:$2nzBW4y0l+/"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="_0DhFV^|zDaxezXwOG[:"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.001098A98B1B6D.1.STATE</field> </block> </value> <value name="B"> <block type="math_number" id="n*9+Cd*CPZxZ4LhCbQZ~"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="`~0uXbL6JCqEnBBn[TEe"> <field name="OP">GT</field> <value name="A"> <block type="get_value" id="Nd.0x.r2|yxiz2h60Im?"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.0017D8A990A79C.1.ILLUMINATION</field> </block> </value> <value name="B"> <block type="math_number" id="ebz9E-~{7-f@@gwVbsV9"> <field name="NUM">4300</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="4IS2#cgnf5TB_Ea9L#2v"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_operation" id="XR|[+joMpGcW9Q@pU?S1" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id=":PTGh06_SoFW@|w[H~JO"> <field name="OP">GT</field> <value name="A"> <block type="get_value" id=",__,zn99f?u?l40!,-jU"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.001118A995071C.3.LEVEL</field> </block> </value> <value name="B"> <block type="math_number" id="+ukms}#6#};r.{-TG(NM"> <field name="NUM">55</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="}pb2cAdWMrel9B(@7pn4"> <field name="OP">GTE</field> <value name="A"> <block type="get_value" id="(!fzV57gWV%b{oraA:CV"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.0017D8A990A79C.1.ACTUAL_TEMPERATURE</field> </block> </value> <value name="B"> <block type="math_number" id="33M[HDy%aa.k3]+1C.9-"> <field name="NUM">24</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="%Bzf7e+H~uW8|Z4HgF7_"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hm-rpc.0.001118A995071C.4.LEVEL</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="2E~|*}e80]$cKE?gHv@b"> <field name="NUM">50</field> </block> </value> <next> <block type="variables_set" id="UG0%]7}TV0.aQFb-keU)"> <field name="VAR" id="PEQ$[OwlwZpSJ?{bJ~^X">level_beschattung</field> <value name="VALUE"> <block type="math_number" id="aa|d`}5Nvp96z6SDDa3+"> <field name="NUM">50</field> </block> </value> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_operation" id="M(YWh!!J;c=A9cXhm^Zc" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="[3`BjI]Yh!AH1)`OAD2R"> <field name="OP">GT</field> <value name="A"> <block type="get_value" id="^?EKlLzMK(~!`DaQ+-~u"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.001118A995071C.3.LEVEL</field> </block> </value> <value name="B"> <block type="math_number" id="OYKc6P0vL;k$g=Zv@OR8"> <field name="NUM">25</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="J*kZR[szBqeNKGbC+gWg"> <field name="OP">GTE</field> <value name="A"> <block type="get_value" id="}v{,.(#(IWwSEKrgw.8t"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.0017D8A990A79C.1.ACTUAL_TEMPERATURE</field> </block> </value> <value name="B"> <block type="math_number" id="OZ1jkoz?Wg5]fG6$ahmy"> <field name="NUM">29</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="7m3N?m6oePa5hzr)[{l{"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hm-rpc.0.001118A995071C.4.LEVEL</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="XrUtgPB{@ym/F.xvLOuF"> <field name="NUM">20</field> </block> </value> <next> <block type="variables_set" id="+@ZMZe0CnUhMQAtYFq;|"> <field name="VAR" id="PEQ$[OwlwZpSJ?{bJ~^X">level_beschattung</field> <value name="VALUE"> <block type="math_number" id="6j!2(#lg![hJ.8`d(6cj"> <field name="NUM">20</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </statement> <next> <block type="on_ext" id="HBy]48R8*n,lz@k{-G7A"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="`_+$E^AKlI(dr7H#A:s("> <field name="oid">hm-rpc.0.001098A98B1B6D.1.STATE</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="J?vfd^hYz5@(+eoQLWr+"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_operation" id="gsUolIQ7LU[ns9Vh,30+" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="H{GeV8kSt_#43[,3?N;v"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="41q4;|Pt+As(9.kCt4N)"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.001098A98B1B6D.1.STATE</field> </block> </value> <value name="B"> <block type="math_number" id="1r3BIKyaWqYxu#W-c/NY"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="m*{S$wke=+5TPXCS}T:l" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="%QTqb$Dc/-G8[Qfc?ngy"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="B0$1:V@wmg8A)b5?EVbI"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.statusRollade</field> </block> </value> <value name="B"> <block type="math_number" id="QAApc#BHwcd4V$Z$28=T"> <field name="NUM">1</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="+kC,Qp(t.?o)E=;0g;GW" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="]BsJ:z.W$wV!Ox+Pi!hP"> <field name="OP">NEQ</field> <value name="A"> <block type="variables_get" id="lwsbrgUtH}qy(o+#9731"> <field name="VAR" id="PEQ$[OwlwZpSJ?{bJ~^X">level_beschattung</field> </block> </value> <value name="B"> <block type="math_number" id="dUM5]P1r$PGAp`Y-z=qj"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="time_compare_ex" id="L+8=j]tv-fgYmEyZoP@:"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="false" actual_time="true"></mutation> <field name="USE_ACTUAL_TIME">TRUE</field> <field name="OPTION"><</field> <value name="START_TIME"> <shadow type="text" id="w.38Vp6YVquKxP!=SUyN"> <field name="TEXT">14:00</field> </shadow> </value> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_settimeout" id="GJ0HzulMLIUqxUEj$^B*"> <field name="NAME">beschatten</field> <field name="DELAY">30</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="control" id="^6GdtXy^fz@r-/I8Dq{A"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hm-rpc.0.001118A995071C.4.LEVEL</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="/k-aag@2b_eA)*J_WP{L"> <field name="VAR" id="PEQ$[OwlwZpSJ?{bJ~^X">level_beschattung</field> </block> </value> </block> </statement> </block> </statement> <value name="IF1"> <block type="logic_operation" id="!WcCA4*X{pIg=3Qnce2G" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="_*IUf#rqz^=$0EIt-B~X"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="~1q]9!Aok6lf)YgvXDA}"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.001098A98B1B6D.1.STATE</field> </block> </value> <value name="B"> <block type="math_number" id="Q+eF;Hdq:_|}hA~L_gcq"> <field name="NUM">1</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="9XSS+AimKUf#~-JhbHs_" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="5@aV8e%[dP%+DGGuLgFv"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="m)jk{6V)S7;=5Fcjdhec"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.statusRollade</field> </block> </value> <value name="B"> <block type="math_number" id="N1LJQc~VLZXaE?)K%iz}"> <field name="NUM">2</field> </block> </value> </block> </value> <value name="B"> <block type="time_compare_ex" id="(2Q^j3OSKfy(i_Q+X/1)"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="false" actual_time="true"></mutation> <field name="USE_ACTUAL_TIME">TRUE</field> <field name="OPTION"><</field> <value name="START_TIME"> <shadow type="text" id="K[Cncjsp-na63OF}B+eO"> <field name="TEXT">14:00</field> </shadow> </value> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="AnONmCR,8h@kr]JfwTdL"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hm-rpc.0.001118A995071C.4.LEVEL</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="1VJ3e[I~$nX*R]cQ=8~G"> <field name="NUM">100</field> </block> </value> </block> </statement> </block> </statement> <next> <block type="schedule" id="T?#r/rfW;w[oC4JVdl}@"> <field name="SCHEDULE">30 14 * 3-10 *</field> <statement name="STATEMENT"> <block type="controls_if" id="M|3|UEuX+{h_oQC8%.?#"> <value name="IF0"> <block type="logic_compare" id="g-GP;xqR~Mns7LC_ki^S"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="N.sy?=PlBeA(W%)8H?%!"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.statusRollade</field> </block> </value> <value name="B"> <block type="math_number" id="z7=mj#i=p?k(|22)J(R#"> <field name="NUM">2</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="M#A8WS]cA.9g9KkkFdO["> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hm-rpc.0.001118A995071C.4.LEVEL</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="fW_lBO^mQ%1mFgOSF@[T"> <field name="NUM">100</field> </block> </value> </block> </statement> <next> <block type="variables_set" id="yAn,L9Wf47v^[?$K/Jh-"> <field name="VAR" id="PEQ$[OwlwZpSJ?{bJ~^X">level_beschattung</field> <value name="VALUE"> <block type="math_number" id="-2Hx]Y/FhI?BoP?4ZJN`"> <field name="NUM">0</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </xml>
Mein manueller DP statusRollade gibt an, ob das Teil offen (=1), geschlossen (=0) oder beschattet (=2) ist.
Diesen Datenpunkt steuere ich einfach über ein zweites Skript separat.
-
@buggybeast Danke Werd ich mir mal in Ruhe ansehen und probieren