From 123ef855dcf0b9284cf143c7229b067f47483564 Mon Sep 17 00:00:00 2001 From: LeonGaultier Date: Tue, 5 Sep 2017 19:24:55 +0000 Subject: [PATCH] 74_GardenaSmartDevice: check character for create devicenames git-svn-id: https://svn.fhem.de/fhem/trunk@15015 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/73_GardenaSmartBridge.pm | 4 ++-- fhem/FHEM/74_GardenaSmartDevice.pm | 9 +++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index aeba7b56e..82c2d7bcb 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # 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. + - feature: 74_GardenaSmartDevice: check character for create devicenames - bugfix: FHEM2FHEM: addStateEvent attribute (Forum #76229) - bugfix: HttpUtils: use urlDecode for password in URL (Forum #76230) - bugfix: 74_GardenaSmartDevice.pm: fix little Commandref bug's diff --git a/fhem/FHEM/73_GardenaSmartBridge.pm b/fhem/FHEM/73_GardenaSmartBridge.pm index 9a225a694..928d0e843 100644 --- a/fhem/FHEM/73_GardenaSmartBridge.pm +++ b/fhem/FHEM/73_GardenaSmartBridge.pm @@ -70,7 +70,7 @@ eval "use IO::Socket::SSL;1" or $missingModul .= "IO::Socket::SSL "; ###todo Hier fehlt noch Modulabfrage für ssl -my $version = "0.2.0"; +my $version = "0.2.1"; @@ -809,7 +809,7 @@ sub GardenaSmartBridge_ParseJSON($$) { diff --git a/fhem/FHEM/74_GardenaSmartDevice.pm b/fhem/FHEM/74_GardenaSmartDevice.pm index f68d13c95..c1054174a 100644 --- a/fhem/FHEM/74_GardenaSmartDevice.pm +++ b/fhem/FHEM/74_GardenaSmartDevice.pm @@ -64,11 +64,11 @@ use Time::Local; use Data::Dumper; #debugging -eval "use Encode qw(encode encode_utf8 decode_utf8);1" or $missingModul .= "Encode "; +# eval "use Encode qw(encode encode_utf8 decode_utf8);1" or $missingModul .= "Encode "; wird nicht benötigt eval "use JSON;1" or $missingModul .= "JSON "; -my $version = "0.2.1"; +my $version = "0.2.2"; @@ -313,8 +313,9 @@ sub GardenaSmartDevice_Parse($$) { } else { - Log3 $name, 3, "GardenaSmartDevice ($name) - autocreate new device " . join('',split("[ \t]+",$decode_json->{name})) . " with deviceId $decode_json->{id}, model $decode_json->{category} and IODev IODev=$name"; - return "UNDEFINED " . join('',split("[ \t]+",$decode_json->{name})) . " GardenaSmartDevice $decode_json->{id} $decode_json->{category} IODev=$name"; + Log3 $name, 3, "GardenaSmartDevice ($name) - autocreate new device " . makeDeviceName($decode_json->{name}) . " with deviceId $decode_json->{id}, model $decode_json->{category} and IODev IODev=$name"; + #return "UNDEFINED " . join('',split("[ \t]+",$decode_json->{name})) . " GardenaSmartDevice $decode_json->{id} $decode_json->{category} IODev=$name"; + return "UNDEFINED " . makeDeviceName($decode_json->{name}) . " GardenaSmartDevice $decode_json->{id} $decode_json->{category} IODev=$name"; } } }