out_on|out_off|button_on|button_off|single_push, ... channel
+#
+########################################################################################
+
+sub Shelly_webhookurl ($@) {
+ my ($hash, @a) = @_ ;
+ my $name = $hash->{NAME};
+ my $cmd = shift @a; # Create, Delete, ...
+ my $entity = shift @a; # shelly component
+ my $channel = shift @a;
+ my $noe = shift @a; # number of event of entity
+
+ my $V = 4;
+ Log3 $name,$V,"[Shelly_webhookurl] calling url-builder with args: $name $cmd $entity ch:$channel noe:$noe";
+
+ my $host_ip = qx("\"hostname -I\""); # local
+ $host_ip =~ m/(\d\d?\d?\.\d\d?\d?\.\d\d?\d?\.\d\d?\d?).*/; #extract ipv4-address
+ $host_ip = $1;
+ Log3 $name,$V,"[Shelly_webhookurl] the host-ip of $name is: $host_ip";
+ my $host_url = "http://$host_ip:";
+
+
+ my $fhemweb = AttrVal($name,"webhook","none");
+ if($fhemweb eq "none"){
+ Log3 $name,$V,"[Shelly_webhookurl] FHEMweb-device for $name is $fhemweb (none or undefined)";
+ ## return($host_ip,InternalVal($name,"PORT",undef),"none","none");
+ return($host_ip,"8084","none","none");
+ }
+ Log3 $name,$V,"[Shelly_webhookurl] FHEMweb-device is: $fhemweb";
+
+
+ my $port = InternalVal($fhemweb,"PORT",undef);
+ if (!$port ){
+ Log3 $name,$V,"[Shelly_webhookurl] FHEMweb device without port-number";
+ return($host_ip,"9000","none","url");
+ }
+ Log3 $name,$V,"[Shelly_webhookurl] FHEMweb port is: $port";
+
+
+ my $webname = AttrVal($fhemweb,"webname","fhem");
+
+ Log3 $name,$V,"[Shelly_webhookurl] FHEMweb-device \"$fhemweb\" has port \"$port\" and webname \"$webname\"";
+
+ # check, if CSRF is defined in according FHEMWEB
+ my $token = InternalVal($fhemweb,"CSRFTOKEN",undef);
+ if (defined $token){
+ $token = "&fwcsrf=".$token;
+ }else{
+ $token = "";
+ }
+ Log3 $name,$V,"[Shelly_webhookurl] the token-string is: $token";
+
+
+ # building the url
+ $host_url .= "$port\/$webname?XHR=1$token";
+ $host_url =~ s/\&/\%26/g; # substitute & by %26
+
+ my ($gen,$urls_pre,$urls_part1,$urls_post);
+ my $model = AttrVal($name,"model","generic");
+ $gen = $shelly_models{$model}[4]; # 0 is Gen1, 1 is Gen2
+ $urls_pre = ($gen?"&urls=[%22":"&urls[]="); # Gen2 : Gen1
+ $urls_part1=$host_url;
+ $urls_post= ($gen?"%22]":"");
+
+ #-- building the command for fhem
+
+ $entity = "status" if (!$entity );
+
+ my $fhemcmd;
+ if ( $entity eq "status" || length($shelly_events{$entity}[$noe])==0 ){
+ $fhemcmd = "get $name status";
+ }else{
+ $entity = $shelly_events{$entity}[$noe];
+ $entity = $fhem_events{$entity};
+ $fhemcmd = "set $name $entity";
+ if( $entity eq "Active_Power" ){
+ $fhemcmd .= "_%24%7bev.phase%7d %24%7bev.act_power%7d" ;
+ }elsif( $entity eq "Current" ){
+ $fhemcmd .= "_%24%7bev.phase%7d %24%7bev.current%7d" ;
+ }elsif( $entity eq "Voltage" ){
+ $fhemcmd .= "_%24%7bev.phase%7d %24%7bev.voltage%7d" ;
+ }else{
+ $fhemcmd .= " $channel";
+ }
+ }
+ Log3 $name,$V,"[Shelly_webhookurl] $name: the fhem command is: \"$fhemcmd\"";
+ $fhemcmd =~ s/\s/\%2520/g; # substitute '&' by '%2520', that will result in '%20'
+ $fhemcmd = "%26cmd=".$fhemcmd; # %26 --> '&'
+ Log3 $name,$V,"[Shelly_webhookurl] $name: $urls_pre$fhemcmd$urls_post";
+ ##########
+ return ($urls_pre,$urls_part1,$fhemcmd,$urls_post);
+}
+
+
+########################################################################################
+#
+# Shelly_error_handling - handling error from callback functions
+#
+# Parameter hash, function, error
+#
+########################################################################################
+
+
+sub Shelly_error_handling {
+ my ($hash, $func, $err) = @_;
+ my $name = $hash->{NAME};
+ readingsBeginUpdate($hash);
+ Log3 $name,1,"[$func] device $name has error \"$err\" ";
+ if( $err =~ /timed out/ ){
+ if( $err =~ /read/ ){
+ $err = "Error: Timeout reading";
+ }elsif( $err =~ /connect/ ){
+ $err = "Error: Timeout connecting";
+ }else{
+ $err = "Error: Timeout";
+ }
+ readingsBulkUpdateIfChanged($hash,"network",$err,1);
+ $err = "Error: Network";
+ }elsif( $err eq "not connected" ){ # from Shelly_proc2G:status
+ readingsBulkUpdateIfChanged($hash,"network","not connected",1);
+ $err = "Error: Network"; #disconnected
+ }elsif( $err =~ /113/ ){ # keine Route zum Zielrechner (113)
+ readingsBulkUpdateIfChanged($hash,"network","not connected (no route)",1);
+ $err = "Error: Network"; #disconnected
+ }elsif( $err =~ /JSON/ ){
+ readingsBulkUpdateIfChanged($hash,"network",$err,1);
+ $err = "Error: JSON";
+ }else{
+ $err = "Error";
+ }
+
+ readingsBulkUpdate($hash,"network_disconnects",ReadingsNum($name,"network_disconnects",0)+1) if( ReadingsVal($name,"state","") ne $err );
+ readingsBulkUpdateMonitored($hash,"state",$err,1);
+ readingsEndUpdate($hash,1);
+ return undef;
+}
+
+########################################################################################
+
+# if unchanged, generates an event and hold the old timestamp
+sub
+readingsBulkUpdateHoldTimestamp($$$@)
+{
+ my ($hash,$reading,$value,$changed)= @_;
+ my $timestamp=ReadingsTimestamp($hash->{NAME},$reading,undef); # yyyy-MM-dd hh:mm:ss
+ if( $value eq ReadingsVal($hash->{NAME},$reading,"") ){
+ return readingsBulkUpdate($hash,$reading,$value,$changed,$timestamp);
+ }else{
+ return readingsBulkUpdate($hash,$reading,$value,$changed);
+ }
+}
+
+
+# generate events at least at given readings age, even if the reading has not changed
+sub
+readingsBulkUpdateMonitored($$$@) # derived from fhem.pl readingsBulkUpdateIfChanged()
+{
+ my ($hash,$reading,$value,$changed)= @_;
+ my $MaxAge=AttrVal($hash->{NAME},"maxAge",21600); # default 6h
+ if( ReadingsAge($hash->{NAME},$reading,$MaxAge)>=$MaxAge || $value ne ReadingsVal($hash->{NAME},$reading,"") ){
+ return readingsBulkUpdate($hash,$reading,$value,$changed);
+ }else{
+ return undef;
+ }
+}
+
+sub
+Shelly_readingsBulkUpdate($$$@) # derived from fhem.pl readingsBulkUpdateIfChanged()
+{
+ my ($hash,$reading,$value,$changed,$timestamp)= @_;
+ my $readingsProfile ="none";
+ if($value ne ReadingsVal($hash->{NAME},$reading,"")){
+ if( !defined($timestamp) ){
+ # Value of Reading changed: generate Event, timestamp is actual time
+ readingsBulkUpdate($hash,$reading,$value,$changed);
+ }else{
+ # Value of Reading changed: generte Event and set timestamp as calculated by function
+ readingsBulkUpdate($hash,$reading,$value,$changed,$timestamp);
+ }
+ }elsif($readingsProfile eq "none" ){ # no change -> do noting, like readingsBulkUpdateIfChanged()
+ return undef;
+ }elsif($readingsProfile eq "actual" ){ # no change -> set actual Timestamp, no Event :: Browser refresh erforderlich
+ # return readingsBulkUpdate($hash,$reading,$value,0,"2023-07-20 19:00:45"); # das gibt es nicht
+ setReadingsVal($hash, $reading, $value,TimeNow() ); # timestamp im Format "2023-07-20 19:33:45"
+ }elsif($readingsProfile eq "update" ){ # no change -> set actual TS and sent event, like readingsBulkUpdate()
+ return readingsBulkUpdate($hash,$reading,$value,$changed);
+ }elsif($readingsProfile eq "maxAge" ){ # no change -> like above, but only when readings is more than maxAge old
+ my $MaxAge=AttrVal($hash->{NAME},"maxAge",21600); # default 6h
+ return readingsBulkUpdate($hash,$reading,$value,$changed) if( ReadingsAge($hash->{NAME},$reading,$MaxAge)>=$MaxAge );
+ }elsif($readingsProfile eq "hold" ){ # no change -> sent event, but dont change timestamp
+ return readingsBulkUpdate($hash,$reading,$value,$changed,ReadingsTimestamp($hash->{NAME},$reading,undef));
+ }else{ #Error
+ return "Error";
+ }
return undef;
}
+#
+
+
+
1;
=pod
=item device
=item summary to communicate with a Shelly switch/roller actuator
+=item summary_DE Gerätemodul für Shelly-Geräte
=begin html
-
+
Shelly
- FHEM module to communicate with a Shelly switch/roller actuator/dimmer/RGBW controller
-
+ FHEM module to communicate with a Shelly switch/roller actuator/dimmer/RGBW controller or energy meter
+
Define
define <name> Shelly <IP address>
Defines the Shelly device.
Notes:
- - The attribute
model must be set
- - This module needs the JSON package
+ - This module needs the JSON and the HttpUtils package
- In Shelly button, switch, roller or dimmer devices one may set URL values that are "hit" when the input or output status changes.
This is useful to transmit status changes arising from locally pressed buttons directly to FHEM by setting
@@ -1790,141 +4619,1050 @@ sub Shelly_updown2($){
If one wants to detach the button from the output, one may generate an additional reading button by setting in the Shelly
- - For Button switched ON url: http://<FHEM IP address>:<Port>/fhem?XHR=1&cmd=set%20<Devicename>%20button_on%20[<channel>]
- - For Button switched OFF url: http://<FHEM IP address>:<Port>/fhem?XHR=1&cmd=set%20<Devicename>%20button_off%20[<channel>]
+ - For Button switched ON url:
+ http://<FHEM IP address>:<Port>/fhem?XHR=1&cmd=set%20<Devicename>%20button_on%20[<channel>]
+ - For Button switched OFF url:
+ http://<FHEM IP address>:<Port>/fhem?XHR=1&cmd=set%20<Devicename>%20button_off%20[<channel>]
Attention: Of course, a csrfToken must be included as well - or a proper allowed device declared.
- - If the model attribute is set to generic, the device does not contain any actors, it is just a placeholder for arbitrary sensors
+ - The attribute
model is set automatically.
+ For shelly devices that are not supported by the device, the attribute is set to generic.
+ If the model attribute is set to generic, the device does not contain any actors, it is just a placeholder for arbitrary sensors
-
+
Set
For all Shelly devices
- set <name> config <registername> <value> [<channel>]
-
set the value of a configuration register
- - password <password>
This is the only way to set the password for the Shelly web interface
+ -
+
+
set <name> name <ShellyName>
+
name of the Shelly device. If the Shelly is not named, its name will set to the name of the Fhem-device.
+ ShellyName may contain space characters.
+
+ Note: Empty strings are not accepted, deletion of Shellies name on its website will result in remaining it to the modules name
+ -
+
+
set <name> config <registername> <value> [<channel>]
+
set the value of a configuration register (Gen1 devices only)
+
+ -
+
+
set <name> interval <integer>
+
Temporarely set the update interval. Will be overwritten by the attribute on restart.
+ A value of -1 set the interval to the default given by attribute,
+ a value of 0 disables the automatic update.
+
+ -
+
+
set <name> password <password>
+
This is the only way to set the password for the Shelly web interface
+
+ -
+
+
set <name> reboot
+
Reboot the Shelly
+
+ -
+
+
set <name> update
+
Update the Shelly to the latest stable version
+
+
- For Shelly switching devices (model=shelly1|shelly1pm|shellyuni|shelly4|shellypro4pm|shellyplug|shellyem|shelly3em or (model=shelly2/2.5 and mode=relay))
+
For Shelly switching devices (model=shelly1|shelly1pm|shellyuni|shelly4|shellypro4pm|shellyplug|shellyem|shelly3em or
+ (model=shelly2/2.5/plus2/pro2 and mode=relay))
-
set <name> on|off|toggle [<channel>]
-
switches channel <channel> on or off. Channel numbers are 0 and 1 for model=shelly2/2.5, 0..3 for model=shelly4. If the channel parameter is omitted, the module will switch the channel defined in the defchannel attribute.
+
switches channel <channel> on or off. Channel numbers are 0 and 1 for model=shelly2/2.5/plus2/pro2, 0..3 for model=shelly4.
+ If the channel parameter is omitted, the module will switch the channel defined in the defchannel attribute.
-
set <name> on-for-timer|off-for-timer <time> [<channel>]
-
switches <channel> on or off for <time> seconds. Channel numbers are 0 and 1 for model=shelly2/2.5 or model=shellyuni, and 0..3 model=shelly4. If the channel parameter is omitted, the module will switch the channel defined in the defchannel attribute.
+
switches <channel> on or off for <time> seconds.
+ Channel numbers are 0 and 1 for model=shelly2/2.5/plus2/pro2 or model=shellyuni, and 0..3 model=shelly4/pro4.
+ If the channel parameter is omitted, the module will switch the channel defined in the defchannel attribute.
-
set <name> xtrachannels
-
create readingsProxy devices for switching device with more than one channel
+
create readingsProxy devices for switching devices with more than one channel
-
For Shelly roller blind devices (model=shelly2/2.5 and mode=roller)
+
For Shelly roller blind devices (model=shelly2/2.5/plus2/pro2 and mode=roller)
- -
+
-
set <name> open|closed|stop [<duration>]
-
drives the roller blind open, closed or to a stop. The commands open and closed take a optional parameter that determines the drive time in seconds
+
drives the roller blind open, closed or to a stop.
+ The commands open and closed take an optional parameter that determines the drive time in seconds
-
set <name> pct <integer percent value>
drives the roller blind to a partially closed position (normally 100=open, 0=closed, see attribute pct100). If the integer percent value
carries a sign + or - the following number will be added to the current value of the position to acquire the target value.
+
+ -
+
set <name> delta +|-<percentage>
+
drives the roller blind a given percentage down or up.
+ The moving direction depends on the attribute 'pct100'.
-
+
set <name> zero
-
calibration of roller device (only for model=shelly2/2.5)
+
calibration of roller device
+ -
+
+
set <name> predefAttr
+
sets predefined attributes: devStateIcon, cmdIcon, webCmd and eventMap
+
Attribute 'pct100' must be set earlier
+
Attributes are set only when not defined yet
+
For Shelly dimmer devices model=shellydimmer or (model=shellyrgbw and mode=white)
-
-
set <name> on|off [<channel>]
-
switches channel <channel> on or off. Channel numbers are 0..3 for model=shellyrgbw. If the channel parameter is omitted, the module will switch the channel defined in the defchannel attribute.
+ set <name> on|off|toggle [<channel>]
+
switches channel <channel> on or off. Channel numbers are 0..3 for model=shellyrgbw.
+ If the channel parameter is omitted, the module will switch the channel defined in the defchannel attribute.
-
set <name> on-for-timer|off-for-timer <time> [<channel>]
-
switches <channel> on or off for <time> seconds. Channel numbers 0..3 for model=shellyrgbw. If the channel parameter is omitted, the module will switch the channel defined in the defchannel attribute.
+
switches <channel> on or off for <time> seconds. Channel numbers 0..3 for model=shellyrgbw.
+ If the channel parameter is omitted, the module will switch the channel defined in the defchannel attribute.
-
set <name> pct <0..100> [<channel>]
-
percent value to set brightness value. Channel numbers 0..3 for model=shellyrgbw. If the channel parameter is omitted, the module will dim the channel defined in the defchannel attribute.
+
percent value to set brightness value. Channel numbers 0..3 for model=shellyrgbw.
+ If the channel parameter is omitted, the module will dim the channel defined in the defchannel attribute.
For Shelly RGBW devices (model=shellyrgbw and mode=color)
-
-
set <name> on|off
+ set <name> on|off|toggle
switches device <channel> on or off
-
set <name> on-for-timer|off-for-timer <time>
switches device on or off for <time> seconds.
-
+
set <name> hsv <hue value 0..360>,<saturation value 0..1>,<brightness value 0..1>
comma separated list of hue, saturation and value to set the color. Note, that 360° is the same hue as 0° = red.
Hue values smaller than 1 will be treated as fraction of the full circle, e.g. 0.5 will give the same hue as 180°.
-
+
+
set <name> gain <integer>
+
number 0..100 to set the gain of the color channels
+ -
+
set <name> rgb <rrggbb>
6-digit hex string to set the color
-
+
set <name> rgbw <rrggbbww>
8-digit hex string to set the color and white value
-
+
set <name> white <integer>
-
number 0..255 to set the white value
+
number 0..100 to set the white value
-
+
Get
-
+
get <name> config [<registername>] [<channel>]
-
get the value of a configuration register and writes it in reading config. If the register name is omitted, only general data like e.g. the SHELLYID are fetched.
+
get the value of a configuration register and writes it in reading config.
+ If the register name is omitted, only general data like e.g. the SHELLYID are fetched.
-
+
get <name> registers
displays the names of the configuration registers for this device
-
+
get <name> status
-
returns the current devices status.
+
returns the current status of the device.
-
+
+
get <name> shelly_status
+
returns the current system status of the device.
+ -
+
+
get <name> model
+
get the type of the Shelly
+ -
+
get <name> version
display the version of the module
-
+
Attributes
- attr <name> shellyuser <shellyuser>
username for addressing the Shelly web interface
- - <
attr <name> model generic|shelly1|shelly1pm|shelly2|shelly2.5|shellyuni|shelly4|shellyplug|shellydimmer|shellyrgbw
-
type of the Shelly device. >If the model attribute is set to generic, the device does not contain any actors,
- it is just a placeholder for arbitrary sensors
- attr <name> mode relay|roller (only for model=shelly2/2.5) mode white|color (only for model=shellyrgbw)
+ -
+
+
attr <name> name <ShellyName>
+
name of the Shelly device. If the Shelly is not named, its name will set to the name of the Fhem-device.
+ ShellyName may contain space characters.
+
+ Note: Empty strings are not accepted, deletion of Shellies name on its website will result in remaining it to the modules name
+
+ -
+
+
attr <name> shellyuser <shellyuser>
+
username for addressing the Shelly web interface. Set the password with the set command.
+ -
+
+
attr <name> model generic|shelly1|shelly1pm|shelly2|shelly2.5|
+ shellyplug|shelly4|shellypro4|shellydimmer|shellyrgbw|shellyem|shelly3em|shellybulb|shellyuni
+
type of the Shelly device. If the model attribute is set to generic, the device does not contain any actors,
+ it is just a placeholder for arbitrary sensors.
+ Note: this attribute is determined automatically.
+ -
+
+
attr <name> mode relay|roller (only for model=shelly2/2.5/plus2/pro2)
+
attr <name> mode white|color (only for model=shellyrgbw)
type of the Shelly device
-
-
<interval>
-
Update interval for reading in seconds. The default is 60 seconds, a value of 0 disables the automatic update.
+
+ attr <name> interval <interval>
+
Update interval for reading in seconds. The default is 60 seconds, a value of 0 disables the automatic update.
+
+
Note: The ShellyPro3EM energy meter is working with a set of two intervals:
+ The power values are read at the main interval (as set by the attribute value),
+ the energy values and calculated power values are read at a multiple of 60 seconds.
+ When setting the main interval, the value is adjusted to match an integer divider of 60.
+
-
-
<timeout>
-
Timeout in seconds for HttpUtils_NonblockingGet. The default is 4 seconds. Careful: Use this attribute only if you get timeout errors in your log.
+
+ attr <name> maxAge <seconds>
+
Maximum age of readings in seconds. The default is 21600 seconds = 6 hours, minimum value is 'interval'.
+
+
+ -
+
attr <name> showinputs show|hide
+
+
Add the state of the input buttons and their mode to the readings. The default value is show.
+ Most comfortable when triggered by actions/webhooks from the device.
+
+ -
+
+
attr <name> showunits none|original|normal|normal2|ISO
+
Add the units to the readings. The default value is none (no units).
+ The energy unit can be selected between Wh, kWh, kJ.
+
+ none: recommended to get results consistend with ShellyMonitor
+ original: the units are as given by the shelly device (eg Wm (Watt-Minutes) for most of first generation devices)
+ normal: energy will be calculated to Wh (Watt-Hours)
+ normal2: energy will be calculated to kWh (Kilo-Watt-Hours)
+ ISO: energy will be calculated to kJ (Kilo-Joule)
+
+
+ -
+
+
attr <name> maxpower <maxpower>
+
Max power protection in watts. The default value and its range is predetermined by the shelly device.
+
+ -
+
+
attr <name> timeout <timeout>
+
Timeout in seconds for HttpUtils_NonblockingGet. The default is 4 seconds.
+ Careful: Use this attribute only if you get timeout errors in your log.
+
+ -
+
+
attr <name> webhook none|<FHEMWEB-device> (default:none)
+
create a set of webhooks on the shelly device which send a status request to fhem (only 2nd gen devices).
+
If a csrf token is set on the FHEMWEB device, this is taken into account. The tokens are checked regulary and will be updated on the shelly.
+
The names of the webhooks in the shelly device are based on the names of shellies events,
+ with an preceding and trailing underscore (eg _COVER.STOPPED_).
+
If the attribute is set to none, these webhooks (with a trailing underscore) will be deleted.
+
+ Webhooks that point to another IP address are ignored by this mechanism.
+
Note: When deleting a fhem device, remove associated webhooks on the Shelly before with attr <name> webhook none or
+ deleteattr <name> webhook
-
For Shelly switching devices (mode=relay for model=shelly2/2.5, standard for all other switching models)
+
For Shelly switching devices (mode=relay for model=shelly2/2.5/plus2/pro2, standard for all other switching models)
- attr <name> defchannel
-
only for model=shelly2|shelly2.5|shelly4 or multi-channel switches: Which channel will be switched, if a command is received without channel number
+ -
+
+
attr <name> defchannel <integer>
+
only for multi-channel switches eg model=shelly2|shelly2.5|shelly4 or shellyrgbw in white mode:
+ Which channel will be switched, if a command is received without channel number
+
-
For Shelly roller blind devices (mode=roller for model=shelly2/2.5)
+
For Shelly roller blind devices (mode=roller for model=shelly2/2.5/plus2/pro2)
- attr <name> maxtime <float>
-
time needed for a complete drive upward or downward
- attr <name> pct100 open|closed (default:open)
-
is pct=100 open or closed ?
+ -
+
+
attr <name> maxtime <int|float>
+
time needed (in seconds) for a complete drive upward or downward
+ -
+
+
attr <name> maxtime_close <int> Gen1
+
attr <name> maxtime_close <float> Gen2
+
time needed (in seconds) for a complete drive downward
+ -
+
+
attr <name> maxtime_open <int> Gen1
+
attr <name> maxtime_open <float> Gen2
+
time needed (in seconds) for a complete drive upward
+ -
+
+
attr <name> pct100 open|closed (default:open)
+
roller or blind devices only: is pct=100 open or closed ?
+
+
For energy meter ShellyPro3EM
+
+ -
+
+
attr <name> Energymeter_P <float>
+
calibrate to the suppliers meter-device for meters with backstop functionality
+ or for the purchase meter if two meters or a bidirectional meter are installed
+
value(s) added to Shellies value(s) to represent the suppliers meter value(s), in Wh (Watthours).
+
Note: the stored attribute value is reduced by the actual value
+ -
+
+
attr <name> Energymeter_R <float>
+
calibrate returned energy to the second suppliers meter-device (Bidirectional meters only)
+
value(s) added to Shellies value(s) to represent the suppliers meter value(s), in Wh (Watthours).
+
Note: the stored attribute value is reduced by the actual value
+ -
+
+
attr <name> Energymeter_F <float>
+
calibrate to the suppliers meter-device for Ferraris-type meters
+
value(s) added to Shellies value(s) to represent the suppliers meter value(s), in Wh (Watthours).
+
Note: the stored attribute value is reduced by the actual value
+ -
+
+
attr <name> EMchannels ABC_|L123_|_ABC|_L123 (default: _ABC)
+
used to attach prefixes or postfixes to the names of the power and energy readings
+
Caution: deleting or change of this attribute will remove relevant readings!
+ -
+
+
attr <name> Periods <periodes>
+
comma separated list of periodes to calculate energy differences
+
hourQ: a quarter of an hour
+
dayQ: a quarter of a day
+
dayT: a third of a day (8 hours), starting at 06:00
+
Caution: when removing an entry from this list or when deleting this attribute,
+ all relevant readings are deleted!
+ -
+
+
attr <name> PeriodsCorr-F <0.90 ... 1.10>
+
a float number as correction factor for the energy differences for the periods given by the attribute "Periods"
Standard attributes
- - alias, comment, event-on-update-reading, event-on-change-reading, room, eventMap, loglevel,
- webCmd
+ - alias,
+ comment,
+ event-on-update-reading,
+ event-on-change-reading,
+ room,
+ eventMap,
+ verbose,
+ webCmd
+
+
+
+
+
+ Readings/Generated events
(selection)
+
+ Webhooks (2nd gen devices only)
+ -
webhook_cnt
+
number of webhooks stored in the shelly
+ -
webhook_ver
+
latest revision number of shellies webhooks
+
+
+ ShellyPlus and ShellyPro devices
+
+ -
+ indicating the configuration of Shellies hardware inputs
+
input_<channel>_mode
+
ShellyPlus/Pro2PM in relay mode:
+
button|switch straight|inverted follow|detached
+
ShellyPlus/Pro2PM in roller mode:
+
button|switch straight|inverted single|dual|detached normal|swapped
+
ShellyPlusI4:
+
button|switch straight|inverted
+
+ -
button input type: button attached to the Shelly
+ -
switch input type: switch attached to the Shelly
+ -
straight the input is not inverted
+ -
inverted the input is inverted
+ -
single control button mode: the roller is controlled by one input *
+ -
dual control button mode: the roller is controlled by two inputs *
+ -
follow control button mode: the relay is controlled by the input **
+ -
detached control button mode: the input is detached from the relay|roller
+ -
normal the inputs are not swapped *
+ -
swapped the inputs are swapped *
+
* roller mode only ** relay mode only
+
+
+
+
+ -
+ indicating the reason for start or stop of the roller
+
start_reason, stop_reason
+
+ -
button button or switch attached to the Shelly
+ -
http HTTP/URL eg Fhem
+ -
HTTP Shelly-App
+ -
loopback Shelly-App timer
+ -
limit_switch roller reaches upper or lower end
+ -
timeout after given drive time (eg fhem)
+ -
WS_in Websocket
+ -
obstruction Obstruction detection
+ -
overpower
+ -
overvoltage
+ -
overcurrent
+
+
+
+
+
+ ShellyPlusI4
+
+ an input in mode 'button' has usually the state 'unknown'.
+ When activated, the input state is set to 'ON' for a short periode, independent from activation time.
+ The activation time and sequence is reprensented by the readings input_<ch>_action and input_<ch>_actionS,
+ which will act simultanously with following values:
+
+ - S single_push
+ - SS double_push
+ - SSS triple_push
+ - L long_push
+
+
+ NOTE: the readings of an input in mode 'button' cannot actualized by polling.
+ It is necessary to set actions/webhooks on the Shelly!
+
+
+
Webhooks on ShellyPlusI4
+
Webhooks generated by Fhem are named as follows:
+
Input mode 'switch'
+
+ - _INPUT.TOGGLE_ON_
+ - _INPUT.TOGGLE_OFF_
+
+
+
Input mode 'button'
+
+ - _INPUT.BUTTON_PUSH_
+ - _INPUT.BUTTON_DOUBLEPUSH_
+ - _INPUT.BUTTON_TRIPLEPUSH_
+ - _INPUT.BUTTON_LONGPUSH_
+
+
+
+ ShellyPro3EM
+
+ Power
+
+ Power, Voltage, Current and Power-Factor are updated at the main interval, unless otherwise specified
+ -
+ Active Power
+
Active_Power_<A|B|C|T>
+
float values of the actual active power
+ -
+ Calculated Active Power
+
Active_Power_calculated
+
float value, calculated from the difference of Shellies Total_Energy reading (updated each minute, or multiple)
+ -
+ Integrated Active Power
+
Active_Power_integrated
+
float value, calculated from the integration of Shellies power readings (updated each minute, or multiple)
+ -
+ Pushed Power
+
Active_Power_pushed_<A|B|C|T>
+
float values of the actual power pushed by the Shelly when the value of a phase differs at least 10% to the previous sent value
+ (update interval depends on load, possible minimum is 1 second)
+ Action on power-events on the Shelly must be enabled.
+
+ -
+ Apparent Power
+
Apparent_Power_<A|B|C|T>
+
float values of the actual apparent power
+ -
+ Voltage, Current and Power-Factor
+
Voltage_<A|B|C>
+
Current_<A|B|C|T>
+
Power_Factor_<A|B|C>
+
float values of the actual voltage, current and power factor
+
+ Energy
+
+ Energy readings are updated each minute, or multiple.
+
When the showunits attribute is set, the associated units (Wh, kWh, kJ) are appended to the values
+ -
+ Active Energy
+
Purchased_Energy_<A|B|C|T>
+
Returned_Energy_<A|B|C|T>
+
float values of the purchased or returned energy per phase and total
+ -
+ Total Active Energy
+
Total_Energy
+
float value of total purchased energy minus total returned energy
+
A minus sign is indicating returned energy.
+
The timestamp of the reading is set to the full minute, as this is Shellies time base.
+ Day and Week are based on GMT.
+
+ -
+ Energymeter
+
Total_Energymeter_<F|P|R>
+
float values of the purchased (P) or returned (R) energy displayed by the suppliers meter.
+ For Ferraris type meters (F), the returned energy is subtracted from the purchased energy
+ -
+ Energy differences in a period of time
+
[measuredEnergy]_<Min|QHour|Hour|Qday|TDay|Day|Week>
+
float value of energy in a period of time (updated at the defined time interval).
+
QDay is a period of 6 hours, starting at 00:00.
+
TDay is a period of 8 hours, starting at 06:00.
+
Week is a period of 7 days, starting mondays at 00:00.
+
+
=end html
+
=begin html_DE
-
+
Shelly
-Absichtlich keine deutsche Dokumentation vorhanden, die englische Version gibt es hier: Shelly
-
+ FHEM Modul zur Kommunikation mit Shelly Aktoren und Sensoren/Energiezähler
+
+ Define
+
+ define <name> Shelly <IP address>
+
Definiert das Shelly Device.
+ Notes:
+ - Dieses Modul benötigt die Pakete JSON und HttpUtils
+
+ - Das Attribut
model wird automatisch gesetzt.
+ Für Shelly Geräte, welche nicht von diesem Modul unterstützt werden, wird das Attribut zu generic gesetzt.
+ Das Device enthält dann keine Aktoren, es ist nur ein Platzhalter für die Bereitstellung von Readings
+
+ - Bei bestimmten Shelly Modellen können URLs (Webhooks) festgelegt werden, welche bei Eintreten bestimmter Ereignisse ausgelöst werden.
+ Beispielsweise lauten die Webhooks für die Information über die Betätigung lokaler Eingänge wie folgt:
+
+ - Button switched ON url:
+ http://<FHEM IP address>:<Port>/fhem?XHR=1&cmd=set%20<Devicename>%20button_on%20[<channel>]
+ - Button switched OFF url:
+ http://<FHEM IP address>:<Port>/fhem?XHR=1&cmd=set%20<Devicename>%20button_off%20[<channel>]
+
+ Ein Webhook für die Aktualisierung aller Readings lautet beispielsweise:
+
+ - http://<FHEM IP address>:<Port>/fhem?XHR=1&cmd=get%20<Devicename>%20status
+
+ Hinweise:
+
+ - Ein CSRF-Token muss gegebenenfalls in den URL aufgenommen werden oder ein zugehörendes allowed Device muss festgelegt werden.
+ - Die URLs (Webhooks) können mit dem Attribut 'webhook' automatisiert angelegt werden
+
+
+
+
+
+ Set
+ Für alle Shelly Geräte
+
+ -
+
+
set <name> name <ShellyName>
+
Name des Shelly Gerätes. Wenn der Shelly noch keinen Namen erhalten hat wird der Shelly nach dem FHEM-Device benannt.
+ Der Shellyname darf Leerzeichen enthalten.
+
+ Hinweis: Leere Zeichenkentten werden nicht akzeptiert.
+ Nach dem Löschen eines Shelly Namens (auf Shellies-Website) wird der Shelly Name auf den Namen des FHEM Devices gesetzt.
+ -
+
+
set <name> config <registername> <value> [<channel>]
+
Setzen eines Registers auf den Wert value (nur für Shellies der 1. Generation)
+
Die verfügbaren Register erhält man mit get <name> registers
+
+ -
+
+
set <name> interval <integer>
+
Vorübergehendes Setzen des Aktualisierungsintervals. Wird bei Restart vom Wert des Attributes interval überschrieben.
+ Der Wert -1 setzt das Interval auf den Wert des Attributes,
+ der Wert 0 deaktiviert die automatische Aktualisierung.
+
+ -
+
+
set <name> password <password>
+
Setzen des Passwortes für das Shelly Web Interface
+
+ -
+
+
set <name> reboot
+
Neustarten des Shelly
+
+ -
+
+
set <name> update
+
Aktualisieren der Shelly Firmware zur aktuellen stabilen Version
+
+
+
+
Für Shelly mit Relais (model=shelly1|shelly1pm|shellyuni|shelly4|shellypro4pm|shellyplug|shellyem|shelly3em oder
+ (model=shelly2/2.5/plus2/pro2 und mode=relay))
+
+ -
+
set <name> on|off|toggle [<channel>]
+
schaltet den Kanal <channel> on oder off. Die Kanalnummern sind 0 und 1 für model=shelly2/2.5/plus2/pro2, 0..3 für model=shelly4.
+ Wenn keine Kanalnummer angegeben, wird der mit dem Attribut 'defchannel' definierte Kanal geschaltet.
+ -
+
set <name> on-for-timer|off-for-timer <time> [<channel>]
+
schaltet den Kanal <channel> on oder off für <time> Sekunden.
+ Kanalnummern sind 0 und 1 für model=shelly2/2.5/plus2/pro2 oder model=shellyuni, und 0..3 model=shelly4/pro4.
+ Wird keine Kanalnummer angegeben, wird der mit dem Attribut 'defchannel' definierte Kanal geschaltet.
+ -
+
set <name> xtrachannels
+
Erstellen von readingsProxy Devices für Shellies mit mehr als einem Relais
+
+
+
Für Shelly Rollladentreiber (model=shelly2/2.5/plus2/pro2 und mode=roller)
+
+ -
+
set <name> open|closed|stop [<duration>]
+
Fährt den Rollladen zu den Positionen open (offen), closed (geschlossen) oder beendet die Fahrbewegung (stop).
+ Bei den Befehle open (öffnen) und closed (schließen) kann ein optionaler Parameter für die Fahrzeit in Sekunden mit übergeben werden
+
+ -
+
set <name> pct <integer percent value>
+
Fährt den Rollladen zu einer Zwischenstellung (normalerweise gilt 100=offen, 0=geschlossen, siehe Attribut 'pct100').
+ Wenn dem Wert für die Zwischenstellung ein Plus (+) oder Minus (-) - Zeichen vorangestellt wird,
+ wird der Wert auf den aktuellen Positionswert hinzugezählt.
+
+
+ -
+
set <name> delta +|-<percentage>
+
Fährt den Rollladen einen gegebenen Prozentwert auf oder ab.
+ Die Fahrtrichtung ist abhängig vom Attribut 'pct100'.
+ -
+
+
set <name> zero
+
Den Shelly kalibrieren
+ -
+
+
set <name> predefAttr
+
Setzen von vordefinierten Attributen: devStateIcon, cmdIcon, webCmd and eventMap
+
Das Attribut 'pct100' muss bereits definiert sein
+
Attribute werden nur gesetzt, wenn sie nicht bereits definiert sind
+
+
+
Für Shelly Dimmer Devices (model=shellydimmer oder model=shellyrgbw und mode=white)
+
+ -
+
set <name> on|off|toggle [<channel>]
+
schaltet Kanal <channel> on oder off. Kanalnummern sind 0..3 für model=shellyrgbw.
+ Wird keine Kanalnummer angegeben, wird der mit dem Attribut 'defchannel' definierte Kanal geschaltet.
+ -
+
set <name> on-for-timer|off-for-timer <time> [<channel>]
+
schaltet Kanal <channel> on oder off für <time> Sekunden. Kanalnummern sind 0..3 for model=shellyrgbw.
+ Wird keine Kanalnummer angegeben, wird der mit dem Attribut 'defchannel' definierte Kanal geschaltet.
+ -
+
set <name> pct <0..100> [<channel>]
+
Prozentualer Wert für die Helligkeit (brightness). Kanalnummern sind 0..3 für model=shellyrgbw.
+ Wird keine Kanalnummer angegeben, wird der mit dem Attribut 'defchannel' definierte Kanal geschaltet.
+
+
Für Shelly RGBW Devices (model=shellyrgbw und mode=color)
+
+ -
+
set <name> on|off|toggle
+
schaltet das Device <channel> on oder off
+ -
+
set <name> on-for-timer|off-for-timer <time>
+
schaltet das Device für <time> Sekunden on oder off.
+ -
+
+
set <name> hsv <hue value 0..360>,<saturation value 0..1>,<brightness value 0..1>
+
Komma separierte Liste von Farbton (hue), Sättigung (saturation) und Helligkeit zum Setzen der Lichtfarbe.
+ Hinweis: ein Hue-Wert von 360° entspricht einem Hue-Wert von 0° = rot.
+ Hue-Werte kleiner als 1 werden als Prozentwert von 360° gewertet, z.B. entspricht ein Hue-Wert von 0.5 einem Hue-Wert von 180°.
+ -
+
+
set <name> gain <integer>
+
setzt die Verstärkung (Helligkeit) der Farbkanäle aufen einen Wert 0..100
+ -
+
+
set <name> rgb <rrggbb>
+
6-stelliger hexadezimal String zum Setzten der Farbe
+ -
+
+
set <name> rgbw <rrggbbww>
+
8-stelliger hexadezimal String zum Setzten der Farbe und des Weiß-Wertes
+ -
+
+
set <name> white <integer>
+
setzt den Weiß-Wert auf einen Wert 0..100
+
+
+ Get
+
+ -
+
+
get <name> config [<registername>] [<channel>]
+
Holt den Inhalt eines Konfigurationsregisters vom Shelly und schreibt das Ergebnis in das Reading 'config'.
+ Wird kein Registername angegeben, werden nur allgemeine Daten wie z.B. die SHELLYID abgelegt.
+ -
+
+
get <name> registers
+
Zeigt die Namen der verfügbaren Konfigurationsregister für dieses Device an.
+ -
+
+
get <name> status
+
Aktualisiert den Gerätestatus.
+ -
+
+
get <name> shelly_status
+
Aktualisiert die Systemdaten des Shelly.
+ -
+
+
get <name> model
+
Ermittelt den Typ des Shelly und passt die Attribute an
+ -
+
+
get <name> version
+
Zeigt die Version des FHEM-Moduls an
+
+
+ Attributes
+
+ -
+
+
attr <name> name <ShellyName>
+
Name des Shelly Devices.
+ Wenn kein Name für den Shelly vergeben wurde oder wenn der Name auf der Website des Shelly gelöscht wird,
+ wird der Shelly-Name entsprechend dem Namens des FHEM-Devices gesetzt.
+ Der Shelly-Name darf Leerzeichen enthalten, leere Zeichenketten werden nicht akzeptiert.
+
+
+ -
+
+
attr <name> shellyuser <shellyuser>
+
Benutername für den Zugang zur Website des Shelly.
+ Das Passwort wird mit dem 'set ... password'-Befehl gesetzt.
+ -
+
+
attr <name> model generic|shelly1|shelly1pm|shelly2|shelly2.5|
+ shellyplug|shelly4|shellypro4|shellydimmer|shellyrgbw|shellyem|shelly3em|shellybulb|shellyuni
+
Type des Shelly Device. Wenn das Attribut model zu generic gesetzt wird, enthält das Device keine Aktoren,
+ es ist dann nur ein Platzhalter für Readings.
+ Hinweis: Dieses Attribut wird bei Definition automatisch ermittelt.
+ -
+
+
attr <name> mode relay|roller (nur bei model=shelly2/2.5/plus2/pro2)
+
attr <name> mode white|color (nur bei model=shellyrgbw)
+
Betriebsart bei bestimmten Shelly Devices
+ -
+
+
attr <name> interval <interval>
+
Aktualisierungsinterval für das Polling der Daten vom Shelly.
+ Der Default-Wert ist 60 Sekunden, ein Wert von 0 deaktiviert das automatische Polling.
+
+
Hinweis: Bei den ShellyPro3EM Energiemessgeräten erfolgt das Polling mit zwei verschiedenen Intervallen:
+ Die Leistungswerte werden entsprechend dem Attribut 'interval' gelesen,
+ die Energiewerte (und daraus rekursiv bestimmte Leistungswerte) werden alle 60 Sekunden oder einem Vielfachen davon gelesen.
+ Beim Setzen des Attributes 'interval' wird der Wert so angepasst,
+ dass das Intervall entweder ein ganzzahliger Teiler oder ein Vielfaches von 60 ist.
+
+ -
+
+
attr <name> maxAge <seconds>
+
Mit diesem Attribut kann bei einigen Readings eine Aktualisierung erzwungen werden.
+ Der Standardwert ist 21600 Sekunden = 6 Stunden, Minimalwert ist das Pollingintervall.
+
+
+ -
+
attr <name> showinputs show|hide
+
+
Das Attribut steuert die Berücksichtigung von Eingangssignalen an den Schalteingängen 'input' des Shelly.
+ Der Status und die Betriebsart des Eingangs/der Eingänge werden als Reading dargestellt.
+ In der Standardeinstellung werden die Readings angezeigt ('show').
+ Dies ist besonders dann sinnvoll, wenn die Informationen zu den Eingängen vom Shelly via 'Shelly actions' (webhooks) vom Shelly gepusht werden.
+
+ -
+
+
attr <name> showunits none|original|normal|normal2|ISO
+
Anzeige der Einheiten in den Readings. Der Standardwert ist 'none' (keine Einheiten anzeigen).
+ Die Einheit für Energie können zwischen Wh, kWh und kJ gewählt werden.
+
+ none: empfohlen im Zusammenhang mit ShellyMonitor
+ original: Einheiten werden entsprechend dem Shelly-Device angezeigt
+ (z.B. Wm (Wattminuten) für die meisten Devices der 1. Gen.)
+ normal: Energie wird als Wh (Wattstunde) ausgegeben
+ normal2: Energie wird als kWh (Kilowattstunde) ausgegeben
+ ISO: Energie wird als kJ (Kilojoule) ausgegeben
+
+
+ -
+
+
attr <name> maxpower <maxpower>
+
Leistungswert für den Überlastungsschutz des Shelly in Watt.
+ Der Standardwert und der Einstellbereich wird vom Shelly-Device vorgegeben.
+
+ -
+
+
attr <name> timeout <timeout>
+
Zeitlimit für nichtblockierende Anfragen an den Shelly. Der Standardwert ist 4 Sekunden.
+ Achtung: Dieses Attribut sollte nur bei Timingproblemen ('timeout errors' in der Logdatei) verändert werden.
+
+ -
+
+
attr <name> webhook none|<FHEMWEB-device> (default:none)
+
Legt einen oder mehrere Actions mit an FHEM addressierten Webhooks auf dem Shelly an,
+ so dass der Shelly von sich aus Statusänderungen an FHEM sendet.
+ Hinweis: Dezeit nur für Shellies der 2.Gen. verfügbar, Actions auf den Shellies der 1. Gen. müssen manuell angelegt werden.
+
Enthält das zugehörige FHEMWEB Device ein CSFR-Token, wird dies mit berücksichtigt.
+ Token werden vom Modul geprüft und die Webhooks auf dem Shelly werden gegenenfalls aktualisiert.
+
Die Namen der Actions auf dem Shelly werden entsprechend der zugehörigen Events benannt,
+ zusätzlich mit einem vorangestellten und angehangenen Unterstrich (z.B. _COVER.STOPPED_).
+
Wird das Attribut zu 'none' gesetzt, werden diese Actions (mit Unterstrich) auf dem Shelly entfernt.
+
+ Webhooks, welche nicht an FHEM addressiert sind, werden von diesem Mechanismus ignoriert.
+
Hinweis: Vor dem Löschen eine FHEM-Devices sollten die zugehörigen Actions auf dem Shelly mit attr <name> webhook none oder
+ deleteattr <name> webhook entfernt werden.
+
+
Für Shelly Relais Devices (mode=relay für model=shelly2/2.5/plus2/pro2, Standard für alle anderen Relais Modelle)
+
+ -
+
+
attr <name> defchannel <integer>
+
nur für mehrkanalige Relais Modelle (z.B. model=shelly2|shelly2.5|shelly4) oder ShellyRGBW im 'white mode':
+ Festlegen des zu schaltenden Kanals, wenn ein Befehl ohne Angabe einer Kanalnummer empfangen wird.
+
+
+
Für Shelly Rollladen Aktoren (mode=roller für model=shelly2/2.5/plus2/pro2)
+
+ -
+
+
attr <name> maxtime <int|float>
+
Benötigte Zeit für das vollständige Öffnen oder Schließen
+ -
+
+
attr <name> maxtime_close <int> Gen1
+
attr <name> maxtime_close <float> Gen2
+
Benötigte Zeit für das vollständige Schließen
+ -
+
+
attr <name> maxtime_open <int> Gen1
+
attr <name> maxtime_open <float> Gen2
+
Benötigte Zeit für das vollständige Öffnen
+ -
+
+
attr <name> pct100 open|closed (default:open)
+
Festlegen der 100%-Endlage für Rollladen offen (pct100=open) oder Rolladen geschlossen (pct100=closed)
+
+
Für Energiemeter ShellyPro3EM
+
+ -
+
+
attr <name> Energymeter_P <float>
+
Anpassen des Zählerstandes an den Zähler des Netzbetreibers, für Zähler mit Rücklaufsperre bzw. für den Bezugszähler, in Wh (Wattstunden).
+
Hinweis: Beim Anlegen des Attributes wird der Wert um den aktuellen Zählerstand reduziert
+ -
+
+
attr <name> Energymeter_R <float>
+
Anpassen des Zählerstandes an den Einspeisezähler des Netzbetreibers (Bidirectional meters only), in Wh (Wattstunden).
+
Hinweis: Beim Anlegen des Attributes wird der Wert um den aktuellen Zählerstand reduziert
+ -
+
+
attr <name> Energymeter_F <float>
+
Anpassen des Zählerstandes an den Zähler des Netzbetreibers, für Zähler ohne Rücklaufsperre (Ferraris-Zähler), in Wh (Wattstunden).
+
Hinweis: Beim Anlegen des Attributes wird der Wert um den aktuellen Zählerstand reduziert
+ -
+
+
attr <name> EMchannels ABC_|L123_|_ABC|_L123 (default: _ABC)
+
Festlegung der Readingnamen mit Postfix oder Präfix
+
Achtung: Das Löschen oder Ändern dieses Attributes führt zum Löschen der zugehörigen Readings!
+ -
+
+
attr <name> Periods <periodes>
+
Komma getrennte Liste von Zeitspannen für die Berechnung von Energiedifferenzen (Energieverbrauch)
+
min: Minute
+
hourQ: Viertelstunde (15 Minuten)
+
hour: Stunde
+
dayQ: Tagesviertel (6 Stunden)
+
dayT: Tagesdrittel (8 Stunden) beginnend um 06:00
+
Week: Woche
+
Achtung:
+ Das Entfernen eines Eintrages dieser Liste oder Löschen des Attributes führt zum Löschen aller zugehörigen Readings!
+ -
+
+
attr <name> PeriodsCorr-F <0.90 ... 1.10>
+
Korrekturfaktor für die berechneten Energiedifferenzen in den durch das Attribut 'Periods' gewählten Zeitspannen
+
+
+
Standard Attribute
+
+
+
+ Readings und erzeugte Events (Auswahl)
+
+ Webhooks (2nd gen devices only)
+ -
webhook_cnt
+
number of webhooks stored in the shelly,
+ -
webhook_ver
+
latest revision number of shellies webhooks.
+
+
+ ShellyPlus and ShellyPro devices
+
+ -
+ indicating the configuration of Shellies hardware inputs
+
input_<channel>_mode
+
ShellyPlus/Pro2PM in relay mode:
+
button|switch straight|inverted follow|detached
+
ShellyPlus/Pro2PM in roller mode:
+
button|switch straight|inverted single|dual|detached normal|swapped
+
ShellyPlusI4:
+
button|switch straight|inverted
+
+ -
button input type: button attached to the Shelly
+ -
switch input type: switch attached to the Shelly
+ -
straight the input is not inverted
+ -
inverted the input is inverted
+ -
single control button mode: the roller is controlled by one input *
+ -
dual control button mode: the roller is controlled by two inputs *
+ -
follow control button mode: the relay is controlled by the input **
+ -
detached control button mode: the input is detached from the relay|roller
+ -
normal the inputs are not swapped *
+ -
swapped the inputs are swapped *
+
* roller mode only ** relay mode only
+
+
+
+
+ -
+ indicating the reason for start or stop of the roller
+
start_reason, stop_reason
+
+ -
button button or switch attached to the Shelly
+ -
http HTTP/URL eg Fhem
+ -
HTTP Shelly-App
+ -
loopback Shelly-App timer
+ -
limit_switch roller reaches upper or lower end
+ -
timeout after given drive time (eg fhem)
+ -
WS_in Websocket
+ -
obstruction Obstruction detection
+ -
overpower
+ -
overvoltage
+ -
overcurrent
+
+
+
+
+
+ ShellyPlusI4
+
+ an input in mode 'button' has usually the state 'unknown'.
+ When activated, the input state is set to 'ON' for a short periode, independent from activation time.
+ The activation time and sequence is reprensented by the readings input_<ch>_action and input_<ch>_actionS,
+ which will act simultanously with following values:
+
+ - S single_push
+ - SS double_push
+ - SSS triple_push
+ - L long_push
+
+
+ NOTE: the readings of an input in mode 'button' cannot actualized by polling.
+ It is necessary to set actions/webhooks on the Shelly!
+
+
+
Webhooks on ShellyPlusI4
+
Webhooks generated by Fhem are named as follows:
+
Input mode 'switch'
+
+ - _INPUT.TOGGLE_ON_
+ - _INPUT.TOGGLE_OFF_
+
+
+
Input mode 'button'
+
+ - _INPUT.BUTTON_PUSH_
+ - _INPUT.BUTTON_DOUBLEPUSH_
+ - _INPUT.BUTTON_TRIPLEPUSH
_
+ - _INPUT.BUTTON_LONGPUSH_
+
+
+
+ ShellyPro3EM
+
+ Power
+
+ Power, Voltage, Current and Power-Factor are updated at the main interval, unless otherwise specified
+ -
+ Active Power
+
Active_Power_<A|B|C|T>
+
float values of the actual active power
+ -
+ Calculated Active Power
+
Active_Power_calculated
+
float value, calculated from the difference of Shellies Total_Energy reading (updated each minute, or multiple)
+ -
+ Integrated Active Power
+
Active_Power_integrated
+
float value, calculated from the integration of Shellies power readings (updated each minute, or multiple)
+ -
+ Pushed Power
+
Active_Power_pushed_<A|B|C|T>
+
float values of the actual power pushed by the Shelly when the value of a phase differs at least 10% to the previous sent value
+ (update interval depends on load, possible minimum is 1 second)
+ Action on power-events on the Shelly must be enabled.
+
+ -
+ Apparent Power
+
Apparent_Power_<A|B|C|T>
+
float values of the actual apparent power
+ -
+ Voltage, Current and Power-Factor
+
Voltage_<A|B|C>
+
Current_<A|B|C|T>
+
Power_Factor_<A|B|C>
+
float values of the actual voltage, current and power factor
+
+ Energy
+
+ Energy readings are updated each minute, or multiple.
+
When the showunits attribute is set, the associated units (Wh, kWh, kJ) are appended to the values
+ -
+ Active Energy
+
Purchased_Energy_<A|B|C|T>
+
Returned_Energy_<A|B|C|T>
+
float values of the purchased or returned energy per phase and total
+ -
+ Total Active Energy
+
Total_Energy
+
float value of total purchased energy minus total returned energy
+
A minus sign is indicating returned energy.
+
The timestamp of the reading is set to the full minute, as this is Shellies time base.
+ Day and Week are based on GMT.
+
+
+ -
+ Energymeter
+
Total_Energymeter_<F|P|R>
+
float values of the purchased (P) or returned (R) energy displayed by the suppliers meter.
+ For Ferraris type meters (F), the returned energy is subtracted from the purchased energy
+ -
+ Energy differences in a period of time
+
[measuredEnergy]_<Min|QHour|Hour|Qday|TDay|Day|Week>
+
float value of energy in a period of time (updated at the defined time interval).
+
+ - QDay is a period of 6 hours, starting at 00:00.
+ - TDay is a period of 8 hours, starting at 06:00.
+ - Week is a period of 7 days, starting mondays at 00:00.
+
+
+
+
+
=end html_DE
-=cut
\ No newline at end of file
+=cut ($@)