Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WMBUS extension to dispatch messages - old discussion #1248

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
3a96ef5
Update SD_ProtocolData.pm
HomeAutoUser Apr 3, 2024
d1441d2
Automatic updated controls and CHANGED
actions-user Apr 3, 2024
5d2d7cd
Update 00_SIGNALduino.pm
HomeAutoUser Apr 3, 2024
45c5d49
Merge branch 'master_WMBUS' of https://github.com/HomeAutoUser/RFFHEM…
HomeAutoUser Apr 3, 2024
1cf7ee4
Automatic updated controls and CHANGED
actions-user Apr 3, 2024
80e8302
Update SD_ProtocolData.pm
HomeAutoUser Apr 3, 2024
8dceb32
Automatic updated controls and CHANGED
actions-user Apr 3, 2024
47763c9
Update SD_ProtocolData.pm
HomeAutoUser Apr 3, 2024
c7b5240
Automatic updated controls and CHANGED
actions-user Apr 3, 2024
5f08ef9
Update SD_ProtocolData.pm
HomeAutoUser Apr 3, 2024
61a6aa2
Merge branch 'master_WMBUS' of https://github.com/HomeAutoUser/RFFHEM…
HomeAutoUser Apr 3, 2024
01f5b6a
Automatic updated controls and CHANGED
actions-user Apr 3, 2024
f283954
Update 00_SIGNALduino.pm
HomeAutoUser Apr 3, 2024
aa85d52
Automatic updated controls and CHANGED
actions-user Apr 3, 2024
8e8ba0d
Update SD_ProtocolData.pm
HomeAutoUser Apr 4, 2024
52223c7
Automatic updated controls and CHANGED
actions-user Apr 4, 2024
eb53980
Update 01_SIGNALduino_Parse_MN.t
HomeAutoUser Apr 4, 2024
42779ae
Update 00_SIGNALduino.pm
HomeAutoUser Apr 4, 2024
9ab9211
Automatic updated controls and CHANGED
actions-user Apr 4, 2024
8d1ad82
Update 00_SIGNALduino.pm
HomeAutoUser Apr 4, 2024
464ad88
Merge branch 'master_WMBUS' of https://github.com/HomeAutoUser/RFFHEM…
HomeAutoUser Apr 4, 2024
47e71ff
Automatic updated controls and CHANGED
actions-user Apr 4, 2024
f1ab733
Update 01_SIGNALduino_Parse_MN.t
HomeAutoUser Apr 4, 2024
269ceca
Merge branch 'master_WMBUS' of https://github.com/HomeAutoUser/RFFHEM…
HomeAutoUser Apr 4, 2024
737ae79
revised
HomeAutoUser Apr 4, 2024
595bfbd
Automatic updated controls and CHANGED
actions-user Apr 4, 2024
0cfba47
Update 01_SIGNALduino_Parse_MN.t
HomeAutoUser Apr 9, 2024
382c06a
Update 00_SIGNALduino.pm
HomeAutoUser Apr 10, 2024
ca35d6d
Automatic updated controls and CHANGED
actions-user Apr 10, 2024
dc82f48
Update SD_ProtocolData.pm
HomeAutoUser Apr 10, 2024
c7eb93d
Automatic updated controls and CHANGED
actions-user Apr 10, 2024
45eb012
Merge remote-tracking branch 'upstream/master' into master_WMBUS
HomeAutoUser Apr 10, 2024
a72db76
Merge branch 'master' into master_WMBUS
HomeAutoUser Apr 15, 2024
1a981c7
duplicate WMBUS proposal
HomeAutoUser Apr 17, 2024
a6b1f0f
Automatic updated controls and CHANGED
actions-user Apr 17, 2024
098a189
feat[00_SIGNALduino]: Changed input validation for WMBus
sidey79 Apr 17, 2024
56899af
Automatic updated controls and CHANGED
actions-user Apr 17, 2024
b16684d
fix[00_SIGNALduino]: Removed unneded code
sidey79 Apr 19, 2024
dc31cbc
Automatic updated controls and CHANGED
actions-user Apr 19, 2024
8eb1ca5
Merge remote-tracking branch 'upstream/master_WMBUS' into master_WMBUS
HomeAutoUser Apr 22, 2024
e7f12e6
Merge remote-tracking branch 'upstream/master_WMBUS' into master_WMBUS
HomeAutoUser Apr 22, 2024
52d0be7
Automatic updated controls and CHANGED
actions-user Apr 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions FHEM/00_SIGNALduino.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: 00_SIGNALduino.pm 3.5.6 2024-03-09 15:50:25Z sidey79 $
# $Id: 00_SIGNALduino.pm 3.5.6 2024-04-04 15:50:25Z sidey79 $
# v3.5.6 - https://github.com/RFD-FHEM/RFFHEM/tree/master
# The module is inspired by the FHEMduino project and modified in serval ways for processing the incoming messages
# see http://www.fhemwiki.de/wiki/SIGNALDuino
Expand Down Expand Up @@ -42,7 +42,7 @@


