Hallo,
ich habe bei mir ein Rollo auf einen Shelly 2.5 im Shuttermode umgestellt. Lässt sich auch hoch- und runterfahren. Mittels Script setze ich in RaspberryMatic auf einem CuxD-Gerät die Zeiten für das Hoch- und Herunterfahren der Rollläden. Für den einen Rollladen, der mit dem Shelly 2.5 läuft, habe ich nun ein Blockly gebaut, damit der Rollladen ebenfalls zur gleichen Zeit wie die anderen fährt. Hintergrund ist, dass der Homematic-Aktor ständig Kommunikationsstörungen hatte (eventuell C26 Problem). Daher teste ich jetzt den Shelly 2.5. Perspektivisch sollen dann alle Rollos umgebaut werden. Nun zu meinem Problem.
Die Zeiten für Hoch- und Herunterfahren sind in einem Datenpunkt des CuxD-Gerätes ersichtlich:
Das zugehörige Script habe ich jetzt wie folgt erstellt:
Läuft also jede Minute, um täglich zwei Aktionen zu starten. Kann mir da jemand helfen, das zu optimieren oder ist das so ok? Das Script läuft ja jede Minute. Sollte ich das vielleicht auf die Zeit zwischen 06.00 Uhr und 08.30 Uhr und 16.00 Uhr bis 20.30 Uhr eingrenzen? Dann würde es nur in den genannten Intervallen alle Minute laufen. Oder ginge auch eine Übernahme der CuXD-Zeiten als Trigger? Danke für Eure Hilfe.
Blockly-Export
Spoiler
<block xmlns="https://developers.google.com/blockly/xml" type="schedule" id="CvobSK]AYMwL89#RPn?T" x="63" y="38">
<field name="SCHEDULE">* * * * *</field>
<statement name="STATEMENT">
<block type="controls_if" id=".oi?L?MZ#XS3M:!Em#.m">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="LN9?9BAf4rHZ+;l1R*rY">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="fVtlH~=td2#g5YW%gCY7">
<field name="ATTR">val</field>
<field name="OID">hm-rpc.0.CUX2800003.2.TIMER_SET</field>
</block>
</value>
<value name="B">
<block type="time_get" id="QAM.au~rqfM%EH.re]PP">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">hh:mm:ss</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="+XV|=$`w!6I(/Zw5GSB@">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">shelly.0.SHSW-25#8CAAB55D81E3#1.Shutter.Close</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="U1PFWFBmCLG`=PD3q}@J">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="control" id="GwVmKcH?Yg+KVNlMKlf@">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
<field name="OID">shelly.0.SHSW-25#8CAAB55D81E3#1.Shutter.Close</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">30</field>
<field name="UNIT">sec</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="}obw.2v?FCRcY$6$3TOw">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="debug" id="]:#/xp-aP!Lq9.FbmVy]">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="nQg:dkI/^(xp0]R{T/?:">
<field name="TEXT">Esszimmer groß heruntergefahren</field>
</shadow>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="1z%T?K;MVFd#Ig#/v@XG">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="kk}k7P7_kc=J]_aHu1rf">
<field name="ATTR">val</field>
<field name="OID">hm-rpc.0.CUX2800003.12.TIMER_SET</field>
</block>
</value>
<value name="B">
<block type="time_get" id="?3:OA}$^5hJ--xS;#KGz">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">hh:mm:ss</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="control" id="-J$ydNEV#8h9X,2.0|tj">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">shelly.0.SHSW-25#8CAAB55D81E3#1.Shutter.Open</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="zB{t:9N/bN}kW3X#s]rV">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="control" id="lCZvEQz*`-nAl@h,F(t`">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
<field name="OID">shelly.0.SHSW-25#8CAAB55D81E3#1.Shutter.Open</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">30</field>
<field name="UNIT">sec</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="PlcCosk/k$x`C~7-6xYj">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="debug" id="zPBrew2A*F5NSk(1v^K9">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="FOF?]~QH=@sLretORDn)">
<field name="TEXT">Esszimmer groß hochgefahren</field>
</shadow>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
<block xmlns="https://developers.google.com/blockly/xml" type="schedule" id="CvobSK]AYMwL89#RPn?T" x="63" y="38">
<field name="SCHEDULE">* * * * *</field>
<statement name="STATEMENT">
<block type="controls_if" id=".oi?L?MZ#XS3M:!Em#.m">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="LN9?9BAf4rHZ+;l1R*rY">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="fVtlH~=td2#g5YW%gCY7">
<field name="ATTR">val</field>
<field name="OID">hm-rpc.0.CUX2800003.2.TIMER_SET</field>
</block>
</value>
<value name="B">
<block type="time_get" id="QAM.au~rqfM%EH.re]PP">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">hh:mm:ss</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="+XV|=$`w!6I(/Zw5GSB@">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">shelly.0.SHSW-25#8CAAB55D81E3#1.Shutter.Close</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="U1PFWFBmCLG`=PD3q}@J">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="control" id="GwVmKcH?Yg+KVNlMKlf@">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
<field name="OID">shelly.0.SHSW-25#8CAAB55D81E3#1.Shutter.Close</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">30</field>
<field name="UNIT">sec</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="}obw.2v?FCRcY$6$3TOw">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="debug" id="]:#/xp-aP!Lq9.FbmVy]">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="nQg:dkI/^(xp0]R{T/?:">
<field name="TEXT">Esszimmer groß heruntergefahren</field>
</shadow>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="1z%T?K;MVFd#Ig#/v@XG">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="kk}k7P7_kc=J]_aHu1rf">
<field name="ATTR">val</field>
<field name="OID">hm-rpc.0.CUX2800003.12.TIMER_SET</field>
</block>
</value>
<value name="B">
<block type="time_get" id="?3:OA}$^5hJ--xS;#KGz">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">hh:mm:ss</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="control" id="-J$ydNEV#8h9X,2.0|tj">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">shelly.0.SHSW-25#8CAAB55D81E3#1.Shutter.Open</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="zB{t:9N/bN}kW3X#s]rV">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="control" id="lCZvEQz*`-nAl@h,F(t`">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
<field name="OID">shelly.0.SHSW-25#8CAAB55D81E3#1.Shutter.Open</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">30</field>
<field name="UNIT">sec</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="PlcCosk/k$x`C~7-6xYj">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="debug" id="zPBrew2A*F5NSk(1v^K9">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="FOF?]~QH=@sLretORDn)">
<field name="TEXT">Esszimmer groß hochgefahren</field>
</shadow>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>