2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-08 13:24:56 +00:00

Change naming schema for unknown devices

git-svn-id: https://svn.fhem.de/fhem/trunk@854 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2011-03-10 19:02:49 +00:00
parent 8b7bbe4d23
commit 88fb1bcdc4

View File

@ -195,11 +195,19 @@ CUL_HM_Parse($$)
if(!$shash) {
my $sname = "CUL_HM_$src";
if($lcm =~ m/1A8.00/) {
# Prefer subType over model to make autocreate easier.
# besides the model names are quite cryptic
my $model = substr($p, 2, 4);
if($culHmModel{$model}) {
$sname = $culHmModel{$model} . "_" . $src;
my $stc = substr($p, 26, 2); # subTypeCode
if($culHmDevProps{$stc}) {
$sname = "CUL_HM_".$culHmDevProps{$stc}{st} . "_" . $src;
} elsif($culHmModel{$model}) {
$sname = "CUL_HM_".$culHmModel{$model} . "_" . $src;
$sname =~ s/-/_/g;
}
}
Log 3, "CUL_HM Unknown device $sname, please define it";
return "UNDEFINED $sname CUL_HM $src $msg";