mirror of
https://github.com/fhem/fhem-mirror.git
synced 2024-11-22 16:09:49 +00:00
contrib/zwave_alliance2open.pl: first version
git-svn-id: https://svn.fhem.de/fhem/trunk@28607 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3ca7caed5f
commit
6793cb95c6
Binary file not shown.
@ -1558,6 +1558,7 @@
|
||||
<Product config="qubino/ZMNHMDx.xml" id="0051" name="ZMNHMDx Smart leak protector" type="0006"/>
|
||||
</Manufacturer>
|
||||
<Manufacturer id="0460" name="Shelly Qubino">
|
||||
<Product config="qubino/QNSW001X16EU.xml" id="0083" name="Wave 1" type="0002" forumNr="137373"/>
|
||||
<Product config="qubino/QNSW001P16EU.xml" id="0084" name="Wave 1PM" type="0002" forumNr="135648"/>
|
||||
</Manufacturer>
|
||||
<Manufacturer id="0130" name="Quby">
|
||||
|
37
fhem/contrib/zwave_alliance2open.pl
Normal file
37
fhem/contrib/zwave_alliance2open.pl
Normal file
@ -0,0 +1,37 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# convert ZWAVE-Alliance XML description file into openzwacve format, which can
|
||||
# be digested by the FHEM ZWave module. Note: only the config parameters are converted.
|
||||
|
||||
if($#ARGV != -1) {
|
||||
print STDERR "Usage: perl zwave_alliance2open.pl < zwavealliance.xml > openzwave.xml\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
my ($inTag, $name,$desc,$pnum,$size,$dflt,$min,$max);
|
||||
print "<Product sourceFile=\"changeme\">\n";
|
||||
print " <CommandClass id=\"112\">\n";
|
||||
|
||||
while(my $l = <>) {
|
||||
$inTag = 1 if($l =~ /<ConfigurationParameterExport>/);
|
||||
$inTag = 0 if($l =~ /<ConfigurationParameterValues>/);
|
||||
if($inTag) {
|
||||
$name = $1 if($l =~ m/<Name>(.*)<\/Name>/);
|
||||
$desc = $1 if($l =~ m/<Description>(.*)<\/Description>/);
|
||||
$pnum = $1 if($l =~ m/<ParameterNumber>(.*)<\/ParameterNumber>/);
|
||||
$size = $1 if($l =~ m/<Size>(.*)<\/Size>/);
|
||||
$dflt = $1 if($l =~ m/<DefaultValue>(.*)<\/DefaultValue>/);
|
||||
$min = $1 if($l =~ m/<minValue>(.*)<\/minValue>/);
|
||||
$max = $1 if($l =~ m/<maxValue>(.*)<\/maxValue>/);
|
||||
}
|
||||
|
||||
if($l =~ /<\/ConfigurationParameterExport>/) {
|
||||
print " <Value genre=\"config\" index=\"$pnum\" label=\"$name\" size=\"$size\" type=\"byte\" value=\"$dflt\" min=\"$min\" max=\"$max\">\n";
|
||||
print " <Help>$desc</Help>\n";
|
||||
print " </Value>\n";
|
||||
$inTag = 0;
|
||||
}
|
||||
}
|
||||
|
||||
print " </CommandClass>\n";
|
||||
print "</Product>\n";
|
@ -44,7 +44,7 @@ for my $fn (sort { $a <=> $b } @files) {
|
||||
}
|
||||
close(FH);
|
||||
if($pic ne $ppi) {
|
||||
printf "Problem: $pic vs. $ppi\n";
|
||||
printf "$path: CertificationNumern:$pic ne ProductPicture:$ppi\n";
|
||||
# just to see new problems with pictures
|
||||
}
|
||||
if($em eq 'empty') {
|
||||
|
Loading…
Reference in New Issue
Block a user