diff --git a/CHANGED b/CHANGED index 2de94cef6..b2a38926b 100644 --- a/CHANGED +++ b/CHANGED @@ -10,6 +10,7 @@ (by datapoint types) (Maz) - feature: NetIO230B module by Andy - feature: Retaining configfile comments (not within a define statement) + - feature: EnOcean PM101 by Ignaz - 2011-12-31 (5.2) - bugfix: applying smallscreen attributes to firefox/opera diff --git a/FHEM/10_EnOcean.pm b/FHEM/10_EnOcean.pm index 08dacc511..717b1d14c 100755 --- a/FHEM/10_EnOcean.pm +++ b/FHEM/10_EnOcean.pm @@ -66,7 +66,7 @@ EnOcean_Initialize($) $hash->{SetFn} = "EnOcean_Set"; $hash->{AttrList} = "IODev do_not_notify:1,0 ignore:0,1 " . "showtime:1,0 loglevel:0,1,2,3,4,5,6 model " . - "subType:switch,contact,sensor,windowHandle,SR04,MD15,". + "subType:switch,contact,sensor,windowHandle,SR04,MD15,PM101,". "dimmer,dimmCtrl actualTemp"; for(my $i=0; $i<@ptm200btn;$i++) { @@ -344,6 +344,16 @@ EnOcean_Parse($$) push @event, "3:measured-temp:". sprintf "%.1f", ($db_1*40/255); EnOcean_MD15Cmd($hash, $name, $db_1); + } elsif($st eq "PM101") { + #################################### + # Ratio Presence Sensor Eagle PM101, code by aicgazi + #################################### + my $lux = sprintf "%3d", $db_2; + # content of $db_2 is the illuminance where max value 0xFF stands for 1000 lx + $lux = sprintf "%04.2f", ( $lux * 1000 / 255 ) ; + push @event, "3:brightness:$lux"; + push @event, "3:channel1:" . ($db_0 & 0x01 ? "off" : "on"); + push @event, "3:channel2:" . ($db_0 & 0x02 ? "off" : "on"); } elsif($st eq "dimmer") { # todo: create a more general solution for the central-command responses diff --git a/docs/commandref.html b/docs/commandref.html index d0c3fe23a..f95f399d4 100644 --- a/docs/commandref.html +++ b/docs/commandref.html @@ -3482,7 +3482,12 @@ A line ending with \ will be concatenated with the next one, so long lines
  • actuator: [ok|obstructed]
  • temperature: $tmp - +
  • Ratio Presence Sensor Eagle PM101 (set subType to PM101)
    +