mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
PM101 by Ignaz
git-svn-id: https://svn.fhem.de/fhem/trunk@1245 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
937cb588e1
commit
188d24b16b
@ -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
|
||||
|
@ -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
|
||||
|
@ -3482,7 +3482,12 @@ A line ending with \ will be concatenated with the next one, so long lines
|
||||
<li>actuator: [ok|obstructed]
|
||||
<li>temperature: $tmp
|
||||
</ul>
|
||||
|
||||
<li>Ratio Presence Sensor Eagle PM101 (set subType to PM101)<br>
|
||||
<ul>
|
||||
<li>brightness: $lux
|
||||
<li>channel1: [on|off]
|
||||
<li>channel2: [on|off]
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user