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
|
||||
#-- Run before package compilation
|
||||
BEGIN {
|
||||
# Import from main context
|
||||
GP_Import(
|
||||
qw(
|
||||
readingFnAttributes
|
||||
)
|
||||
);
|
||||
|
||||
#-- Export to main context with different name
|
||||
GP_Export(
|
||||
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
|
||||
# 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->{SetFn} = \&FHEM::Automation::ShuttersControl::Set;
|
||||
$hash->{GetFn} = \&FHEM::Automation::ShuttersControl::Get;
|
||||
$hash->{DefFn} = \&FHEM::Automation::ShuttersControl::Define;
|
||||
$hash->{NotifyFn} = \&FHEM::Automation::ShuttersControl::Notify;
|
||||
$hash->{UndefFn} = \&FHEM::Automation::ShuttersControl::Undef;
|
||||
$hash->{AttrList} =
|
||||
'ASC_tempSensor '
|
||||
. 'ASC_brightnessDriveUpDown '
|
||||
@ -94,7 +101,7 @@ sub Initialize {
|
||||
. 'ASC_slatDriveCmdInverse:0,1 '
|
||||
. $readingFnAttributes;
|
||||
$hash->{NotifyOrderPrefix} = '51-'; # Order Nummer für NotifyFn
|
||||
$hash->{FW_detailFn} = \&ShuttersInformation;
|
||||
$hash->{FW_detailFn} = \&FHEM::Automation::ShuttersControl::ShuttersInformation;
|
||||
$hash->{parseParams} = 1;
|
||||
|
||||
return FHEM::Meta::InitMod( __FILE__, $hash );
|
||||
|
@ -76,6 +76,10 @@ use Date::Parse;
|
||||
use FHEM::Automation::ShuttersControl::Shutters;
|
||||
use FHEM::Automation::ShuttersControl::Dev;
|
||||
|
||||
require Exporter;
|
||||
our @ISA = qw(Exporter);
|
||||
our @Export = qw($shutters $ascDev %userAttrList);
|
||||
|
||||
# try to use JSON::MaybeXS wrapper
|
||||
# for chance of better performance + open code
|
||||
eval {
|
||||
@ -202,7 +206,7 @@ BEGIN {
|
||||
|
||||
|
||||
## 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_Down:absent,always,off,home' => '-',
|
||||
'ASC_Up:time,astro,brightness,roommate' => '-',
|
||||
@ -285,8 +289,8 @@ my %posSetCmds = (
|
||||
);
|
||||
|
||||
## 2 Objekte werden erstellt
|
||||
my $shutters = ASC_Shutters->new();
|
||||
my $ascDev = ASC_Dev->new();
|
||||
our $shutters = FHEM::Automation::ShuttersControl::Shutters->new();
|
||||
our $ascDev = FHEM::Automation::ShuttersControl::Dev->new();
|
||||
|
||||
sub ascAPIget {
|
||||
my ( $getCommand, $shutterDev, $value ) = @_;
|
||||
@ -325,44 +329,6 @@ sub ascAPIset {
|
||||
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 {
|
||||
my $hash = shift // return;
|
||||
my $aArg = shift // return;
|
||||
@ -398,7 +364,7 @@ sub Define {
|
||||
CommandAttr( undef, $name . ' icon fts_shutter_automatic' )
|
||||
if ( AttrVal( $name, 'icon', 'none' ) eq 'none' );
|
||||
CommandAttr( undef,
|
||||
$name . ' devStateIcon { AutoShuttersControl_DevStateIcon($name) }' )
|
||||
$name . ' devStateIcon { ShuttersControl_DevStateIcon($name) }' )
|
||||
if ( AttrVal( $name, 'devStateIcon', 'none' ) eq 'none' );
|
||||
|
||||
addToAttrList('ASC:0,1,2');
|
||||
|
@ -39,6 +39,10 @@
|
||||
|
||||
## 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;
|
||||
|
||||
our @ISA = qw(FHEM::Automation::ShuttersControl::Dev::Readings FHEM::Automation::ShuttersControl::Dev::Attr);
|
||||
|
||||
use strict;
|
||||
|
@ -38,7 +38,7 @@
|
||||
###############################################################################
|
||||
|
||||
## Subklasse Attr ##
|
||||
package ASC_Dev::Attr;
|
||||
package FHEM::Automation::ShuttersControl::Dev::Attr;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
@ -46,6 +46,9 @@ use utf8;
|
||||
|
||||
use GPUtils qw(GP_Import);
|
||||
|
||||
my $shutters = $FHEM::Automation::ShuttersControl::shutters;
|
||||
my $ascDev = $FHEM::Automation::ShuttersControl::ascDev;
|
||||
|
||||
## Import der FHEM Funktionen
|
||||
BEGIN {
|
||||
GP_Import(
|
||||
|
@ -46,6 +46,9 @@ use utf8;
|
||||
|
||||
use GPUtils qw(GP_Import);
|
||||
|
||||
my $shutters = $FHEM::Automation::ShuttersControl::shutters;
|
||||
my $ascDev = $FHEM::Automation::ShuttersControl::ascDev;
|
||||
|
||||
## Import der FHEM Funktionen
|
||||
BEGIN {
|
||||
GP_Import(
|
||||
|
@ -46,6 +46,8 @@ use utf8;
|
||||
|
||||
use GPUtils qw(GP_Import);
|
||||
|
||||
my $shutters = $FHEM::Automation::ShuttersControl::shutters;
|
||||
|
||||
## Import der FHEM Funktionen
|
||||
BEGIN {
|
||||
GP_Import(
|
||||
|
@ -44,6 +44,12 @@
|
||||
## desweiteren wird noch die Klasse ASC_Roommate mit eingebunden
|
||||
|
||||
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 =
|
||||
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);
|
||||
|
||||
my $shutters = $FHEM::Automation::ShuttersControl::shutters;
|
||||
my $ascDev = $FHEM::Automation::ShuttersControl::ascDev;
|
||||
|
||||
## Import der FHEM Funktionen
|
||||
BEGIN {
|
||||
GP_Import(
|
||||
|
@ -46,6 +46,9 @@ use utf8;
|
||||
|
||||
use GPUtils qw(GP_Import);
|
||||
|
||||
my $shutters = $FHEM::Automation::ShuttersControl::shutters;
|
||||
my %userAttrList = %FHEM::Automation::ShuttersControl::userAttrList;
|
||||
|
||||
## Import der FHEM Funktionen
|
||||
BEGIN {
|
||||
GP_Import(
|
||||
@ -529,7 +532,7 @@ sub getAdv {
|
||||
|
||||
return (
|
||||
AttrVal( $self->{shuttersDev}, 'ASC_Adv', 'off' ) eq 'on'
|
||||
? ( FHEM::Automation::ShuttersControl::_IsAdv == 1 ? 1 : 0 )
|
||||
? ( \&FHEM::Automation::ShuttersControl::_IsAdv == 1 ? 1 : 0 )
|
||||
: 0
|
||||
);
|
||||
}
|
||||
|
@ -47,6 +47,9 @@ use utf8;
|
||||
|
||||
use GPUtils qw(GP_Import);
|
||||
|
||||
my $shutters = $FHEM::Automation::ShuttersControl::shutters;
|
||||
my $ascDev = $FHEM::Automation::ShuttersControl::ascDev;
|
||||
|
||||
## Import der FHEM Funktionen
|
||||
BEGIN {
|
||||
GP_Import(
|
||||
|
@ -44,6 +44,9 @@ use strict;
|
||||
use warnings;
|
||||
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);
|
||||
|
||||
|
||||
|
@ -46,6 +46,8 @@ use utf8;
|
||||
|
||||
use GPUtils qw(GP_Import);
|
||||
|
||||
my $shutters = $FHEM::Automation::ShuttersControl::shutters;
|
||||
|
||||
## Import der FHEM Funktionen
|
||||
BEGIN {
|
||||
GP_Import(
|
||||
|
@ -46,6 +46,8 @@ use utf8;
|
||||
|
||||
use GPUtils qw(GP_Import);
|
||||
|
||||
my $shutters = $FHEM::Automation::ShuttersControl::shutters;
|
||||
|
||||
## Import der FHEM Funktionen
|
||||
BEGIN {
|
||||
GP_Import(
|
||||
|
Loading…
x
Reference in New Issue
Block a user