Merge pull request 'docs: change copyright year' (#102) from patch-merge into dev

Reviewed-on: #102
This commit is contained in:
Marko Oldenburg 2024-04-15 15:46:41 +02:00
commit 80147631d6
3 changed files with 81 additions and 60 deletions

View File

@ -2,7 +2,7 @@
#
# Developed with VSCodium and richterger perl plugin.
#
# (c) 2017-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# (c) 2017-2024 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved
#
# Special thanks goes to comitters:
@ -629,6 +629,7 @@ sub ErrorHandling {
if ($decode_json) {
if ( ref( $decode_json->{errors} ) eq "ARRAY"
&& exists( $decode_json->{errors} ) )
# replace defined with exists
# && defined( $decode_json->{errors} ) )
{
@ -1060,11 +1061,17 @@ sub WriteReadings {
#$v = encode_utf8($v);
$v = ' ' if ( !defined $v );
Log3 $name, 4, "Gardena DEBUG DEBUG DEBUG stage 1 ".$decode_json->{abilities}[0]{properties}[$properties]{name} if ( $decode_json->{abilities}[0]{properties}[$properties]
Log3 $name, 4,
"Gardena DEBUG DEBUG DEBUG stage 1 "
. $decode_json->{abilities}[0]{properties}[$properties]
{name}
if ( $decode_json->{abilities}[0]{properties}[$properties]
{name} !~ /ethernet_status|wifi_status/ );
Log3 $name, 4, "Gardena DEBUG DEBUG DEBUG stage 2".$t if ( $decode_json->{abilities}[0]{properties}[$properties]
Log3 $name, 4, "Gardena DEBUG DEBUG DEBUG stage 2" . $t
if ( $decode_json->{abilities}[0]{properties}[$properties]
{name} !~ /ethernet_status|wifi_status/ );
Log3 $name, 4, "Gardena DEBUG DEBUG DEBUG stage 3".$v if ( $decode_json->{abilities}[0]{properties}[$properties]
Log3 $name, 4, "Gardena DEBUG DEBUG DEBUG stage 3" . $v
if ( $decode_json->{abilities}[0]{properties}[$properties]
{name} !~ /ethernet_status|wifi_status/ );
readingsBulkUpdateIfChanged(
@ -1086,12 +1093,18 @@ sub WriteReadings {
)
{
if ( $v->{is_connected} ) {
readingsBulkUpdateIfChanged( $hash,
$decode_json->{abilities}[0]{properties}[$properties]{name}.'-ip', $v->{ip} )
if ( ref( $v->{ip} ) ne 'HASH' );
readingsBulkUpdateIfChanged( $hash,
$decode_json->{abilities}[0]{properties}[$properties]{name}.'-isconnected', $v->{is_connected} )
if ( $v->{is_connected} );
readingsBulkUpdateIfChanged(
$hash,
$decode_json->{abilities}[0]{properties}
[$properties]{name} . '-ip',
$v->{ip}
) if ( ref( $v->{ip} ) ne 'HASH' );
readingsBulkUpdateIfChanged(
$hash,
$decode_json->{abilities}[0]{properties}
[$properties]{name} . '-isconnected',
$v->{is_connected}
) if ( $v->{is_connected} );
}
} # fi ethernet and wifi
}

View File

@ -2,7 +2,7 @@
#
# Developed with VSCodium and richterger perl plugin.
#
# (c) 2017-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# (c) 2017-2024 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
# All rights reserved
#
# Special thanks goes to comitters:
@ -324,7 +324,8 @@ sub Set {
elsif ( lc $cmd eq 'parkuntilnexttimer' ) {
$payload = '"name":"park_until_next_timer"';
if ( $mainboard_version > 10.30 ) {
$payload = '"mowerTimer":0,"startingPointDistance":null,"areaId":null';
$payload =
'"mowerTimer":0,"startingPointDistance":null,"areaId":null';
$abilities = 'mower';
}
}
@ -339,12 +340,14 @@ sub Set {
}
}
elsif ( lc $cmd eq 'startoverridetimer' ) {
# $payload = '"name":"start_override_timer","parameters":{"duration":'
# . $aArg->[0] * 60 . '}';
# if ( $mainboard_version > 10.30 ) {
$payload = '"startingPointDistance":null,"areaId":null, "mowerTimer": '
. $aArg->[0] * 60;
$abilities = 'mower';
# } removed code < 10.30 api changes March 2024
}
@ -735,7 +738,8 @@ sub WriteReadings {
. RigReadingsValue( $hash,
$propertie->{value} ) # cast all data to string with ""
)
if ( exists( $propertie->{value} )
if (
exists( $propertie->{value} )
&& $decode_json->{abilities}[$abilities]{name} . '-'
. $propertie->{name} ne 'radio-quality'
&& $decode_json->{abilities}[$abilities]{name} . '-'
@ -756,7 +760,8 @@ sub WriteReadings {
. $propertie->{name} ne 'ic24-valves_master_config'
&& ( $decode_json->{abilities}[$abilities]{name} . '-'
. $propertie->{name} ) !~ /scheduling-timeslot_state_\d/
&& ref( $propertie->{value} ) ne "HASH" );
&& ref( $propertie->{value} ) ne "HASH"
);
readingsBulkUpdateIfChanged(
$hash,
@ -852,11 +857,13 @@ sub WriteReadings {
}
}
}
# decode timeslot_state_N arrays code by hhhdg
if ( defined( $propertie->{value} )
&& $decode_json->{abilities}[$abilities]{name} . '-'
. $propertie->{name} =~ /scheduling-timeslot_state_\d/
&& ref( $propertie->{value} ) eq "ARRAY" ) {
&& ref( $propertie->{value} ) eq "ARRAY" )
{
while ( my ( $r, $v ) = each @{ $propertie->{value} } ) {
if ( ref($v) eq "HASH" ) {
my $entry = $r + 1;
@ -976,7 +983,8 @@ sub WriteReadings {
while ( my $old_schedule_id = shift(@ist) ) {
foreach ( keys %{ $hash->{READINGS} } ) {
delete $hash->{READINGS}->{$_}
if ( $_ =~ /scheduling-schedules_event_${old_schedule_id}_.*/ );
if ( $_ =~
/scheduling-schedules_event_${old_schedule_id}_.*/ );
} # fi
Log3 $name, 5,
"[DEBUG] - $name : deletereading scheduling-schedules_event_${old_schedule_id}_.*"

View File

@ -1,2 +1,2 @@
UPD 2024-04-15_09:21:58 49572 FHEM/73_GardenaSmartBridge.pm
UPD 2024-04-15_09:37:55 127663 FHEM/74_GardenaSmartDevice.pm
UPD 2024-04-15_15:44:03 49971 FHEM/73_GardenaSmartBridge.pm
UPD 2024-04-15_15:43:50 127762 FHEM/74_GardenaSmartDevice.pm