diff --git a/fhem/FHEM/10_OWServer.pm b/fhem/FHEM/10_OWServer.pm
index 8b1ae9613..55f2c0454 100644
--- a/fhem/FHEM/10_OWServer.pm
+++ b/fhem/FHEM/10_OWServer.pm
@@ -280,8 +280,8 @@ OWServer_Set($@)
get <name> devices
- Lists the addresses and types of all 1-wire devices provided by the owserver, Also shows
- the corresponding OWDevice devices if defined.
+ Lists the addresses and types of all 1-wire devices provided by the owserver. Also shows
+ the corresponding OWDevice if one is defined for the respective 1-wire devices.
diff --git a/fhem/FHEM/11_OWDevice.pm b/fhem/FHEM/11_OWDevice.pm
index 5bb08eba5..54666d440 100644
--- a/fhem/FHEM/11_OWDevice.pm
+++ b/fhem/FHEM/11_OWDevice.pm
@@ -38,8 +38,9 @@ OWDevice_Initialize($)
$hash->{GetFn} = "OWDevice_Get";
$hash->{SetFn} = "OWDevice_Set";
$hash->{DefFn} = "OWDevice_Define";
+ $hash->{AttrFn} = "OWDevice_Attr";
- $hash->{AttrList} = "trimvalues loglevel:0,1,2,3,4,5";
+ $hash->{AttrList} = "trimvalues polls interfaces loglevel:0,1,2,3,4,5";
}
###################################
@@ -208,6 +209,31 @@ OWDevice_UpdateValues($) {
}
+###################################
+sub
+OWDevice_Attr($@)
+{
+ my ($cmd, $name, $attrName, $attrVal) = @_;
+ my $hash = $defs{$name};
+
+ $attrVal= "" unless defined($attrVal);
+ $attrVal= "" if($cmd eq "del");
+
+ if($attrName eq "polls") {
+ my @polls= split(",", $attrVal);
+ $hash->{fhem}{polls}= \@polls;
+ Log 5, "$name: polls: " . join(" ", @polls);
+ } elsif($attrName eq "interfaces") {
+ if($attrVal ne "") {
+ $hash->{fhem}{interfaces}= join(";",split(",",$attrVal));
+ Log 5, "$name: interfaces: " . $hash->{fhem}{interfaces};
+ } else {
+ delete $hash->{fhem}{interfaces} if(defined($hash->{fhem}{interfaces}));
+ Log 5, "$name: no interfaces";
+ }
+ }
+}
+
###################################
sub
OWDevice_Get($@)
@@ -419,6 +445,8 @@ OWDevice_Define($$)
Attributes
- trimvalues: removes leading and trailing whitespace from readings. Default is 1 (on).
+ - polls: a comma-separated list of readings to poll. This supersedes the list of default readings to poll.
+ - interfaces: supersedes the interfaces exposed by that device.
- loglevel
- eventMap
- event-on-update-reading