Compare commits
690 Commits
Author | SHA1 | Date | |
---|---|---|---|
dd2cb7d2b8 | |||
3c1e539ef8 | |||
e155fbf3ec | |||
2178943e3a | |||
ef9349ec90 | |||
640cd620b5 | |||
9039254ead | |||
8923b8edbe | |||
81489d5246 | |||
833a370347 | |||
fb50355d39 | |||
d41615c90f | |||
be5e721c43 | |||
2351e5b9db | |||
d4626a068b | |||
0571adccc5 | |||
8ec3bcde54 | |||
bd97e399bf | |||
d409662969 | |||
c1c3e2cbdf | |||
72298746ab | |||
787114040c | |||
b517e032cf | |||
|
30cf6f41d7 | ||
|
eef3dc7b21 | ||
|
cfe3963f32 | ||
|
b654481df1 | ||
e19c902780 | |||
757a19bdb5 | |||
52930d9a07 | |||
e1592b8b7d | |||
7eb1079458 | |||
ceecbb063a | |||
49b0ff17fa | |||
ae5057fbc5 | |||
9cd0d364b4 | |||
f216e1b308 | |||
6f137256e0 | |||
cc5ef41e21 | |||
587d4e4316 | |||
|
3542e51375 | ||
|
f517b72f23 | ||
|
ad5cbaac12 | ||
8da3b13bcc | |||
c09edf5496 | |||
cd1c2c104a | |||
51256c1ed9 | |||
c0a7bfa6df | |||
403936fe73 | |||
5095c65d80 | |||
0bd8d6273f | |||
c3b61def25 | |||
9c096902e8 | |||
6dfc92c35e | |||
9994af6ca2 | |||
eb85a74a07 | |||
358c760b45 | |||
34a6a88401 | |||
bb80fb5d3a | |||
2907e19d3b | |||
ae86468077 | |||
7cba141447 | |||
f67d56e1cc | |||
527d72dd57 | |||
459b8508ec | |||
ac87015478 | |||
26105fa434 | |||
15be0a6885 | |||
cca6e90303 | |||
de5d6cbc6a | |||
|
4925e654ec | ||
97caf64308 | |||
6bf2b17d6f | |||
|
fb27bedf48 | ||
f52187ad35 | |||
103697184e | |||
c9894453bb | |||
14eee0e6dd | |||
9545dda125 | |||
3135a27c63 | |||
13689963f1 | |||
d8881ff6d1 | |||
12f48e98b5 | |||
a1d19a797d | |||
f1f265b89a | |||
ca99e2bd0c | |||
29e3a1a8d7 | |||
e02395a82f | |||
663ce748e2 | |||
d35dda835a | |||
47be49617d | |||
0dc0a9c6e4 | |||
79d369b9f5 | |||
8109cd7ebe | |||
842e41e3dc | |||
35a4f60a53 | |||
ef650b2d4b | |||
bf773ca2d7 | |||
ae88630277 | |||
f811cfd87f | |||
1a71c63652 | |||
7d3d11d1e2 | |||
1eeeb85eaf | |||
|
397f949a21 | ||
|
4ea1db3aa0 | ||
|
004a15ea42 | ||
|
9a1b6acad3 | ||
4aa24587a5 | |||
c76280639f | |||
a3c023711c | |||
c6e88f2d45 | |||
f0f5cbde4b | |||
5928276b74 | |||
32a3ac9d13 | |||
ef590e002e | |||
427018ab46 | |||
89431a2af3 | |||
39c7ec3dc5 | |||
37044b2316 | |||
a44fffe94e | |||
870f2be5d8 | |||
36669f1405 | |||
a61458cfc2 | |||
8c17eb5f6a | |||
d87ddb146c | |||
58b2f20f19 | |||
301fd32048 | |||
0255be94b5 | |||
4773fd0ea0 | |||
1ce3805427 | |||
5f00d33fa9 | |||
|
da79e25929 | ||
|
0b22ac9e12 | ||
e6a01cdb18 | |||
fb44ff9f1a | |||
9663b2dd43 | |||
d6cb059eaf | |||
6774e3a918 | |||
e28fad13d7 | |||
1c1ac77851 | |||
1ac38a7216 | |||
8d6044c404 | |||
fcce22b102 | |||
4b5b03a8fc | |||
f412e88325 | |||
0dca852ad0 | |||
8ea4101747 | |||
b9a7328661 | |||
f03a7d690f | |||
5ccceaba16 | |||
54450962ac | |||
9409c60400 | |||
75f5b6bf01 | |||
98edf0c5f6 | |||
a9a47f9e70 | |||
f2b7e8490f | |||
3d7f9fcf92 | |||
e037a12879 | |||
096e4ab815 | |||
feba24bf99 | |||
e5a6bbdbe5 | |||
a66daa7d5a | |||
617b7a7531 | |||
f498829347 | |||
4cc3ecc40a | |||
95446cc91e | |||
63393b4cd4 | |||
6a62226a39 | |||
cbd058773d | |||
1016b7d087 | |||
649d21f19b | |||
93bd0cd22e | |||
62a4a249b4 | |||
e66aa0cb4d | |||
34afd51a11 | |||
a2c878e333 | |||
bb1d139ed7 | |||
|
ef5b9a982e | ||
4c1d6c7885 | |||
2b12b9ed10 | |||
6babb451c9 | |||
9afc3ccf97 | |||
|
bee5ff33ae | ||
|
9ba046452a | ||
|
5e60229c7a | ||
|
8009a27869 | ||
|
0b048e7dc0 | ||
bd6e901ca1 | |||
f36101f48a | |||
f51cdf4943 | |||
2c68ae8406 | |||
697cdd1089 | |||
d3af20bc01 | |||
7882128336 | |||
c25c395a5b | |||
d89a05632b | |||
879caa1b25 | |||
f5004dbc93 | |||
c1b71c12b4 | |||
93420b80f1 | |||
52fe367c81 | |||
7b988a395d | |||
4d968405fd | |||
774fe63a26 | |||
aadc88c570 | |||
7f7fcae522 | |||
7454200c7a | |||
c5b1a03c65 | |||
273e53fb83 | |||
9e41936dcd | |||
f6085b2df8 | |||
4851ecb6a7 | |||
df27f70161 | |||
dd75295e94 | |||
c3f7191f70 | |||
70644d715d | |||
2012ec1fc3 | |||
36285e57bb | |||
f1124548da | |||
9a3dd21e26 | |||
489a7d829f | |||
4f2af22628 | |||
a0c08bdfc0 | |||
c63f4d64d5 | |||
c6e25e391b | |||
bfeadd0bbf | |||
ba4d2203f4 | |||
07c4755845 | |||
98529d3c15 | |||
cd080e1d4d | |||
9eda91cac1 | |||
c18f128722 | |||
|
8e93599f3b | ||
|
0289358b83 | ||
|
4ceb3a1ab8 | ||
e74c9a8b28 | |||
4604fcb0b0 | |||
3bb26eb255 | |||
b0805d0fc8 | |||
b71a74b52e | |||
2c6f8bacab | |||
121b9063ea | |||
5cfcd4de2b | |||
1a8685eae3 | |||
b69493ac6f | |||
31e2afe553 | |||
09fd5cd36b | |||
a2d88bddf2 | |||
7b55671166 | |||
61d9f29ad7 | |||
3535042915 | |||
154f6a58de | |||
70a56ddf3b | |||
7ef429c80f | |||
9439e3b2e2 | |||
95f520901a | |||
13134ebcdb | |||
8a5a6cafdd | |||
fbca7af3c6 | |||
7f88f4c82f | |||
d1b04fcdce | |||
0b4a5a0d4f | |||
338db55e05 | |||
5d270eca3a | |||
7a154a5f85 | |||
933b4f1c91 | |||
ed1325e735 | |||
4792dcea10 | |||
b0ff527957 | |||
eb28fef84f | |||
fa82a77665 | |||
84da158b64 | |||
684f91b697 | |||
8329cf35d1 | |||
9eef44ca3a | |||
27cf612b2f | |||
58f86d05e0 | |||
a27233869b | |||
770be1d91e | |||
f74ec772b9 | |||
00eeb93318 | |||
b7160fa8b4 | |||
d9ae8152d1 | |||
864138a2e3 | |||
f8800e910b | |||
269288c24a | |||
ea8813cd2c | |||
b6bb0af471 | |||
11870789e1 | |||
468d5713b2 | |||
b8488ebdc2 | |||
2850f6394f | |||
417ecbf8fd | |||
2bafc3d433 | |||
a37b6eddb9 | |||
b6034b7357 | |||
4ffcc1a7ef | |||
daf94c9483 | |||
1efe3b576c | |||
b928c021c2 | |||
5df984048d | |||
c6b76320a4 | |||
3f8397a6a2 | |||
05479ffdd6 | |||
8812be8fca | |||
924363fe18 | |||
837ad71c48 | |||
82934125fe | |||
185fe7576b | |||
331b0b0432 | |||
857683fbe2 | |||
bb6f4860f9 | |||
026904e898 | |||
554195f476 | |||
0d168b488a | |||
7200ebfbb3 | |||
254c84ffe1 | |||
9bbd2445e2 | |||
af7894753c | |||
9f2eeea6d8 | |||
4a5b4d9ac1 | |||
109a67e388 | |||
83fe657171 | |||
af727cd2f2 | |||
ad1c541891 | |||
c69b72c081 | |||
7b83072b83 | |||
7511e4254b | |||
242de9523b | |||
cd2adb49f3 | |||
cb7c3f8667 | |||
63f86165ba | |||
d3e05719f0 | |||
92a9175fe3 | |||
c607e9b81a | |||
20584f6294 | |||
245a9b7357 | |||
7a60b04777 | |||
8d748b65ce | |||
c356217eaf | |||
d5d8d5a116 | |||
2d2c10ed9c | |||
9fafc505ae | |||
|
b79ab5efaf | ||
|
2bd44d3073 | ||
|
60db9c4f5d | ||
|
b2a70e6917 | ||
|
6d755015aa | ||
|
d34d71277c | ||
|
80831c167b | ||
|
5ab7c09712 | ||
|
4e493e6a4b | ||
|
c1695ae811 | ||
|
1b90829744 | ||
|
9b3ca6618a | ||
|
5ddf5adfad | ||
|
3b31474e18 | ||
|
f3979f090f | ||
|
c19f9728a0 | ||
|
4e0e9203c9 | ||
|
578b96a4ff | ||
|
e5ce1f40e3 | ||
|
fd708c2685 | ||
|
a5d1582d5a | ||
|
29e35be498 | ||
|
0fa7dc308c | ||
|
82a9d2c930 | ||
|
ccbe471931 | ||
|
242e056069 | ||
|
2dc5da70c2 | ||
|
419bba1e74 | ||
|
b440b1b96e | ||
|
3b5cb7730f | ||
|
ca56067e5c | ||
|
6ab65372d2 | ||
|
2e7deafc55 | ||
|
ac818f6250 | ||
|
e87578a082 | ||
|
a61adbef0c | ||
|
9d0a1b0141 | ||
|
15b186b4c7 | ||
|
2a2122f93a | ||
|
c1a4c5a470 | ||
|
20191f4565 | ||
|
806074325f | ||
|
1a2b8f52cd | ||
|
ce5fb58b34 | ||
|
9268276518 | ||
|
47066ea068 | ||
|
7a0aad9ff7 | ||
|
0498d0323b | ||
|
d98e5a903c | ||
|
005340a2fa | ||
|
9d77ac4811 | ||
|
3e7becaf89 | ||
|
2a90962675 | ||
|
fc81592a32 | ||
|
63ec20cde6 | ||
|
e4a2f82419 | ||
|
107a2b1c96 | ||
|
ed5be615e0 | ||
|
9ed15f90fe | ||
|
fbc7a39fe0 | ||
|
0e8137eb09 | ||
|
dc4982fa19 | ||
|
770fd0d26f | ||
|
775219b034 | ||
|
1f99f0fbd7 | ||
|
f50f20f197 | ||
|
65708ae9ec | ||
|
c87353f204 | ||
|
6ad0baabe5 | ||
|
3607269e72 | ||
|
c0104a3c53 | ||
|
453794ecd5 | ||
|
18b6286cbc | ||
|
6fa8fa8817 | ||
|
164a85edaa | ||
|
f61ceaf6f0 | ||
|
df93a8b8c1 | ||
|
78427bf1bc | ||
|
95349ce3db | ||
|
b1025d746d | ||
|
b2e035b6a2 | ||
|
9b96323f3e | ||
|
a38a29a99d | ||
|
ab54aba823 | ||
|
aad143c2cc | ||
|
a871e70dec | ||
|
b60ddfd90b | ||
|
9a5ef3654e | ||
|
2338089eba | ||
|
219187bd7b | ||
|
8a9db0fd8f | ||
|
d7adb36ca5 | ||
|
62caa1d5c3 | ||
|
f311bcf9cb | ||
|
3e1fe3f329 | ||
|
9d050b7b28 | ||
|
878bf99a16 | ||
|
3ef0ae9ccf | ||
|
42007fa86b | ||
|
831f8a37ff | ||
|
cb8f3d693a | ||
|
f59c40ead6 | ||
|
9fcf615af8 | ||
|
208bac6ae0 | ||
|
0e9a212aa0 | ||
|
b608d511ce | ||
|
4bdb540368 | ||
|
46eb9da8c8 | ||
|
4454838eba | ||
|
0081b53d16 | ||
|
412243e2bd | ||
|
fa552d8a25 | ||
|
caddb87d57 | ||
|
68f9f46fb5 | ||
|
f8218646a7 | ||
|
d421be61d1 | ||
|
2ddda0c622 | ||
|
bca593a36c | ||
|
72a35e94d2 | ||
|
44b4837664 | ||
|
42e4fdcc44 | ||
|
85d5ffefba | ||
|
f2548ee6fa | ||
|
f718eeabf8 | ||
|
87d18928c0 | ||
|
eeffd9b16b | ||
|
02c16ebc6c | ||
|
e361bc037e | ||
|
97a9e2fce4 | ||
|
3396c515b9 | ||
|
a3333949ae | ||
|
3f90155119 | ||
|
11029985ee | ||
|
c27a8b46ba | ||
|
b4927e169f | ||
|
eb61c5c7e0 | ||
|
4d52cd52a4 | ||
|
58544edf2a | ||
|
11782224c9 | ||
|
60ae53a9cf | ||
|
1776f8bd3b | ||
|
3ae315d1e3 | ||
|
f654d4f8a5 | ||
|
a7519695f6 | ||
|
34d87eef17 | ||
|
3bfe619164 | ||
|
7c37fe11b6 | ||
|
a11eb2487d | ||
|
ac3c2bb14b | ||
|
6bbb8e9ea6 | ||
|
27e20d2e07 | ||
|
d83beb1a2a | ||
|
e1c33c76f4 | ||
|
a55566a8a5 | ||
|
ecf1935164 | ||
|
aeec2d88f8 | ||
|
47e64de57d | ||
|
2f41ead59d | ||
|
5deccc4f58 | ||
|
52f17be042 | ||
|
ebbb84494c | ||
|
8bd2ad315c | ||
|
804bfbf80b | ||
|
be8fa1135e | ||
|
3dcce78568 | ||
|
2c2d420251 | ||
|
3121e88fb2 | ||
|
9f488925c1 | ||
|
81f610374a | ||
|
36f0f45fb4 | ||
|
ce32256130 | ||
|
2b5bc24fd2 | ||
|
f11e8d88e1 | ||
|
e2d49c7c02 | ||
|
39edc75094 | ||
|
4ae99c00f5 | ||
|
6526ad8301 | ||
|
89087dde59 | ||
|
c335249e63 | ||
|
14f714943b | ||
|
c0260bf7e5 | ||
|
ab5966fc79 | ||
|
c5e08affc5 | ||
|
63ba3a5997 | ||
|
a8493a6122 | ||
|
443d661416 | ||
|
d4e6a19106 | ||
|
3b5e668544 | ||
|
bd39083d67 | ||
|
df3006fe25 | ||
|
43f9fc9099 | ||
|
afc094de0b | ||
|
b49eae10e3 | ||
|
e589864a0a | ||
|
7009423fa9 | ||
|
7d47fae3a7 | ||
|
03ffe3e1fd | ||
|
d845966849 | ||
|
f143f06da4 | ||
|
d113f02250 | ||
|
410ae9ed90 | ||
|
8035f9a5c6 | ||
|
07c3a5d634 | ||
|
1a379a3153 | ||
|
e76092fce4 | ||
|
ce425067b7 | ||
|
23b0333c88 | ||
|
9e570fc894 | ||
|
74073aea09 | ||
|
440ce81a70 | ||
|
deca4e3900 | ||
|
964a6879d9 | ||
|
19ff67a6ce | ||
|
7f78529215 | ||
|
2e92283a65 | ||
|
8d1bc376d5 | ||
|
3d9b4b5ba9 | ||
|
87de357005 | ||
|
9629906c3c | ||
|
7e906691db | ||
|
123ad8747b | ||
|
8d1358ff91 | ||
|
0fff9e28a1 | ||
|
9ad485e747 | ||
|
cdb35a98f7 | ||
|
cc16dcf0c5 | ||
|
4c72e24ca7 | ||
|
2b5368ef0f | ||
|
27c75dd3ed | ||
|
222ad38d44 | ||
|
aa4092867d | ||
|
31b9bacbe7 | ||
|
20e419de35 | ||
|
a1be549c67 | ||
|
50a7b70f6a | ||
|
e3c63a0a93 | ||
|
0128f07505 | ||
|
a85b7fcb33 | ||
|
5504103597 | ||
|
2b7a388450 | ||
|
697ca99192 | ||
|
1729e8eba1 | ||
|
a158862210 | ||
|
75437ab202 | ||
|
3023b3fedf | ||
|
510a5e40d0 | ||
|
4437c3ef9f | ||
|
f60b64ddb6 | ||
|
682486414e | ||
|
6d7ecf5e7d | ||
|
f85035dda5 | ||
|
cc0722d35c | ||
|
1f4156388d | ||
|
d73d3225bb | ||
|
77c6350b0b | ||
|
52849d54d3 | ||
|
1d78161bb6 | ||
|
711f42748b | ||
|
d3bdcc38bb | ||
|
bea678f565 | ||
|
d7d4b8b493 | ||
|
f4abf21cb7 | ||
|
f4a45fce51 | ||
|
1571caf277 | ||
|
97e4ef8511 | ||
|
e57fc0ac1f | ||
|
ac7d9b212a | ||
|
4c5c24ff79 | ||
|
6359a67195 | ||
|
ba1b317799 | ||
|
03d0094942 | ||
|
6b7db998be | ||
|
fac703e385 | ||
|
81a8ef64ec | ||
|
b4ab616774 | ||
|
b76b03794c | ||
|
7d3a572825 | ||
|
8596983126 | ||
|
89331090ce | ||
|
94770e7939 | ||
|
1f98f2ceb4 | ||
|
1c190fb41a | ||
|
b1aacde894 | ||
|
836283e2aa | ||
|
9997f67025 | ||
|
88175a7699 | ||
|
cca397c338 | ||
|
91f160fc6a | ||
|
5ff52208f4 | ||
|
9a6f1f5036 | ||
|
2d9478be05 | ||
|
2ce59ed9a5 | ||
|
45b6130bd0 | ||
|
31bd4cea24 | ||
|
05b46042de | ||
|
64910661a1 | ||
|
69810dcf70 | ||
|
e18d609e5f | ||
|
6396cd25d5 | ||
|
f9f84f07d4 | ||
|
11d3942916 | ||
|
aa0dc90a2e | ||
|
d139f8dd40 | ||
|
d9858108ed | ||
|
f3953e00b4 | ||
|
987827a088 | ||
|
0ca68a3713 | ||
|
ff69349147 | ||
|
beeef8ccf3 | ||
|
465ea6134b | ||
|
ed631686d9 | ||
|
4011a56656 | ||
|
83ec288728 | ||
|
9c7fc36737 | ||
|
1589fd3650 | ||
|
94ce9163ec | ||
|
9f4eef1442 | ||
|
b39f18c8bb | ||
|
01be69baec | ||
|
6b9459f267 | ||
|
72633c9fb1 | ||
|
755984fd1d | ||
|
68c15c9f8b | ||
|
88cfc01271 | ||
|
f061794145 | ||
|
0582052748 | ||
|
2943624a60 | ||
|
6a8c0f03b1 | ||
|
348058782f | ||
|
86bcdb05d0 | ||
|
2eb113dd6d | ||
|
f2d7559f1b | ||
|
3ededcb209 | ||
|
0aa3b79a4b | ||
|
62ca4ead34 | ||
|
207342fc64 | ||
|
fa55f73d8d | ||
|
62f46596c8 | ||
|
f7ef511489 | ||
|
ca9c01226d | ||
|
f3605737c5 | ||
|
435bb4346a | ||
|
797022cb82 | ||
|
c0e157164d | ||
|
7aa58167f2 | ||
|
e4e32c6c9e | ||
|
056010fc35 |
File diff suppressed because it is too large
Load Diff
8549
CHANGELOG.md
Normal file
8549
CHANGELOG.md
Normal file
File diff suppressed because it is too large
Load Diff
1519
FHEM/73_AutoShuttersControl.pm
Normal file
1519
FHEM/73_AutoShuttersControl.pm
Normal file
File diff suppressed because it is too large
Load Diff
339
LICENSE
Normal file
339
LICENSE
Normal file
@ -0,0 +1,339 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Lesser General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License.
|
16
controls_AutoShuttersControl.txt
Normal file
16
controls_AutoShuttersControl.txt
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
UPD 2025-02-05_07:57:04 117935 FHEM/73_AutoShuttersControl.pm
|
||||||
|
UPD 2025-01-25_11:47:02 76570 lib/FHEM/Automation/ShuttersControl.pm
|
||||||
|
UPD 2024-10-12_09:12:30 2691 lib/FHEM/Automation/ShuttersControl/Dev.pm
|
||||||
|
UPD 2024-10-12_09:12:30 2675 lib/FHEM/Automation/ShuttersControl/Roommate.pm
|
||||||
|
UPD 2024-10-12_09:12:30 31828 lib/FHEM/Automation/ShuttersControl/Shutters.pm
|
||||||
|
UPD 2024-10-12_09:12:30 25541 lib/FHEM/Automation/ShuttersControl/Shading.pm
|
||||||
|
UPD 2024-10-12_09:12:30 112297 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
|
||||||
|
UPD 2024-10-12_09:12:30 40681 lib/FHEM/Automation/ShuttersControl/Helper.pm
|
||||||
|
UPD 2024-10-12_09:12:30 2209 lib/FHEM/Automation/ShuttersControl/Window.pm
|
||||||
|
UPD 2024-10-12_09:12:30 11857 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
|
||||||
|
UPD 2024-10-12_09:12:30 7265 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
|
||||||
|
UPD 2024-10-12_09:12:30 52751 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
|
||||||
|
UPD 2024-10-12_09:12:30 2799 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
|
||||||
|
UPD 2024-10-12_09:12:30 3887 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
|
||||||
|
UPD 2024-10-12_09:12:30 2200 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm
|
||||||
|
UPD 2024-10-12_09:12:30 7394 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm
|
36
hooks/commit-msg
Executable file
36
hooks/commit-msg
Executable 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
18
hooks/post-commit
Executable 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
|
53
hooks/pre-commit
Executable file
53
hooks/pre-commit
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
use File::Basename;
|
||||||
|
use POSIX qw(strftime);
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
my @filenames = ( 'FHEM/73_AutoShuttersControl.pm',
|
||||||
|
'lib/FHEM/Automation/ShuttersControl.pm',
|
||||||
|
'lib/FHEM/Automation/ShuttersControl/Dev.pm',
|
||||||
|
'lib/FHEM/Automation/ShuttersControl/Roommate.pm',
|
||||||
|
'lib/FHEM/Automation/ShuttersControl/Shutters.pm',
|
||||||
|
'lib/FHEM/Automation/ShuttersControl/Shading.pm',
|
||||||
|
'lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm',
|
||||||
|
'lib/FHEM/Automation/ShuttersControl/Helper.pm',
|
||||||
|
'lib/FHEM/Automation/ShuttersControl/Window.pm',
|
||||||
|
'lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm',
|
||||||
|
'lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm',
|
||||||
|
'lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm',
|
||||||
|
'lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm',
|
||||||
|
'lib/FHEM/Automation/ShuttersControl/Window/Attr.pm',
|
||||||
|
'lib/FHEM/Automation/ShuttersControl/Window/Readings.pm',
|
||||||
|
'lib/FHEM/Automation/ShuttersControl/Rainprotection.pm'
|
||||||
|
);
|
||||||
|
|
||||||
|
my $controlsfile = 'controls_AutoShuttersControl.txt';
|
||||||
|
|
||||||
|
open(FH, ">$controlsfile") || return("Can't open $controlsfile: $!");
|
||||||
|
|
||||||
|
for my $filename (@filenames) {
|
||||||
|
my @statOutput = stat($filename);
|
||||||
|
|
||||||
|
if (scalar @statOutput != 13) {
|
||||||
|
printf 'error: stat has unexpected return value for ' . $filename . "\n";
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $mtime = $statOutput[9];
|
||||||
|
my $date = POSIX::strftime("%Y-%m-%d", localtime($mtime));
|
||||||
|
my $time = POSIX::strftime("%H:%M:%S", localtime($mtime));
|
||||||
|
my $filetime = $date."_".$time;
|
||||||
|
|
||||||
|
my $filesize = $statOutput[7];
|
||||||
|
|
||||||
|
printf FH 'UPD ' . $filetime . ' ' . $filesize . ' ' .$filename . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
close(FH);
|
||||||
|
|
||||||
|
system("git add $controlsfile");
|
||||||
|
|
||||||
|
print 'Create controls File succesfully' . "\n";
|
||||||
|
|
||||||
|
exit 0;
|
2100
lib/FHEM/Automation/ShuttersControl.pm
Normal file
2100
lib/FHEM/Automation/ShuttersControl.pm
Normal file
File diff suppressed because it is too large
Load Diff
83
lib/FHEM/Automation/ShuttersControl/Dev.pm
Normal file
83
lib/FHEM/Automation/ShuttersControl/Dev.pm
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Developed with VSCodium and richterger perl plugin
|
||||||
|
#
|
||||||
|
# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||||
|
# All rights reserved
|
||||||
|
#
|
||||||
|
# Special thanks goes to:
|
||||||
|
# - Bernd (Cluni) this module is based on the logic of his script "Rollladensteuerung für HM/ROLLO inkl. Abschattung und Komfortfunktionen in Perl" (https://forum.fhem.de/index.php/topic,73964.0.html)
|
||||||
|
# - Beta-User for many tests, many suggestions and good discussions
|
||||||
|
# - pc1246 write english commandref
|
||||||
|
# - FunkOdyssey commandref style
|
||||||
|
# - sledge fix many typo in commandref
|
||||||
|
# - many User that use with modul and report bugs
|
||||||
|
# - Christoph (christoph.kaiser.in) Patch that expand RegEx for Window Events
|
||||||
|
# - Julian (Loredo) expand Residents Events for new Residents functions
|
||||||
|
# - Christoph (Christoph Morrison) for fix Commandref, many suggestions and good discussions
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# This script is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License,or
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# The GNU General Public License can be found at
|
||||||
|
# http://www.gnu.org/copyleft/gpl.html.
|
||||||
|
# A copy is found in the textfile GPL.txt and important notices to the license
|
||||||
|
# from the author is found in LICENSE.txt distributed with these scripts.
|
||||||
|
#
|
||||||
|
# This script is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
## Klasse ASC_Dev plus Subklassen ASC_Attr_Dev und ASC_Readings_Dev##
|
||||||
|
package FHEM::Automation::ShuttersControl::Dev;
|
||||||
|
|
||||||
|
use FHEM::Automation::ShuttersControl::Dev::Readings;
|
||||||
|
use FHEM::Automation::ShuttersControl::Dev::Attr;
|
||||||
|
|
||||||
|
use base
|
||||||
|
qw(FHEM::Automation::ShuttersControl::Dev::Readings FHEM::Automation::ShuttersControl::Dev::Attr);
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use utf8;
|
||||||
|
|
||||||
|
sub new {
|
||||||
|
my $class = shift;
|
||||||
|
|
||||||
|
my $self = { name => undef, };
|
||||||
|
|
||||||
|
bless $self, $class;
|
||||||
|
return $self;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub setName {
|
||||||
|
my $self = shift;
|
||||||
|
my $name = shift;
|
||||||
|
|
||||||
|
$self->{name} = $name if ( defined($name) );
|
||||||
|
return $self->{name};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub setDefault {
|
||||||
|
my $self = shift;
|
||||||
|
my $defaultarg = shift;
|
||||||
|
|
||||||
|
$self->{defaultarg} = $defaultarg if ( defined($defaultarg) );
|
||||||
|
return $self->{defaultarg};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getName {
|
||||||
|
my $self = shift;
|
||||||
|
return $self->{name};
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
403
lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
Normal file
403
lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
Normal file
@ -0,0 +1,403 @@
|
|||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Developed with VSCodium and richterger perl plugin
|
||||||
|
#
|
||||||
|
# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||||
|
# All rights reserved
|
||||||
|
#
|
||||||
|
# Special thanks goes to:
|
||||||
|
# - Bernd (Cluni) this module is based on the logic of his script "Rollladensteuerung für HM/ROLLO inkl. Abschattung und Komfortfunktionen in Perl" (https://forum.fhem.de/index.php/topic,73964.0.html)
|
||||||
|
# - Beta-User for many tests, many suggestions and good discussions
|
||||||
|
# - pc1246 write english commandref
|
||||||
|
# - FunkOdyssey commandref style
|
||||||
|
# - sledge fix many typo in commandref
|
||||||
|
# - many User that use with modul and report bugs
|
||||||
|
# - Christoph (christoph.kaiser.in) Patch that expand RegEx for Window Events
|
||||||
|
# - Julian (Loredo) expand Residents Events for new Residents functions
|
||||||
|
# - Christoph (Christoph Morrison) for fix Commandref, many suggestions and good discussions
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# This script is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License,or
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# The GNU General Public License can be found at
|
||||||
|
# http://www.gnu.org/copyleft/gpl.html.
|
||||||
|
# A copy is found in the textfile GPL.txt and important notices to the license
|
||||||
|
# from the author is found in LICENSE.txt distributed with these scripts.
|
||||||
|
#
|
||||||
|
# This script is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
## Subklasse Attr ##
|
||||||
|
package FHEM::Automation::ShuttersControl::Dev::Attr;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use utf8;
|
||||||
|
|
||||||
|
sub getShuttersOffset {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::AttrVal( $name, 'ASC_shuttersDriveDelay', -1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getBrightnessMinVal {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return $self->{ASC_brightness}->{triggermin}
|
||||||
|
if ( exists( $self->{ASC_brightness}->{LASTGETTIME} )
|
||||||
|
&& ( ::gettimeofday() - $self->{ASC_brightness}->{LASTGETTIME} ) < 2 );
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->getBrightnessMaxVal;
|
||||||
|
|
||||||
|
return $self->{ASC_brightness}->{triggermin};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getBrightnessMaxVal {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return $self->{ASC_brightness}->{triggermax}
|
||||||
|
if ( exists( $self->{ASC_brightness}->{LASTGETTIME} )
|
||||||
|
&& ( ::gettimeofday() - $self->{ASC_brightness}->{LASTGETTIME} ) < 2 );
|
||||||
|
$self->{ASC_brightness}->{LASTGETTIME} = int( ::gettimeofday() );
|
||||||
|
|
||||||
|
my ( $triggermax, $triggermin ) =
|
||||||
|
FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name,
|
||||||
|
'ASC_brightnessDriveUpDown', '800:500' );
|
||||||
|
|
||||||
|
## erwartetes Ergebnis
|
||||||
|
# max:min
|
||||||
|
|
||||||
|
$self->{ASC_brightness}->{triggermin} = $triggermin;
|
||||||
|
$self->{ASC_brightness}->{triggermax} = $triggermax;
|
||||||
|
|
||||||
|
return $self->{ASC_brightness}->{triggermax};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _getTwilightDevice {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::AttrVal( $name, 'ASC_twilightDevice', 'none' );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getAutoAstroModeEvening {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::AttrVal( $name, 'ASC_autoAstroModeEvening', 'REAL' );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getAutoAstroModeEveningHorizon {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::AttrVal( $name, 'ASC_autoAstroModeEveningHorizon', 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getAutoAstroModeMorning {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::AttrVal( $name, 'ASC_autoAstroModeMorning', 'REAL' );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getAutoAstroModeMorningHorizon {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::AttrVal( $name, 'ASC_autoAstroModeMorningHorizon', 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getAutoShuttersControlMorning {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::AttrVal( $name, 'ASC_autoShuttersControlMorning', 'on' );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getAutoShuttersControlEvening {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::AttrVal( $name, 'ASC_autoShuttersControlEvening', 'on' );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getAutoShuttersControlComfort {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::AttrVal( $name, 'ASC_autoShuttersControlComfort', 'off' );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getFreezeTemp {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::AttrVal( $name, 'ASC_freezeTemp', 3 );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getSlatDriveCmdInverse {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::AttrVal( $name, 'ASC_slatDriveCmdInverse', 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _getTempSensor {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return $self->{ASC_tempSensor}->{device}
|
||||||
|
if ( exists( $self->{ASC_tempSensor}->{LASTGETTIME} )
|
||||||
|
&& ( ::gettimeofday() - $self->{ASC_tempSensor}->{LASTGETTIME} ) < 2 );
|
||||||
|
$self->{ASC_tempSensor}->{LASTGETTIME} = int( ::gettimeofday() );
|
||||||
|
my ( $device, $reading ) =
|
||||||
|
FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name,
|
||||||
|
'ASC_tempSensor', 'none' );
|
||||||
|
|
||||||
|
## erwartetes Ergebnis
|
||||||
|
# DEVICE:READING
|
||||||
|
$self->{ASC_tempSensor}->{device} = $device;
|
||||||
|
$self->{ASC_tempSensor}->{reading} =
|
||||||
|
( $reading ne 'none' ? $reading : 'temperature' );
|
||||||
|
|
||||||
|
return $self->{ASC_tempSensor}->{device};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getTempSensorReading {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return $self->{ASC_tempSensor}->{reading}
|
||||||
|
if ( exists( $self->{ASC_tempSensor}->{LASTGETTIME} )
|
||||||
|
&& ( ::gettimeofday() - $self->{ASC_tempSensor}->{LASTGETTIME} ) < 2 );
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getTempSensor;
|
||||||
|
return $self->{ASC_tempSensor}->{reading};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _getResidentsDev {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return $self->{ASC_residentsDev}->{device}
|
||||||
|
if ( exists( $self->{ASC_residentsDev}->{LASTGETTIME} )
|
||||||
|
&& ( ::gettimeofday() - $self->{ASC_residentsDev}->{LASTGETTIME} ) <
|
||||||
|
2 );
|
||||||
|
$self->{ASC_residentsDev}->{LASTGETTIME} = int( ::gettimeofday() );
|
||||||
|
my ( $device, $reading ) =
|
||||||
|
FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name,
|
||||||
|
'ASC_residentsDev', 'none' );
|
||||||
|
|
||||||
|
$self->{ASC_residentsDev}->{device} = $device;
|
||||||
|
$self->{ASC_residentsDev}->{reading} =
|
||||||
|
( $reading ne 'none' ? $reading : 'state' );
|
||||||
|
|
||||||
|
return $self->{ASC_residentsDev}->{device};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getResidentsReading {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return $self->{ASC_residentsDev}->{reading}
|
||||||
|
if ( exists( $self->{ASC_residentsDev}->{LASTGETTIME} )
|
||||||
|
&& ( ::gettimeofday() - $self->{ASC_residentsDev}->{LASTGETTIME} ) <
|
||||||
|
2 );
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev;
|
||||||
|
return $self->{ASC_residentsDev}->{reading};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _getRainSensor {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return $self->{ASC_rainSensor}->{device}
|
||||||
|
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
||||||
|
&& ( ::gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
||||||
|
$self->{ASC_rainSensor}->{LASTGETTIME} = int( ::gettimeofday() );
|
||||||
|
my ( $device, $reading, $max, $hyst, $pos, $wait ) =
|
||||||
|
FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name,
|
||||||
|
'ASC_rainSensor', 'none' );
|
||||||
|
|
||||||
|
## erwartetes Ergebnis
|
||||||
|
# DEVICE:READING MAX:HYST
|
||||||
|
|
||||||
|
return $device if ( $device eq 'none' );
|
||||||
|
$self->{ASC_rainSensor}->{device} = $device;
|
||||||
|
$self->{ASC_rainSensor}->{reading} =
|
||||||
|
( $reading ne 'none' ? $reading : 'rain' );
|
||||||
|
$self->{ASC_rainSensor}->{triggermax} = (
|
||||||
|
( $max ne 'none' && $max =~ m{\A(-?\d+(\.\d+)?)\z}xms )
|
||||||
|
? $max
|
||||||
|
: 1000
|
||||||
|
);
|
||||||
|
|
||||||
|
$self->{ASC_rainSensor}->{triggerhyst} = (
|
||||||
|
$hyst ne 'none'
|
||||||
|
? $self->{ASC_rainSensor}->{triggermax} - $hyst
|
||||||
|
: ( $self->{ASC_rainSensor}->{triggermax} * 0 )
|
||||||
|
);
|
||||||
|
|
||||||
|
$self->{ASC_rainSensor}->{shuttersClosedPos} = (
|
||||||
|
$pos ne 'none'
|
||||||
|
? $pos
|
||||||
|
: $FHEM::Automation::ShuttersControl::shutters->getClosedPos
|
||||||
|
);
|
||||||
|
$self->{ASC_rainSensor}->{waitingTime} =
|
||||||
|
( $wait ne 'none' ? $wait : 0 );
|
||||||
|
|
||||||
|
return $self->{ASC_rainSensor}->{device};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getRainSensorReading {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return $self->{ASC_rainSensor}->{reading}
|
||||||
|
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
||||||
|
&& ( ::gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getRainSensor;
|
||||||
|
return $self->{ASC_rainSensor}->{reading};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getRainTriggerMax {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return $self->{ASC_rainSensor}->{triggermax}
|
||||||
|
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
||||||
|
&& ( ::gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getRainSensor;
|
||||||
|
return $self->{ASC_rainSensor}->{triggermax};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getRainTriggerMin {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return $self->{ASC_rainSensor}->{triggerhyst}
|
||||||
|
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
||||||
|
&& ( ::gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getRainSensor;
|
||||||
|
return $self->{ASC_rainSensor}->{triggerhyst};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getRainSensorShuttersClosedPos {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return $self->{ASC_rainSensor}->{shuttersClosedPos}
|
||||||
|
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
||||||
|
&& ( ::gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getRainSensor;
|
||||||
|
return $self->{ASC_rainSensor}->{shuttersClosedPos};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getRainWaitingTime {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return $self->{ASC_rainSensor}->{waitingTime}
|
||||||
|
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
||||||
|
&& ( ::gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getRainSensor;
|
||||||
|
return $self->{ASC_rainSensor}->{waitingTime};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _getWindSensor {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return $self->{ASC_windSensor}->{device}
|
||||||
|
if ( exists( $self->{ASC_windSensor}->{LASTGETTIME} )
|
||||||
|
&& ( ::gettimeofday() - $self->{ASC_windSensor}->{LASTGETTIME} ) < 2 );
|
||||||
|
$self->{ASC_windSensor}->{LASTGETTIME} = int( ::gettimeofday() );
|
||||||
|
my ( $device, $reading ) =
|
||||||
|
FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name,
|
||||||
|
'ASC_windSensor', 'none' );
|
||||||
|
|
||||||
|
return $device if ( $device eq 'none' );
|
||||||
|
$self->{ASC_windSensor}->{device} = $device;
|
||||||
|
$self->{ASC_windSensor}->{reading} =
|
||||||
|
( $reading ne 'none' ? $reading : 'wind' );
|
||||||
|
|
||||||
|
return $self->{ASC_windSensor}->{device};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getWindSensorReading {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return $self->{ASC_windSensor}->{reading}
|
||||||
|
if ( exists( $self->{ASC_windSensor}->{LASTGETTIME} )
|
||||||
|
&& ( ::gettimeofday() - $self->{ASC_windSensor}->{LASTGETTIME} ) < 2 );
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getWindSensor;
|
||||||
|
return (
|
||||||
|
defined( $self->{ASC_windSensor}->{reading} )
|
||||||
|
? $self->{ASC_windSensor}->{reading}
|
||||||
|
: 'wind'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getBlockAscDrivesAfterManual {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::AttrVal( $name, 'ASC_blockAscDrivesAfterManual', 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getAdvStartDate {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::AttrVal( $name, 'ASC_advStartDate', 'FirstAdvent' );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getAdvEndDate {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::AttrVal( $name, 'ASC_advEndDate', 'EpiphanyDay' );
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
284
lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
Normal file
284
lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
Normal file
@ -0,0 +1,284 @@
|
|||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Developed with VSCodium and richterger perl plugin
|
||||||
|
#
|
||||||
|
# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||||
|
# All rights reserved
|
||||||
|
#
|
||||||
|
# Special thanks goes to:
|
||||||
|
# - Bernd (Cluni) this module is based on the logic of his script "Rollladensteuerung für HM/ROLLO inkl. Abschattung und Komfortfunktionen in Perl" (https://forum.fhem.de/index.php/topic,73964.0.html)
|
||||||
|
# - Beta-User for many tests, many suggestions and good discussions
|
||||||
|
# - pc1246 write english commandref
|
||||||
|
# - FunkOdyssey commandref style
|
||||||
|
# - sledge fix many typo in commandref
|
||||||
|
# - many User that use with modul and report bugs
|
||||||
|
# - Christoph (christoph.kaiser.in) Patch that expand RegEx for Window Events
|
||||||
|
# - Julian (Loredo) expand Residents Events for new Residents functions
|
||||||
|
# - Christoph (Christoph Morrison) for fix Commandref, many suggestions and good discussions
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# This script is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License,or
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# The GNU General Public License can be found at
|
||||||
|
# http://www.gnu.org/copyleft/gpl.html.
|
||||||
|
# A copy is found in the textfile GPL.txt and important notices to the license
|
||||||
|
# from the author is found in LICENSE.txt distributed with these scripts.
|
||||||
|
#
|
||||||
|
# This script is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
## Subklasse Readings ##
|
||||||
|
package FHEM::Automation::ShuttersControl::Dev::Readings;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use utf8;
|
||||||
|
|
||||||
|
use GPUtils qw(GP_Import);
|
||||||
|
|
||||||
|
## Import der FHEM Funktionen
|
||||||
|
BEGIN {
|
||||||
|
GP_Import(qw(defs));
|
||||||
|
}
|
||||||
|
|
||||||
|
sub setDelayCmdReading {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
my $hash = $defs{$name};
|
||||||
|
|
||||||
|
::readingsSingleUpdate(
|
||||||
|
$hash,
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||||
|
. '_lastDelayPosValue',
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getDelayCmd,
|
||||||
|
1
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub setStateReading {
|
||||||
|
my $self = shift;
|
||||||
|
my $value = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
my $hash = $defs{$name};
|
||||||
|
|
||||||
|
::readingsSingleUpdate(
|
||||||
|
$hash, 'state',
|
||||||
|
(
|
||||||
|
defined($value)
|
||||||
|
? $value
|
||||||
|
: $FHEM::Automation::ShuttersControl::shutters->getLastDrive
|
||||||
|
),
|
||||||
|
1
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub setPosReading {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
my $hash = $defs{$name};
|
||||||
|
|
||||||
|
::readingsSingleUpdate(
|
||||||
|
$hash,
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||||
|
. '_PosValue',
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getStatus,
|
||||||
|
1
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub setLastPosReading {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
my $hash = $defs{$name};
|
||||||
|
|
||||||
|
::readingsSingleUpdate(
|
||||||
|
$hash,
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||||
|
. '_lastPosValue',
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getLastPos,
|
||||||
|
1
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getPartyMode {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::ReadingsVal( $name, 'partyMode', 'off' );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getHardLockOut {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::ReadingsVal( $name, 'hardLockOut', 'none' );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getSunriseTimeWeHoliday {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::ReadingsVal( $name, 'sunriseTimeWeHoliday', 'none' );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getMonitoredDevs {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
$self->{monitoredDevs} = ::ReadingsVal( $name, '.monitoredDevs', 'none' );
|
||||||
|
return $self->{monitoredDevs};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getOutTemp {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
return ::ReadingsVal(
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getTempSensor,
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->getTempSensorReading,
|
||||||
|
-100 );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getResidentsStatus {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $val =
|
||||||
|
::ReadingsVal(
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev,
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->getResidentsReading,
|
||||||
|
'none' );
|
||||||
|
|
||||||
|
if ( $val =~ m{^(?:(.+)_)?(.+)$}xms ) {
|
||||||
|
return ( $1, $2 ) if (wantarray);
|
||||||
|
return $1 && $1 eq 'pet' ? 'absent' : $2;
|
||||||
|
}
|
||||||
|
elsif (
|
||||||
|
::ReadingsVal(
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev,
|
||||||
|
'homealoneType', '-' ) eq 'PET'
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return ( 'pet', 'absent' ) if (wantarray);
|
||||||
|
return 'absent';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return ( undef, $val ) if (wantarray);
|
||||||
|
return $val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getResidentsLastStatus {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $val =
|
||||||
|
::ReadingsVal(
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev,
|
||||||
|
'lastState', 'none' );
|
||||||
|
|
||||||
|
if ( $val =~ m{^(?:(.+)_)?(.+)$}xms ) {
|
||||||
|
return ( $1, $2 ) if (wantarray);
|
||||||
|
return $1 && $1 eq 'pet' ? 'absent' : $2;
|
||||||
|
}
|
||||||
|
elsif (
|
||||||
|
::ReadingsVal(
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev,
|
||||||
|
'lastHomealoneType', '-' ) eq 'PET'
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return ( 'pet', 'absent' ) if (wantarray);
|
||||||
|
return 'absent';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return ( undef, $val ) if (wantarray);
|
||||||
|
return $val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getAutoShuttersControlShading {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::ReadingsVal( $name, 'controlShading', 'none' );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getSelfDefense {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::ReadingsVal( $name, 'selfDefense', 'none' );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getAzimuth {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $azimuth;
|
||||||
|
|
||||||
|
$azimuth = ::ReadingsVal(
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice,
|
||||||
|
'azimuth', -1 )
|
||||||
|
if (
|
||||||
|
$defs{ $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice }
|
||||||
|
->{TYPE} eq 'Twilight' );
|
||||||
|
$azimuth = ::ReadingsVal(
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice,
|
||||||
|
'SunAz', -1 )
|
||||||
|
if (
|
||||||
|
$defs{ $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice }
|
||||||
|
->{TYPE} eq 'Astro' );
|
||||||
|
|
||||||
|
return $azimuth;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getElevation {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $elevation;
|
||||||
|
|
||||||
|
$elevation = ::ReadingsVal(
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice,
|
||||||
|
'elevation', -1 )
|
||||||
|
if (
|
||||||
|
$defs{ $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice }
|
||||||
|
->{TYPE} eq 'Twilight' );
|
||||||
|
$elevation = ::ReadingsVal(
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice,
|
||||||
|
'SunAlt', -1 )
|
||||||
|
if (
|
||||||
|
$defs{ $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice }
|
||||||
|
->{TYPE} eq 'Astro' );
|
||||||
|
|
||||||
|
return $elevation;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getASCenable {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::ReadingsVal( $name, 'ascEnable', 'none' );
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
2544
lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
Normal file
2544
lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
Normal file
File diff suppressed because it is too large
Load Diff
1072
lib/FHEM/Automation/ShuttersControl/Helper.pm
Normal file
1072
lib/FHEM/Automation/ShuttersControl/Helper.pm
Normal file
File diff suppressed because it is too large
Load Diff
206
lib/FHEM/Automation/ShuttersControl/Rainprotection.pm
Normal file
206
lib/FHEM/Automation/ShuttersControl/Rainprotection.pm
Normal file
@ -0,0 +1,206 @@
|
|||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Developed with VSCodium and richterger perl plugin
|
||||||
|
#
|
||||||
|
# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||||
|
# All rights reserved
|
||||||
|
#
|
||||||
|
# Special thanks goes to:
|
||||||
|
# - Bernd (Cluni) this module is based on the logic of his script "Rollladensteuerung für HM/ROLLO inkl. Abschattung und Komfortfunktionen in Perl" (https://forum.fhem.de/index.php/topic,73964.0.html)
|
||||||
|
# - Beta-User for many tests, many suggestions and good discussions
|
||||||
|
# - pc1246 write english commandref
|
||||||
|
# - FunkOdyssey commandref style
|
||||||
|
# - sledge fix many typo in commandref
|
||||||
|
# - many User that use with modul and report bugs
|
||||||
|
# - Christoph (christoph.kaiser.in) Patch that expand RegEx for Window Events
|
||||||
|
# - Julian (Loredo) expand Residents Events for new Residents functions
|
||||||
|
# - Christoph (Christoph Morrison) for fix Commandref, many suggestions and good discussions
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# This script is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License,or
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# The GNU General Public License can be found at
|
||||||
|
# http://www.gnu.org/copyleft/gpl.html.
|
||||||
|
# A copy is found in the textfile GPL.txt and important notices to the license
|
||||||
|
# from the author is found in LICENSE.txt distributed with these scripts.
|
||||||
|
#
|
||||||
|
# This script is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
## unserer packagename
|
||||||
|
package FHEM::Automation::ShuttersControl::Rainprotection;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use utf8;
|
||||||
|
|
||||||
|
use FHEM::Automation::ShuttersControl::Helper qw (:ALL);
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
use base qw(Exporter);
|
||||||
|
|
||||||
|
# our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
RainProcessing
|
||||||
|
);
|
||||||
|
our %EXPORT_TAGS = (
|
||||||
|
ALL => [
|
||||||
|
qw(
|
||||||
|
RainProcessing
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
sub RainProcessing {
|
||||||
|
my ( $hash, $val, $triggerMax, $triggerMin ) = @_;
|
||||||
|
|
||||||
|
my $rainClosedPos = $FHEM::Automation::ShuttersControl::ascDev
|
||||||
|
->getRainSensorShuttersClosedPos;
|
||||||
|
|
||||||
|
for my $shuttersDev ( @{ $hash->{helper}{shuttersList} } ) {
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev(
|
||||||
|
$shuttersDev);
|
||||||
|
|
||||||
|
next
|
||||||
|
if (
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getRainProtection eq
|
||||||
|
'off' );
|
||||||
|
|
||||||
|
if (
|
||||||
|
$val > $triggerMax
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters->getStatus !=
|
||||||
|
$rainClosedPos
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getRainProtectionStatus eq 'unprotected'
|
||||||
|
|| ( $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getRainProtectionStatus eq 'unprotected'
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getRainUnprotectionDelayObj ne 'none' )
|
||||||
|
)
|
||||||
|
{
|
||||||
|
_RainProtected();
|
||||||
|
}
|
||||||
|
elsif ( ( $val == 0 || $val < $triggerMin )
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters->getStatus ==
|
||||||
|
$rainClosedPos
|
||||||
|
&& IsAfterShuttersManualBlocking($shuttersDev)
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getRainProtectionStatus eq 'protected' )
|
||||||
|
{
|
||||||
|
my %funcHash = ( shuttersdevice => $shuttersDev, );
|
||||||
|
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->setRainUnprotectionDelayObj( \%funcHash );
|
||||||
|
::InternalTimer(
|
||||||
|
::gettimeofday() +
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev
|
||||||
|
->getRainWaitingTime,
|
||||||
|
\&_RainUnprotected, \%funcHash
|
||||||
|
);
|
||||||
|
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->setRainProtectionStatus('unprotected');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if ( $FHEM::Automation::ShuttersControl::shutters->getStatus !=
|
||||||
|
$rainClosedPos
|
||||||
|
&& ( $val == 0 || $val < $triggerMin ) )
|
||||||
|
{
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->setRainProtectionStatus('unprotected');
|
||||||
|
}
|
||||||
|
elsif ( $val > $triggerMax ) {
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->setRainProtectionStatus('protected');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
### es muss noch beobachtet werden ob die Auswahl des Rollos welches bearbeitet werden soll bestehen bleibt oder mit in die neuen Funktionen übergeben werden muss
|
||||||
|
sub _RainProtected {
|
||||||
|
::RemoveInternalTimer( $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getRainUnprotectionDelayObj )
|
||||||
|
if ( $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getRainUnprotectionDelayObj ne 'none' );
|
||||||
|
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setRainUnprotectionDelayObj(
|
||||||
|
'none');
|
||||||
|
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
||||||
|
'rain protected');
|
||||||
|
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd(
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev
|
||||||
|
->getRainSensorShuttersClosedPos );
|
||||||
|
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setRainProtectionStatus(
|
||||||
|
'protected');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _RainUnprotected {
|
||||||
|
my $h = shift;
|
||||||
|
my $targetPos = $FHEM::Automation::ShuttersControl::shutters->getLastPos;
|
||||||
|
|
||||||
|
my $shuttersDev = $h->{shuttersdevice};
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
|
||||||
|
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
||||||
|
'rain un-protected');
|
||||||
|
|
||||||
|
if ( $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getRainUnprotectionDelayObj ne 'none' )
|
||||||
|
{
|
||||||
|
::RemoveInternalTimer( $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getRainUnprotectionDelayObj );
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->setRainUnprotectionDelayObj('none');
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
84
lib/FHEM/Automation/ShuttersControl/Roommate.pm
Normal file
84
lib/FHEM/Automation/ShuttersControl/Roommate.pm
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Developed with VSCodium and richterger perl plugin
|
||||||
|
#
|
||||||
|
# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||||
|
# All rights reserved
|
||||||
|
#
|
||||||
|
# Special thanks goes to:
|
||||||
|
# - Bernd (Cluni) this module is based on the logic of his script "Rollladensteuerung für HM/ROLLO inkl. Abschattung und Komfortfunktionen in Perl" (https://forum.fhem.de/index.php/topic,73964.0.html)
|
||||||
|
# - Beta-User for many tests, many suggestions and good discussions
|
||||||
|
# - pc1246 write english commandref
|
||||||
|
# - FunkOdyssey commandref style
|
||||||
|
# - sledge fix many typo in commandref
|
||||||
|
# - many User that use with modul and report bugs
|
||||||
|
# - Christoph (christoph.kaiser.in) Patch that expand RegEx for Window Events
|
||||||
|
# - Julian (Loredo) expand Residents Events for new Residents functions
|
||||||
|
# - Christoph (Christoph Morrison) for fix Commandref, many suggestions and good discussions
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# This script is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License,or
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# The GNU General Public License can be found at
|
||||||
|
# http://www.gnu.org/copyleft/gpl.html.
|
||||||
|
# A copy is found in the textfile GPL.txt and important notices to the license
|
||||||
|
# from the author is found in LICENSE.txt distributed with these scripts.
|
||||||
|
#
|
||||||
|
# This script is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
## Klasse ASC_Roommate ##
|
||||||
|
package FHEM::Automation::ShuttersControl::Roommate;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use utf8;
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
use base qw(Exporter);
|
||||||
|
|
||||||
|
# our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
getRoommateStatus
|
||||||
|
getRoommateLastStatus
|
||||||
|
);
|
||||||
|
our %EXPORT_TAGS = (
|
||||||
|
ALL => [
|
||||||
|
qw(
|
||||||
|
getRoommateStatus
|
||||||
|
getRoommateLastStatus
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
sub getRoommateStatus {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $roommate = $self->{roommate};
|
||||||
|
|
||||||
|
return ::ReadingsVal( $roommate,
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getRoommatesReading,
|
||||||
|
'none' );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getRoommateLastStatus {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $roommate = $self->{roommate};
|
||||||
|
my $default = $self->{defaultarg};
|
||||||
|
|
||||||
|
$default = 'none' if ( !defined($default) );
|
||||||
|
return ::ReadingsVal( $roommate, 'lastState', $default );
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
672
lib/FHEM/Automation/ShuttersControl/Shading.pm
Normal file
672
lib/FHEM/Automation/ShuttersControl/Shading.pm
Normal file
@ -0,0 +1,672 @@
|
|||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Developed with VSCodium and richterger perl plugin
|
||||||
|
#
|
||||||
|
# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||||
|
# All rights reserved
|
||||||
|
#
|
||||||
|
# Special thanks goes to:
|
||||||
|
# - Bernd (Cluni) this module is based on the logic of his script "Rollladensteuerung für HM/ROLLO inkl. Abschattung und Komfortfunktionen in Perl" (https://forum.fhem.de/index.php/topic,73964.0.html)
|
||||||
|
# - Beta-User for many tests, many suggestions and good discussions
|
||||||
|
# - pc1246 write english commandref
|
||||||
|
# - FunkOdyssey commandref style
|
||||||
|
# - sledge fix many typo in commandref
|
||||||
|
# - many User that use with modul and report bugs
|
||||||
|
# - Christoph (christoph.kaiser.in) Patch that expand RegEx for Window Events
|
||||||
|
# - Julian (Loredo) expand Residents Events for new Residents functions
|
||||||
|
# - Christoph (Christoph Morrison) for fix Commandref, many suggestions and good discussions
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# This script is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License,or
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# The GNU General Public License can be found at
|
||||||
|
# http://www.gnu.org/copyleft/gpl.html.
|
||||||
|
# A copy is found in the textfile GPL.txt and important notices to the license
|
||||||
|
# from the author is found in LICENSE.txt distributed with these scripts.
|
||||||
|
#
|
||||||
|
# This script is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
## unserer packagename
|
||||||
|
package FHEM::Automation::ShuttersControl::Shading;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use POSIX qw(strftime);
|
||||||
|
use utf8;
|
||||||
|
|
||||||
|
use FHEM::Automation::ShuttersControl::Helper qw (IsInTime);
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
use base qw(Exporter);
|
||||||
|
|
||||||
|
# our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
CheckASC_ConditionsForShadingFn
|
||||||
|
ShadingProcessing
|
||||||
|
ShadingProcessingDriveCommand
|
||||||
|
);
|
||||||
|
our %EXPORT_TAGS = (
|
||||||
|
ALL => [
|
||||||
|
qw(
|
||||||
|
CheckASC_ConditionsForShadingFn
|
||||||
|
ShadingProcessing
|
||||||
|
ShadingProcessingDriveCommand
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
sub CheckASC_ConditionsForShadingFn {
|
||||||
|
my $hash = shift;
|
||||||
|
my $value = shift;
|
||||||
|
|
||||||
|
my $error;
|
||||||
|
|
||||||
|
$error .=
|
||||||
|
' no valid data from the ASC temperature sensor, is ASC_tempSensor attribut set?'
|
||||||
|
if ( $FHEM::Automation::ShuttersControl::ascDev->getOutTemp == -100 );
|
||||||
|
$error .= ' no twilight device found'
|
||||||
|
if ( $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice eq
|
||||||
|
'none' );
|
||||||
|
|
||||||
|
my $count = 1;
|
||||||
|
for my $shuttersDev ( @{ $hash->{helper}{shuttersList} } ) {
|
||||||
|
my %funcHash = (
|
||||||
|
hash => $hash,
|
||||||
|
shuttersdevice => $shuttersDev,
|
||||||
|
value => $value,
|
||||||
|
attrEvent => 0,
|
||||||
|
);
|
||||||
|
|
||||||
|
::InternalTimer(
|
||||||
|
::gettimeofday() + $count,
|
||||||
|
'FHEM::Automation::ShuttersControl::Shading::_CheckShuttersConditionsForShadingFn',
|
||||||
|
\%funcHash
|
||||||
|
);
|
||||||
|
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
defined($error)
|
||||||
|
? $error
|
||||||
|
: 'none'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _CheckShuttersConditionsForShadingFn {
|
||||||
|
my $funcHash = shift;
|
||||||
|
|
||||||
|
my $hash = $funcHash->{hash};
|
||||||
|
my $shuttersDev = $funcHash->{shuttersdevice};
|
||||||
|
my $value = $funcHash->{value};
|
||||||
|
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
|
||||||
|
my $shuttersDevHash = $::defs{$shuttersDev};
|
||||||
|
my $message = '';
|
||||||
|
my $errorMessage;
|
||||||
|
my $warnMessage;
|
||||||
|
my $infoMessage;
|
||||||
|
|
||||||
|
if ( $value eq 'off' ) {
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setShadingStatus('out');
|
||||||
|
$infoMessage .= ' shading was deactivated '
|
||||||
|
. ( $funcHash->{attrEvent} ? 'in the device' : 'globally' );
|
||||||
|
$errorMessage .= '';
|
||||||
|
ShadingProcessingDriveCommand( $hash, $shuttersDev );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$infoMessage .= (
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingMode ne
|
||||||
|
'off'
|
||||||
|
&& $FHEM::Automation::ShuttersControl::ascDev
|
||||||
|
->getAutoShuttersControlShading eq 'on'
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters->getOutTemp ==
|
||||||
|
-100
|
||||||
|
? ' shading active, global temp sensor is set, but shutters temperature sensor is not set'
|
||||||
|
: ''
|
||||||
|
);
|
||||||
|
|
||||||
|
$warnMessage .= (
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingMode eq
|
||||||
|
'off'
|
||||||
|
&& $FHEM::Automation::ShuttersControl::ascDev
|
||||||
|
->getAutoShuttersControlShading eq 'on'
|
||||||
|
? ' global shading active but ASC_Shading_Mode attribut is not set or off'
|
||||||
|
: ''
|
||||||
|
);
|
||||||
|
|
||||||
|
$errorMessage .= (
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingMode ne
|
||||||
|
'off'
|
||||||
|
&& $FHEM::Automation::ShuttersControl::ascDev
|
||||||
|
->getAutoShuttersControlShading ne 'on'
|
||||||
|
&& $FHEM::Automation::ShuttersControl::ascDev
|
||||||
|
->getAutoShuttersControlShading ne 'off'
|
||||||
|
? ' ASC_Shading_Mode attribut is set but global shading has errors, look at ASC device '
|
||||||
|
. '<a href="'
|
||||||
|
. '/fhem?detail='
|
||||||
|
. ::ReadingsVal( $shuttersDev, 'associatedWith', 'ASC device' )
|
||||||
|
. $::FW_CSRF . '">'
|
||||||
|
. ::ReadingsVal( $shuttersDev, 'associatedWith', 'ASC device' )
|
||||||
|
. '</a>'
|
||||||
|
: ''
|
||||||
|
);
|
||||||
|
|
||||||
|
$errorMessage .= (
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getBrightness == -1
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters->getShadingMode
|
||||||
|
ne 'off'
|
||||||
|
? ' no brightness sensor found, please set ASC_BrightnessSensor attribut'
|
||||||
|
: ''
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$message .= ' ERROR: ' . $errorMessage
|
||||||
|
if ( defined($errorMessage)
|
||||||
|
&& $errorMessage ne '' );
|
||||||
|
|
||||||
|
$message .= ' WARN: ' . $warnMessage
|
||||||
|
if ( defined($warnMessage)
|
||||||
|
&& $warnMessage ne ''
|
||||||
|
&& $errorMessage eq '' );
|
||||||
|
|
||||||
|
$message .= ' INFO: ' . $infoMessage
|
||||||
|
if ( defined($infoMessage)
|
||||||
|
&& $infoMessage ne ''
|
||||||
|
&& $errorMessage eq '' );
|
||||||
|
|
||||||
|
::readingsBeginUpdate($shuttersDevHash);
|
||||||
|
::readingsBulkUpdateIfChanged( $shuttersDevHash, 'ASC_ShadingMessage',
|
||||||
|
'<html>' . $message . ' </html>' );
|
||||||
|
::readingsEndUpdate( $shuttersDevHash, 1 );
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub ShadingProcessing {
|
||||||
|
### angleMinus ist $FHEM::Automation::ShuttersControl::shutters->getShadingAzimuthLeft
|
||||||
|
### anglePlus ist $FHEM::Automation::ShuttersControl::shutters->getShadingAzimuthRight
|
||||||
|
### winPos ist die Fensterposition $FHEM::Automation::ShuttersControl::shutters->getDirection
|
||||||
|
my ( $hash, $shuttersDev, $azimuth, $elevation, $outTemp,
|
||||||
|
$azimuthLeft, $azimuthRight )
|
||||||
|
= @_;
|
||||||
|
|
||||||
|
my $name = $hash->{NAME};
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
|
||||||
|
my $brightness =
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getBrightnessAverage;
|
||||||
|
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->setShadingBetweenTheTimeSuspend(
|
||||||
|
(
|
||||||
|
IsInTime(
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingBetweenTheTime
|
||||||
|
)
|
||||||
|
? 0
|
||||||
|
: 1
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
FHEM::Automation::ShuttersControl::ASC_Debug(
|
||||||
|
'ShadingProcessing: '
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||||
|
. ' - Übergebende Werte - Azimuth:'
|
||||||
|
. $azimuth
|
||||||
|
. ', Elevation: '
|
||||||
|
. $elevation
|
||||||
|
. ', Brightness: '
|
||||||
|
. $brightness
|
||||||
|
. ', OutTemp: '
|
||||||
|
. $outTemp
|
||||||
|
. ', Azimut Beschattung: '
|
||||||
|
. $azimuthLeft
|
||||||
|
. ', Azimut Endschattung: '
|
||||||
|
. $azimuthRight
|
||||||
|
. ', Ist es nach der Zeitblockadezeit: '
|
||||||
|
. (
|
||||||
|
FHEM::Automation::ShuttersControl::Helper::IsAfterShuttersTimeBlocking(
|
||||||
|
$shuttersDev) ? 'JA' : 'NEIN'
|
||||||
|
)
|
||||||
|
. ', Das Rollo ist in der Beschattung und wurde manuell gefahren: '
|
||||||
|
. (
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingManualDriveStatus ? 'JA' : 'NEIN'
|
||||||
|
)
|
||||||
|
. ', Ist es nach der Hälfte der Beschattungswartezeit: '
|
||||||
|
. (
|
||||||
|
(
|
||||||
|
int( ::gettimeofday() ) -
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingStatusTimestamp
|
||||||
|
) < (
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingWaitingPeriod / 2
|
||||||
|
) ? 'NEIN' : 'JA'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
::Log3( $name, 4,
|
||||||
|
"AutoShuttersControl ($name) - Shading Processing, Rollladen: "
|
||||||
|
. $shuttersDev
|
||||||
|
. " Azimuth: "
|
||||||
|
. $azimuth
|
||||||
|
. " Elevation: "
|
||||||
|
. $elevation
|
||||||
|
. " Brightness: "
|
||||||
|
. $brightness
|
||||||
|
. " OutTemp: "
|
||||||
|
. $outTemp );
|
||||||
|
|
||||||
|
return
|
||||||
|
if (
|
||||||
|
$azimuth == -1
|
||||||
|
|| $elevation == -1
|
||||||
|
|| $brightness == -1
|
||||||
|
|| $outTemp == -100
|
||||||
|
|| (
|
||||||
|
int( ::gettimeofday() ) -
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingStatusTimestamp ) < (
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingWaitingPeriod / 2
|
||||||
|
)
|
||||||
|
|| $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getExternalTriggerStatus
|
||||||
|
|| $FHEM::Automation::ShuttersControl::shutters->getShadingMode eq 'off'
|
||||||
|
|| $FHEM::Automation::ShuttersControl::ascDev
|
||||||
|
->getAutoShuttersControlShading eq 'off'
|
||||||
|
|| $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getExternalTriggerStatus
|
||||||
|
);
|
||||||
|
|
||||||
|
::Log3( $name, 4,
|
||||||
|
"AutoShuttersControl ($name) - Shading Processing, Rollladen: "
|
||||||
|
. $shuttersDev
|
||||||
|
. " Nach dem return" );
|
||||||
|
|
||||||
|
my $getShadingPos =
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingPos;
|
||||||
|
my $getStatus = $FHEM::Automation::ShuttersControl::shutters->getStatus;
|
||||||
|
my $oldShadingStatus =
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingStatus;
|
||||||
|
my $shuttersDevHash = $::defs{$shuttersDev};
|
||||||
|
|
||||||
|
my $getModeUp = $FHEM::Automation::ShuttersControl::shutters->getModeUp;
|
||||||
|
my $homemode = $FHEM::Automation::ShuttersControl::shutters->getHomemode;
|
||||||
|
|
||||||
|
FHEM::Automation::ShuttersControl::ASC_Debug( 'ShadingProcessing: '
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||||
|
. ' - Alle Werte für die weitere Verarbeitung sind korrekt vorhanden und es wird nun mit der Beschattungsverarbeitung begonnen'
|
||||||
|
);
|
||||||
|
|
||||||
|
if (
|
||||||
|
(
|
||||||
|
$outTemp < $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingMinOutsideTemperature - 4
|
||||||
|
|| $azimuth < $azimuthLeft
|
||||||
|
|| $azimuth > $azimuthRight
|
||||||
|
|| ( !$FHEM::Automation::ShuttersControl::shutters->getIsDay
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getSunriseUnixTime - ( int( ::gettimeofday() ) ) > 7200 )
|
||||||
|
)
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters->getShadingStatus ne
|
||||||
|
'out'
|
||||||
|
)
|
||||||
|
{
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setShadingStatus('out');
|
||||||
|
|
||||||
|
FHEM::Automation::ShuttersControl::ASC_Debug( 'ShadingProcessing: '
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||||
|
. ' - Es ist Nacht oder die Aussentemperatur unterhalb der Shading Temperatur. Die Beschattung wird Zwangsbeendet'
|
||||||
|
);
|
||||||
|
|
||||||
|
::Log3( $name, 4,
|
||||||
|
"AutoShuttersControl ($name) - Shading Processing - Der Sonnenstand ist ausserhalb der Winkelangaben oder die Aussentemperatur unterhalb der Shading Temperatur "
|
||||||
|
);
|
||||||
|
}
|
||||||
|
elsif ($azimuth < $azimuthLeft
|
||||||
|
|| $azimuth > $azimuthRight
|
||||||
|
|| $elevation <
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingMinElevation
|
||||||
|
|| $elevation >
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingMaxElevation
|
||||||
|
|| $brightness < $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingStateChangeCloudy
|
||||||
|
|| $outTemp < $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingMinOutsideTemperature - 1 )
|
||||||
|
{
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setShadingStatus(
|
||||||
|
'out reserved')
|
||||||
|
if ( $FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq
|
||||||
|
'in'
|
||||||
|
|| $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
|
||||||
|
eq 'in reserved' );
|
||||||
|
|
||||||
|
if (
|
||||||
|
(
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingStatus
|
||||||
|
eq 'out reserved'
|
||||||
|
and (
|
||||||
|
int( ::gettimeofday() ) -
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingStatusTimestamp )
|
||||||
|
) > $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingWaitingPeriod
|
||||||
|
)
|
||||||
|
{
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setShadingStatus(
|
||||||
|
'out');
|
||||||
|
}
|
||||||
|
|
||||||
|
::Log3( $name, 4,
|
||||||
|
"AutoShuttersControl ($name) - Shading Processing, Rollladen: "
|
||||||
|
. $shuttersDev
|
||||||
|
. " In der Out Abfrage, Shadingwert: "
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
|
||||||
|
. ", Zeitstempel: "
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingStatusTimestamp );
|
||||||
|
|
||||||
|
FHEM::Automation::ShuttersControl::ASC_Debug( 'ShadingProcessing: '
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||||
|
. ' - Einer der Beschattungsbedingungen wird nicht mehr erfüllt und somit wird der Beschattungsstatus um eine Stufe reduziert. Alter Status: '
|
||||||
|
. $oldShadingStatus
|
||||||
|
. ' Neuer Status: '
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
|
||||||
|
);
|
||||||
|
}
|
||||||
|
elsif ($azimuth > $azimuthLeft
|
||||||
|
&& $azimuth < $azimuthRight
|
||||||
|
&& $elevation >
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingMinElevation
|
||||||
|
&& $elevation <
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingMaxElevation
|
||||||
|
&& $brightness >
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingStateChangeSunny
|
||||||
|
&& $outTemp > $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingMinOutsideTemperature )
|
||||||
|
{
|
||||||
|
if ( $FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq
|
||||||
|
'out'
|
||||||
|
|| $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
|
||||||
|
eq 'out reserved' )
|
||||||
|
{
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setShadingStatus(
|
||||||
|
'in reserved');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq
|
||||||
|
'in reserved'
|
||||||
|
and (
|
||||||
|
int( ::gettimeofday() ) -
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingStatusTimestamp ) > (
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingWaitingPeriod / 2
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setShadingStatus(
|
||||||
|
'in');
|
||||||
|
}
|
||||||
|
|
||||||
|
::Log3( $name, 4,
|
||||||
|
"AutoShuttersControl ($name) - Shading Processing, Rollladen: "
|
||||||
|
. $shuttersDev
|
||||||
|
. " In der In Abfrage, Shadingwert: "
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
|
||||||
|
. ", Zeitstempel: "
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingStatusTimestamp );
|
||||||
|
|
||||||
|
FHEM::Automation::ShuttersControl::ASC_Debug( 'ShadingProcessing: '
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||||
|
. ' - Alle Beschattungsbedingungen wurden erfüllt und somit wird der Beschattungsstatus um eine Stufe angehoben. Alter Status: '
|
||||||
|
. $oldShadingStatus
|
||||||
|
. ' Neuer Status: '
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
ShadingProcessingDriveCommand( $hash, $shuttersDev )
|
||||||
|
if (
|
||||||
|
FHEM::Automation::ShuttersControl::Helper::IsAfterShuttersTimeBlocking(
|
||||||
|
$shuttersDev)
|
||||||
|
&& !$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingManualDriveStatus
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters->getRoommatesStatus ne
|
||||||
|
'gotosleep'
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters->getRoommatesStatus ne
|
||||||
|
'asleep'
|
||||||
|
&& (
|
||||||
|
(
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingStatus
|
||||||
|
eq 'out'
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingLastStatus eq 'in'
|
||||||
|
)
|
||||||
|
|| ( $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
|
||||||
|
eq 'in'
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingLastStatus eq 'out' )
|
||||||
|
)
|
||||||
|
&& ( $FHEM::Automation::ShuttersControl::shutters->getShadingMode eq
|
||||||
|
'always'
|
||||||
|
|| $FHEM::Automation::ShuttersControl::shutters->getShadingMode eq
|
||||||
|
$homemode )
|
||||||
|
&& (
|
||||||
|
$getModeUp eq 'always'
|
||||||
|
|| $getModeUp eq $homemode
|
||||||
|
|| $getModeUp eq 'off'
|
||||||
|
|| $getModeUp eq 'absent'
|
||||||
|
|| $getModeUp eq 'gone'
|
||||||
|
|| ( $getModeUp eq 'home'
|
||||||
|
&& $homemode ne 'asleep' )
|
||||||
|
)
|
||||||
|
&& (
|
||||||
|
(
|
||||||
|
(
|
||||||
|
int( ::gettimeofday() ) -
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingStatusTimestamp
|
||||||
|
) < 2
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters->getStatus !=
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getClosedPos
|
||||||
|
)
|
||||||
|
|| (
|
||||||
|
!$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getQueryShuttersPos(
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingPos
|
||||||
|
)
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters->getIfInShading
|
||||||
|
)
|
||||||
|
|| ( !$FHEM::Automation::ShuttersControl::shutters->getIfInShading
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters->getStatus ==
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingPos )
|
||||||
|
|| ( !$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingBetweenTheTimeSuspend
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters->getStatus !=
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingPos )
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
::readingsBeginUpdate($shuttersDevHash);
|
||||||
|
::readingsBulkUpdate(
|
||||||
|
$shuttersDevHash,
|
||||||
|
'ASC_ShadingMessage',
|
||||||
|
'INFO: current shading status is \''
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
|
||||||
|
. '\''
|
||||||
|
. ' - next check in '
|
||||||
|
. (
|
||||||
|
(
|
||||||
|
(
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingLastStatus eq 'out reserved'
|
||||||
|
|| $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingLastStatus eq 'out'
|
||||||
|
)
|
||||||
|
? $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingWaitingPeriod
|
||||||
|
: $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingWaitingPeriod / 2
|
||||||
|
)
|
||||||
|
) / 60
|
||||||
|
. 'm'
|
||||||
|
);
|
||||||
|
::readingsEndUpdate( $shuttersDevHash, 1 );
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub ShadingProcessingDriveCommand {
|
||||||
|
my $hash = shift;
|
||||||
|
my $shuttersDev = shift;
|
||||||
|
my $marker = shift // 0;
|
||||||
|
|
||||||
|
my $name = $hash->{NAME};
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
|
||||||
|
|
||||||
|
my $getShadingPos =
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingPos;
|
||||||
|
my $getStatus = $FHEM::Automation::ShuttersControl::shutters->getStatus;
|
||||||
|
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setShadingStatus(
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingStatus );
|
||||||
|
|
||||||
|
if (
|
||||||
|
IsInTime(
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingBetweenTheTime
|
||||||
|
)
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq
|
||||||
|
'in'
|
||||||
|
&& $getShadingPos != $getStatus
|
||||||
|
&& (
|
||||||
|
$getStatus !=
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getClosedPos
|
||||||
|
|| ( $getStatus ==
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getClosedPos
|
||||||
|
&& $marker )
|
||||||
|
)
|
||||||
|
&& (
|
||||||
|
$getStatus !=
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getSleepPos
|
||||||
|
|| ( $getStatus ==
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getSleepPos
|
||||||
|
&& $marker )
|
||||||
|
)
|
||||||
|
&& (
|
||||||
|
FHEM::Automation::ShuttersControl::CheckIfShuttersWindowRecOpen(
|
||||||
|
$shuttersDev) != 2
|
||||||
|
|| $FHEM::Automation::ShuttersControl::shutters->getShuttersPlace
|
||||||
|
ne 'terrace'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
||||||
|
'shading in');
|
||||||
|
FHEM::Automation::ShuttersControl::ShuttersCommandSet( $hash,
|
||||||
|
$shuttersDev, $getShadingPos );
|
||||||
|
|
||||||
|
FHEM::Automation::ShuttersControl::ASC_Debug(
|
||||||
|
'ShadingProcessingDriveCommand: '
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||||
|
. ' - Der aktuelle Beschattungsstatus ist: '
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
|
||||||
|
. ' und somit wird nun in die Position: '
|
||||||
|
. $getShadingPos
|
||||||
|
. ' zum Beschatten gefahren' );
|
||||||
|
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setShadingLastPos(
|
||||||
|
$getShadingPos);
|
||||||
|
}
|
||||||
|
elsif (
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq 'out'
|
||||||
|
&& $getShadingPos == $getStatus )
|
||||||
|
{
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
||||||
|
'shading out');
|
||||||
|
|
||||||
|
FHEM::Automation::ShuttersControl::ShuttersCommandSet(
|
||||||
|
$hash,
|
||||||
|
$shuttersDev,
|
||||||
|
(
|
||||||
|
(
|
||||||
|
$getShadingPos ==
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getLastPos
|
||||||
|
|| $getShadingPos ==
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingLastPos
|
||||||
|
)
|
||||||
|
? $FHEM::Automation::ShuttersControl::shutters->getOpenPos
|
||||||
|
: (
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getQueryShuttersPos(
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getLastPos
|
||||||
|
)
|
||||||
|
? (
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getLastPos ==
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getSleepPos
|
||||||
|
? $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getOpenPos
|
||||||
|
: $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getLastPos
|
||||||
|
)
|
||||||
|
: $FHEM::Automation::ShuttersControl::shutters->getOpenPos
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
if ( $FHEM::Automation::ShuttersControl::shutters->getIsDay
|
||||||
|
|| $FHEM::Automation::ShuttersControl::shutters->getShuttersPlace
|
||||||
|
eq 'awning' );
|
||||||
|
|
||||||
|
FHEM::Automation::ShuttersControl::ASC_Debug(
|
||||||
|
'ShadingProcessingDriveCommand: '
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||||
|
. ' - Der aktuelle Beschattungsstatus ist: '
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
|
||||||
|
. ' und somit wird nun in die Position: '
|
||||||
|
. $getShadingPos
|
||||||
|
. ' zum beenden der Beschattung gefahren' );
|
||||||
|
}
|
||||||
|
|
||||||
|
::Log3( $name, 4,
|
||||||
|
"AutoShuttersControl ($name) - Shading Processing - In der Routine zum fahren der Rollläden, Shading Wert: "
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatus );
|
||||||
|
|
||||||
|
FHEM::Automation::ShuttersControl::ASC_Debug(
|
||||||
|
'ShadingProcessingDriveCommand: '
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||||
|
. ' - Der aktuelle Beschattungsstatus ist: '
|
||||||
|
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
|
||||||
|
. ', Beschattungsstatus Zeitstempel: '
|
||||||
|
. strftime(
|
||||||
|
"%Y.%m.%d %T",
|
||||||
|
localtime(
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingStatusTimestamp
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
1101
lib/FHEM/Automation/ShuttersControl/Shutters.pm
Normal file
1101
lib/FHEM/Automation/ShuttersControl/Shutters.pm
Normal file
File diff suppressed because it is too large
Load Diff
1987
lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
Normal file
1987
lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
Normal file
File diff suppressed because it is too large
Load Diff
83
lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
Normal file
83
lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Developed with VSCodium and richterger perl plugin
|
||||||
|
#
|
||||||
|
# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||||
|
# All rights reserved
|
||||||
|
#
|
||||||
|
# Special thanks goes to:
|
||||||
|
# - Bernd (Cluni) this module is based on the logic of his script "Rollladensteuerung für HM/ROLLO inkl. Abschattung und Komfortfunktionen in Perl" (https://forum.fhem.de/index.php/topic,73964.0.html)
|
||||||
|
# - Beta-User for many tests, many suggestions and good discussions
|
||||||
|
# - pc1246 write english commandref
|
||||||
|
# - FunkOdyssey commandref style
|
||||||
|
# - sledge fix many typo in commandref
|
||||||
|
# - many User that use with modul and report bugs
|
||||||
|
# - Christoph (christoph.kaiser.in) Patch that expand RegEx for Window Events
|
||||||
|
# - Julian (Loredo) expand Residents Events for new Residents functions
|
||||||
|
# - Christoph (Christoph Morrison) for fix Commandref, many suggestions and good discussions
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# This script is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License,or
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# The GNU General Public License can be found at
|
||||||
|
# http://www.gnu.org/copyleft/gpl.html.
|
||||||
|
# A copy is found in the textfile GPL.txt and important notices to the license
|
||||||
|
# from the author is found in LICENSE.txt distributed with these scripts.
|
||||||
|
#
|
||||||
|
# This script is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
## Subklasse Readings von ASC_Shutters ##
|
||||||
|
package FHEM::Automation::ShuttersControl::Shutters::Readings;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use utf8;
|
||||||
|
|
||||||
|
sub getBrightness {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
return ::ReadingsNum(
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->_getBrightnessSensor,
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getBrightnessReading,
|
||||||
|
-1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getWindStatus {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
return ::ReadingsVal(
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getWindSensor,
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->getWindSensorReading, -1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getStatus {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
return ::ReadingsNum( $self->{shuttersDev},
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getPosCmd, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getDelayCmd {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
return $self->{ $self->{shuttersDev} }{delayCmd};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getASCenable {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
return ::ReadingsVal( $self->{shuttersDev}, 'ASC_Enable', 'on' );
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
53
lib/FHEM/Automation/ShuttersControl/Window.pm
Normal file
53
lib/FHEM/Automation/ShuttersControl/Window.pm
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Developed with VSCodium and richterger perl plugin
|
||||||
|
#
|
||||||
|
# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||||
|
# All rights reserved
|
||||||
|
#
|
||||||
|
# Special thanks goes to:
|
||||||
|
# - Bernd (Cluni) this module is based on the logic of his script "Rollladensteuerung für HM/ROLLO inkl. Abschattung und Komfortfunktionen in Perl" (https://forum.fhem.de/index.php/topic,73964.0.html)
|
||||||
|
# - Beta-User for many tests, many suggestions and good discussions
|
||||||
|
# - pc1246 write english commandref
|
||||||
|
# - FunkOdyssey commandref style
|
||||||
|
# - sledge fix many typo in commandref
|
||||||
|
# - many User that use with modul and report bugs
|
||||||
|
# - Christoph (christoph.kaiser.in) Patch that expand RegEx for Window Events
|
||||||
|
# - Julian (Loredo) expand Residents Events for new Residents functions
|
||||||
|
# - Christoph (Christoph Morrison) for fix Commandref, many suggestions and good discussions
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# This script is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License,or
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# The GNU General Public License can be found at
|
||||||
|
# http://www.gnu.org/copyleft/gpl.html.
|
||||||
|
# A copy is found in the textfile GPL.txt and important notices to the license
|
||||||
|
# from the author is found in LICENSE.txt distributed with these scripts.
|
||||||
|
#
|
||||||
|
# This script is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
## Klasse Fenster (Window) und die Subklassen Attr und Readings ##
|
||||||
|
package FHEM::Automation::ShuttersControl::Window;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use utf8;
|
||||||
|
|
||||||
|
use FHEM::Automation::ShuttersControl::Window::Attr;
|
||||||
|
use FHEM::Automation::ShuttersControl::Window::Readings;
|
||||||
|
|
||||||
|
use base
|
||||||
|
qw(FHEM::Automation::ShuttersControl::Window::Attr FHEM::Automation::ShuttersControl::Window::Readings);
|
||||||
|
|
||||||
|
1;
|
118
lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
Normal file
118
lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Developed with VSCodium and richterger perl plugin
|
||||||
|
#
|
||||||
|
# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||||
|
# All rights reserved
|
||||||
|
#
|
||||||
|
# Special thanks goes to:
|
||||||
|
# - Bernd (Cluni) this module is based on the logic of his script "Rollladensteuerung für HM/ROLLO inkl. Abschattung und Komfortfunktionen in Perl" (https://forum.fhem.de/index.php/topic,73964.0.html)
|
||||||
|
# - Beta-User for many tests, many suggestions and good discussions
|
||||||
|
# - pc1246 write english commandref
|
||||||
|
# - FunkOdyssey commandref style
|
||||||
|
# - sledge fix many typo in commandref
|
||||||
|
# - many User that use with modul and report bugs
|
||||||
|
# - Christoph (christoph.kaiser.in) Patch that expand RegEx for Window Events
|
||||||
|
# - Julian (Loredo) expand Residents Events for new Residents functions
|
||||||
|
# - Christoph (Christoph Morrison) for fix Commandref, many suggestions and good discussions
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# This script is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License,or
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# The GNU General Public License can be found at
|
||||||
|
# http://www.gnu.org/copyleft/gpl.html.
|
||||||
|
# A copy is found in the textfile GPL.txt and important notices to the license
|
||||||
|
# from the author is found in LICENSE.txt distributed with these scripts.
|
||||||
|
#
|
||||||
|
# This script is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
## Subklasse Attr von Klasse ASC_Window ##
|
||||||
|
package FHEM::Automation::ShuttersControl::Window::Attr;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use utf8;
|
||||||
|
|
||||||
|
sub setSubTyp {
|
||||||
|
my $self = shift;
|
||||||
|
my $attrVal = shift;
|
||||||
|
|
||||||
|
_setAttributs( $self->{shuttersDev}, 'ASC_WindowRec_subType', $attrVal );
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getSubTyp {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
return ::AttrVal( $self->{shuttersDev}, 'ASC_WindowRec_subType',
|
||||||
|
'twostate' );
|
||||||
|
}
|
||||||
|
|
||||||
|
sub setWinDev {
|
||||||
|
my $self = shift;
|
||||||
|
my $attrVal = shift;
|
||||||
|
|
||||||
|
_setAttributs( $self->{shuttersDev}, 'ASC_WindowRec', $attrVal );
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _getWinDev {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
return $self->{ $self->{shuttersDev} }->{ASC_WindowRec}->{device}
|
||||||
|
if (
|
||||||
|
exists(
|
||||||
|
$self->{ $self->{shuttersDev} }->{ASC_WindowRec}->{LASTGETTIME}
|
||||||
|
)
|
||||||
|
&& ( ::gettimeofday() -
|
||||||
|
$self->{ $self->{shuttersDev} }->{ASC_WindowRec}->{LASTGETTIME} ) <
|
||||||
|
2
|
||||||
|
);
|
||||||
|
$self->{ $self->{shuttersDev} }->{ASC_WindowRec}->{LASTGETTIME} =
|
||||||
|
int( ::gettimeofday() );
|
||||||
|
my ( $device, $reading ) =
|
||||||
|
FHEM::Automation::ShuttersControl::Helper::GetAttrValues(
|
||||||
|
$self->{shuttersDev}, 'ASC_WindowRec', 'none' );
|
||||||
|
|
||||||
|
### erwartetes Ergebnis
|
||||||
|
# DEVICE:READING VALUEACTIVE:VALUEINACTIVE POSACTIVE:POSINACTIVE
|
||||||
|
|
||||||
|
$self->{ $self->{shuttersDev} }->{ASC_WindowRec}->{device} =
|
||||||
|
$device;
|
||||||
|
$self->{ $self->{shuttersDev} }->{ASC_WindowRec}->{reading} =
|
||||||
|
( $reading ne 'none' ? $reading : 'state' );
|
||||||
|
|
||||||
|
return $self->{ $self->{shuttersDev} }->{ASC_WindowRec}->{device};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getWinDevReading {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
return $self->{ $self->{shuttersDev} }->{ASC_WindowRec}->{reading}
|
||||||
|
if (
|
||||||
|
exists(
|
||||||
|
$self->{ $self->{shuttersDev} }->{ASC_WindowRec}->{LASTGETTIME}
|
||||||
|
)
|
||||||
|
&& ( ::gettimeofday() -
|
||||||
|
$self->{ $self->{shuttersDev} }->{ASC_WindowRec}->{LASTGETTIME} ) <
|
||||||
|
2
|
||||||
|
);
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->_getWinDev;
|
||||||
|
|
||||||
|
return $self->{ $self->{shuttersDev} }->{ASC_WindowRec}->{reading};
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
56
lib/FHEM/Automation/ShuttersControl/Window/Readings.pm
Normal file
56
lib/FHEM/Automation/ShuttersControl/Window/Readings.pm
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Developed with VSCodium and richterger perl plugin
|
||||||
|
#
|
||||||
|
# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||||
|
# All rights reserved
|
||||||
|
#
|
||||||
|
# Special thanks goes to:
|
||||||
|
# - Bernd (Cluni) this module is based on the logic of his script "Rollladensteuerung für HM/ROLLO inkl. Abschattung und Komfortfunktionen in Perl" (https://forum.fhem.de/index.php/topic,73964.0.html)
|
||||||
|
# - Beta-User for many tests, many suggestions and good discussions
|
||||||
|
# - pc1246 write english commandref
|
||||||
|
# - FunkOdyssey commandref style
|
||||||
|
# - sledge fix many typo in commandref
|
||||||
|
# - many User that use with modul and report bugs
|
||||||
|
# - Christoph (christoph.kaiser.in) Patch that expand RegEx for Window Events
|
||||||
|
# - Julian (Loredo) expand Residents Events for new Residents functions
|
||||||
|
# - Christoph (Christoph Morrison) for fix Commandref, many suggestions and good discussions
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# This script is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License,or
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# The GNU General Public License can be found at
|
||||||
|
# http://www.gnu.org/copyleft/gpl.html.
|
||||||
|
# A copy is found in the textfile GPL.txt and important notices to the license
|
||||||
|
# from the author is found in LICENSE.txt distributed with these scripts.
|
||||||
|
#
|
||||||
|
# This script is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
## Subklasse Readings von Klasse ASC_Window ##
|
||||||
|
package FHEM::Automation::ShuttersControl::Window::Readings;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use utf8;
|
||||||
|
|
||||||
|
sub getWinStatus {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
return ::ReadingsVal(
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->_getWinDev,
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getWinDevReading,
|
||||||
|
'closed' );
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
Loading…
x
Reference in New Issue
Block a user