Skip to content

Commit

Permalink
HB-UNI-Sensor1, update Perl script for better FHEM compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMajor committed Apr 12, 2021
1 parent a0ab27f commit 897884b
Showing 1 changed file with 7 additions and 6 deletions.
Expand Up @@ -4,23 +4,24 @@ use strict;
use warnings;

# device definition
$HMConfig::culHmModel{'F103'} = {name => 'HB-UNI-Sensor1', st => 'UniSensor1', cyc => '00:10', rxt => 'l:w:c:f', lst => 'p', chn => '',};
$HMConfig::culHmModel{'F103'} = {name => 'HB-UNI-Sensor1', st => 'UniSensor1', cyc => '00:10', rxt => 'l:w:c:f', lst => 'p', chn => ''};

# definitions for register settings
# examples see HMConfig.pm line 350ff
$HMConfig::culHmRegDefine{'ledMode'} = {a=> 5.6,s=>0.2,l=>0,min=>0 ,max=>1 ,p=>'n',c=>'lit',f=>'',u=>'' ,d=>0,t=>'LED mode',lit=>{off=>0,on=>1}};
$HMConfig::culHmRegDefine{'lowBatLimit'} = {a=>18.0,s=>1.0,l=>0,min=>1.0 ,max=>5 ,p=>'n',c=>'' ,f=>10,u=>'V' ,d=>0,t=>'Low batterie limit, step 0.1 V.'};
# 'ledMode', a=> 5.6, s=>0.2, .. is already configured in HMConfig.pm
# see also franks explanations: https://forum.fhem.de/index.php/topic,20620.msg1148330.html#msg1148330
$HMConfig::culHmRegDefine{'lowBatLimitUS1'} = {a=>18.0,s=>1.0,l=>0,min=>1.0 ,max=>5 ,p=>'n',c=>'' ,f=>10,u=>'V' ,d=>0,t=>'Low batterie limit, step 0.1 V.'};
$HMConfig::culHmRegDefine{'updateIntervall'} = {a=>32.0,s=>2.0,l=>0,min=>60 ,max=>43200 ,p=>'n',c=>'' ,f=>'',u=>'s' ,d=>0,t=>'Sensor measure and send intervall in seconds.'};
$HMConfig::culHmRegDefine{'altitude'} = {a=>34.0,s=>2.0,l=>0,min=>0 ,max=>10000 ,p=>'n',c=>'' ,f=>'',u=>'m' ,d=>0,t=>'Altitude for calculate air pressure at see level in meter.'};
$HMConfig::culHmRegDefine{'altitudeUS1'} = {a=>34.0,s=>2.0,l=>0,min=>0 ,max=>10000 ,p=>'n',c=>'' ,f=>'',u=>'m' ,d=>0,t=>'Altitude for calculate air pressure at see level in meter.'};
# Register model mapping
$HMConfig::culHmRegModel{'HB-UNI-Sensor1'} = {
'burstRx' => 1,
'lowBatLimit' => 1,
'lowBatLimitUS1' => 1,
'ledMode' => 1,
'transmDevTryMax' => 1,
'updateIntervall' => 1,
'altitude' => 1
'altitudeUS1' => 1
};
# subtype channel mapping
Expand Down

0 comments on commit 897884b

Please sign in to comment.