fix diverse Fehlermeldungen
This commit is contained in:
parent
578b96a4ff
commit
4e0e9203c9
@ -54,6 +54,13 @@ use GPUtils qw(GP_Import GP_Export);
|
|||||||
## Import der FHEM Funktionen
|
## Import der FHEM Funktionen
|
||||||
#-- Run before package compilation
|
#-- Run before package compilation
|
||||||
BEGIN {
|
BEGIN {
|
||||||
|
# Import from main context
|
||||||
|
GP_Import(
|
||||||
|
qw(
|
||||||
|
readingFnAttributes
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
#-- Export to main context with different name
|
#-- Export to main context with different name
|
||||||
GP_Export(
|
GP_Export(
|
||||||
qw(
|
qw(
|
||||||
@ -67,11 +74,11 @@ sub Initialize {
|
|||||||
|
|
||||||
## Da ich mit package arbeite müssen in die Initialize für die jeweiligen hash Fn Funktionen der Funktionsname
|
## Da ich mit package arbeite müssen in die Initialize für die jeweiligen hash Fn Funktionen der Funktionsname
|
||||||
# und davor mit :: getrennt der eigentliche package Name des Modules
|
# und davor mit :: getrennt der eigentliche package Name des Modules
|
||||||
$hash->{SetFn} = \&Set;
|
$hash->{SetFn} = \&FHEM::Automation::ShuttersControl::Set;
|
||||||
$hash->{GetFn} = \&Get;
|
$hash->{GetFn} = \&FHEM::Automation::ShuttersControl::Get;
|
||||||
$hash->{DefFn} = \&Define;
|
$hash->{DefFn} = \&FHEM::Automation::ShuttersControl::Define;
|
||||||
$hash->{NotifyFn} = \&Notify;
|
$hash->{NotifyFn} = \&FHEM::Automation::ShuttersControl::Notify;
|
||||||
$hash->{UndefFn} = \&Undef;
|
$hash->{UndefFn} = \&FHEM::Automation::ShuttersControl::Undef;
|
||||||
$hash->{AttrList} =
|
$hash->{AttrList} =
|
||||||
'ASC_tempSensor '
|
'ASC_tempSensor '
|
||||||
. 'ASC_brightnessDriveUpDown '
|
. 'ASC_brightnessDriveUpDown '
|
||||||
@ -94,7 +101,7 @@ sub Initialize {
|
|||||||
. 'ASC_slatDriveCmdInverse:0,1 '
|
. 'ASC_slatDriveCmdInverse:0,1 '
|
||||||
. $readingFnAttributes;
|
. $readingFnAttributes;
|
||||||
$hash->{NotifyOrderPrefix} = '51-'; # Order Nummer für NotifyFn
|
$hash->{NotifyOrderPrefix} = '51-'; # Order Nummer für NotifyFn
|
||||||
$hash->{FW_detailFn} = \&ShuttersInformation;
|
$hash->{FW_detailFn} = \&FHEM::Automation::ShuttersControl::ShuttersInformation;
|
||||||
$hash->{parseParams} = 1;
|
$hash->{parseParams} = 1;
|
||||||
|
|
||||||
return FHEM::Meta::InitMod( __FILE__, $hash );
|
return FHEM::Meta::InitMod( __FILE__, $hash );
|
||||||
|
@ -76,6 +76,10 @@ use Date::Parse;
|
|||||||
use FHEM::Automation::ShuttersControl::Shutters;
|
use FHEM::Automation::ShuttersControl::Shutters;
|
||||||
use FHEM::Automation::ShuttersControl::Dev;
|
use FHEM::Automation::ShuttersControl::Dev;
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @Export = qw($shutters $ascDev %userAttrList);
|
||||||
|
|
||||||
# try to use JSON::MaybeXS wrapper
|
# try to use JSON::MaybeXS wrapper
|
||||||
# for chance of better performance + open code
|
# for chance of better performance + open code
|
||||||
eval {
|
eval {
|
||||||
@ -202,7 +206,7 @@ BEGIN {
|
|||||||
|
|
||||||
|
|
||||||
## Die Attributsliste welche an die Rolläden verteilt wird. Zusammen mit Default Werten
|
## Die Attributsliste welche an die Rolläden verteilt wird. Zusammen mit Default Werten
|
||||||
my %userAttrList = (
|
our %userAttrList = (
|
||||||
'ASC_Mode_Up:absent,always,off,home' => '-',
|
'ASC_Mode_Up:absent,always,off,home' => '-',
|
||||||
'ASC_Mode_Down:absent,always,off,home' => '-',
|
'ASC_Mode_Down:absent,always,off,home' => '-',
|
||||||
'ASC_Up:time,astro,brightness,roommate' => '-',
|
'ASC_Up:time,astro,brightness,roommate' => '-',
|
||||||
@ -285,8 +289,8 @@ my %posSetCmds = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
## 2 Objekte werden erstellt
|
## 2 Objekte werden erstellt
|
||||||
my $shutters = ASC_Shutters->new();
|
our $shutters = FHEM::Automation::ShuttersControl::Shutters->new();
|
||||||
my $ascDev = ASC_Dev->new();
|
our $ascDev = FHEM::Automation::ShuttersControl::Dev->new();
|
||||||
|
|
||||||
sub ascAPIget {
|
sub ascAPIget {
|
||||||
my ( $getCommand, $shutterDev, $value ) = @_;
|
my ( $getCommand, $shutterDev, $value ) = @_;
|
||||||
@ -325,44 +329,6 @@ sub ascAPIset {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub Initialize {
|
|
||||||
my $hash = shift;
|
|
||||||
|
|
||||||
## Da ich mit package arbeite müssen in die Initialize für die jeweiligen hash Fn Funktionen der Funktionsname
|
|
||||||
# und davor mit :: getrennt der eigentliche package Name des Modules
|
|
||||||
$hash->{SetFn} = \&Set;
|
|
||||||
$hash->{GetFn} = \&Get;
|
|
||||||
$hash->{DefFn} = \&Define;
|
|
||||||
$hash->{NotifyFn} = \&Notify;
|
|
||||||
$hash->{UndefFn} = \&Undef;
|
|
||||||
$hash->{AttrList} =
|
|
||||||
'ASC_tempSensor '
|
|
||||||
. 'ASC_brightnessDriveUpDown '
|
|
||||||
. 'ASC_autoShuttersControlMorning:on,off '
|
|
||||||
. 'ASC_autoShuttersControlEvening:on,off '
|
|
||||||
. 'ASC_autoShuttersControlComfort:on,off '
|
|
||||||
. 'ASC_residentsDev '
|
|
||||||
. 'ASC_rainSensor '
|
|
||||||
. 'ASC_autoAstroModeMorning:REAL,CIVIL,NAUTIC,ASTRONOMIC,HORIZON '
|
|
||||||
. 'ASC_autoAstroModeMorningHorizon:-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9 '
|
|
||||||
. 'ASC_autoAstroModeEvening:REAL,CIVIL,NAUTIC,ASTRONOMIC,HORIZON '
|
|
||||||
. 'ASC_autoAstroModeEveningHorizon:-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9 '
|
|
||||||
. 'ASC_freezeTemp:-5,-4,-3,-2,-1,0,1,2,3,4,5 '
|
|
||||||
. 'ASC_shuttersDriveDelay '
|
|
||||||
. 'ASC_twilightDevice '
|
|
||||||
. 'ASC_windSensor '
|
|
||||||
. 'ASC_expert:1 '
|
|
||||||
. 'ASC_blockAscDrivesAfterManual:0,1 '
|
|
||||||
. 'ASC_debug:1 '
|
|
||||||
. 'ASC_slatDriveCmdInverse:0,1 '
|
|
||||||
. $readingFnAttributes;
|
|
||||||
$hash->{NotifyOrderPrefix} = '51-'; # Order Nummer für NotifyFn
|
|
||||||
$hash->{FW_detailFn} = \&ShuttersInformation;
|
|
||||||
$hash->{parseParams} = 1;
|
|
||||||
|
|
||||||
return FHEM::Meta::InitMod( __FILE__, $hash );
|
|
||||||
}
|
|
||||||
|
|
||||||
sub Define {
|
sub Define {
|
||||||
my $hash = shift // return;
|
my $hash = shift // return;
|
||||||
my $aArg = shift // return;
|
my $aArg = shift // return;
|
||||||
@ -398,7 +364,7 @@ sub Define {
|
|||||||
CommandAttr( undef, $name . ' icon fts_shutter_automatic' )
|
CommandAttr( undef, $name . ' icon fts_shutter_automatic' )
|
||||||
if ( AttrVal( $name, 'icon', 'none' ) eq 'none' );
|
if ( AttrVal( $name, 'icon', 'none' ) eq 'none' );
|
||||||
CommandAttr( undef,
|
CommandAttr( undef,
|
||||||
$name . ' devStateIcon { AutoShuttersControl_DevStateIcon($name) }' )
|
$name . ' devStateIcon { ShuttersControl_DevStateIcon($name) }' )
|
||||||
if ( AttrVal( $name, 'devStateIcon', 'none' ) eq 'none' );
|
if ( AttrVal( $name, 'devStateIcon', 'none' ) eq 'none' );
|
||||||
|
|
||||||
addToAttrList('ASC:0,1,2');
|
addToAttrList('ASC:0,1,2');
|
||||||
|
@ -39,6 +39,10 @@
|
|||||||
|
|
||||||
## Klasse ASC_Dev plus Subklassen ASC_Attr_Dev und ASC_Readings_Dev##
|
## Klasse ASC_Dev plus Subklassen ASC_Attr_Dev und ASC_Readings_Dev##
|
||||||
package FHEM::Automation::ShuttersControl::Dev;
|
package FHEM::Automation::ShuttersControl::Dev;
|
||||||
|
|
||||||
|
use FHEM::Automation::ShuttersControl::Dev::Readings;
|
||||||
|
use FHEM::Automation::ShuttersControl::Dev::Attr;
|
||||||
|
|
||||||
our @ISA = qw(FHEM::Automation::ShuttersControl::Dev::Readings FHEM::Automation::ShuttersControl::Dev::Attr);
|
our @ISA = qw(FHEM::Automation::ShuttersControl::Dev::Readings FHEM::Automation::ShuttersControl::Dev::Attr);
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
## Subklasse Attr ##
|
## Subklasse Attr ##
|
||||||
package ASC_Dev::Attr;
|
package FHEM::Automation::ShuttersControl::Dev::Attr;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
@ -46,6 +46,9 @@ use utf8;
|
|||||||
|
|
||||||
use GPUtils qw(GP_Import);
|
use GPUtils qw(GP_Import);
|
||||||
|
|
||||||
|
my $shutters = $FHEM::Automation::ShuttersControl::shutters;
|
||||||
|
my $ascDev = $FHEM::Automation::ShuttersControl::ascDev;
|
||||||
|
|
||||||
## Import der FHEM Funktionen
|
## Import der FHEM Funktionen
|
||||||
BEGIN {
|
BEGIN {
|
||||||
GP_Import(
|
GP_Import(
|
||||||
|
@ -46,6 +46,9 @@ use utf8;
|
|||||||
|
|
||||||
use GPUtils qw(GP_Import);
|
use GPUtils qw(GP_Import);
|
||||||
|
|
||||||
|
my $shutters = $FHEM::Automation::ShuttersControl::shutters;
|
||||||
|
my $ascDev = $FHEM::Automation::ShuttersControl::ascDev;
|
||||||
|
|
||||||
## Import der FHEM Funktionen
|
## Import der FHEM Funktionen
|
||||||
BEGIN {
|
BEGIN {
|
||||||
GP_Import(
|
GP_Import(
|
||||||
|
@ -46,6 +46,8 @@ use utf8;
|
|||||||
|
|
||||||
use GPUtils qw(GP_Import);
|
use GPUtils qw(GP_Import);
|
||||||
|
|
||||||
|
my $shutters = $FHEM::Automation::ShuttersControl::shutters;
|
||||||
|
|
||||||
## Import der FHEM Funktionen
|
## Import der FHEM Funktionen
|
||||||
BEGIN {
|
BEGIN {
|
||||||
GP_Import(
|
GP_Import(
|
||||||
|
@ -44,6 +44,12 @@
|
|||||||
## desweiteren wird noch die Klasse ASC_Roommate mit eingebunden
|
## desweiteren wird noch die Klasse ASC_Roommate mit eingebunden
|
||||||
|
|
||||||
package FHEM::Automation::ShuttersControl::Shutters;
|
package FHEM::Automation::ShuttersControl::Shutters;
|
||||||
|
|
||||||
|
use FHEM::Automation::ShuttersControl::Shutters::Readings;
|
||||||
|
use FHEM::Automation::ShuttersControl::Shutters::Attr;
|
||||||
|
use FHEM::Automation::ShuttersControl::Roommate;
|
||||||
|
use FHEM::Automation::ShuttersControl::Window;
|
||||||
|
|
||||||
our @ISA =
|
our @ISA =
|
||||||
qw(FHEM::Automation::ShuttersControl::Shutters::Readings FHEM::Automation::ShuttersControl::Shutters::Attr FHEM::Automation::ShuttersControl::Roommate FHEM::Automation::ShuttersControl::Window);
|
qw(FHEM::Automation::ShuttersControl::Shutters::Readings FHEM::Automation::ShuttersControl::Shutters::Attr FHEM::Automation::ShuttersControl::Roommate FHEM::Automation::ShuttersControl::Window);
|
||||||
|
|
||||||
@ -53,6 +59,9 @@ use utf8;
|
|||||||
|
|
||||||
use GPUtils qw(GP_Import);
|
use GPUtils qw(GP_Import);
|
||||||
|
|
||||||
|
my $shutters = $FHEM::Automation::ShuttersControl::shutters;
|
||||||
|
my $ascDev = $FHEM::Automation::ShuttersControl::ascDev;
|
||||||
|
|
||||||
## Import der FHEM Funktionen
|
## Import der FHEM Funktionen
|
||||||
BEGIN {
|
BEGIN {
|
||||||
GP_Import(
|
GP_Import(
|
||||||
|
@ -46,6 +46,9 @@ use utf8;
|
|||||||
|
|
||||||
use GPUtils qw(GP_Import);
|
use GPUtils qw(GP_Import);
|
||||||
|
|
||||||
|
my $shutters = $FHEM::Automation::ShuttersControl::shutters;
|
||||||
|
my %userAttrList = %FHEM::Automation::ShuttersControl::userAttrList;
|
||||||
|
|
||||||
## Import der FHEM Funktionen
|
## Import der FHEM Funktionen
|
||||||
BEGIN {
|
BEGIN {
|
||||||
GP_Import(
|
GP_Import(
|
||||||
@ -67,10 +70,10 @@ sub _setAttributs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub _getPosition {
|
sub _getPosition {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
my $attr = shift;
|
my $attr = shift;
|
||||||
my $userAttrList = shift;
|
my $userAttrList = shift;
|
||||||
|
|
||||||
return $self->{ $self->{shuttersDev} }->{$attr}->{position}
|
return $self->{ $self->{shuttersDev} }->{$attr}->{position}
|
||||||
if (
|
if (
|
||||||
@ -529,7 +532,7 @@ sub getAdv {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
AttrVal( $self->{shuttersDev}, 'ASC_Adv', 'off' ) eq 'on'
|
AttrVal( $self->{shuttersDev}, 'ASC_Adv', 'off' ) eq 'on'
|
||||||
? ( FHEM::Automation::ShuttersControl::_IsAdv == 1 ? 1 : 0 )
|
? ( \&FHEM::Automation::ShuttersControl::_IsAdv == 1 ? 1 : 0 )
|
||||||
: 0
|
: 0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,9 @@ use utf8;
|
|||||||
|
|
||||||
use GPUtils qw(GP_Import);
|
use GPUtils qw(GP_Import);
|
||||||
|
|
||||||
|
my $shutters = $FHEM::Automation::ShuttersControl::shutters;
|
||||||
|
my $ascDev = $FHEM::Automation::ShuttersControl::ascDev;
|
||||||
|
|
||||||
## Import der FHEM Funktionen
|
## Import der FHEM Funktionen
|
||||||
BEGIN {
|
BEGIN {
|
||||||
GP_Import(
|
GP_Import(
|
||||||
|
@ -44,6 +44,9 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use utf8;
|
use utf8;
|
||||||
|
|
||||||
|
use FHEM::Automation::ShuttersControl::Window::Attr;
|
||||||
|
use FHEM::Automation::ShuttersControl::Window::Readings;
|
||||||
|
|
||||||
our @ISA = qw(FHEM::Automation::ShuttersControl::Window::Attr FHEM::Automation::ShuttersControl::Window::Readings);
|
our @ISA = qw(FHEM::Automation::ShuttersControl::Window::Attr FHEM::Automation::ShuttersControl::Window::Readings);
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,6 +46,8 @@ use utf8;
|
|||||||
|
|
||||||
use GPUtils qw(GP_Import);
|
use GPUtils qw(GP_Import);
|
||||||
|
|
||||||
|
my $shutters = $FHEM::Automation::ShuttersControl::shutters;
|
||||||
|
|
||||||
## Import der FHEM Funktionen
|
## Import der FHEM Funktionen
|
||||||
BEGIN {
|
BEGIN {
|
||||||
GP_Import(
|
GP_Import(
|
||||||
|
@ -46,6 +46,8 @@ use utf8;
|
|||||||
|
|
||||||
use GPUtils qw(GP_Import);
|
use GPUtils qw(GP_Import);
|
||||||
|
|
||||||
|
my $shutters = $FHEM::Automation::ShuttersControl::shutters;
|
||||||
|
|
||||||
## Import der FHEM Funktionen
|
## Import der FHEM Funktionen
|
||||||
BEGIN {
|
BEGIN {
|
||||||
GP_Import(
|
GP_Import(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user