Compare commits

...

40 Commits

Author SHA1 Message Date
e19c902780 Merge pull request 'testing' (#129) from testing into main
Reviewed-on: #129
2024-10-12 07:11:29 +00:00
757a19bdb5 Merge pull request 'dev' (#128) from dev into testing
Reviewed-on: #128
2024-10-12 05:59:59 +00:00
52930d9a07 Merge pull request 'patch-remove-eperimental' (#127) from patch-remove-eperimental into dev
Reviewed-on: #127
2024-10-12 05:59:27 +00:00
e1592b8b7d docs: Changelog 2024-10-12 07:40:57 +02:00
7eb1079458 fix: remove experimental features
change copyright
2024-10-12 07:40:39 +02:00
ceecbb063a Merge pull request 'testing' (#123) from testing into main
Reviewed-on: #123
2023-01-03 07:50:14 +01:00
49b0ff17fa Merge pull request 'dev' (#122) from dev into testing
Reviewed-on: #122
2023-01-03 07:48:55 +01:00
ae5057fbc5 Merge pull request 'patch-adv' (#121) from patch-adv into dev
Reviewed-on: #121
2022-12-20 14:20:57 +01:00
9cd0d364b4 change Copyright text
new year range
2022-12-20 14:17:08 +01:00
f216e1b308 Merge branch 'dev' of git.cooltux.net:FHEM/mod-AutoShuttersControl into dev 2022-12-20 13:56:59 +01:00
6f137256e0 Merge pull request 'fix selfdefense' (#120) from patch-selfdefense into dev
Reviewed-on: #120
2022-12-20 13:55:47 +01:00
cc5ef41e21 fix selfdefense
change selfdefense condition in SunRiseShuttersAfterTimerFn
2022-12-15 09:56:26 +01:00
587d4e4316 Merge branch 'dev' of https://github.com/fhem/AutoShuttersControl into dev 2022-11-17 10:13:20 +01:00
Marko Oldenburg
f517b72f23
Merge pull request #97 from riedel2/patch-1
Update 73_AutoShuttersControl.pm
2022-11-05 23:18:48 +01:00
riedel2
ad5cbaac12
Update 73_AutoShuttersControl.pm
HORIZON option not yet added to german help
2022-11-05 21:52:39 +01:00
8da3b13bcc Merge pull request 'testing' (#119) from testing into main
Reviewed-on: #119
2022-08-30 18:20:26 +02:00
c09edf5496 Merge pull request 'dev' (#118) from dev into testing
Reviewed-on: #118
2022-08-30 18:20:03 +02:00
cd1c2c104a Merge pull request 'closes: #116' (#117) from patch-cant_locate_object_method into dev
Reviewed-on: #117
2022-08-30 18:13:21 +02:00
51256c1ed9 closes: #116
[Ticket: #116]
2022-08-30 18:12:01 +02:00
c0a7bfa6df Merge pull request 'patch-CommandRef' (#115) from patch-CommandRef into dev
Reviewed-on: #115
2022-08-29 13:31:17 +02:00
403936fe73 fix CommandRef ASC_Up and ASC_Down entry 2022-08-29 13:30:37 +02:00
5095c65d80 Merge pull request 'main' (#113) from main into testing
Reviewed-on: #113
2022-08-29 10:17:58 +02:00
0bd8d6273f Merge pull request 'dev' (#112) from dev into main
Reviewed-on: #112
2022-08-29 10:09:12 +02:00
c3b61def25 Merge pull request 'fix is in external trigger and shading is aktive' (#111) from patch-externalTriggerAndShading into dev
Reviewed-on: #111
2022-08-29 10:08:01 +02:00
9c096902e8 Merge branch 'dev' into patch-externalTriggerAndShading 2022-08-29 10:07:37 +02:00
6dfc92c35e Merge pull request 'fix little typo in ASC_WindParameter' (#110) from patch-Commandref into dev
Reviewed-on: #110
2022-08-29 10:00:58 +02:00
9994af6ca2 fix is in external trigger and shading is aktive
[Ticket: X]
2022-08-29 10:00:01 +02:00
eb85a74a07 fix little typo in ASC_WindParameter
[Ticket: no]
2022-08-29 09:43:06 +02:00
358c760b45 Merge pull request 'Change WindUnprotectionFn if ShuttersPlace awning' (#109) from patch-windIsDay into dev
Reviewed-on: #109
2022-08-29 09:27:13 +02:00
34a6a88401 Change WindUnprotectionFn if ShuttersPlace awning
[Ticket: X]
2022-08-29 09:25:34 +02:00
bb80fb5d3a Merge pull request 'fix ASC_Shading_BetweenTheTime Commandref entry' (#108) from patch-IsInTimeFn into dev
Reviewed-on: #108
2022-08-29 09:08:34 +02:00
2907e19d3b fix ASC_Shading_BetweenTheTime Commandref entry
[Ticket: no]
2022-08-29 08:45:51 +02:00
ae86468077 Merge pull request 'dev' (#107) from dev into main
Reviewed-on: #107
2022-08-29 07:45:43 +02:00
7cba141447 Merge pull request 'patch-regen' (#106) from patch-regen into dev
Reviewed-on: #106
2022-08-29 07:42:17 +02:00
f67d56e1cc expane rain and wind protection control
add condition for wind and rain protection

[Ticket: none]
2022-06-20 15:56:47 +02:00
527d72dd57 code review rain unprotection drive 2022-04-19 12:32:19 +02:00
459b8508ec Merge pull request 'dev' (#105) from dev into main
Reviewed-on: #105
2022-04-07 21:29:10 +02:00
ac87015478 Merge pull request 'patch-shading_markise_IsDay' (#104) from patch-shading_markise_IsDay into dev
Reviewed-on: #104
2022-04-07 21:27:00 +02:00
26105fa434 more Log out with information 2022-04-07 21:25:03 +02:00
15be0a6885 observed ShuttersPlace awning for shading condition
[Ticket: no]
2022-03-24 09:54:55 +01:00
20 changed files with 8743 additions and 232 deletions

8426
CHANGELOG.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # Developed with VSCodium and richterger perl plugin
# #
# (c) 2018-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:
@ -707,7 +707,7 @@ __END__
are used for shading. Defaults to 120. are used for shading. Defaults to 120.
</li> </li>
<a id="AutoShuttersControl-attr-ASC_Shading_BetweenTheTime"></a> <a id="AutoShuttersControl-attr-ASC_Shading_BetweenTheTime"></a>
<li><strong>ASC_Shading_BetweenTheTime</strong> - Limit the time slots for shading functionality. Example: 9:00-13:00 11:25-15:30</li> <li><strong>ASC_Shading_BetweenTheTime</strong> - Limit the time slots for shading functionality. Example: 09:00-13:00 11:25-15:30</li>
</ul> </ul>
</blockquote> </blockquote>
</ul> </ul>
@ -1029,11 +1029,11 @@ __END__
<a id="AutoShuttersControl-attr-ASC_Antifreeze_Pos"></a> <a id="AutoShuttersControl-attr-ASC_Antifreeze_Pos"></a>
<li><strong>ASC_Antifreeze_Pos</strong> - Position die angefahren werden soll, wenn der Fahrbefehl komplett schlie&szlig;en lautet, aber der Frostschutz aktiv ist (Default: ist abh&auml;ngig vom Attribut<em>ASC</em> 85/15) !!!Verwendung von Perlcode ist m&ouml;glich, dieser muss in {} eingeschlossen sein. R&uuml;ckgabewert muss eine positive Zahl/Dezimalzahl sein!!!</li> <li><strong>ASC_Antifreeze_Pos</strong> - Position die angefahren werden soll, wenn der Fahrbefehl komplett schlie&szlig;en lautet, aber der Frostschutz aktiv ist (Default: ist abh&auml;ngig vom Attribut<em>ASC</em> 85/15) !!!Verwendung von Perlcode ist m&ouml;glich, dieser muss in {} eingeschlossen sein. R&uuml;ckgabewert muss eine positive Zahl/Dezimalzahl sein!!!</li>
<a id="AutoShuttersControl-attr-ASC_AutoAstroModeEvening"></a> <a id="AutoShuttersControl-attr-ASC_AutoAstroModeEvening"></a>
<li><strong>ASC_AutoAstroModeEvening</strong> - aktuell REAL,CIVIL,NAUTIC,ASTRONOMIC (default: none)</li> <li><strong>ASC_AutoAstroModeEvening</strong> - aktuell REAL,CIVIL,NAUTIC,ASTRONOMIC oder HORIZON (default: none)</li>
<a id="AutoShuttersControl-attr-ASC_AutoAstroModeEveningHorizon"></a> <a id="AutoShuttersControl-attr-ASC_AutoAstroModeEveningHorizon"></a>
<li><strong>ASC_AutoAstroModeEveningHorizon</strong> - H&ouml;he &uuml;ber Horizont, wenn beim Attribut ASC_autoAstroModeEvening HORIZON ausgew&auml;hlt (default: none)</li> <li><strong>ASC_AutoAstroModeEveningHorizon</strong> - H&ouml;he &uuml;ber Horizont, wenn beim Attribut ASC_autoAstroModeEvening HORIZON ausgew&auml;hlt (default: none)</li>
<a id="AutoShuttersControl-attr-ASC_AutoAstroModeMorning"></a> <a id="AutoShuttersControl-attr-ASC_AutoAstroModeMorning"></a>
<li><strong>ASC_AutoAstroModeMorning</strong> - aktuell REAL,CIVIL,NAUTIC,ASTRONOMIC (default: none)</li> <li><strong>ASC_AutoAstroModeMorning</strong> - aktuell REAL,CIVIL,NAUTIC,ASTRONOMIC oder HORIZON (default: none)</li>
<a id="AutoShuttersControl-attr-ASC_AutoAstroModeMorningHorizon"></a> <a id="AutoShuttersControl-attr-ASC_AutoAstroModeMorningHorizon"></a>
<li><strong>ASC_AutoAstroModeMorningHorizon</strong> - H&ouml;he &uuml;ber Horizont,a wenn beim Attribut ASC_autoAstroModeMorning HORIZON ausgew&auml;hlt (default: none)</li> <li><strong>ASC_AutoAstroModeMorningHorizon</strong> - H&ouml;he &uuml;ber Horizont,a wenn beim Attribut ASC_autoAstroModeMorning HORIZON ausgew&auml;hlt (default: none)</li>
<a id="AutoShuttersControl-attr-ASC_BlockingTime_afterManual"></a> <a id="AutoShuttersControl-attr-ASC_BlockingTime_afterManual"></a>
@ -1045,7 +1045,7 @@ __END__
<a id="AutoShuttersControl-attr-ASC_BrightnessSensor"></a> <a id="AutoShuttersControl-attr-ASC_BrightnessSensor"></a>
<li><strong>ASC_BrightnessSensor - DEVICE[:READING] WERT-MORGENS:WERT-ABENDS</strong> / 'Sensorname[:brightness [400:800]]' Angaben zum Helligkeitssensor mit (Readingname, optional) f&uuml;r die Beschattung und dem Fahren der Rollladen nach brightness und den optionalen Brightnesswerten f&uuml;r Sonnenauf- und Sonnenuntergang. (default: none)</li> <li><strong>ASC_BrightnessSensor - DEVICE[:READING] WERT-MORGENS:WERT-ABENDS</strong> / 'Sensorname[:brightness [400:800]]' Angaben zum Helligkeitssensor mit (Readingname, optional) f&uuml;r die Beschattung und dem Fahren der Rollladen nach brightness und den optionalen Brightnesswerten f&uuml;r Sonnenauf- und Sonnenuntergang. (default: none)</li>
<a id="AutoShuttersControl-attr-ASC_Down"></a> <a id="AutoShuttersControl-attr-ASC_Down"></a>
<li><strong>ASC_Down - astro/time/brightness</strong> - bei astro wird Sonnenuntergang berechnet, bei time wird der Wert aus ASC_Time_Down_Early als Fahrzeit verwendet und bei brightness muss ASC_Time_Down_Early und ASC_Time_Down_Late korrekt gesetzt werden. Der Timer l&auml;uft dann nach ASC_Time_Down_Late Zeit, es wird aber in der Zeit zwischen ASC_Time_Down_Early und ASC_Time_Down_Late geschaut, ob die als Attribut im Moduldevice hinterlegte ASC_brightnessDriveUpDown der Down Wert erreicht wurde. Wenn ja, wird der Rollladen runter gefahren (default: astro)</li> <li><strong>ASC_Down - astro/time/brightness/roommate</strong> - bei astro wird Sonnenuntergang berechnet, bei time wird der Wert aus ASC_Time_Down_Early als Fahrzeit verwendet und bei brightness muss ASC_Time_Down_Early und ASC_Time_Down_Late korrekt gesetzt werden. Der Timer l&auml;uft dann nach ASC_Time_Down_Late Zeit, es wird aber in der Zeit zwischen ASC_Time_Down_Early und ASC_Time_Down_Late geschaut, ob die als Attribut im Moduldevice hinterlegte ASC_brightnessDriveUpDown der Down Wert erreicht wurde. Wenn ja, wird der Rollladen runter gefahren (default: astro)</li>
<ul></p> <ul></p>
<strong><u>Beschreibung der besonderen Positionsattribute</u></strong> <strong><u>Beschreibung der besonderen Positionsattribute</u></strong>
<a id="AutoShuttersControl-attr-ASC_Closed_Pos"></a> <a id="AutoShuttersControl-attr-ASC_Closed_Pos"></a>
@ -1137,7 +1137,7 @@ __END__
<a id="AutoShuttersControl-attr-ASC_Shading_WaitingPeriod"></a> <a id="AutoShuttersControl-attr-ASC_Shading_WaitingPeriod"></a>
<li><strong>ASC_Shading_WaitingPeriod</strong> - wie viele Sekunden soll gewartet werden bevor eine weitere Auswertung der Sensordaten f&uuml;r die Beschattung stattfinden soll (default: 1200)</li> <li><strong>ASC_Shading_WaitingPeriod</strong> - wie viele Sekunden soll gewartet werden bevor eine weitere Auswertung der Sensordaten f&uuml;r die Beschattung stattfinden soll (default: 1200)</li>
<a id="AutoShuttersControl-attr-ASC_Shading_BetweenTheTime"></a> <a id="AutoShuttersControl-attr-ASC_Shading_BetweenTheTime"></a>
<li><strong>ASC_Shading_BetweenTheTime</strong> - das Fahren in die Beschattung erfolgt bei Angabe nur innerhalb des Zeitraumes, Bsp: 9:00-13:00 11:25-15:30</li> <li><strong>ASC_Shading_BetweenTheTime</strong> - das Fahren in die Beschattung erfolgt bei Angabe nur innerhalb des Zeitraumes, Bsp: 09:00-13:00 11:25-15:30</li>
</ul></p> </ul></p>
<a id="AutoShuttersControl-attr-ASC_ShuttersPlace"></a> <a id="AutoShuttersControl-attr-ASC_ShuttersPlace"></a>
<li><strong>ASC_ShuttersPlace - window/terrace/awning</strong> - Wenn dieses Attribut auf terrace gesetzt ist, das Residence Device in den Status "gone" geht und SelfDefense aktiv ist (ohne das das Reading selfDefense gesetzt sein muss), wird das Rollo geschlossen. awning steht für Markise und wirkt sich auf die Beschattungssteuerung aus. (default: window)</li> <li><strong>ASC_ShuttersPlace - window/terrace/awning</strong> - Wenn dieses Attribut auf terrace gesetzt ist, das Residence Device in den Status "gone" geht und SelfDefense aktiv ist (ohne das das Reading selfDefense gesetzt sein muss), wird das Rollo geschlossen. awning steht für Markise und wirkt sich auf die Beschattungssteuerung aus. (default: window)</li>
@ -1152,13 +1152,13 @@ __END__
<a id="AutoShuttersControl-attr-ASC_Time_Up_WE_Holiday"></a> <a id="AutoShuttersControl-attr-ASC_Time_Up_WE_Holiday"></a>
<li><strong>ASC_Time_Up_WE_Holiday</strong> - Sonnenaufgang fr&uuml;hste Zeit zum Hochfahren am Wochenende und/oder Urlaub (holiday2we wird beachtet). (default: 08:00) ACHTUNG!!! in Verbindung mit Brightness f&uuml;r <em>ASC_Up</em> muss die Uhrzeit kleiner sein wie die Uhrzeit aus <em>ASC_Time_Up_Late</em> !!!Verwendung von Perlcode ist möglich, dieser muss in {} eingeschlossen sein. Rückgabewert muss ein Zeitformat in Form HH:MM[:SS] sein!!!</li> <li><strong>ASC_Time_Up_WE_Holiday</strong> - Sonnenaufgang fr&uuml;hste Zeit zum Hochfahren am Wochenende und/oder Urlaub (holiday2we wird beachtet). (default: 08:00) ACHTUNG!!! in Verbindung mit Brightness f&uuml;r <em>ASC_Up</em> muss die Uhrzeit kleiner sein wie die Uhrzeit aus <em>ASC_Time_Up_Late</em> !!!Verwendung von Perlcode ist möglich, dieser muss in {} eingeschlossen sein. Rückgabewert muss ein Zeitformat in Form HH:MM[:SS] sein!!!</li>
<a id="AutoShuttersControl-attr-ASC_Up"></a> <a id="AutoShuttersControl-attr-ASC_Up"></a>
<li><strong>ASC_Up - astro/time/brightness</strong> - bei astro wird Sonnenaufgang berechnet, bei time wird der Wert aus ASC_Time_Up_Early als Fahrzeit verwendet und bei brightness muss ASC_Time_Up_Early und ASC_Time_Up_Late korrekt gesetzt werden. Der Timer l&auml;uft dann nach ASC_Time_Up_Late Zeit, es wird aber in der Zeit zwischen ASC_Time_Up_Early und ASC_Time_Up_Late geschaut, ob die als Attribut im Moduldevice hinterlegte Down Wert von ASC_brightnessDriveUpDown erreicht wurde. Wenn ja, wird der Rollladen hoch gefahren (default: astro)</li> <li><strong>ASC_Up - astro/time/brightness/roommate</strong> - bei astro wird Sonnenaufgang berechnet, bei time wird der Wert aus ASC_Time_Up_Early als Fahrzeit verwendet und bei brightness muss ASC_Time_Up_Early und ASC_Time_Up_Late korrekt gesetzt werden. Der Timer l&auml;uft dann nach ASC_Time_Up_Late Zeit, es wird aber in der Zeit zwischen ASC_Time_Up_Early und ASC_Time_Up_Late geschaut, ob die als Attribut im Moduldevice hinterlegte Down Wert von ASC_brightnessDriveUpDown erreicht wurde. Wenn ja, wird der Rollladen hoch gefahren (default: astro)</li>
<a id="AutoShuttersControl-attr-ASC_Ventilate_Window_Open"></a> <a id="AutoShuttersControl-attr-ASC_Ventilate_Window_Open"></a>
<li><strong>ASC_Ventilate_Window_Open</strong> - auf l&uuml;ften, wenn das Fenster gekippt/ge&ouml;ffnet wird und aktuelle Position unterhalb der L&uuml;ften-Position ist (default: on)</li> <li><strong>ASC_Ventilate_Window_Open</strong> - auf l&uuml;ften, wenn das Fenster gekippt/ge&ouml;ffnet wird und aktuelle Position unterhalb der L&uuml;ften-Position ist (default: on)</li>
<a id="AutoShuttersControl-attr-ASC_WiggleValue"></a> <a id="AutoShuttersControl-attr-ASC_WiggleValue"></a>
<li><strong>ASC_WiggleValue</strong> - Wert um welchen sich die Position des Rollladens &auml;ndern soll (default: 5)</li> <li><strong>ASC_WiggleValue</strong> - Wert um welchen sich die Position des Rollladens &auml;ndern soll (default: 5)</li>
<a id="AutoShuttersControl-attr-ASC_WindParameters"></a> <a id="AutoShuttersControl-attr-ASC_WindParameters"></a>
<li><strong>ASC_WindParameters - TRIGGERMAX[:HYSTERESE] [DRIVEPOSITION]</strong> / Angabe von Max Wert ab dem f&uuml;r Wind getriggert werden soll, Hytsrese Wert ab dem der Windschutz aufgehoben werden soll TRIGGERMAX - HYSTERESE / Ist es bei einigen Rolll&auml;den nicht gew&uuml;nscht das gefahren werden soll, so ist der TRIGGERMAX Wert mit -1 an zu geben. (default: '50:20 ClosedPosition')</li> <li><strong>ASC_WindParameters - TRIGGERMAX[:HYSTERESE] [DRIVEPOSITION]</strong> / ACHTUNG! Wird nur beachtet wenn ASC_WindProtection auf on gesetzt ist. - Angabe von Max Wert ab dem f&uuml;r Wind getriggert werden soll, Hytsrese Wert ab dem der Windschutz aufgehoben werden soll TRIGGERMAX - HYSTERESE / Ist es bei einigen Rolll&auml;den nicht gew&uuml;nscht das gefahren werden soll, so ist der TRIGGERMAX Wert mit -1 an zu geben. (default: '50:20 ASC_Closed_Pos')</li>
<a id="AutoShuttersControl-attr-ASC_WindowRec_PosAfterDayClosed"></a> <a id="AutoShuttersControl-attr-ASC_WindowRec_PosAfterDayClosed"></a>
<li><strong>ASC_WindowRec_PosAfterDayClosed</strong> - open,lastManual / auf welche Position soll das Rollo nach dem schlie&szlig;en am Tag fahren. Open Position oder letzte gespeicherte manuelle Position (default: open)</li> <li><strong>ASC_WindowRec_PosAfterDayClosed</strong> - open,lastManual / auf welche Position soll das Rollo nach dem schlie&szlig;en am Tag fahren. Open Position oder letzte gespeicherte manuelle Position (default: open)</li>
<a id="AutoShuttersControl-attr-ASC_WindowRec"></a> <a id="AutoShuttersControl-attr-ASC_WindowRec"></a>
@ -1323,7 +1323,7 @@ __END__
<tr><td>Sunrise</td><td>1=Morgenfahrt wurde durchgef&uuml;hrt, 0=noch keine Morgenfahrt durchgef&uuml;hrt</td></tr> <tr><td>Sunrise</td><td>1=Morgenfahrt wurde durchgef&uuml;hrt, 0=noch keine Morgenfahrt durchgef&uuml;hrt</td></tr>
<tr><td>RoommatesStatus</td><td>aktueller Status der/des Roommate/s f&uuml;r den Rollladen</td></tr> <tr><td>RoommatesStatus</td><td>aktueller Status der/des Roommate/s f&uuml;r den Rollladen</td></tr>
<tr><td>RoommatesLastStatus</td><td>letzter Status der/des Roommate/s f&uuml;r den Rollladen</td></tr> <tr><td>RoommatesLastStatus</td><td>letzter Status der/des Roommate/s f&uuml;r den Rollladen</td></tr>
<tr><td>ShadingStatus</td><td>Ausgabe des aktuellen Shading Status, in, out, in reserved, out reserved</td></tr> <tr><td>ShadingStatus</td><td>Ausgabe des aktuellen Shading Status, <EFBFBD><EFBFBD><EFBFBD>in, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>out, in reserved, out reserved</td></tr>
<tr><td>ShadingStatusTimestamp</td><td>Timestamp des letzten Beschattungsstatus</td></tr> <tr><td>ShadingStatusTimestamp</td><td>Timestamp des letzten Beschattungsstatus</td></tr>
<tr><td>IfInShading</td><td>Befindet sich der Rollladen, in Abh&auml;ngigkeit des Shading Mode, in der Beschattung</td></tr> <tr><td>IfInShading</td><td>Befindet sich der Rollladen, in Abh&auml;ngigkeit des Shading Mode, in der Beschattung</td></tr>
<tr><td>DelayCmd</td><td>letzter Fahrbefehl welcher in die Warteschlange kam. Grund z.B. Partymodus.</td></tr> <tr><td>DelayCmd</td><td>letzter Fahrbefehl welcher in die Warteschlange kam. Grund z.B. Partymodus.</td></tr>
@ -1462,7 +1462,7 @@ __END__
], ],
"release_status": "stable", "release_status": "stable",
"license": "GPL_2", "license": "GPL_2",
"version": "v0.10.22", "version": "v0.99.10",
"author": [ "author": [
"Marko Oldenburg <fhemdevelopment@cooltux.net>" "Marko Oldenburg <fhemdevelopment@cooltux.net>"
], ],

View File

@ -1,16 +1,16 @@
UPD 2022-03-04_06:58:36 116177 FHEM/73_AutoShuttersControl.pm UPD 2024-10-12_07:38:48 116314 FHEM/73_AutoShuttersControl.pm
UPD 2022-03-04_06:55:50 76011 lib/FHEM/Automation/ShuttersControl.pm UPD 2024-10-12_07:35:03 76335 lib/FHEM/Automation/ShuttersControl.pm
UPD 2022-01-14_08:49:13 2691 lib/FHEM/Automation/ShuttersControl/Dev.pm UPD 2024-10-12_07:33:39 2691 lib/FHEM/Automation/ShuttersControl/Dev.pm
UPD 2022-01-14_08:49:13 2677 lib/FHEM/Automation/ShuttersControl/Roommate.pm UPD 2024-10-12_07:34:12 2675 lib/FHEM/Automation/ShuttersControl/Roommate.pm
UPD 2022-01-14_08:49:13 32016 lib/FHEM/Automation/ShuttersControl/Shutters.pm UPD 2024-10-12_07:34:38 31828 lib/FHEM/Automation/ShuttersControl/Shutters.pm
UPD 2022-01-14_08:49:13 25452 lib/FHEM/Automation/ShuttersControl/Shading.pm UPD 2024-10-12_07:34:24 25541 lib/FHEM/Automation/ShuttersControl/Shading.pm
UPD 2022-03-02_16:50:08 112109 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm UPD 2024-10-12_07:33:49 112297 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
UPD 2022-01-14_08:49:13 40603 lib/FHEM/Automation/ShuttersControl/Helper.pm UPD 2024-10-12_07:34:00 40681 lib/FHEM/Automation/ShuttersControl/Helper.pm
UPD 2022-01-14_08:49:13 2209 lib/FHEM/Automation/ShuttersControl/Window.pm UPD 2024-10-12_07:34:46 2209 lib/FHEM/Automation/ShuttersControl/Window.pm
UPD 2022-01-14_08:49:13 11857 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm UPD 2024-10-12_07:38:13 11857 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
UPD 2022-01-14_08:49:13 7265 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm UPD 2024-10-12_07:38:06 7265 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
UPD 2022-01-14_08:49:13 52751 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm UPD 2024-10-12_07:37:57 52751 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
UPD 2022-01-14_08:49:13 2799 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm UPD 2024-10-12_07:37:49 2799 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
UPD 2022-01-14_08:49:13 3887 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm UPD 2024-10-12_07:37:43 3887 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
UPD 2022-01-14_08:49:13 2200 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm UPD 2024-10-12_07:33:29 2200 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm
UPD 2022-01-14_08:49:13 7113 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm UPD 2024-10-12_07:34:06 7394 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm

36
hooks/commit-msg Executable file
View File

@ -0,0 +1,36 @@
#!/bin/sh
#
# An example hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit. The hook is allowed to edit the commit message file.
#
# To enable this hook, rename this file to "commit-msg".
# Uncomment the below to add a Signed-off-by line to the message.
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
# hook is more suited to it.
#
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
# This example catches duplicate Signed-off-by lines.
commit_msg=$(cat "${1:?Missing commit message file}")
test "" = "$(grep '^Signed-off-by: ' "$1" |
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
echo >&2 Duplicate Signed-off-by lines.
exit 1
}
if ! echo "$commit_msg" | grep -Eq "^(build|chore|ci|docs|feat|feat!|fix|perf|refactor|revert|style|test)(\(.+\))?: .*$" ; then
echo "Invalid commit message"
exit 1
fi
echo "Commit message is valid!"

18
hooks/post-commit Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
set -eu
# destination of the final changelog file
OUTPUT_FILE=CHANGELOG.md
# generate the changelog
git --no-pager log --no-merges --format="### %s%d%n>%aD%n%n>Author: %aN (%aE)%n%n>Commiter: %cN (%cE)%n%n%b%n%N%n" > $OUTPUT_FILE
# prevent recursion!
# since a 'commit --amend' will trigger the post-commit script again
# we have to check if the changelog file has changed or not
res=$(git status --porcelain | grep -c ".\$OUTPUT_FILE$")
if [ "$res" -gt 0 ]; then
git add $OUTPUT_FILE
git commit --amend
echo "Populated Changelog in $OUTPUT_FILE"
fi

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # Developed with VSCodium and richterger perl plugin
# #
# (c) 2018-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:
@ -72,7 +72,8 @@ use FHEM::Meta;
use GPUtils qw(GP_Import GP_Export); use GPUtils qw(GP_Import GP_Export);
use Data::Dumper; #only for Debugging use Data::Dumper; #only for Debugging
use Date::Parse; use Date::Parse;
use experimental qw( switch );
# use experimental qw( switch ); deprecated
use FHEM::Automation::ShuttersControl::Shutters; use FHEM::Automation::ShuttersControl::Shutters;
use FHEM::Automation::ShuttersControl::Dev; use FHEM::Automation::ShuttersControl::Dev;
@ -80,7 +81,7 @@ use FHEM::Automation::ShuttersControl::Dev;
use FHEM::Automation::ShuttersControl::Shading use FHEM::Automation::ShuttersControl::Shading
qw (CheckASC_ConditionsForShadingFn); qw (CheckASC_ConditionsForShadingFn);
use FHEM::Automation::ShuttersControl::EventProcessingFunctions qw (:ALL); use FHEM::Automation::ShuttersControl::EventProcessingFunctions qw (:ALL);
use FHEM::Automation::ShuttersControl::Helper qw (:ALL); use FHEM::Automation::ShuttersControl::Helper qw (:ALL);
# try to use JSON::MaybeXS wrapper # try to use JSON::MaybeXS wrapper
# for chance of better performance + open code # for chance of better performance + open code
@ -167,7 +168,7 @@ BEGIN {
ascAPIget ascAPIget
ascAPIset ascAPIset
DevStateIcon DevStateIcon
) )
); );
} }
@ -187,24 +188,24 @@ our %userAttrList = (
'ASC_Open_Pos:0,10,20,30,40,50,60,70,80,90,100' => [ '', 0, 100 ], 'ASC_Open_Pos:0,10,20,30,40,50,60,70,80,90,100' => [ '', 0, 100 ],
'ASC_Closed_Pos:0,10,20,30,40,50,60,70,80,90,100' => [ '', 100, 0 ], 'ASC_Closed_Pos:0,10,20,30,40,50,60,70,80,90,100' => [ '', 100, 0 ],
'ASC_Sleep_Pos:0,10,20,30,40,50,60,70,80,90,100' => [ '', -1, -1 ], 'ASC_Sleep_Pos:0,10,20,30,40,50,60,70,80,90,100' => [ '', -1, -1 ],
'ASC_Pos_Reading' => [ '', 'position', 'pct' ], 'ASC_Pos_Reading' => [ '', 'position', 'pct' ],
'ASC_Time_Up_Early' => '-', 'ASC_Time_Up_Early' => '-',
'ASC_Time_Up_Late' => '-', 'ASC_Time_Up_Late' => '-',
'ASC_Time_Up_WE_Holiday' => '-', 'ASC_Time_Up_WE_Holiday' => '-',
'ASC_Time_Down_Early' => '-', 'ASC_Time_Down_Early' => '-',
'ASC_Time_Down_Late' => '-', 'ASC_Time_Down_Late' => '-',
'ASC_PrivacyUpValue_beforeDayOpen' => '-', 'ASC_PrivacyUpValue_beforeDayOpen' => '-',
'ASC_PrivacyDownValue_beforeNightClose' => '-', 'ASC_PrivacyDownValue_beforeNightClose' => '-',
'ASC_PrivacyUp_Pos' => [ '', 50, 50 ], 'ASC_PrivacyUp_Pos' => [ '', 50, 50 ],
'ASC_PrivacyDown_Pos' => [ '', 50, 50 ], 'ASC_PrivacyDown_Pos' => [ '', 50, 50 ],
'ASC_TempSensor' => '-', 'ASC_TempSensor' => '-',
'ASC_Ventilate_Window_Open:on,off' => '-', 'ASC_Ventilate_Window_Open:on,off' => '-',
'ASC_LockOut:soft,hard,off' => '-', 'ASC_LockOut:soft,hard,off' => '-',
'ASC_LockOut_Cmd:inhibit,blocked,protection' => '-', 'ASC_LockOut_Cmd:inhibit,blocked,protection' => '-',
'ASC_BlockingTime_afterManual' => '-', 'ASC_BlockingTime_afterManual' => '-',
'ASC_BlockingTime_beforeNightClose' => '-', 'ASC_BlockingTime_beforeNightClose' => '-',
'ASC_BlockingTime_beforeDayOpen' => '-', 'ASC_BlockingTime_beforeDayOpen' => '-',
'ASC_BrightnessSensor' => '-', 'ASC_BrightnessSensor' => '-',
'ASC_Shading_Pos:10,20,30,40,50,60,70,80,90,100' => [ '', 80, 20 ], 'ASC_Shading_Pos:10,20,30,40,50,60,70,80,90,100' => [ '', 80, 20 ],
'ASC_Shading_Mode:absent,always,off,home' => '-', 'ASC_Shading_Mode:absent,always,off,home' => '-',
'ASC_Shading_InOutAzimuth' => '-', 'ASC_Shading_InOutAzimuth' => '-',
@ -485,16 +486,23 @@ sub Notify {
} }
elsif ( $devname eq "global" ) elsif ( $devname eq "global" )
{ # Kommt ein globales Event und beinhaltet folgende Syntax wird die Funktion zur Verarbeitung aufgerufen { # Kommt ein globales Event und beinhaltet folgende Syntax wird die Funktion zur Verarbeitung aufgerufen
::Log3( $name, 4,
"AutoShuttersControl ($name) - ShuttersControl: Devicename eq global"
);
if ( if (
grep { grep {
/^(ATTR|DELETEATTR)\s(.*ASC_Time_Up_WE_Holiday|.*ASC_Up|.*ASC_Down|.*ASC_AutoAstroModeMorning|.*ASC_AutoAstroModeMorningHorizon|.*ASC_AutoAstroModeEvening|.*ASC_AutoAstroModeEveningHorizon|.*ASC_Time_Up_Early|.*ASC_Time_Up_Late|.*ASC_Time_Down_Early|.*ASC_Time_Down_Late|.*ASC_autoAstroModeMorning|.*ASC_autoAstroModeMorningHorizon|.*ASC_PrivacyDownValue_beforeNightClose|.*ASC_PrivacyUpValue_beforeDayOpen|.*ASC_autoAstroModeEvening|.*ASC_autoAstroModeEveningHorizon|.*ASC_Roommate_Device|.*ASC_WindowRec|.*ASC_residentsDev|.*ASC_rainSensor|.*ASC_windSensor|.*ASC_tempSensor|.*ASC_BrightnessSensor|.*ASC_twilightDevice|.*ASC_ExternalTrigger|.*ASC_Shading_StateChange_SunnyCloudy|.*ASC_TempSensor|.*ASC_Shading_Mode)(\s.*|$) / /^(ATTR|DELETEATTR)\s(.*ASC_Time_Up_WE_Holiday|.*ASC_Up|.*ASC_Down|.*ASC_AutoAstroModeMorning|.*ASC_AutoAstroModeMorningHorizon|.*ASC_AutoAstroModeEvening|.*ASC_AutoAstroModeEveningHorizon|.*ASC_Time_Up_Early|.*ASC_Time_Up_Late|.*ASC_Time_Down_Early|.*ASC_Time_Down_Late|.*ASC_autoAstroModeMorning|.*ASC_autoAstroModeMorningHorizon|.*ASC_PrivacyDownValue_beforeNightClose|.*ASC_PrivacyUpValue_beforeDayOpen|.*ASC_autoAstroModeEvening|.*ASC_autoAstroModeEveningHorizon|.*ASC_Roommate_Device|.*ASC_WindowRec|.*ASC_residentsDev|.*ASC_rainSensor|.*ASC_windSensor|.*ASC_tempSensor|.*ASC_BrightnessSensor|.*ASC_twilightDevice|.*ASC_ExternalTrigger|.*ASC_Shading_StateChange_SunnyCloudy|.*ASC_TempSensor|.*ASC_Shading_Mode)(\s.*|$) /x
} @{$events} } @{$events}
) )
{ {
::Log3( $name, 4,
"AutoShuttersControl ($name) - ShuttersControl: Event Attr or Deleteattr Time and Astro"
);
EventProcessingGeneral( $hash, undef, join( ' ', @{$events} ) ); EventProcessingGeneral( $hash, undef, join( ' ', @{$events} ) );
} }
} }
elsif ( grep { /^($posReading):\s\d{1,3}(\.\d{1,3})?$/ } @{$events} ) { elsif ( grep { /^($posReading):\s\d{1,3}(\.\d{1,3})?$/x } @{$events} ) {
ASC_Debug( 'Notify: ' ASC_Debug( 'Notify: '
. ' ASC_Pos_Reading Event vom Rollo ' . ' ASC_Pos_Reading Event vom Rollo '
. $devname . $devname
@ -519,107 +527,103 @@ sub Set {
my $cmd = shift @$aArg my $cmd = shift @$aArg
// return qq{"set $name" needs at least one argument}; // return qq{"set $name" needs at least one argument};
given ($cmd) { if ( $cmd eq 'renewAllTimer' ) {
when ('renewAllTimer') { return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 );
return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 ); RenewSunRiseSetShuttersTimer($hash);
RenewSunRiseSetShuttersTimer($hash); }
} elsif ( $cmd eq 'renewTimer' ) {
when ('renewTimer') { return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); CreateSunRiseSetShuttersTimer( $hash, $aArg->[0] );
CreateSunRiseSetShuttersTimer( $hash, $aArg->[0] ); }
} elsif ( $cmd eq 'scanForShutters' ) {
when ('scanForShutters') { return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 );
return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 ); ShuttersDeviceScan($hash);
ShuttersDeviceScan($hash); }
} elsif ( $cmd eq 'createNewNotifyDev' ) {
when ('createNewNotifyDev') { return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 );
return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 ); CreateNewNotifyDev($hash);
CreateNewNotifyDev($hash); }
} elsif ( $cmd eq 'partyMode' ) {
when ('partyMode') { return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 )
::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 ) if ( $aArg->[0] ne ::ReadingsVal( $name, 'partyMode', 0 ) );
if ( $aArg->[0] ne ::ReadingsVal( $name, 'partyMode', 0 ) ); }
} elsif ( $cmd eq 'hardLockOut' ) {
when ('hardLockOut') { return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 );
::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 ); HardewareBlockForShutters( $hash, $aArg->[0] );
HardewareBlockForShutters( $hash, $aArg->[0] ); }
} elsif ( $cmd eq 'sunriseTimeWeHoliday' ) {
when ('sunriseTimeWeHoliday') { return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 );
::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 ); }
} elsif ( $cmd eq 'controlShading' ) {
when ('controlShading') { return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
my $response = CheckASC_ConditionsForShadingFn( $hash, $aArg->[0] );
::readingsSingleUpdate(
$hash, $cmd,
(
$aArg->[0] eq 'off' ? $aArg->[0]
: (
$response eq 'none' ? $aArg->[0]
: $response
)
),
1
);
}
when ('selfDefense') {
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 );
}
when ('ascEnable') {
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 );
}
when ('advDriveDown') {
return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 );
EventProcessingAdvShuttersClose($hash);
}
when ('shutterASCenableToggle') {
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
::readingsSingleUpdate(
$defs{ $aArg->[0] },
'ASC_Enable',
(
::ReadingsVal( $aArg->[0], 'ASC_Enable', 'off' ) eq 'on'
? 'off'
: 'on'
),
1
);
}
when ('wiggle') {
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
my $response = CheckASC_ConditionsForShadingFn( $hash, $aArg->[0] );
::readingsSingleUpdate(
$hash, $cmd,
( (
$aArg->[0] eq 'all' $aArg->[0] eq 'off' ? $aArg->[0]
? wiggleAll($hash) : (
: wiggle( $hash, $aArg->[0] ) $response eq 'none' ? $aArg->[0]
); : $response
} )
default { ),
my $list = 'scanForShutters:noArg'; 1
$list .= );
' renewAllTimer:noArg advDriveDown:noArg partyMode:on,off hardLockOut:on,off sunriseTimeWeHoliday:on,off controlShading:on,off selfDefense:on,off ascEnable:on,off wiggle:all,' }
. join( ',', @{ $hash->{helper}{shuttersList} } ) elsif ( $cmd eq 'selfDefense' ) {
. ' shutterASCenableToggle:' return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
. join( ',', @{ $hash->{helper}{shuttersList} } ) ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 );
. ' renewTimer:' }
. join( ',', @{ $hash->{helper}{shuttersList} } ) elsif ( $cmd eq 'ascEnable' ) {
if ( return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
::ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out' ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 );
&& defined( $hash->{helper}{shuttersList} ) }
&& scalar( @{ $hash->{helper}{shuttersList} } ) > 0 ); elsif ( $cmd eq 'advDriveDown' ) {
$list .= ' createNewNotifyDev:noArg' return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 );
if ( EventProcessingAdvShuttersClose($hash);
::ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out' }
&& ::AttrVal( $name, 'ASC_expert', 0 ) == 1 ); elsif ( $cmd eq 'shutterASCenableToggle' ) {
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
::readingsSingleUpdate(
$defs{ $aArg->[0] },
'ASC_Enable',
(
::ReadingsVal( $aArg->[0], 'ASC_Enable', 'off' ) eq 'on'
? 'off'
: 'on'
),
1
);
}
elsif ( $cmd eq 'wiggle' ) {
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
return "Unknown argument $cmd,choose one of $list"; (
} $aArg->[0] eq 'all'
? wiggleAll($hash)
: wiggle( $hash, $aArg->[0] )
);
}
else {
my $list = 'scanForShutters:noArg';
$list .=
' renewAllTimer:noArg advDriveDown:noArg partyMode:on,off hardLockOut:on,off sunriseTimeWeHoliday:on,off controlShading:on,off selfDefense:on,off ascEnable:on,off wiggle:all,'
. join( ',', @{ $hash->{helper}{shuttersList} } )
. ' shutterASCenableToggle:'
. join( ',', @{ $hash->{helper}{shuttersList} } )
. ' renewTimer:'
. join( ',', @{ $hash->{helper}{shuttersList} } )
if ( ::ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out'
&& defined( $hash->{helper}{shuttersList} )
&& scalar( @{ $hash->{helper}{shuttersList} } ) > 0 );
$list .= ' createNewNotifyDev:noArg'
if ( ::ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out'
&& ::AttrVal( $name, 'ASC_expert', 0 ) == 1 );
return "Unknown argument $cmd,choose one of $list";
} }
return; return;
@ -1440,10 +1444,14 @@ sub SunRiseShuttersAfterTimerFn {
|| $shutters->getSelfDefenseMode eq 'off' || $shutters->getSelfDefenseMode eq 'off'
|| ( || (
$ascDev->getSelfDefense eq 'on' $ascDev->getSelfDefense eq 'on'
&& ( $shutters->getSelfDefenseMode eq 'gone' && (
|| $shutters->getSelfDefenseMode eq 'absent' ) (
&& $ascDev->getResidentsStatus ne 'gone' $shutters->getSelfDefenseMode eq 'gone'
&& $ascDev->getResidentsStatus ne 'absent' && $ascDev->getResidentsStatus ne 'gone'
)
|| ( $shutters->getSelfDefenseMode eq 'absent'
&& $ascDev->getResidentsStatus ne 'absent' )
)
) )
) )
&& ( && (
@ -1757,7 +1765,11 @@ sub SetCmdFn {
return return
if ( $shutters->getASCenable eq 'off' if ( $shutters->getASCenable eq 'off'
|| $ascDev->getASCenable eq 'off' || $ascDev->getASCenable eq 'off'
|| $idleDetection !~ m{^$idleDetectionValue$}xms ); || $idleDetection !~ m{^$idleDetectionValue$}xms
|| $FHEM::Automation::ShuttersControl::shutters
->getWindProtectionStatus eq 'protected'
|| $FHEM::Automation::ShuttersControl::shutters
->getRainProtectionStatus eq 'protected' );
if ( $shutters->getStatus != $posValue ) { if ( $shutters->getStatus != $posValue ) {
$shutters->setLastPos( $shutters->getStatus ); $shutters->setLastPos( $shutters->getStatus );
@ -1838,7 +1850,7 @@ sub SetCmdFn {
if ( $commandTemplate ne 'none' ) if ( $commandTemplate ne 'none' )
{ # Patch von Beta-User Forum https://forum.fhem.de/index.php/topic,123659.0.html { # Patch von Beta-User Forum https://forum.fhem.de/index.php/topic,123659.0.html
# Nutzervariablen setzen # Nutzervariablen setzen
my %specials = ( my %specials = (
'$name' => $shuttersDev, '$name' => $shuttersDev,
'$pos' => $posValue, '$pos' => $posValue,

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # Developed with VSCodium and richterger perl plugin
# #
# (c) 2018-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # Developed with VSCodium and richterger perl plugin
# #
# (c) 2018-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # Developed with VSCodium and richterger perl plugin
# #
# (c) 2018-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # Developed with VSCodium and richterger perl plugin
# #
# (c) 2018-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:
@ -47,8 +47,8 @@ use utf8;
use Data::Dumper; #only for Debugging use Data::Dumper; #only for Debugging
use FHEM::Automation::ShuttersControl::Helper qw (:ALL); use FHEM::Automation::ShuttersControl::Helper qw (:ALL);
use FHEM::Automation::ShuttersControl::Shading qw (:ALL); use FHEM::Automation::ShuttersControl::Shading qw (:ALL);
use FHEM::Automation::ShuttersControl::Rainprotection qw (:ALL); use FHEM::Automation::ShuttersControl::Rainprotection qw (:ALL);
require Exporter; require Exporter;
@ -68,7 +68,7 @@ our %EXPORT_TAGS = (
EventProcessingGeneral EventProcessingGeneral
EventProcessingShutters EventProcessingShutters
EventProcessingAdvShuttersClose EventProcessingAdvShuttersClose
) )
], ],
); );
@ -133,6 +133,10 @@ sub EventProcessingGeneral {
} }
} }
else { # alles was kein Devicenamen mit übergeben hat landet hier else { # alles was kein Devicenamen mit übergeben hat landet hier
::Log3( $name, 4,
"AutoShuttersControl ($name) - EventProcessing: All without device name in the Event"
);
if ( if (
$events =~ m{^ATTR\s(.*) $events =~ m{^ATTR\s(.*)
\s(ASC_Roommate_Device|ASC_WindowRec|ASC_residentsDev|ASC_rainSensor \s(ASC_Roommate_Device|ASC_WindowRec|ASC_residentsDev|ASC_rainSensor
@ -140,7 +144,7 @@ sub EventProcessingGeneral {
|ASC_twilightDevice) |ASC_twilightDevice)
\s(.*)$}xms \s(.*)$}xms
) )
{ # wurde den Attributen unserer Rolläden ein Wert zugewiesen ? { # wurde den Attributen unserer Rolläden ein Wert zugewiesen ?
FHEM::Automation::ShuttersControl::AddNotifyDev( $hash, $3, $1, $2 ) FHEM::Automation::ShuttersControl::AddNotifyDev( $hash, $3, $1, $2 )
if ( $3 ne 'none' ); if ( $3 ne 'none' );
::Log3( $name, 4, ::Log3( $name, 4,
@ -170,6 +174,10 @@ sub EventProcessingGeneral {
(.*)?}xms (.*)?}xms
) )
{ {
::Log3( $name, 4,
"AutoShuttersControl ($name) - EventProcessing: Morning and Evening Time Shedules"
);
FHEM::Automation::ShuttersControl::CreateSunRiseSetShuttersTimer( FHEM::Automation::ShuttersControl::CreateSunRiseSetShuttersTimer(
$hash, $2 ) $hash, $2 )
if ( if (
@ -1355,6 +1363,7 @@ sub EventProcessingWind {
my $name = $hash->{NAME}; my $name = $hash->{NAME};
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev); $FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
my $targetPos = $FHEM::Automation::ShuttersControl::shutters->getLastPos;
my $reading = my $reading =
$FHEM::Automation::ShuttersControl::ascDev->getWindSensorReading $FHEM::Automation::ShuttersControl::ascDev->getWindSensorReading
@ -1406,35 +1415,38 @@ sub EventProcessingWind {
{ {
$FHEM::Automation::ShuttersControl::shutters->setLastDrive( $FHEM::Automation::ShuttersControl::shutters->setLastDrive(
'wind un-protected'); 'wind un-protected');
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd(
( if ( $FHEM::Automation::ShuttersControl::shutters->getIsDay
$FHEM::Automation::ShuttersControl::shutters->getIsDay && !$FHEM::Automation::ShuttersControl::shutters
->getIfInShading
&& $FHEM::Automation::ShuttersControl::shutters->getLastPos
== $FHEM::Automation::ShuttersControl::shutters
->getShadingPos )
{
$targetPos =
$FHEM::Automation::ShuttersControl::shutters->getOpenPos;
}
else {
$targetPos =
$FHEM::Automation::ShuttersControl::shutters->getLastPos;
}
if ( !$FHEM::Automation::ShuttersControl::shutters->getIsDay ) {
$targetPos = (
$FHEM::Automation::ShuttersControl::shutters
->getPrivacyDownStatus == 2
? $FHEM::Automation::ShuttersControl::shutters ? $FHEM::Automation::ShuttersControl::shutters
->getLastPos ->getPrivacyDownPos
: ( : $FHEM::Automation::ShuttersControl::shutters
$FHEM::Automation::ShuttersControl::shutters ->getClosedPos
->getShuttersPlace eq 'awning' );
? $FHEM::Automation::ShuttersControl::shutters }
->getOpenPos
: (
$FHEM::Automation::ShuttersControl::shutters
->getPrivacyDownStatus == 2
? $FHEM::Automation::ShuttersControl::shutters
->getPrivacyDownPos
: (
$FHEM::Automation::ShuttersControl::shutters
->getSleepPos > 0
? $FHEM::Automation::ShuttersControl::shutters
->getSleepPos
: $FHEM::Automation::ShuttersControl::shutters
->getClosedPos
)
)
)
)
);
$FHEM::Automation::ShuttersControl::shutters $FHEM::Automation::ShuttersControl::shutters
->setWindProtectionStatus('unprotected'); ->setWindProtectionStatus('unprotected');
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd(
$targetPos);
} }
FHEM::Automation::ShuttersControl::ASC_Debug( FHEM::Automation::ShuttersControl::ASC_Debug(

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # Developed with VSCodium and richterger perl plugin
# #
# (c) 2018-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:
@ -84,7 +84,7 @@ our %EXPORT_TAGS = (
PerlCodeCheck PerlCodeCheck
IsAdv IsAdv
IsInTime IsInTime
) )
], ],
); );
@ -207,7 +207,7 @@ sub CheckIfShuttersWindowRecOpen {
m{[Cc]lose|true}xms ) m{[Cc]lose|true}xms )
{ {
return 0; return 0;
} # CK: covers: close|closed } # CK: covers: close|closed
} }
sub ExtractNotifyDevFromEvent { sub ExtractNotifyDevFromEvent {
@ -399,6 +399,8 @@ sub _IsDay {
or $FHEM::Automation::ShuttersControl::shutters->getRoommates or $FHEM::Automation::ShuttersControl::shutters->getRoommates
ne 'gotosleep' ) ne 'gotosleep' )
) )
or ( $FHEM::Automation::ShuttersControl::shutters->getShuttersPlace eq
'awning' )
); );
return $respIsDay; return $respIsDay;
@ -406,7 +408,7 @@ sub _IsDay {
sub ShuttersSunrise { sub ShuttersSunrise {
my $shuttersDev = shift; my $shuttersDev = shift;
my $tm = shift; # Tm steht für Timemode und bedeutet Realzeit oder Unixzeit my $tm = shift; # Tm steht für Timemode und bedeutet Realzeit oder Unixzeit
my $autoAstroMode; my $autoAstroMode;
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev); $FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
@ -827,7 +829,7 @@ sub ShuttersSunrise {
sub ShuttersSunset { sub ShuttersSunset {
my $shuttersDev = shift; my $shuttersDev = shift;
my $tm = shift; # Tm steht für Timemode und bedeutet Realzeit oder Unixzeit my $tm = shift; # Tm steht für Timemode und bedeutet Realzeit oder Unixzeit
my $autoAstroMode; my $autoAstroMode;
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev); $FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # Developed with VSCodium and richterger perl plugin
# #
# (c) 2018-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:
@ -57,7 +57,7 @@ our %EXPORT_TAGS = (
ALL => [ ALL => [
qw( qw(
RainProcessing RainProcessing
) )
], ],
); );
@ -153,7 +153,8 @@ sub _RainProtected {
} }
sub _RainUnprotected { sub _RainUnprotected {
my $h = shift; my $h = shift;
my $targetPos = $FHEM::Automation::ShuttersControl::shutters->getLastPos;
my $shuttersDev = $h->{shuttersdevice}; my $shuttersDev = $h->{shuttersdevice};
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev); $FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
@ -170,29 +171,35 @@ sub _RainUnprotected {
->setRainUnprotectionDelayObj('none'); ->setRainUnprotectionDelayObj('none');
} }
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd( if ( $FHEM::Automation::ShuttersControl::shutters->getIsDay
( && !$FHEM::Automation::ShuttersControl::shutters->getIfInShading
$FHEM::Automation::ShuttersControl::shutters->getIsDay && $FHEM::Automation::ShuttersControl::shutters->getLastPos ==
? $FHEM::Automation::ShuttersControl::shutters->getLastPos $FHEM::Automation::ShuttersControl::shutters->getShadingPos )
: ( {
$FHEM::Automation::ShuttersControl::shutters->getShuttersPlace $targetPos = $FHEM::Automation::ShuttersControl::shutters->getOpenPos;
eq 'awning' }
? $FHEM::Automation::ShuttersControl::shutters->getOpenPos else {
: ( $targetPos = $FHEM::Automation::ShuttersControl::shutters->getLastPos;
$FHEM::Automation::ShuttersControl::shutters }
->getPrivacyDownStatus == 2
? $FHEM::Automation::ShuttersControl::shutters if ( !$FHEM::Automation::ShuttersControl::shutters->getIsDay
->getPrivacyDownPos && $FHEM::Automation::ShuttersControl::shutters->getShuttersPlace ne
: $FHEM::Automation::ShuttersControl::shutters 'awning' )
->getClosedPos {
) $targetPos = (
) $FHEM::Automation::ShuttersControl::shutters->getPrivacyDownStatus
) == 2
) if ( IsAfterShuttersTimeBlocking($shuttersDev) ); ? $FHEM::Automation::ShuttersControl::shutters->getPrivacyDownPos
: $FHEM::Automation::ShuttersControl::shutters->getClosedPos
);
}
$FHEM::Automation::ShuttersControl::shutters->setRainProtectionStatus( $FHEM::Automation::ShuttersControl::shutters->setRainProtectionStatus(
'unprotected'); 'unprotected');
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd($targetPos)
if ( IsAfterShuttersTimeBlocking($shuttersDev) );
return; return;
} }

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # Developed with VSCodium and richterger perl plugin
# #
# (c) 2018-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:
@ -57,7 +57,7 @@ our %EXPORT_TAGS = (
qw( qw(
getRoommateStatus getRoommateStatus
getRoommateLastStatus getRoommateLastStatus
) )
], ],
); );

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # Developed with VSCodium and richterger perl plugin
# #
# (c) 2018-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:
@ -62,7 +62,7 @@ our %EXPORT_TAGS = (
CheckASC_ConditionsForShadingFn CheckASC_ConditionsForShadingFn
ShadingProcessing ShadingProcessing
ShadingProcessingDriveCommand ShadingProcessingDriveCommand
) )
], ],
); );
@ -287,6 +287,8 @@ sub ShadingProcessing {
|| $FHEM::Automation::ShuttersControl::shutters->getShadingMode eq 'off' || $FHEM::Automation::ShuttersControl::shutters->getShadingMode eq 'off'
|| $FHEM::Automation::ShuttersControl::ascDev || $FHEM::Automation::ShuttersControl::ascDev
->getAutoShuttersControlShading eq 'off' ->getAutoShuttersControlShading eq 'off'
|| $FHEM::Automation::ShuttersControl::shutters
->getExternalTriggerStatus
); );
::Log3( $name, 4, ::Log3( $name, 4,

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # Developed with VSCodium and richterger perl plugin
# #
# (c) 2018-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:
@ -162,10 +162,6 @@ sub setDriveCmd {
$FHEM::Automation::ShuttersControl::ascDev->setDelayCmdReading; $FHEM::Automation::ShuttersControl::ascDev->setDelayCmdReading;
$FHEM::Automation::ShuttersControl::shutters->setNoDelay(0); $FHEM::Automation::ShuttersControl::shutters->setNoDelay(0);
# $FHEM::Automation::ShuttersControl::shutters->setExternalTriggerStatus(0)
# if ( $FHEM::Automation::ShuttersControl::shutters
# ->getExternalTriggerStatus );
FHEM::Automation::ShuttersControl::ASC_Debug( 'setDriveCmd: ' FHEM::Automation::ShuttersControl::ASC_Debug( 'setDriveCmd: '
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev . $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
. ' - Die Fahrt wird zurückgestellt. Grund kann ein geöffnetes Fenster sein oder ein aktivierter Party Modus oder Weihnachtszeit' . ' - Die Fahrt wird zurückgestellt. Grund kann ein geöffnetes Fenster sein oder ein aktivierter Party Modus oder Weihnachtszeit'
@ -598,7 +594,7 @@ sub getShuttersPosCmdValueNegate {
sub getQueryShuttersPos sub getQueryShuttersPos
{ # Es wird geschaut ob die aktuelle Position des Rollos unterhalb der Zielposition ist { # Es wird geschaut ob die aktuelle Position des Rollos unterhalb der Zielposition ist
my $self = shift; my $self = shift;
my $posValue = shift; # wenn dem so ist wird 1 zurück gegeben ansonsten 0 my $posValue = shift; # wenn dem so ist wird 1 zurück gegeben ansonsten 0
return ( return (
$FHEM::Automation::ShuttersControl::shutters $FHEM::Automation::ShuttersControl::shutters
@ -889,7 +885,7 @@ sub getIdleDetection {
### Begin Beschattung Objekt mit Daten befüllen ### Begin Beschattung Objekt mit Daten befüllen
sub setShadingStatus { sub setShadingStatus {
my $self = shift; my $self = shift;
my $value = shift; ### Werte für value = in, out, in reserved, out reserved my $value = shift; ### Werte für value = in, out, in reserved, out reserved
# Es wird durch das return die ShadingWaitingTime nicht mehr beachtet, Bugmeldung von Bernd Griemsmann # Es wird durch das return die ShadingWaitingTime nicht mehr beachtet, Bugmeldung von Bernd Griemsmann
# return # return
@ -1002,7 +998,7 @@ sub getBrightnessAverage {
return; return;
} }
sub getShadingStatus { # Werte für value = in, out, in reserved, out reserved sub getShadingStatus { # Werte für value = in, out, in reserved, out reserved
my $self = shift; my $self = shift;
return ( return (

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # Developed with VSCodium and richterger perl plugin
# #
# (c) 2018-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # Developed with VSCodium and richterger perl plugin
# #
# (c) 2018-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # Developed with VSCodium and richterger perl plugin
# #
# (c) 2018-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # Developed with VSCodium and richterger perl plugin
# #
# (c) 2018-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # Developed with VSCodium and richterger perl plugin
# #
# (c) 2018-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to: