mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-25 03:44:52 +00:00
98_vitoconnect.pm: Small bug fixes, removed warnings
git-svn-id: https://svn.fhem.de/fhem/trunk@29620 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
952d013ced
commit
90aac5bbfb
@ -91,6 +91,7 @@ use FHEM::SynoModules::SMUtils qw (
|
|||||||
); # Hilfsroutinen Modul
|
); # Hilfsroutinen Modul
|
||||||
|
|
||||||
my %vNotesIntern = (
|
my %vNotesIntern = (
|
||||||
|
"0.6.3" => "04.02.2025 Small bug fixes, removed warnings",
|
||||||
"0.6.2" => "28.01.2025 Very small bugfixes ",
|
"0.6.2" => "28.01.2025 Very small bugfixes ",
|
||||||
"0.6.1" => "28.01.2025 Rework of module documentation",
|
"0.6.1" => "28.01.2025 Rework of module documentation",
|
||||||
"0.6.0" => "23.01.2025 Total rebuild of initialization and gw handling. In case of more than one installation or gw you have to set it via".
|
"0.6.0" => "23.01.2025 Total rebuild of initialization and gw handling. In case of more than one installation or gw you have to set it via".
|
||||||
@ -1369,15 +1370,15 @@ sub vitoconnect_Set {
|
|||||||
# Setter für Device Werte rufen
|
# Setter für Device Werte rufen
|
||||||
if (AttrVal( $name, 'vitoconnect_raw_readings', 0 ) eq "1" ) {
|
if (AttrVal( $name, 'vitoconnect_raw_readings', 0 ) eq "1" ) {
|
||||||
#use new dynamic parsing of JSON to get raw setters
|
#use new dynamic parsing of JSON to get raw setters
|
||||||
$val .= vitoconnect_Set_New ($hash,$name,$opt,@args);
|
$val .= vitoconnect_Set_New ($hash,$name,$opt,@args) // '';
|
||||||
}
|
}
|
||||||
elsif (AttrVal( $name, 'vitoconnect_mapping_roger', 0 ) eq "1" ) {
|
elsif (AttrVal( $name, 'vitoconnect_mapping_roger', 0 ) eq "1" ) {
|
||||||
#use roger setters
|
#use roger setters
|
||||||
$val .= vitoconnect_Set_Roger ($hash,$name,$opt,@args);
|
$val .= vitoconnect_Set_Roger ($hash,$name,$opt,@args) // '';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#use svn setters
|
#use svn setters
|
||||||
$val .= vitoconnect_Set_SVN ($hash,$name,$opt,@args);
|
$val .= vitoconnect_Set_SVN ($hash,$name,$opt,@args) // '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3655,7 +3656,7 @@ sub vitoconnect_action {
|
|||||||
}
|
}
|
||||||
else { # Befehl korrekt ausgeführt
|
else { # Befehl korrekt ausgeführt
|
||||||
readingsSingleUpdate($hash,"Aktion_Status","OK: ".$opt." ".$Text,1); # Reading 'Aktion_Status' setzen
|
readingsSingleUpdate($hash,"Aktion_Status","OK: ".$opt." ".$Text,1); # Reading 'Aktion_Status' setzen
|
||||||
#Log3($name,1,$name.",vitoconnect_action: set name:".$name." opt:".$opt." text:".$Text.", korrekt ausgefuehrt: ".$err." :: ".$msg); # TODO: Wieder weg machen $err
|
# Log3($name,1,$name.",vitoconnect_action: set name:".$name." opt:".$opt." text:".$Text.", korrekt ausgefuehrt: ".$err." :: ".$msg); # TODO: Wieder weg machen $err
|
||||||
Log3($name,3,$name.",vitoconnect_action: set name:".$name." opt:".$opt." text:".$Text.", korrekt ausgefuehrt");
|
Log3($name,3,$name.",vitoconnect_action: set name:".$name." opt:".$opt." text:".$Text.", korrekt ausgefuehrt");
|
||||||
|
|
||||||
# Spezial Readings update
|
# Spezial Readings update
|
||||||
@ -3667,6 +3668,7 @@ sub vitoconnect_action {
|
|||||||
$Text = "1";
|
$Text = "1";
|
||||||
}
|
}
|
||||||
readingsSingleUpdate($hash,$opt,$Text,1); # Reading updaten
|
readingsSingleUpdate($hash,$opt,$Text,1); # Reading updaten
|
||||||
|
# Log3($name,1,$name.",vitoconnect_action: reading upd1 hash:".$hash." opt:".$opt." text:".$Text); # TODO: Wieder weg machen $err
|
||||||
|
|
||||||
# Spezial Readings update, activate mit temperatur siehe brenner Vitoladens300C
|
# Spezial Readings update, activate mit temperatur siehe brenner Vitoladens300C
|
||||||
if ($feature =~ /(.*)\.deactivate/) {
|
if ($feature =~ /(.*)\.deactivate/) {
|
||||||
@ -3676,6 +3678,7 @@ sub vitoconnect_action {
|
|||||||
$Text = "1";
|
$Text = "1";
|
||||||
}
|
}
|
||||||
readingsSingleUpdate($hash,$opt,$Text,1); # Reading updaten
|
readingsSingleUpdate($hash,$opt,$Text,1); # Reading updaten
|
||||||
|
# Log3($name,1,$name.",vitoconnect_action: reading upd2 hash:".$hash." opt:".$opt." text:".$Text); # TODO: Wieder weg machen $err
|
||||||
|
|
||||||
|
|
||||||
Log3($name,4,$name.",vitoconnect_action: set feature:".$feature." data:".$data.", korrekt ausgefuehrt"); #4
|
Log3($name,4,$name.",vitoconnect_action: set feature:".$feature." data:".$data.", korrekt ausgefuehrt"); #4
|
||||||
@ -3693,20 +3696,20 @@ sub vitoconnect_errorHandling {
|
|||||||
|
|
||||||
#Log3 $name, 1, "$name - errorHandling StatusCode: $items->{statusCode} ";
|
#Log3 $name, 1, "$name - errorHandling StatusCode: $items->{statusCode} ";
|
||||||
|
|
||||||
if (!$items->{statusCode} eq "") {
|
if (defined $items->{statusCode} && !$items->{statusCode} eq "") {
|
||||||
Log3 $name, 4,
|
Log3 $name, 4,
|
||||||
"$name - statusCode: $items->{statusCode} "
|
"$name - statusCode: " . ($items->{statusCode} // 'undef') . " "
|
||||||
. "errorType: $items->{errorType} "
|
. "errorType: " . ($items->{errorType} // 'undef') . " "
|
||||||
. "message: $items->{message} "
|
. "message: " . ($items->{message} // 'undef') . " "
|
||||||
. "error: $items->{error}";
|
. "error: " . ($items->{error} // 'undef');
|
||||||
readingsSingleUpdate(
|
readingsSingleUpdate(
|
||||||
$hash,
|
$hash,
|
||||||
"state",
|
"state",
|
||||||
"statusCode: $items->{statusCode} "
|
"statusCode: " . ($items->{statusCode} // 'undef') . " "
|
||||||
. "errorType: $items->{errorType} "
|
. "errorType: " . ($items->{errorType} // 'undef') . " "
|
||||||
. "message: $items->{message} "
|
. "message: " . ($items->{message} // 'undef') . " "
|
||||||
. "error: $items->{error}",
|
. "error: " . ($items->{error} // 'undef'),
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
if ( $items->{statusCode} eq "401" ) {
|
if ( $items->{statusCode} eq "401" ) {
|
||||||
# EXPIRED TOKEN
|
# EXPIRED TOKEN
|
||||||
|
Loading…
x
Reference in New Issue
Block a user