diff --git a/fhem/FHEM/36_Shelly.pm b/fhem/FHEM/36_Shelly.pm index 84e1e794f..da1d3be26 100644 --- a/fhem/FHEM/36_Shelly.pm +++ b/fhem/FHEM/36_Shelly.pm @@ -2,7 +2,7 @@ # # Shelly.pm # -# FHEM module to communicate with Shelly switch/roller actor +# FHEM module to communicate with Shelly switch/roller actor devices # Prof. Dr. Peter A. Henning, 2018 # # $Id$ @@ -38,7 +38,7 @@ use vars qw{%attr %defs}; sub Log($$); #-- globals on start -my $version = "1.12"; +my $version = "1.2"; #-- these we may get on request my %gets = ( @@ -292,7 +292,7 @@ sub Shelly_Get ($@) { my $txt = "relay"; $txt = "roller" if( ($model eq "shelly2") && ($mode eq "roller") ); - return $shelly_regs{$txt}."\n\nSet/Get these registers by calling set/get $name config <register> [] <value>"; + return $shelly_regs{$txt}."\n\nSet/Get these registers by calling set/get $name config <registername> [<channel>] <value>"; #-- configuration register }elsif($a[1] eq "config") { @@ -504,7 +504,7 @@ sub Shelly_Set ($@) { if ( $hash && !$err && !$data ){ $url = "http://".$hash->{TCPIP}."/".$cmd; - Log3 $name, 1,"[Shelly_configure] called with only hash => Issue a non-blocking call to $url"; + Log3 $name, 5,"[Shelly_configure] called with only hash => Issue a non-blocking call to $url"; HttpUtils_NonblockingGet({ url => $url, callback=>sub($$$){ Shelly_configure($hash,$cmd,$_[1],$_[2]) } @@ -528,7 +528,7 @@ sub Shelly_Set ($@) { #-- isolate register name my $reg = substr($cmd,index($cmd,"?")+1); my $val = $jhash->{$reg}; - readingsSingleUpdate($hash,"config",$reg."=".$val,0); + readingsSingleUpdate($hash,"config",$reg."=".$val,1); return undef; } @@ -944,6 +944,12 @@ sub Shelly_Set ($@) {

Set

+ For Shelly all Shelly devices + For Shelly switching devices (mode=relay for model=shelly2, standard for all other models)