use constant {
SDUINO_VERSION => '3.5.6+20231214', # Datum wird automatisch bei jedem pull request aktualisiert
SDUINO_VERSION => '3.5.6+20240404', # Datum wird automatisch bei jedem pull request aktualisiert
SDUINO_INIT_WAIT_XQ => 1.5, # wait disable device
SDUINO_INIT_WAIT => 2,
SDUINO_INIT_MAXRETRY => 3,
Expand Down Expand Up @@ -232,6 +232,7 @@
.'SD_WS:'
.'SD_WS_Maverick:'
.'SOMFY:'
.'WMBUS:'
.' :' # Zeilenumbruch
.'Siro:'
.'SIGNALduino_un:'
Expand Down Expand Up @@ -271,6 +272,7 @@
'31:KOPP_FC' => '^kr\w{18,}',
'32:PCA301' => '^\\S+\\s+24',
'33:SD_Rojaflex' => '^P109#[A-Fa-f0-9]+',
'34:WMBUS' => '^b.*',
'X:SIGNALduino_un' => '^[u]\d+#.*',
);

Expand Down Expand Up @@ -533,7 +535,7 @@

local $/=undef;
if (-e $logFile) {
open FILE, $logFile;

Check warning on line 538 in FHEM/00_SIGNALduino.pm

View workflow job for this annotation

GitHub Actions / critic

[perlcritic] reported by reviewdog 🐶 Bareword file handle opened (See pages 202,204 of PBP) Raw Output: FHEM/00_SIGNALduino.pm:538:5:Bareword file handle opened (See pages 202,204 of PBP)

Check warning on line 538 in FHEM/00_SIGNALduino.pm

View workflow job for this annotation

GitHub Actions / critic

[perlcritic] reported by reviewdog 🐶 Two-argument "open" used (See page 207 of PBP) Raw Output: FHEM/00_SIGNALduino.pm:538:5:Two-argument "open" used (See page 207 of PBP)
$hash->{helper}{avrdudelogs} .= "--- AVRDUDE ---------------------------------------------------------------------------------\n";
$hash->{helper}{avrdudelogs} .= <FILE>;
$hash->{helper}{avrdudelogs} .= "--- AVRDUDE ---------------------------------------------------------------------------------\n\n";
Expand Down Expand Up @@ -2610,7 +2612,7 @@
} else {
$hash->{logMethod}->($name, 5, "$name: Parse_MU, for MU protocol id $id, applying filterfunc $method");

no strict "refs";

Check warning on line 2615 in FHEM/00_SIGNALduino.pm

View workflow job for this annotation

GitHub Actions / critic

[perlcritic] reported by reviewdog 🐶 Stricture disabled (See page 429 of PBP) Raw Output: FHEM/00_SIGNALduino.pm:2615:11:Stricture disabled (See page 429 of PBP)
(my $count_changes,$rawData,my %patternListRaw_tmp) = $method->($name,$id,$rawData,%patternListRaw);
use strict "refs";

Expand Down Expand Up @@ -2904,7 +2906,12 @@

my $hash = shift // return; #return if no hash is provided
my $rmsg = shift // return; #return if no rmsg is provided


my $mark;
if (substr($rmsg,5,1) eq 'Y') { # WMBus
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ich verstehe grob, warum das Y hier entfernt wird.
Was ich aber nicht verstanden habe ist, wieso die Daten mit Y und nicht MN im Modul ankommen.
Gerade auch, weil die FW ja noch angepasst werden muss.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MIST falsche Nachricht gelöscht :-(

Copy link
Contributor Author

@HomeAutoUser HomeAutoUser Apr 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was ich aber nicht verstanden habe ist, wieso die Daten mit Y und nicht MN im Modul ankommen.
Gerade auch, weil die FW ja noch angepasst werden muss.

Ich schreibe nochmal "nur" kurz die Antwort.
Das mit dem Y wird aus der Historie und der Vielfahlt des WMBus Protokolles entstanden sein.
Wegen der Kompatiblität müsste es so beibehalten bleiben weil es so der CUL empfängt.

CUL_RAWMSG | bY25442D2C628346771B168D20BE124C0E20D48C96EA64C8FCCC14A07A3A8840A30DE4F084AB8D80F7
or
CUL_868Mhz_RAWMSG | b3E44F536892656000108F5D97AAC0020256B755DD9228B433D8D5C82F0618CAD0643C2E540A722C2DC9B8A0138CE0041A2DCD11DE10F800C0001090086B41E0098DB14011E070416C580
or
signalGateway_DMSG | b3E44F536892656000108F5D97AA9002025FB7AD4DF8710D69A3867E687B0633B1515F7BA8A6BE0C93649EC5593F476E7DD3E82F0470F800C0001090086B41E0098CE14011E070416C50018
signalGateway_Protocol_ID | 134
signalGateway_RAWMSG | MN;D=3E44F536892656000108F5D97AA9002025FB7AD4DF8710D69A3867E687B0633B1515F7BA8A6BE0C93649EC5593F476E7DD3E82F0470F800C0001090086B41E0098CE14011E070416C50018;R=24;A=0;
or
signalGateway_DMSG | bY304497264202231800087A5E0020A5D9CF9E719E36DB255C06F2AEC0722FC3853A3031BD85EF085BDAD29194136A02DD7E00FD
signalGateway_Protocol_ID | 134
signalGateway_RAWMSG | MN;D=304497264202231800087A5E0020A5D9CF9E719E36DB255C06F2AEC0722FC3853A3031BD85EF085BDAD29194136A02DD7E00FD;R=253;A=0;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, das leuchtet mir noch nicht ein.
Das logische Modul braucht die Daten wie sie auch das CUL Modul übergibt.

Aber das SIGNALduino Modul braucht sie doch nur so, wie es der SIGNALduino übergibt.

Funktioniert beim IT Modul doch auch genau so.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Habe die RAW MSGs erst jetzt gesehen, aber wenn ich es richtig verstehe würde der SIGNALduino wie sonst auch

MN;D=304497264202231800087A5E0020A5D9CF9E719E36DB255C06F2AEC0722FC3853A3031BD85EF085BDAD29194136A02DD7E00FD;R=253;A=0;
übergeben.
Das bedeutet aber auch, dass hier nicht Y vom uC an das Modul übergeben wird, sondern der Y vom Modul an das logische Modul.. Richtig? In "SIGNALduino_Parse_MN" würde somit nie das gesuchte Y in der Variable rmsg ankommen.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naja, wenn das Y vom Uc kommt, dann hätte ich vorgeschlagen die Regex anzupassen.
Den Teil der der an _limit_to_hex hätte ich mit einem substr von dem ersten Zeichen (das Y) entfernt.

Dann bleibt das Y in der rmsg enthalten.

Wäre aber schön, wenn wir einen Testdatensatz (rmsg) mit dem Y aufnehmen.
Die fehlt da und machte mich halt unsicher ob das vom uC so kommt.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ich habe mal Euch etwas zusammengestellt @sidey79 & @elektron-bbs

-MSG1-
uC_RAWMSG
            MN;D=Y304497264202231800087AE30020A5C247707714E518602D984FE2BF82C023288C39460740DC47132AAE42791B8F48F2EB00FD;R=253;A=0;
Internal_DMSG
                bY304497264202231800087AE30020A5C247707714E518602D984FE2BF82C023288C39460740DC47132AAE42791B8F48F2EB00FD
Internal_RAMSG
             MN;D=304497264202231800087AE30020A5C247707714E518602D984FE2BF82C023288C39460740DC47132AAE42791B8F48F2EB00FD;R=253;A=0

-MSG2-
uC_RAWMSG
            MN;D=Y304497264202231800087AE40020A5D75DA00DA8A5A3E0E7A39CEFE3FA26FDC78E6C874675EFA951F6031F8E211C9E0BA500F7;R=247;A=0;
HTML_RAWMSG (uninteressant für das SIGNALduino Projekt)
                 Y304497264202231800087AE40020A5D75DA00DA8A5A3E0E7A39CEFE3FA26FDC78E6C874675EFA951F6031F8E211C9E0BA5
Internal_DMSG
                bY304497264202231800087AE40020A5D75DA00DA8A5A3E0E7A39CEFE3FA26FDC78E6C874675EFA951F6031F8E211C9E0BA500F7
Internal_RAMSG
             MN;D=304497264202231800087AE40020A5D75DA00DA8A5A3E0E7A39CEFE3FA26FDC78E6C874675EFA951F6031F8E211C9E0BA500F7;R=247;A=0;

Wie verfahren wir weiter oder wie gedenkst du @sidey79 solche Nachrichten an das entsprechende Modul weiterzugeben?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was stört dich jetzt eigentlich an den Nachrichten?
Das einzige, was mir auffällt, ist das "Internal_RAMSG", das nicht der Nachricht vom µC entspricht.
Oder werden die Nachrichten etwa gar nicht an das WMBus-Modul weitergegeben?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ich bin immer noch dafür, dass eine rmsg Einzug in die Testdaten erhält.
Dann können wir die Implementierung so anpassen, dass die Tests erfolgreich sind.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sidey79

Ich bin immer noch dafür, dass eine rmsg Einzug in die Testdaten erhält.
Dann können wir die Implementierung so anpassen, dass die Tests erfolgreich sind.

https://github.com/RFD-FHEM/RFFHEM/pull/1248/files#diff-092416c5806fd44b768736cdcc4ed6b8b54b0c3f6123d65e96e3cc6f41b38c86R143-R174

@elektron-bbs

Oder werden die Nachrichten etwa gar nicht an das WMBus-Modul weitergegeben?
Doch diese werden an das Modul weitergegeben aber bei jeder _RMSG ist das Phänomen so.

$mark = substr($rmsg,5,1);
$rmsg =~ s/Y//g;
}
if ($rmsg !~ /^MN;D=[0-9A-F]+;(?:R=[0-9]+;)?(?:A=-?[0-9]{1,3};)?$/) { # AFC cc1101 0x32 (0xF2): FREQEST – Frequency Offset Estimate from Demodulator
$hash->{logMethod}->($hash->{NAME}, 3, qq[$hash->{NAME}: Parse_MN, faulty msg: $rmsg]);
return ; # Abort here if not successfull
Expand All @@ -2915,6 +2922,10 @@

# Verify if extracted hash has the correct values:
my $rawData = _limit_to_hex($msg_parts{rawData}) // $hash->{logMethod}->($hash->{NAME}, 3, qq[$hash->{NAME}: Parse_MN, faulty rawData D=: $msg_parts{rawData}]) // return ;

if ($mark) { # WMBus
$rawData = $mark . $rawData;
}
my $rssi;
my $rssiStr= '';
my $freqafc;
Expand Down Expand Up @@ -3098,7 +3109,7 @@
syswrite($hash->{DIODev}, $msg) if($hash->{DIODev});

# Some linux installations are broken with 0.001, T01 returns no answer
select(undef, undef, undef, 0.01);

Check warning on line 3112 in FHEM/00_SIGNALduino.pm

View workflow job for this annotation

GitHub Actions / critic

[perlcritic] reported by reviewdog 🐶 "select" used to emulate "sleep" (See page 168 of PBP) Raw Output: FHEM/00_SIGNALduino.pm:3112:3:"select" used to emulate "sleep" (See page 168 of PBP)
}

############################# package main
Expand All @@ -3120,7 +3131,7 @@
elsif( $aName eq 'MatchList' ) {
my $match_list;
if( $cmd eq 'set' ) {
$match_list = eval $aVal; ## Allow evaluation of hash object from "attr" string f.e. { '34:MYMODULE' => '^u99#.{9}' }

Check warning on line 3134 in FHEM/00_SIGNALduino.pm

View workflow job for this annotation

GitHub Actions / critic

[perlcritic] reported by reviewdog 🐶 Expression form of "eval" (See page 161 of PBP) Raw Output: FHEM/00_SIGNALduino.pm:3134:21:Expression form of "eval" (See page 161 of PBP)
if( $@ ) {
$hash->{logMethod}->($name, 2, $name .": Attr, $aVal: ". $@);
}
Expand Down Expand Up @@ -3534,7 +3545,7 @@
{
if (defined($evalFirst) && $evalFirst)
{
eval( $method->($obj,$name, @args));

Check warning on line 3548 in FHEM/00_SIGNALduino.pm

View workflow job for this annotation

GitHub Actions / critic

[perlcritic] reported by reviewdog 🐶 Expression form of "eval" (See page 161 of PBP) Raw Output: FHEM/00_SIGNALduino.pm:3548:7:Expression form of "eval" (See page 161 of PBP)
if($@) {
$hash->{logMethod}->($name, 5, "$name: callsub, Error: $funcname, has an error and will not be executed: $@ please report at github.");
return (0,undef);
Expand Down Expand Up @@ -3663,7 +3674,7 @@
{
#print"\t". $patternListRaw{$key}."($key) is intol of ".$buckets{$b_key}."($b_key) \n";
$cnt++;
eval "\$rawData =~ tr/$key/$b_key/";

Check warning on line 3677 in FHEM/00_SIGNALduino.pm

View workflow job for this annotation

GitHub Actions / critic

[perlcritic] reported by reviewdog 🐶 Expression form of "eval" (See page 161 of PBP) Raw Output: FHEM/00_SIGNALduino.pm:3677:9:Expression form of "eval" (See page 161 of PBP)

#if ($key == $msg_parts{clockidx})
#{
Expand Down Expand Up @@ -3732,7 +3743,7 @@
{
#print"\t". $patternListRaw{$key}."($key) is intol of ".$buckets{$b_key}."($b_key) \n";
$cnt++;
eval "\$rawData =~ tr/$key/$b_key/";

Check warning on line 3746 in FHEM/00_SIGNALduino.pm

View workflow job for this annotation

GitHub Actions / critic

[perlcritic] reported by reviewdog 🐶 Expression form of "eval" (See page 161 of PBP) Raw Output: FHEM/00_SIGNALduino.pm:3746:9:Expression form of "eval" (See page 161 of PBP)

#if ($key == $msg_parts{clockidx})
#{
Expand Down Expand Up @@ -4876,6 +4887,14 @@
<li>SlowRF<br>
modulation ASK/OOK, <b>loads the standard setting from the uC</b>
</li>
<li>WMBus_S<br>
modulation FSK, Datarate=32.7301 kbps, Sync Word=7696, frequency 868.300 MHz (processing needs to be integrated into firmware)
<ul><small>example: water, gas, heat, electric meters and the data collecting devices</small></ul>
</li>
<li>WMBus_T<br>
modulation FSK, Datarate=99.9756 kbps, Sync Word=543D, frequency 868.950 MHz (processing needs to be integrated into firmware)
<ul><small>example: water, gas, heat, electric meters and the data collecting devices</small></ul>
</li>
</ul>
</li><br>
<a name="suppressDeviceRawmsg"></a>
Expand Down Expand Up @@ -5483,6 +5502,14 @@
<li>SlowRF<br>
Modulation ASK/OOK, <b>l&auml;d die Standard Einstellung vom uC</b>
</li>
<li>WMBus_S<br>
Modulation FSK, Datenrate=32.7301 kbps, Sync Word=7696, Frequenz 868.300 MHz (Verarbeitung muss noch in Firmware integriert werden)
<ul><small>Beispiel: diverse Wasser-, Gas-, Wärme- und Stromzähler sowie die Datenerfassungsgeräte</small></ul>
</li>
<li>WMBus_T<br>
Modulation FSK, Datenrate=99.9756 kbps, Sync Word=543D, Frequenz 868.950 MHz (Verarbeitung muss noch in Firmware integriert werden)
<ul><small>Beispiel: diverse Wasser-, Gas-, Wärme- und Stromzähler sowie die Datenerfassungsgeräte</small></ul>
</li>
</ul>
</li><br>
<a name="suppressDeviceRawmsg"></a>
Expand Down
92 changes: 47 additions & 45 deletions FHEM/lib/SD_ProtocolData.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3522,6 +3522,53 @@ package lib::SD_ProtocolData;
length_min => '24',
length_max => '24',
},
"133" => # WMBus_S
# https://wiki.fhem.de/wiki/WMBUS
# note !!! Implementation in the FW still needs to be done, register settings are not sufficient
# - definition is in advance in order to dispatch a DMSG | https://github.com/RFD-FHEM/RFFHEM/issues/1247
{
name => 'WMBus_S',
comment => 'WMBus mode S',
id => '133',
#developId => 'm',
knownFreqs => '868.300',
datarate => '32.720',
preamble => 'b',
modulation => '2-FSK',
rfmode => 'WMBus_S',
# registers need to be adjusted and can be optimized if necessary
register => ['0006','012E','0200','0300','0476','0596','06FF','0704','0802','0900','0A00','0B08','0C00','0D21','0E65','0F6A','106A','114A','1206','1322','14F8','1547','1607','1700','1818','192E','1A6D','1B04','1C09','1DB2','1E87','1F6B','20F8','21B6','2210','23EF','242A','2512','261F','2741'],
length_min => '56', # to filter messages | must check
clientmodule => 'WMBUS',
#regexMatch => qr/^b/, # ToDo, check! fuer eine regexp Pruefung am Anfang vor dem method Aufruf
},
"134" => # WMBus_T
# https://wiki.fhem.de/wiki/WMBUS
# note !!! Implementation in the FW still needs to be done, register settings are not sufficient
# - definition is in advance in order to dispatch a DMSG | https://github.com/RFD-FHEM/RFFHEM/issues/1247
# messages with normal identifier
# RAWMSG: MN;D=3E44FA1213871122011633057A1C002025417CD28E06770269857D8001EF3B8BBE56BA7E06855CBA0334149F51682F2E6E2960E6900F800C0001090086B41E003A6F140131414D7D88810A;R=10;A=16;
# DMSG: b3E44FA1213871122011633057A1B002025CCC7C1BF453C407A299D8E1F21A3779CC6591EDF5E43BC3B5B0E9175B3DD6ACE29E5DCE00F800C0001090086B41E000726140131414D7D88001B
# messages with Y identifier
# RAWMSG: MN;D=304497264202231800087A3E0020A5EE5B2074920E46E4B4A26B99C92C8DD3A55F44FAF6AE0256B354F9C48C717BFAD43400FB;R=251;A=0;
# DMSG: bY304497264202231800087A3E0020A5EE5B2074920E46E4B4A26B99C92C8DD3A55F44FAF6AE0256B354F9C48C717BFAD43400FB
{
name => 'WMBus_T',
comment => 'WMBus mode C and T',
id => '134',
# developId => 'm',
knownFreqs => '868.950',
datarate => '100.000',
preamble => 'b',
modulation => '2-FSK',
rfmode => 'WMBus_T',
# registers need to be adjusted and can be optimized if necessary
register => ['0006','012E','0200','0300','0454','053D','06FF','0704','0802','0900','0A00','0B08','0C00','0D21','0E6B','0FD0','105C','1104','1206','1322','14F8','1544','1607','1700','1818','192E','1ABF','1B43','1C09','1DB5','1E87','1F6B','20F8','21B6','2210','23EF','242A','2513','261F','2741'],
length_min => '56', # to filter messages | must check
clientmodule => 'WMBUS',
#regexMatch => qr/^b/, # ToDo, check! fuer eine regexp Pruefung am Anfang vor dem method Aufruf
},

########################################################################
#### ### register informations from other hardware protocols #### ####

Expand Down Expand Up @@ -3583,51 +3630,6 @@ package lib::SD_ProtocolData;
# rfmode => 'RIO',
# register => ['000D','012E','022D','0347','04D3','0591','063D','0704','0832','0900','0A00','0B06','0C00','0D21','0E65','0F6F','1086','1190','1218','1323','14B9','1540','1607','1700','1818','1914','1A6C','1B07','1C00','1D91','1E87','1F6B','20F8','21B6','2211','23EF','240D','253E','261F','2741'],
# },
# "997" => # WMBus_C
# # https://wiki.fhem.de/wiki/WMBUS
# # settings from CUL
# {
# name => 'WMBus_C',
# comment => '',
# id => '997',
# developId => 'm',
# knownFreqs => '',
# datarate => '',
# modulation => '2-FSK',
# rfmode => 'WMBus_C',
# register => ['0029','012E','023F','0307','04D3','0591','06FF','0704','0845','0900','0A00','0B0F','0C00','0D1E','0EC4','0FEC','108C','1122','1202','1322','14F8','1547','1607','1730','1804','1976','1A6C','1B03','1C40','1D91','1E87','1F6B','20F8','2156','2210','23A9','240A','2520','260D','2741'],
# #regexMatch => qr/^9/, # ToDo, check! fuer eine regexp Pruefung am Anfang vor dem method Aufruf
# },
# "998" => # WMBus_S
# # https://wiki.fhem.de/wiki/WMBUS
# # settings from CUL
# {
# name => 'WMBus_S',
# comment => '',
# id => '998',
# developId => 'm',
# knownFreqs => '',
# datarate => '',
# modulation => '2-FSK',
# rfmode => 'WMBus_S',
# register => ['0006','012E','0200','0300','0476','0596','06FF','0704','0802','0900','0A00','0B08','0C00','0D21','0E65','0F6A','106A','114A','1206','1322','14F8','1547','1607','1700','1818','192E','1A6D','1B04','1C09','1DB2','1E87','1F6B','20F8','21B6','2210','23EF','242A','2512','261F','2741'],
# #regexMatch => qr/^9/, # ToDo, check! fuer eine regexp Pruefung am Anfang vor dem method Aufruf
# },
# "999" => # WMBus_T
# # https://wiki.fhem.de/wiki/WMBUS
# # settings from CUL
# {
# name => 'WMBus_T',
# comment => '',
# id => '999',
# developId => 'm',
# knownFreqs => '',
# datarate => '',
# modulation => '2-FSK',
# rfmode => 'WMBus_T',
# register => ['0006','012E','0200','0300','0454','053D','06FF','0704','0802','0900','0A00','0B08','0C00','0D21','0E6B','0FD0','105C','1104','1206','1322','14F8','1544','1607','1700','1818','192E','1ABF','1B43','1C09','1DB5','1E87','1F6B','20F8','21B6','2210','23EF','242A','2513','261F','2741'],
# #regexMatch => qr/^9/, # ToDo, check! fuer eine regexp Pruefung am Anfang vor dem method Aufruf
# },

########################################################################
#### ### old information from incomplete implemented protocols #### ####
Expand Down
4 changes: 2 additions & 2 deletions controls_signalduino.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
UPD 2024-03-09_15:50:57 240692 FHEM/00_SIGNALduino.pm
UPD 2024-04-04_19:40:56 242070 FHEM/00_SIGNALduino.pm
UPD 2023-01-06_12:08:43 20082 FHEM/10_FS10.pm
UPD 2024-01-03_23:05:39 27250 FHEM/10_SD_GT.pm
UPD 2023-01-01_18:10:40 25403 FHEM/10_SD_Rojaflex.pm
Expand All @@ -14,5 +14,5 @@ UPD 2023-01-23_21:06:26 38569 FHEM/14_SD_WS09.pm
UPD 2023-01-09_19:54:48 16458 FHEM/14_SD_WS_Maverick.pm
UPD 2023-01-28_20:08:00 40378 FHEM/41_OREGON.pm
UPD 2020-12-17_23:16:30 15582 FHEM/90_SIGNALduino_un.pm
UPD 2024-01-06_20:21:35 252437 FHEM/lib/SD_ProtocolData.pm
UPD 2024-04-04_17:54:58 253161 FHEM/lib/SD_ProtocolData.pm
UPD 2024-01-06_20:21:35 81862 FHEM/lib/SD_Protocols.pm
18 changes: 17 additions & 1 deletion t/FHEM/00_SIGNALduino/01_SIGNALduino_Parse_MN.t
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ my @mockData = (
plan => 2,
testname => q[Good MN data, without RSSI, with set attribute rfmode=PCA301],
input => q[MN;D=0405019E8700AAAAAAAA0F13AA16ACC0540AAA49C814473A2774D208AC0B0167;R=6;],
rValue => 1,
rValue => 3,
rfmode => 'PCA301'
},
{
Expand Down Expand Up @@ -140,6 +140,22 @@ my @mockData = (
rValue => 1,
rfmode => 'Bresser_6in1'
},
{
deviceName => q[dummyDuino],
plan => 2,
testname => q[Good MN data, with RSSI, with set attribute rfmode=WMBus_T, DMSG started with b],
input => q[MN;D=3E44F536892656000108F5D97AA9002025FB7AD4DF8710D69A3867E687B0633B1515F7BA8A6BE0C93649EC5593F476E7DD3E82F0470F800C0001090086B41E0098CE14011E070416C50018;R=24;A=0;],
rValue => 2,
rfmode => 'WMBus_T'
},
{
deviceName => q[dummyDuino],
plan => 2,
testname => q[Good MN data, with RSSI, with set attribute rfmode=WMBus_T, DMSG started with bY],
input => q[MN;D=304497264202231800087A5E0020A5D9CF9E719E36DB255C06F2AEC0722FC3853A3031BD85EF085BDAD29194136A02DD7E00FD;R=253;A=0;],
Copy link
Contributor Author

@HomeAutoUser HomeAutoUser Apr 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sidey79 , diese MN Message ergibt eine DMSG mit bY. (Glaube ich, da ich den Kommentar so definierte)
PS: Genaue Daten habe ich erst morgen wieder am PC.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Es muss nach den Erklärungen doch auch eine RMSG mit MN;D=Y geben.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Es wird nun noch von Vorteil sein, bei diesen Warnings

2024-04-09T21:36:45.3459830Z 2024.04.09 21:36:39 4: dummyDuino: Parse_MN, Found 2-FSK Protocol id 108 -> Bresser 5in1
2024-04-09T21:36:45.3461571Z 2024.04.09 21:36:39 1: PERL WARNING: Illegal hexadecimal digit 'Y' ignored at FHEM/lib/SD_Protocols.pm line 1952.
2024-04-09T21:36:45.3483159Z 2024.04.09 21:36:39 4: dummyDuino: Parse_MN, Found 2-FSK Protocol id 117 -> Bresser 7in1
2024-04-09T21:36:45.3484865Z 2024.04.09 21:36:39 1: PERL WARNING: Illegal hexadecimal digit 'Y' ignored at FHEM/lib/SD_Protocols.pm line 2029.
2024-04-09T21:36:45.3505768Z 2024.04.09 21:36:39 4: dummyDuino: Parse_MN, Found 2-FSK Protocol id 131 -> Bresser lightning
2024-04-09T21:36:45.3508364Z 2024.04.09 21:36:39 1: PERL WARNING: Illegal hexadecimal digit 'Y' ignored at FHEM/lib/SD_Protocols.pm line 2052.

in der Datei SD_ProtocolData.pm jeweils bei der ID 108,117,131 den regexMatch => qr/^[a-fA-F0-9]+/, zu ergänzen. So würden doch die DMSG Nachrichten mit Y keinen Fehler produzieren. Oder sehe ich das verkehrt?

rValue => 3,
rfmode => 'WMBus_T'
},
);


Expand Down
Loading