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
#
# (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
#
# Special thanks goes to:
@ -707,7 +707,7 @@ __END__
are used for shading. Defaults to 120.
</li>
<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>
</blockquote>
</ul>
@ -1029,11 +1029,11 @@ __END__
<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>
<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>
<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>
<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>
<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>
@ -1045,7 +1045,7 @@ __END__
<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>
<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>
<strong><u>Beschreibung der besonderen Positionsattribute</u></strong>
<a id="AutoShuttersControl-attr-ASC_Closed_Pos"></a>
@ -1137,7 +1137,7 @@ __END__
<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>
<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>
<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>
@ -1152,13 +1152,13 @@ __END__
<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>
<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>
<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>
<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>
<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>
<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>
@ -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>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>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>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>
@ -1462,7 +1462,7 @@ __END__
],
"release_status": "stable",
"license": "GPL_2",
"version": "v0.10.22",
"version": "v0.99.10",
"author": [
"Marko Oldenburg <fhemdevelopment@cooltux.net>"
],

View File

@ -1,16 +1,16 @@
UPD 2022-03-04_06:58:36 116177 FHEM/73_AutoShuttersControl.pm
UPD 2022-03-04_06:55:50 76011 lib/FHEM/Automation/ShuttersControl.pm
UPD 2022-01-14_08:49:13 2691 lib/FHEM/Automation/ShuttersControl/Dev.pm
UPD 2022-01-14_08:49:13 2677 lib/FHEM/Automation/ShuttersControl/Roommate.pm
UPD 2022-01-14_08:49:13 32016 lib/FHEM/Automation/ShuttersControl/Shutters.pm
UPD 2022-01-14_08:49:13 25452 lib/FHEM/Automation/ShuttersControl/Shading.pm
UPD 2022-03-02_16:50:08 112109 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
UPD 2022-01-14_08:49:13 40603 lib/FHEM/Automation/ShuttersControl/Helper.pm
UPD 2022-01-14_08:49:13 2209 lib/FHEM/Automation/ShuttersControl/Window.pm
UPD 2022-01-14_08:49: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 2022-01-14_08:49:13 52751 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
UPD 2022-01-14_08:49:13 2799 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
UPD 2022-01-14_08:49:13 3887 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
UPD 2022-01-14_08:49:13 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:38:48 116314 FHEM/73_AutoShuttersControl.pm
UPD 2024-10-12_07:35:03 76335 lib/FHEM/Automation/ShuttersControl.pm
UPD 2024-10-12_07:33:39 2691 lib/FHEM/Automation/ShuttersControl/Dev.pm
UPD 2024-10-12_07:34:12 2675 lib/FHEM/Automation/ShuttersControl/Roommate.pm
UPD 2024-10-12_07:34:38 31828 lib/FHEM/Automation/ShuttersControl/Shutters.pm
UPD 2024-10-12_07:34:24 25541 lib/FHEM/Automation/ShuttersControl/Shading.pm
UPD 2024-10-12_07:33:49 112297 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
UPD 2024-10-12_07:34:00 40681 lib/FHEM/Automation/ShuttersControl/Helper.pm
UPD 2024-10-12_07:34:46 2209 lib/FHEM/Automation/ShuttersControl/Window.pm
UPD 2024-10-12_07:38:13 11857 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
UPD 2024-10-12_07:38:06 7265 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
UPD 2024-10-12_07:37:57 52751 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
UPD 2024-10-12_07:37:49 2799 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
UPD 2024-10-12_07:37:43 3887 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
UPD 2024-10-12_07:33:29 2200 lib/FHEM/Automation/ShuttersControl/Window/Readings.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
#
# (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
#
# Special thanks goes to:
@ -72,7 +72,8 @@ use FHEM::Meta;
use GPUtils qw(GP_Import GP_Export);
use Data::Dumper; #only for Debugging
use Date::Parse;
use experimental qw( switch );
# use experimental qw( switch ); deprecated
use FHEM::Automation::ShuttersControl::Shutters;
use FHEM::Automation::ShuttersControl::Dev;
@ -485,16 +486,23 @@ sub Notify {
}
elsif ( $devname eq "global" )
{ # Kommt ein globales Event und beinhaltet folgende Syntax wird die Funktion zur Verarbeitung aufgerufen
::Log3( $name, 4,
"AutoShuttersControl ($name) - ShuttersControl: Devicename eq global"
);
if (
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}
)
{
::Log3( $name, 4,
"AutoShuttersControl ($name) - ShuttersControl: Event Attr or Deleteattr Time and Astro"
);
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_Pos_Reading Event vom Rollo '
. $devname
@ -519,38 +527,37 @@ sub Set {
my $cmd = shift @$aArg
// return qq{"set $name" needs at least one argument};
given ($cmd) {
when ('renewAllTimer') {
if ( $cmd eq 'renewAllTimer' ) {
return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 );
RenewSunRiseSetShuttersTimer($hash);
}
when ('renewTimer') {
elsif ( $cmd eq 'renewTimer' ) {
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
CreateSunRiseSetShuttersTimer( $hash, $aArg->[0] );
}
when ('scanForShutters') {
elsif ( $cmd eq 'scanForShutters' ) {
return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 );
ShuttersDeviceScan($hash);
}
when ('createNewNotifyDev') {
elsif ( $cmd eq 'createNewNotifyDev' ) {
return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 );
CreateNewNotifyDev($hash);
}
when ('partyMode') {
elsif ( $cmd eq 'partyMode' ) {
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 )
if ( $aArg->[0] ne ::ReadingsVal( $name, 'partyMode', 0 ) );
}
when ('hardLockOut') {
elsif ( $cmd eq 'hardLockOut' ) {
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 );
HardewareBlockForShutters( $hash, $aArg->[0] );
}
when ('sunriseTimeWeHoliday') {
elsif ( $cmd eq 'sunriseTimeWeHoliday' ) {
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 );
}
when ('controlShading') {
elsif ( $cmd eq 'controlShading' ) {
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
my $response = CheckASC_ConditionsForShadingFn( $hash, $aArg->[0] );
@ -566,19 +573,19 @@ sub Set {
1
);
}
when ('selfDefense') {
elsif ( $cmd eq 'selfDefense' ) {
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 );
}
when ('ascEnable') {
elsif ( $cmd eq 'ascEnable' ) {
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 );
}
when ('advDriveDown') {
elsif ( $cmd eq 'advDriveDown' ) {
return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 );
EventProcessingAdvShuttersClose($hash);
}
when ('shutterASCenableToggle') {
elsif ( $cmd eq 'shutterASCenableToggle' ) {
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
::readingsSingleUpdate(
$defs{ $aArg->[0] },
@ -591,7 +598,7 @@ sub Set {
1
);
}
when ('wiggle') {
elsif ( $cmd eq 'wiggle' ) {
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
(
@ -600,7 +607,7 @@ sub Set {
: wiggle( $hash, $aArg->[0] )
);
}
default {
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,'
@ -609,18 +616,15 @@ sub Set {
. join( ',', @{ $hash->{helper}{shuttersList} } )
. ' renewTimer:'
. join( ',', @{ $hash->{helper}{shuttersList} } )
if (
::ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out'
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'
if ( ::ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out'
&& ::AttrVal( $name, 'ASC_expert', 0 ) == 1 );
return "Unknown argument $cmd,choose one of $list";
}
}
return;
}
@ -1440,10 +1444,14 @@ sub SunRiseShuttersAfterTimerFn {
|| $shutters->getSelfDefenseMode eq 'off'
|| (
$ascDev->getSelfDefense eq 'on'
&& ( $shutters->getSelfDefenseMode eq 'gone'
|| $shutters->getSelfDefenseMode eq 'absent' )
&& (
(
$shutters->getSelfDefenseMode eq 'gone'
&& $ascDev->getResidentsStatus ne 'gone'
&& $ascDev->getResidentsStatus ne 'absent'
)
|| ( $shutters->getSelfDefenseMode eq 'absent'
&& $ascDev->getResidentsStatus ne 'absent' )
)
)
)
&& (
@ -1757,7 +1765,11 @@ sub SetCmdFn {
return
if ( $shutters->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 ) {
$shutters->setLastPos( $shutters->getStatus );

View File

@ -2,7 +2,7 @@
#
# 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
#
# Special thanks goes to:

View File

@ -2,7 +2,7 @@
#
# 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
#
# Special thanks goes to:

View File

@ -2,7 +2,7 @@
#
# 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
#
# Special thanks goes to:

View File

@ -2,7 +2,7 @@
#
# 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
#
# Special thanks goes to:
@ -133,6 +133,10 @@ sub EventProcessingGeneral {
}
}
else { # alles was kein Devicenamen mit übergeben hat landet hier
::Log3( $name, 4,
"AutoShuttersControl ($name) - EventProcessing: All without device name in the Event"
);
if (
$events =~ m{^ATTR\s(.*)
\s(ASC_Roommate_Device|ASC_WindowRec|ASC_residentsDev|ASC_rainSensor
@ -170,6 +174,10 @@ sub EventProcessingGeneral {
(.*)?}xms
)
{
::Log3( $name, 4,
"AutoShuttersControl ($name) - EventProcessing: Morning and Evening Time Shedules"
);
FHEM::Automation::ShuttersControl::CreateSunRiseSetShuttersTimer(
$hash, $2 )
if (
@ -1355,6 +1363,7 @@ sub EventProcessingWind {
my $name = $hash->{NAME};
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
my $targetPos = $FHEM::Automation::ShuttersControl::shutters->getLastPos;
my $reading =
$FHEM::Automation::ShuttersControl::ascDev->getWindSensorReading
@ -1406,35 +1415,38 @@ sub EventProcessingWind {
{
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
'wind un-protected');
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd(
(
$FHEM::Automation::ShuttersControl::shutters->getIsDay
? $FHEM::Automation::ShuttersControl::shutters
->getLastPos
: (
$FHEM::Automation::ShuttersControl::shutters
->getShuttersPlace eq 'awning'
? $FHEM::Automation::ShuttersControl::shutters
->getOpenPos
: (
if ( $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
->getPrivacyDownPos
: (
$FHEM::Automation::ShuttersControl::shutters
->getSleepPos > 0
? $FHEM::Automation::ShuttersControl::shutters
->getSleepPos
: $FHEM::Automation::ShuttersControl::shutters
->getClosedPos
)
)
)
)
);
}
$FHEM::Automation::ShuttersControl::shutters
->setWindProtectionStatus('unprotected');
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd(
$targetPos);
}
FHEM::Automation::ShuttersControl::ASC_Debug(

View File

@ -2,7 +2,7 @@
#
# 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
#
# Special thanks goes to:
@ -399,6 +399,8 @@ sub _IsDay {
or $FHEM::Automation::ShuttersControl::shutters->getRoommates
ne 'gotosleep' )
)
or ( $FHEM::Automation::ShuttersControl::shutters->getShuttersPlace eq
'awning' )
);
return $respIsDay;

View File

@ -2,7 +2,7 @@
#
# 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
#
# Special thanks goes to:
@ -154,6 +154,7 @@ sub _RainProtected {
sub _RainUnprotected {
my $h = shift;
my $targetPos = $FHEM::Automation::ShuttersControl::shutters->getLastPos;
my $shuttersDev = $h->{shuttersdevice};
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
@ -170,29 +171,35 @@ sub _RainUnprotected {
->setRainUnprotectionDelayObj('none');
}
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd(
(
$FHEM::Automation::ShuttersControl::shutters->getIsDay
? $FHEM::Automation::ShuttersControl::shutters->getLastPos
: (
$FHEM::Automation::ShuttersControl::shutters->getShuttersPlace
eq 'awning'
? $FHEM::Automation::ShuttersControl::shutters->getOpenPos
: (
$FHEM::Automation::ShuttersControl::shutters
->getPrivacyDownStatus == 2
? $FHEM::Automation::ShuttersControl::shutters
->getPrivacyDownPos
: $FHEM::Automation::ShuttersControl::shutters
->getClosedPos
)
)
)
) if ( IsAfterShuttersTimeBlocking($shuttersDev) );
if ( $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
&& $FHEM::Automation::ShuttersControl::shutters->getShuttersPlace ne
'awning' )
{
$targetPos = (
$FHEM::Automation::ShuttersControl::shutters->getPrivacyDownStatus
== 2
? $FHEM::Automation::ShuttersControl::shutters->getPrivacyDownPos
: $FHEM::Automation::ShuttersControl::shutters->getClosedPos
);
}
$FHEM::Automation::ShuttersControl::shutters->setRainProtectionStatus(
'unprotected');
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd($targetPos)
if ( IsAfterShuttersTimeBlocking($shuttersDev) );
return;
}

View File

@ -2,7 +2,7 @@
#
# 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
#
# Special thanks goes to:

View File

@ -2,7 +2,7 @@
#
# 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
#
# Special thanks goes to:
@ -287,6 +287,8 @@ sub ShadingProcessing {
|| $FHEM::Automation::ShuttersControl::shutters->getShadingMode eq 'off'
|| $FHEM::Automation::ShuttersControl::ascDev
->getAutoShuttersControlShading eq 'off'
|| $FHEM::Automation::ShuttersControl::shutters
->getExternalTriggerStatus
);
::Log3( $name, 4,

View File

@ -2,7 +2,7 @@
#
# 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
#
# Special thanks goes to:
@ -162,10 +162,6 @@ sub setDriveCmd {
$FHEM::Automation::ShuttersControl::ascDev->setDelayCmdReading;
$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::shutters->getShuttersDev
. ' - Die Fahrt wird zurückgestellt. Grund kann ein geöffnetes Fenster sein oder ein aktivierter Party Modus oder Weihnachtszeit'

View File

@ -2,7 +2,7 @@
#
# 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
#
# Special thanks goes to:

View File

@ -2,7 +2,7 @@
#
# 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
#
# Special thanks goes to:

View File

@ -2,7 +2,7 @@
#
# 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
#
# Special thanks goes to:

View File

@ -2,7 +2,7 @@
#
# 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
#
# Special thanks goes to:

View File

@ -2,7 +2,7 @@
#
# 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
#
# Special thanks goes to: