Compare commits
No commits in common. "dev" and "v0.6.20" have entirely different histories.
6548
73_AutoShuttersControl.pm
Normal file
6548
73_AutoShuttersControl.pm
Normal file
File diff suppressed because it is too large
Load Diff
8549
CHANGELOG.md
8549
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,16 +0,0 @@
|
||||
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
|
@ -1,36 +0,0 @@
|
||||
#!/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!"
|
@ -1,18 +0,0 @@
|
||||
#!/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
|
@ -1,53 +0,0 @@
|
||||
#!/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;
|
File diff suppressed because it is too large
Load Diff
@ -1,83 +0,0 @@
|
||||
###############################################################################
|
||||
#
|
||||
# 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;
|
@ -1,403 +0,0 @@
|
||||
###############################################################################
|
||||
#
|
||||
# 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;
|
@ -1,284 +0,0 @@
|
||||
###############################################################################
|
||||
#
|
||||
# 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;
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,206 +0,0 @@
|
||||
###############################################################################
|
||||
#
|
||||
# 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;
|
@ -1,84 +0,0 @@
|
||||
###############################################################################
|
||||
#
|
||||
# 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;
|
@ -1,672 +0,0 @@
|
||||
###############################################################################
|
||||
#
|
||||
# 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;
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,83 +0,0 @@
|
||||
###############################################################################
|
||||
#
|
||||
# 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;
|
@ -1,53 +0,0 @@
|
||||
###############################################################################
|
||||
#
|
||||
# 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;
|
@ -1,118 +0,0 @@
|
||||
###############################################################################
|
||||
#
|
||||
# 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;
|
@ -1,56 +0,0 @@
|
||||
###############################################################################
|
||||
#
|
||||
# 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