36_Shelly.pm: Neue Version mit Support für Shelly Dimmer

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@20605 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
phenning 2019-11-27 15:46:54 +00:00
parent 5d94c408cd
commit 4efbb5f920

View File

@ -39,7 +39,7 @@ use vars qw{%attr %defs};
sub Log($$); sub Log($$);
#-- globals on start #-- globals on start
my $version = "2.1"; my $version = "2.11";
#-- these we may get on request #-- these we may get on request
my %gets = ( my %gets = (
@ -648,6 +648,12 @@ sub Shelly_Set ($@) {
} }
#Shelly_onoff($hash,"white/$channel","?turn=".$cmd); #Shelly_onoff($hash,"white/$channel","?turn=".$cmd);
#-- command received via web to register local changes of the device input
}elsif( $cmd =~ /^button_((on)|(off))/){
my $ison = $1;
#--
my $subs = "_".$value;
readingsSingleUpdate( $hash, "button".$subs, $ison, 1 )
}elsif( $cmd eq "pct" ){ }elsif( $cmd eq "pct" ){
#$channel = $value; #$channel = $value;
$channel = shift @a; $channel = shift @a;
@ -1408,7 +1414,7 @@ sub Shelly_updown2($){
Notes: <ul> Notes: <ul>
<li>The attribute <code>model</code> <b>must</b> be set</li> <li>The attribute <code>model</code> <b>must</b> be set</li>
<li>This module needs the JSON package</li> <li>This module needs the JSON package</li>
<li>In Shelly switch devices one may set URL values that are "hit" when the input or output status changes. Here one must set <li>In Shelly switch devices or the Shelly dimmer device one may set URL values that are "hit" when the input or output status changes. Here one must set
<ul> <ul>
<li> For <i>Button switched ON url</i>: http://&lt;FHEM IP address&gt;:&lt;Port&gt;/fhem?XHR=1&cmd=set%20&lt;Devicename&gt;%20<b>button_on</b>%20[&lt;channel&gt;]</li> <li> For <i>Button switched ON url</i>: http://&lt;FHEM IP address&gt;:&lt;Port&gt;/fhem?XHR=1&cmd=set%20&lt;Devicename&gt;%20<b>button_on</b>%20[&lt;channel&gt;]</li>
<li> For <i>Button switched OFF url</i>: http://&lt;FHEM IP address&gt;:&lt;Port&gt;/fhem?XHR=1&cmd=set%20&lt;Devicename&gt;%20<b>button_off</b>%20[&lt;channel&gt;]</li> <li> For <i>Button switched OFF url</i>: http://&lt;FHEM IP address&gt;:&lt;Port&gt;/fhem?XHR=1&cmd=set%20&lt;Devicename&gt;%20<b>button_off</b>%20[&lt;channel&gt;]</li>