mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
73_NUKIBridge: 74_NUKIDevice, fix Perlwarnings
git-svn-id: https://svn.fhem.de/fhem/trunk@14250 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1376c8fcf5
commit
e19914db82
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- change: 73_NUKIBridge,74_NUKIDevice: fix Perlwarnings
|
||||||
- bugfix: 38_CO20: fixed definition with serial number
|
- bugfix: 38_CO20: fixed definition with serial number
|
||||||
- bugfix: 32_withings: safer json decoding
|
- bugfix: 32_withings: safer json decoding
|
||||||
- feature: 38_netatmo: home notification settings
|
- feature: 38_netatmo: home notification settings
|
||||||
|
@ -46,7 +46,7 @@ use JSON;
|
|||||||
|
|
||||||
use HttpUtils;
|
use HttpUtils;
|
||||||
|
|
||||||
my $version = "0.6.0";
|
my $version = "0.6.1";
|
||||||
my $bridgeapi = "1.5";
|
my $bridgeapi = "1.5";
|
||||||
|
|
||||||
|
|
||||||
@ -372,7 +372,7 @@ sub NUKIBridge_Distribution($$$) {
|
|||||||
|
|
||||||
Log3 $name, 5, "NUKIBridge ($name) - Response JSON: $json";
|
Log3 $name, 5, "NUKIBridge ($name) - Response JSON: $json";
|
||||||
Log3 $name, 5, "NUKIBridge ($name) - Response ERROR: $err";
|
Log3 $name, 5, "NUKIBridge ($name) - Response ERROR: $err";
|
||||||
Log3 $name, 5, "NUKIBridge ($name) - Response CODE: $param->{code}";
|
Log3 $name, 5, "NUKIBridge ($name) - Response CODE: $param->{code}" if( defined($param->{code}) and ($param->{code}) );
|
||||||
|
|
||||||
readingsBeginUpdate($hash);
|
readingsBeginUpdate($hash);
|
||||||
|
|
||||||
|
@ -456,13 +456,13 @@ sub NUKIDevice_WriteReadings($$) {
|
|||||||
my ($state,$lockState);
|
my ($state,$lockState);
|
||||||
|
|
||||||
|
|
||||||
if( $decode_json->{success} eq "true" ) {
|
if( defined($decode_json->{success}) and $decode_json->{success} eq "true" ) {
|
||||||
|
|
||||||
$state = $hash->{helper}{lockAction};
|
$state = $hash->{helper}{lockAction};
|
||||||
$lockState = $hash->{helper}{lockAction};
|
$lockState = $hash->{helper}{lockAction};
|
||||||
NUKIDevice_ReadFromNUKIBridge($hash, "lockState", undef, $hash->{NUKIID} ) if( ReadingsVal($hash->{IODev}->{NAME},'bridgeType','Software') eq 'Software' );
|
NUKIDevice_ReadFromNUKIBridge($hash, "lockState", undef, $hash->{NUKIID} ) if( ReadingsVal($hash->{IODev}->{NAME},'bridgeType','Software') eq 'Software' );
|
||||||
|
|
||||||
} elsif ( $decode_json->{success} eq "false" ) {
|
} elsif ( defined($decode_json->{success}) and $decode_json->{success} eq "false" ) {
|
||||||
|
|
||||||
$state = "error";
|
$state = "error";
|
||||||
NUKIDevice_ReadFromNUKIBridge($hash, "lockState", undef, $hash->{NUKIID} );
|
NUKIDevice_ReadFromNUKIBridge($hash, "lockState", undef, $hash->{NUKIID} );
|
||||||
|
Loading…
Reference in New Issue
Block a user