2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

98_fheminfo.pm: special handling for ZWAVE

git-svn-id: https://svn.fhem.de/fhem/trunk@14661 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2017-07-07 09:50:26 +00:00
parent dc762c0931
commit ede399f834

View File

@ -107,7 +107,11 @@ sub _fi2_Count() {
$model = ReadingsVal($name,'type',$model)
if (lc($type) eq 'bosest');
# special reading for ZWave
$model = _fi2_zwave(ReadingsVal($name,'modelId','')) if (lc($type) eq 'zwave');
if (lc($type) eq 'zwave') {
$model = ReadingsVal($name,'modelId',undef);
next unless (defined($model));
$model = _fi2_zwave($model);
}
# 5. ignore model for KNX
$model = $c_noModel if (lc($type) eq 'knx');
@ -252,12 +256,12 @@ sub _fi2_findRev {
sub _fi2_zwave($) {
my ($zwave) = @_;
my $xml = $attr{global}{modpath}.
"/FHEM/lib/openzwave_manufacturer_specific.xml";
my ($mf, $prod, $id) = split(/-/,$zwave);
($mf, $prod, $id) = (lc($mf), lc($prod), lc($id)); # Just to make it sure
my $xml = $attr{global}{modpath}.
"/FHEM/lib/openzwave_manufacturer_specific.xml";
my ($err,@data) = FileRead({FileName => $xml, ForceType=>'file'});
return $err if($err);