SIGNALduino und ESA2000

Begonnen von daubsi, 08 September 2024, 00:04:19

Vorheriges Thema - Nächstes Thema

Ralf9

Ja, das ist das einzigste was passen könnte, bitte poste mal einige dieser MC Nachrichten
FHEM auf Cubietruck mit Igor-Image, SSD und  hmland + HM-CFG-USB-2,  HMUARTLGW Lan,   HM-LC-Bl1PBU-FM, HM-CC-RT-DN, HM-SEC-SC-2, HM-MOD-Re-8, HM-MOD-Em-8
HM-Wired:  HMW_IO_12_FM, HMW_Sen_SC_12_DR, Selbstbau IO-Module HBW_IO_SW
Maple-SIGNALduino, WH3080,  Hideki, Id 7

daubsi

in der FHEM Seite des sduino finde ich nun eine Reihe von "unknownMessages" gelistet:

Bringe ich diese Mal in eine strukturierte Anzeige und markiere die Zeiten wo ich zeitlgleich (+/- 1 Sekunde) auch ESA2000 Messages mit dem CUL empfange mit "xxxx" dann ergibt sich folgendes Bild...

2024-09-13 16:21:13-MC;LL=-502;LH=508;SL=-267;SH=250;D=0001476410EDD7B39CA6F4D0A369711FFAB30981;C=254;L=160;R=241;s30;b1;#   xxxx
2024-09-13 16:22:16-MC;LL=-505;LH=497;SL=-247;SH=258;D=8FC920DAAE66384CE8A047D3E33EF5661002;C=251;L=143;R=243;s33;b32;#
2024-09-13 16:23:26-MC;LL=-1009;LH=1005;SL=-526;SH=507;D=AAAAAAAAAA;C=507;L=40;R=200;i;s1;b1;w;#
2024-09-13 16:24:04-MC;LL=-505;LH=499;SL=-253;SH=249;D=0001446713EED4B09FA505E1B399417F5AB30873;C=250;L=160;R=241;s30;b1;#
2024-09-13 16:25:04-MC;LL=-504;LH=515;SL=-242;SH=256;D=FDAB2;C=252;L=19;R=241;s11;b0;w;#
2024-09-13 16:25:04-MC;LL=-504;LH=515;SL=-242;SH=256;D=4E7936E54301F2585613319C1FFDAB307F3;C=252;L=140;R=241;s13;b12;#
2024-09-13 16:26:29-MU;P0=-1898;P1=253;P2=-256;P3=194;P4=-503;P5=509;CP=1;R=241;D=01232323232323232323232323232345452121454541252141252121214521454121254121212121254545412541252121412521412121254545214521212121452121214121254125214125212145214541254125454521412541212125214121212521412125454125214125212121454521212121214521;e;#   xxxx
2024-09-13 16:27:33-MC;LL=-510;LH=501;SL=-257;SH=244;D=7598342F34937AA988F124836221B1339A75983420;C=251;L=165;R=242;s2;b1;#
2024-09-13 16:28:44-MC;LL=-1008;LH=1010;SL=-501;SH=503;D=AAAAAAAAAA;C=503;L=40;R=203;i;s1;b1;w;#
2024-09-13 16:28:44-MC;LL=-508;LH=500;SL=-253;SH=255;D=5BD52B7570EDEBA1B2CE7660DD6;C=252;L=107;R=208;i;s2;b1;w;#
2024-09-13 16:28:44-MC;LL=-508;LH=500;SL=-253;SH=255;D=4B2CA8005BD52B7570EDEBA1B2CE7660DD6;C=252;L=139;R=208;s1;b0;#
2024-09-13 16:28:44-MC;LL=-506;LH=507;SL=-255;SH=250;D=BCECC25AC;C=252;L=34;R=195;s1;b0;#
2024-09-13 16:30:03-MC;LL=-506;LH=507;SL=-255;SH=250;D=9E5C0825E29DB2B07EFDD8D16F3B3096B;C=252;L=132;R=192;s1;b1;#
2024-09-13 16:30:46-MC;LL=-506;LH=507;SL=-241;SH=254;D=00014358644103DFA85A906C4208D02702B30616;C=251;L=160;R=244;s30;b1;#    xxxx
2024-09-13 16:31:47-MC;LL=-516;LH=502;SL=-247;SH=250;D=C3D8E4C1835F28DA10ECC28850A782B30996;C=252;L=144;R=243;s35;b32;#
2024-09-13 16:33:37-MC;LL=-1003;LH=1013;SL=-519;SH=505;D=AAAAAAAAAA;C=506;L=40;R=200;i;s1;b1;w;#                     xxxx
2024-09-13 16:33:37-MC;LL=-510;LH=506;SL=-257;SH=247;D=A1006E55ACC02E1B82EA9684598280B6CE8401B956B300B86E0BAA5A1166;C=253;L=240;R=233;s1;b1;#     xxxx
2024-09-13 16:34:34-MC;LL=-509;LH=504;SL=-248;SH=256;D=C45984BC8;C=252;L=33;R=193;i;s3;b0;w;#
2024-09-13 16:34:34-MC;LL=-509;LH=504;SL=-248;SH=256;D=6F9F0A0170AF640372DE1556B622CC25E4;C=252;L=134;R=193;s1;b0;#
2024-09-13 16:36:15-MC;LL=-507;LH=503;SL=-246;SH=244;D=0001415A664301DDAA58F7D3A16B73E4C1B308C5;C=249;L=160;R=242;s30;b1;#   xxxx
2024-09-13 16:37:32-MC;LL=-506;LH=508;SL=-258;SH=240;D=83661C1DAE6C3815D2AD8775321EBF36441B30945;C=251;L=164;R=244;s1;b1;#
2024-09-13 16:38:36-MC;LL=-1015;LH=1003;SL=-521;SH=489;D=AAAAAAAAAA;C=504;L=40;R=201;i;s1;b1;w;#                     xxxx
2024-09-13 16:38:37-MC;LL=-498;LH=513;SL=-242;SH=259;D=D9B8F767E311FD98;C=251;L=63;R=6;s3;b0;w;#                     xxxx
2024-09-13 16:38:37-MC;LL=-498;LH=513;SL=-242;SH=259;D=539B467D33AAA56BD6CDC7BB3F188FECC;C=251;L=132;R=6;s8;b8;#     xxxx
2024-09-13 16:38:37-MC;LL=-506;LH=506;SL=-250;SH=255;D=FECC23C0;C=252;L=30;R=192;s13;b0;                             xxxx
Um 2024-09-13 16:33:37 und 2024-09-13 16:38:36 haben wir zumindest mal die Nachrichten, die ich auch beim Original Signalduino vorher schon gesehen habe...

Was ist denn mit der Nachricht um 2024-09-13 16:26:29 - warum wurde die nicht in einen Hexstring gewandelt?

daubsi

Hier noch ein paar MC Nachrichten direkt aus dem Log wie gewünscht:

2024.09.13 16:01:14 4: sduino/msg READ: MC;LL=-511;LH=500;SL=-260;SH=244;D=00AFBE0472EFDDC25F4B392F161DE6D459844C8;C=252;L=153;R=244;s16;b1;
2024.09.13 16:01:28 4: sduino/msg READ: MC;LL=-509;LH=496;SL=-248;SH=247;D=9459840CF910CABE76087C2DE5BD59769A51661032;C=249;L=167;R=239;s1;b1;
2024.09.13 16:02:35 4: sduino/msg READ: MC;LL=-1018;LH=1004;SL=-507;SH=503;D=AAAAAAAAAA;C=505;L=40;R=200;i;s1;b1;w;
2024.09.13 16:02:35 4: sduino/msg READ: MC;LL=-1018;LH=1004;SL=-507;SH=503;D=B6A1AFFFDDBFADACE4;C=505;L=70;R=200;s1;b0;
2024.09.13 16:03:47 4: sduino/msg READ: MC;LL=-507;LH=500;SL=-256;SH=244;D=FB58750;C=251;L=28;R=241;s9;b0;
2024.09.13 16:03:47 4: sduino/msg READ: MC;LL=-515;LH=497;SL=-263;SH=250;D=8B41661054;C=254;L=39;R=191;s2;b1;
2024.09.13 16:04:37 4: sduino/msg READ: MC;LL=-515;LH=497;SL=-263;SH=250;D=E2D9970E01CF40F7ED61D431682CC20A8;C=254;L=130;R=188;s5;b0;
2024.09.13 16:06:04 4: sduino/msg READ: MC;LL=-511;LH=508;SL=-252;SH=243;D=575F82B9F76E61AF2FE6DE900BFF366CC25BC;C=336;L=146;R=238;s29;b29;
2024.09.13 16:06:41 4: sduino/msg READ: MC;LL=-510;LH=510;SL=-249;SH=248;D=E2CC1DDFE8A675D39063C3F1BFAC0AF7C59B307EF;C=252;L=164;R=242;s5;b0;
2024.09.13 16:08:03 4: sduino/msg READ: MC;LL=-1002;LH=1005;SL=-495;SH=523;D=AAAAAAAAAA;C=504;L=40;R=201;i;s1;b1;w;
2024.09.13 16:08:03 4: sduino/msg READ: MC;LL=-1002;LH=1005;SL=-495;SH=523;D=B6A1AFFE3DBAADAB34;C=504;L=70;R=201;s1;b0;
2024.09.13 16:08:07 4: sduino/msg READ: MC;LL=-522;LH=504;SL=-259;SH=230;D=00015A711DF8CAA691B3BC9878422A05E0B30864;C=252;L=160;R=245;s30;b1;
2024.09.13 16:09:04 4: sduino/msg READ: MC;LL=-508;LH=512;SL=-251;SH=250;D=C1603B5E33AF0944C22667831F185550AC1660FC8;C=253;L=163;R=242;s3;b0;
2024.09.13 16:11:03 4: sduino/msg READ: MC;LL=-510;LH=509;SL=-253;SH=237;D=000ADB80E7CE5D3C859665445B8BCA00ED984468;C=251;L=157;R=241;s30;b7;
2024.09.13 16:12:03 4: sduino/msg READ: MC;LL=-508;LH=501;SL=-247;SH=259;D=04ED9DBF09C794B2710324C280BF1F9C09DB3080D;C=252;L=164;R=242;s10;b1;
2024.09.13 16:13:04 4: sduino/msg READ: MC;LL=-1005;LH=1008;SL=-516;SH=512;D=AAAAAAAAAA;C=506;L=40;R=201;i;s1;b1;w;
2024.09.13 16:13:04 4: sduino/msg READ: MC;LL=-1005;LH=1008;SL=-516;SH=512;D=B6A1AFFF3CB8EDAF14;C=506;L=70;R=201;s1;b0;
2024.09.13 16:13:39 4: sduino/msg READ: MC;LL=-504;LH=501;SL=-240;SH=261;D=000158731FFAC8A493B1C29E774515D5B0B308FD;C=250;L=160;R=242;s30;b1;
2024.09.13 16:14:38 4: sduino/msg READ: MC;LL=-505;LH=507;SL=-247;SH=257;D=8F39F7A48241331421EF7C5955530B3077D;C=252;L=140;R=241;s39;b38;
2024.09.13 16:16:04 4: sduino/msg READ: MC;LL=-514;LH=503;SL=-254;SH=239;D=002B2E43DF7934B2561A1590AEECEE09B6611C6;C=251;L=155;R=241;s30;b11;
2024.09.13 16:17:07 4: sduino/msg READ: MC;LL=-506;LH=502;SL=-255;SH=250;D=19B66;C=252;L=19;R=243;i;s6;b1;w;
2024.09.13 16:17:07 4: sduino/msg READ: MC;LL=-506;LH=502;SL=-255;SH=250;D=767CA79ED249448C140B017DF9FC336CC218C;C=252;L=146;R=243;s1;b0;
2024.09.13 16:18:08 4: sduino/msg READ: MC;LL=-1016;LH=1002;SL=-517;SH=501;D=AAAAAAAAAA;C=505;L=40;R=200;i;s1;b1;w;
2024.09.13 16:18:08 4: sduino/msg READ: MC;LL=-1016;LH=1002;SL=-517;SH=501;D=B6A1AFFF3CB8EDAF14;C=505;L=70;R=200;s1;b0;
2024.09.13 16:18:13 4: sduino/msg READ: MC;LL=-491;LH=507;SL=-255;SH=257;D=005199447B35ACA769F93025D95D447B2CC24E4;C=251;L=154;R=245;s20;b3;
2024.09.13 16:19:33 4: sduino/msg READ: MC;LL=-507;LH=505;SL=-259;SH=249;D=D9660E372C8B62B190E93B2200BF2FAC8B65983DC8;C=253;L=165;R=242;s3;b0;
2024.09.13 16:21:13 4: sduino/msg READ: MC;LL=-502;LH=508;SL=-267;SH=250;D=0001476410EDD7B39CA6F4D0A369711FFAB30981;C=254;L=160;R=241;s30;b1;
2024.09.13 16:22:16 4: sduino/msg READ: MC;LL=-505;LH=497;SL=-247;SH=258;D=8FC920DAAE66384CE8A047D3E33EF5661002;C=251;L=143;R=243;s33;b32;
2024.09.13 16:23:26 4: sduino/msg READ: MC;LL=-1009;LH=1005;SL=-526;SH=507;D=AAAAAAAAAA;C=507;L=40;R=200;i;s1;b1;w;
2024.09.13 16:23:26 4: sduino/msg READ: MC;LL=-1009;LH=1005;SL=-526;SH=507;D=B6A1AFFF3CB8EDAF14;C=507;L=70;R=200;s1;b0;
2024.09.13 16:24:04 4: sduino/msg READ: MC;LL=-505;LH=499;SL=-253;SH=249;D=0001446713EED4B09FA505E1B399417F5AB30873;C=250;L=160;R=241;s30;b1;
2024.09.13 16:25:04 4: sduino/msg READ: MC;LL=-504;LH=515;SL=-242;SH=256;D=FDAB2;C=252;L=19;R=241;s11;b0;w;
2024.09.13 16:25:04 4: sduino/msg READ: MC;LL=-504;LH=515;SL=-242;SH=256;D=4E7936E54301F2585613319C1FFDAB307F3;C=252;L=140;R=241;s13;b12;
2024.09.13 16:27:33 4: sduino/msg READ: MC;LL=-510;LH=501;SL=-257;SH=244;D=7598342F34937AA988F124836221B1339A75983420;C=251;L=165;R=242;s2;b1;
2024.09.13 16:28:44 4: sduino/msg READ: MC;LL=-1008;LH=1010;SL=-501;SH=503;D=AAAAAAAAAA;C=503;L=40;R=203;i;s1;b1;w;
2024.09.13 16:28:44 4: sduino/msg READ: MC;LL=-1008;LH=1010;SL=-501;SH=503;D=B6A1AFFF3CBCADAF50;C=503;L=70;R=203;s1;b0;
2024.09.13 16:28:44 4: sduino/msg READ: MC;LL=-508;LH=500;SL=-253;SH=255;D=5BD52B7570EDEBA1B2CE7660DD6;C=252;L=107;R=208;i;s2;b1;w;
2024.09.13 16:28:44 4: sduino/msg READ: MC;LL=-508;LH=500;SL=-253;SH=255;D=4B2CA8005BD52B7570EDEBA1B2CE7660DD6;C=252;L=139;R=208;s1;b0;
2024.09.13 16:28:44 4: sduino/msg READ: MC;LL=-506;LH=507;SL=-255;SH=250;D=BCECC25AC;C=252;L=34;R=195;s1;b0;
2024.09.13 16:30:03 4: sduino/msg READ: MC;LL=-506;LH=507;SL=-255;SH=250;D=9E5C0825E29DB2B07EFDD8D16F3B3096B;C=252;L=132;R=192;s1;b1;
2024.09.13 16:30:46 4: sduino/msg READ: MC;LL=-506;LH=507;SL=-241;SH=254;D=00014358644103DFA85A906C4208D02702B30616;C=251;L=160;R=244;s30;b1;
2024.09.13 16:31:47 4: sduino/msg READ: MC;LL=-516;LH=502;SL=-247;SH=250;D=C3D8E4C1835F28DA10ECC28850A782B30996;C=252;L=144;R=243;s35;b32;
2024.09.13 16:33:37 4: sduino/msg READ: MC;LL=-1003;LH=1013;SL=-519;SH=505;D=AAAAAAAAAA;C=506;L=40;R=200;i;s1;b1;w;
2024.09.13 16:33:37 4: sduino/msg READ: MC;LL=-1003;LH=1013;SL=-519;SH=505;D=B6A1AFFEBCB8EDA914;C=506;L=70;R=200;s1;b0;
2024.09.13 16:33:37 4: sduino/msg READ: MC;LL=-510;LH=506;SL=-257;SH=247;D=A1006E55ACC02E1B82EA9684598280B6CE8401B956B300B86E0BAA5A1166;C=253;L=240;R=233;s1;b1;
2024.09.13 16:34:34 4: sduino/msg READ: MC;LL=-509;LH=504;SL=-248;SH=256;D=C45984BC8;C=252;L=33;R=193;i;s3;b0;w;
2024.09.13 16:34:34 4: sduino/msg READ: MC;LL=-509;LH=504;SL=-248;SH=256;D=6F9F0A0170AF640372DE1556B622CC25E4;C=252;L=134;R=193;s1;b0;
2024.09.13 16:36:15 4: sduino/msg READ: MC;LL=-507;LH=503;SL=-246;SH=244;D=0001415A664301DDAA58F7D3A16B73E4C1B308C5;C=249;L=160;R=242;s30;b1;
2024.09.13 16:37:32 4: sduino/msg READ: MC;LL=-506;LH=508;SL=-258;SH=240;D=83661C1DAE6C3815D2AD8775321EBF36441B30945;C=251;L=164;R=244;s1;b1;
2024.09.13 16:38:36 4: sduino/msg READ: MC;LL=-1015;LH=1003;SL=-521;SH=489;D=AAAAAAAAAA;C=504;L=40;R=201;i;s1;b1;w;
2024.09.13 16:38:36 4: sduino/msg READ: MC;LL=-1015;LH=1003;SL=-521;SH=489;D=B6A1AFFEBCBB2DA928;C=504;L=70;R=201;s1;b0;
2024.09.13 16:38:37 4: sduino/msg READ: MC;LL=-498;LH=513;SL=-242;SH=259;D=D9B8F767E311FD98;C=251;L=63;R=6;s3;b0;w;
2024.09.13 16:38:37 4: sduino/msg READ: MC;LL=-498;LH=513;SL=-242;SH=259;D=539B467D33AAA56BD6CDC7BB3F188FECC;C=251;L=132;R=6;s8;b8;
2024.09.13 16:38:37 4: sduino/msg READ: MC;LL=-506;LH=506;SL=-250;SH=255;D=FECC23C0;C=252;L=30;R=192;s13;b0;
2024.09.13 16:39:36 4: sduino/msg READ: A: MS=0;MU=0;MC=1;Mred=0_MScnt=4;maxMuPrint=768;maxMsgSize=1024;maxNumPat=8;Mdebug=1;MdebFifoLimit=150/200
2024.09.13 16:39:36 5: sduino/noMsg Parse: A: MS=0;MU=0;MC=1;Mred=0_MScnt=4;maxMuPrint=768;maxMsgSize=1024;maxNumPat=8;Mdebug=1;MdebFifoLimit=150/200
2024.09.13 16:39:36 4: sduino/msg READ: regexp=(MS.*MU.*MC.*)|(ccmode=) cmd=config msg=A: MS=0;MU=0;MC=1;Mred=0_MScnt=4;maxMuPrint=768;maxMsgSize=1024;maxNumPat=8;Mdebug=1;MdebFifoLimit=150/200
2024.09.13 16:40:03 4: sduino/msg READ: MC;LL=-506;LH=506;SL=-250;SH=255;D=D99744E2A152FDBB79E6C7CE2BFB308F0;C=252;L=132;R=188;s3;b0;
2024.09.13 16:40:45 4: sduino/msg READ: MC;LL=-499;LH=505;SL=-263;SH=239;D=00014F6C18F5CFAB94AE563202C890AA87B3084A;C=250;L=160;R=242;s30;b1;
2024.09.13 16:41:37 4: sduino/msg READ: MC;LL=-499;LH=513;SL=-248;SH=254;D=3D9839FD930EA9E56285DAD65049020540F660D94;C=252;L=163;R=241;s4;b1;
2024.09.13 16:43:42 4: sduino/msg READ: MC;LL=-1010;LH=1001;SL=-523;SH=481;D=AAAAAAAAAA;C=502;L=40;R=0;i;s1;b1;w;
2024.09.13 16:43:42 4: sduino/msg READ: MC;LL=-1010;LH=1001;SL=-523;SH=481;D=B6A1AFFEBCBB2DA928;C=502;L=70;R=0;s1;b0;
2024.09.13 16:43:42 4: sduino/msg READ: MC;LL=-509;LH=505;SL=-248;SH=256;D=FFDE27DD6611BBC6FDB32A25EB59D0C37FFBC4FBACC2374;C=252;L=186;R=192;s19;b0;
2024.09.13 16:44:35 4: sduino/msg READ: MC;LL=-501;LH=506;SL=-250;SH=258;D=6DD6610BBE6DD930A05CB79F0E35FDBE4DBACC2174;C=252;L=166;R=190;s2;b1;
2024.09.13 16:46:26 4: sduino/msg READ: MC;LL=-500;LH=509;SL=-261;SH=232;D=00014D6E1AF7CDA996AD8B67572535F9D4B308A8;C=250;L=160;R=244;s30;b1;
2024.09.13 16:47:21 4: sduino/msg READ: MC;LL=-509;LH=500;SL=-255;SH=253;D=B30039BDD34EE9A522C5A17CFAF4B6AF2A9661050;C=252;L=163;R=241;s1;b1;
2024.09.13 16:49:03 4: sduino/msg READ: MC;LL=-1014;LH=999;SL=-484;SH=526;D=AAAAAAAAAA;C=503;L=40;R=201;i;s1;b1;w;
2024.09.13 16:49:03 4: sduino/msg READ: MC;LL=-1014;LH=999;SL=-484;SH=526;D=B6A1AFFF3CBF6DAF6C;C=503;L=70;R=201;s1;b0;
2024.09.13 16:49:03 4: sduino/msg READ: MC;LL=-511;LH=497;SL=-252;SH=250;D=588B023D31A5A1582CC1C3C;C=251;L=90;R=190;s2;b1;
2024.09.13 16:49:03 4: sduino/msg READ: MC;LL=-511;LH=497;SL=-252;SH=250;D=A90742DC2C45811E98D2D0AC1660E1E;C=251;L=123;R=240;s1;b0;
2024.09.13 16:50:11 4: sduino/msg READ: MC;LL=-501;LH=505;SL=-254;SH=252;D=C166131F8;C=251;L=33;R=193;i;s3;b0;w;
2024.09.13 16:50:11 4: sduino/msg READ: MC;LL=-501;LH=505;SL=-254;SH=252;D=7B722EA59878AB221D118581782CC263C;C=251;L=130;R=193;s1;b0;
2024.09.13 16:51:09 4: sduino/msg READ: MC;LL=-502;LH=504;SL=-252;SH=251;D=00014B606C493B17E0631FFBD9A34A23FEB307A9;C=251;L=160;R=244;s30;b1;
2024.09.13 16:51:38 4: sduino/msg READ: MC;LL=-517;LH=506;SL=-263;SH=235;D=6FD6072F83B326EE5D838E7DED648F2A8DFACC28A4;C=253;L=166;R=244;s2;b1;
2024.09.13 16:54:12 4: sduino/msg READ: MC;LL=-1019;LH=999;SL=-482;SH=521;D=AAAAAAAAAA;C=503;L=40;R=200;i;s1;b1;w;
2024.09.13 16:54:12 4: sduino/msg READ: MC;LL=-1019;LH=999;SL=-482;SH=521;D=B6A1AFFF3CBF6DAF6C;C=503;L=70;R=200;s1;b0;
2024.09.13 16:54:12 4: sduino/msg READ: MC;LL=-505;LH=496;SL=-263;SH=245;D=01FD7A94D6F08C3660F6CDBD28E0538D803FAF529ADE1186CC1ED8;C=251;L=214;R=213;s14;b1;
2024.09.13 16:54:24 4: sduino/msg READ: MC;LL=-500;LH=498;SL=-259;SH=255;D=70DF8;C=251;L=17;R=242;i;s2;b1;w;
2024.09.13 16:54:24 4: sduino/msg READ: MC;LL=-500;LH=498;SL=-259;SH=255;D=7238FBF2AE2518F823DAD5098DC1386CC24D8;C=251;L=146;R=242;s1;b0;
2024.09.13 16:57:03 4: sduino/msg READ: MC;LL=-514;LH=505;SL=-247;SH=261;D=000A4B137259C8AF130BCAA907579F3E159840E0;C=254;L=157;R=241;s24;b1;
2024.09.13 16:58:23 4: sduino/msg READ: MC;LL=-501;LH=493;SL=-257;SH=257;D=93C5DD97732AC5C3F3AB40D4E6CE85661538;C=251;L=143;R=243;s35;b34;
2024.09.13 16:59:35 4: sduino/msg READ: MC;LL=-1023;LH=999;SL=-494;SH=516;D=5555555554;C=505;L=39;R=188;i;s1;b1;w;
2024.09.13 16:59:35 4: sduino/msg READ: MC;LL=-1023;LH=999;SL=-494;SH=516;D=B6A1AFFF3CBF6DAF6C;C=505;L=70;R=188;s1;b0;
2024.09.13 16:59:37 4: sduino/msg READ: MC;LL=-499;LH=503;SL=-253;SH=246;D=026CAAC2780DC55AACCC841DF9DBFDB766107C;C=250;L=151;R=244;s30;b19;
2024.09.13 17:00:40 4: sduino/msg READ: MC;LL=-504;LH=506;SL=-257;SH=241;D=BB30B6DABC3790CC45BADCD851CF8DAFCB766137C;C=251;L=163;R=245;s1;b0;
2024.09.13 17:02:03 4: sduino/msg READ: MC;LL=-491;LH=520;SL=-248;SH=256;D=009BAA301E83F1D62BA89683FAF242B05983858;C=252;L=153;R=245;s30;b15;
2024.09.13 17:02:47 4: sduino/msg READ: MC;LL=-517;LH=502;SL=-241;SH=254;D=C166137D4E0BD87632CD7D1AD87756405E0B3098B;C=252;L=164;R=242;s3;b0;
2024.09.13 17:04:04 4: sduino/msg READ: MC;LL=-503;LH=507;SL=-264;SH=233;D=00013457633E04E0AF545E3A1AE0893712B3062A;C=251;L=160;R=242;s30;b1;
2024.09.13 17:04:10 4: sduino/msg READ: MC;LL=-504;LH=504;SL=-255;SH=247;D=C9580DA6BF1DF423017EA6F5D4D3004DBC95984D50;C=251;L=165;R=242;s3;b0;
2024.09.13 17:04:27 4: sduino/msg READ: MC;LL=-1017;LH=1004;SL=-483;SH=524;D=AAAAAAAAAA;C=504;L=40;R=201;i;s1;b1;w;
2024.09.13 17:04:27 4: sduino/msg READ: MC;LL=-1017;LH=1004;SL=-483;SH=524;D=B6A1AFFF3CBF6DAF6C;C=504;L=70;R=201;s1;b0;
2024.09.13 17:07:03 4: sduino/msg READ: MC;LL=-510;LH=495;SL=-258;SH=240;D=00013556623F05E1AE554E2A17E5F4B38EB30771;C=250;L=160;R=243;s30;b1;
2024.09.13 17:08:03 4: sduino/msg READ: MC;LL=-510;LH=495;SL=-266;SH=253;D=B5D6E2BF85612ED5CEAA976574330EB308F1;C=253;L=144;R=245;s33;b32;
2024.09.13 17:09:36 4: sduino/msg READ: MC;LL=-1006;LH=1000;SL=-501;SH=520;D=AAAAAAAAAA;C=504;L=40;R=203;i;s1;b1;w;
2024.09.13 17:09:36 4: sduino/msg READ: MC;LL=-1006;LH=1000;SL=-501;SH=520;D=B6A1AFFF3CBF6DAF6C;C=504;L=70;R=203;s1;b0;
2024.09.13 17:09:41 4: sduino/msg READ: MC;LL=-505;LH=505;SL=-255;SH=249;D=26492EAA0641DF214D0885E3B99B76D660D16;C=252;L=147;R=244;s18;b15;
2024.09.13 17:10:36 4: sduino/msg READ: MC;LL=-501;LH=496;SL=-257;SH=255;D=6CB27D742CA39E62BA312BE75316CDACC282C;C=251;L=146;R=241;s34;b34;
2024.09.13 17:14:20 4: sduino/msg READ: MC;LL=-496;LH=505;SL=-243;SH=254;D=09825BBA918067D84279584F9FD2C9A5983198;C=249;L=149;R=243;s30;b23;
2024.09.13 17:14:32 4: sduino/msg READ: MC;LL=-515;LH=506;SL=-242;SH=252;D=B4B30;C=252;L=18;R=243;s1;b1;w;
2024.09.13 17:14:32 4: sduino/msg READ: MC;LL=-515;LH=506;SL=-242;SH=252;D=6C32FDF4AC231EE233EAE25CDEB66D2CC2ACC;C=252;L=146;R=243;s6;b6;

Ralf9

Die MC Nachrichten mit short 500 und long 1000 gehören nicht dazu, das sind HMS Temeratursensoren

Fehlerhafte Nachrichten die nicht als MC erkannt werden, werden nicht nach MC gewandelt

MC;LL=-509;LH=496;SL=-248;SH=247;D=9459840CF910CABE76087C2DE5BD59769A51661032;C=249;L=167;R=239;s1;b1;
MC;LL=-522;LH=504;SL=-259;SH=230;D=00015A711DF8CAA691B3BC9878422A05E0B30864;C=252;L=160;R=245;s30;b1;
MC;LL=-508;LH=512;SL=-251;SH=250;D=C1603B5E33AF0944C22667831F185550AC1660FC8;C=253;L=163;R=242;s3;b0;
MC;LL=-510;LH=509;SL=-253;SH=237;D=000ADB80E7CE5D3C859665445B8BCA00ED984468;C=251;L=157;R=241;s30;b7;
MC;LL=-508;LH=501;SL=-247;SH=259;D=04ED9DBF09C794B2710324C280BF1F9C09DB3080D;C=252;L=164;R=242;s10;b1;
MC;LL=-504;LH=501;SL=-240;SH=261;D=000158731FFAC8A493B1C29E774515D5B0B308FD;C=250;L=160;R=242;s30;b1;
MC;LL=-514;LH=503;SL=-254;SH=239;D=002B2E43DF7934B2561A1590AEECEE09B6611C6;C=251;L=155;R=241;s30;b11;
MC;LL=-491;LH=507;SL=-255;SH=257;D=005199447B35ACA769F93025D95D447B2CC24E4;C=251;L=154;R=245;s20;b3;
MC;LL=-507;LH=505;SL=-259;SH=249;D=D9660E372C8B62B190E93B2200BF2FAC8B65983DC8;C=253;L=165;R=242;s3;b0;
MC;LL=-502;LH=508;SL=-267;SH=250;D=0001476410EDD7B39CA6F4D0A369711FFAB30981;C=254;L=160;R=241;s30;b1;
MC;LL=-505;LH=497;SL=-247;SH=258;D=8FC920DAAE66384CE8A047D3E33EF5661002;C=251;L=143;R=243;s33;b32;
MC;LL=-505;LH=499;SL=-253;SH=249;D=0001446713EED4B09FA505E1B399417F5AB30873;C=250;L=160;R=241;s30;b1;
MC;LL=-506;LH=507;SL=-241;SH=254;D=00014358644103DFA85A906C4208D02702B30616;C=251;L=160;R=244;s30;b1;
MC;LL=-510;LH=506;SL=-257;SH=247;D=A1006E55ACC02E1B82EA9684598280B6CE8401B956B300B86E0BAA5A1166;C=253;L=240;R=233;s1;b1;
MC;LL=-507;LH=503;SL=-246;SH=244;D=0001415A664301DDAA58F7D3A16B73E4C1B308C5;C=249;L=160;R=242;s30;b1;
MC;LL=-506;LH=508;SL=-258;SH=240;D=83661C1DAE6C3815D2AD8775321EBF36441B30945;C=251;L=164;R=244;s1;b1;
MC;LL=-499;LH=505;SL=-263;SH=239;D=00014F6C18F5CFAB94AE563202C890AA87B3084A;C=250;L=160;R=242;s30;b1;
MC;LL=-499;LH=513;SL=-248;SH=254;D=3D9839FD930EA9E56285DAD65049020540F660D94;C=252;L=163;R=241;s4;b1;
MC;LL=-509;LH=505;SL=-248;SH=256;D=FFDE27DD6611BBC6FDB32A25EB59D0C37FFBC4FBACC2374;C=252;L=186;R=192;s19;b0;
MC;LL=-501;LH=506;SL=-250;SH=258;D=6DD6610BBE6DD930A05CB79F0E35FDBE4DBACC2174;C=252;L=166;R=190;s2;b1;
MC;LL=-500;LH=509;SL=-261;SH=232;D=00014D6E1AF7CDA996AD8B67572535F9D4B308A8;C=250;L=160;R=244;s30;b1;
MC;LL=-509;LH=500;SL=-255;SH=253;D=B30039BDD34EE9A522C5A17CFAF4B6AF2A9661050;C=252;L=163;R=241;s1;b1;
MC;LL=-502;LH=504;SL=-252;SH=251;D=00014B606C493B17E0631FFBD9A34A23FEB307A9;C=251;L=160;R=244;s30;b1;
MC;LL=-517;LH=506;SL=-263;SH=235;D=6FD6072F83B326EE5D838E7DED648F2A8DFACC28A4;C=253;L=166;R=244;s2;b1;
MC;LL=-505;LH=496;SL=-263;SH=245;D=01FD7A94D6F08C3660F6CDBD28E0538D803FAF529ADE1186CC1ED8;C=251;L=214;R=213;s14;b1;
MC;LL=-514;LH=505;SL=-247;SH=261;D=000A4B137259C8AF130BCAA907579F3E159840E0;C=254;L=157;R=241;s24;b1;
MC;LL=-504;LH=506;SL=-257;SH=241;D=BB30B6DABC3790CC45BADCD851CF8DAFCB766137C;C=251;L=163;R=245;s1;b0;
MC;LL=-517;LH=502;SL=-241;SH=254;D=C166137D4E0BD87632CD7D1AD87756405E0B3098B;C=252;L=164;R=242;s3;b0;
MC;LL=-503;LH=507;SL=-264;SH=233;D=00013457633E04E0AF545E3A1AE0893712B3062A;C=251;L=160;R=242;s30;b1;
MC;LL=-504;LH=504;SL=-255;SH=247;D=C9580DA6BF1DF423017EA6F5D4D3004DBC95984D50;C=251;L=165;R=242;s3;b0;
MC;LL=-510;LH=495;SL=-258;SH=240;D=00013556623F05E1AE554E2A17E5F4B38EB30771;C=250;L=160;R=243;s30;b1;

Die MC Nachrichten haben normalerweise eine Länge von L=160, bei den die kürzer sind fehlen am Anfang 0-Bits

Die Nachrichten die länger als L=160 sind passen nicht in das Schema, sie fangen nicht mit 0001 an
FHEM auf Cubietruck mit Igor-Image, SSD und  hmland + HM-CFG-USB-2,  HMUARTLGW Lan,   HM-LC-Bl1PBU-FM, HM-CC-RT-DN, HM-SEC-SC-2, HM-MOD-Re-8, HM-MOD-Em-8
HM-Wired:  HMW_IO_12_FM, HMW_Sen_SC_12_DR, Selbstbau IO-Module HBW_IO_SW
Maple-SIGNALduino, WH3080,  Hideki, Id 7

daubsi

OK, also wenn ich mir alle Dateien seit ca. 16:00 bis jetzt anschaue und die HMS Nachrichten ausfiltere bleiben ca 300 Nachrichten übrig die LL=-5xx und SL=-2xx haben.

Filtere ich weiter auf die, deren D-Wert mit 0001 beginnen dann bleiben 64 Nachrichten übrig:

D=000102992500C29E69A6FEDAA06A7E10EDB3083F
D=000104A7D3AE94705FD8E0BC95677B7A57B308FE
D=000106A5D1AC96725DDA87632F1DC18D68B30806
D=000109A22E0BF9D5A29A7A563F0DD1421FB306EF
D=00010BA02C09FBD7A09F8A6652382CDAB7B307DB
D=00010CAFDBB68C6857D0674312F8EC6F4AB30873
D=00010DAEDAB78D6956D17A563E0CD018F5B30813
D=00010EADD9B48E6A55D21EFAD9A347A481B3091A
D=000110ABD7B2906C5BD5E2BEB98368320FB308A8
D=000116B5C19C66420D087D592B11DAAF8AB306BD
D=000117B4C09D67430C095D390AF0FBF1CCB307E2
D=000118B3DFBA886453CCA27E453724EDC8B30897
D=00011CBFCBA69C7847C13A16E1ABB03C19B307FC
D=00011DBECAA79D7946C05C380DFFEC0AE7B30898
D=000120BBC7A2603C0B074521EDDF8DECC9B30819
D=000121BAC6A3613D0A06573300CA90FFDAB30762
D=000122B9C5A0623E0905644010FAE0D8B5B307BC
D=000123B8C4A1633F080476523F0DDFCEABB3070D
D=00012546724F3511FE3A6F4B2A10DAEECBB306E4
D=00012645714C3612FD39583402C8924421B305A6
D=00012744704D3713FC38492511FBE18663B3069D
D=000128434F2A18F4C37E03DF917B61C6A3B3079C
D=00013457633E04E0AF545E3A1AE0893712B3062A
D=00013556623F05E1AE554E2A17E5F4B38EB30771
D=000138537F5A2804F32F2400CCBEAC835EB306A0
D=000139527E5B2905F22E310DE5D7857954B306B1
D=00013A517D582A06F12D07E3AC9E4FC6A3B3074D
D=00013D5E6A473D19E61D02DEB48657EFCAB30782
D=00013F5C68453F1BE41F2501CDBFAE4B26B30629
D=0001415A664301DDAA58F7D3A16B73E4C1B308C5
D=00014358644103DFA85A906C4208D02702B30616
D=0001446713EED4B09FA505E1B399417F5AB30873
D=0001476410EDD7B39CA6F4D0A369711FFAB30981
D=00014B606C493B17E0631FFBD9A34A23FEB307A9
D=00014D6E1AF7CDA996AD8B67572535F9D4B308A8
D=00014F6C18F5CFAB94AE563202C890AA87B3084A
D=0001536814F1D3AF98A94A2612F8E75F3AB30830
D=0001547703DEA4804FF6724E2416C1F3CEB30844
D=000158731FFAC8A493B1C29E774515D5B0B308FD
D=00015A711DF8CAA691B3BC9878422A05E0B30864
D=00015E7D09E4DEBA85BC64400DFFE80EEBB308E5
D=00016407B38E74503FC705E1AC9E485835B3072E
D=00016407B38E74503FFEC19D6B5117FFDAB3086A
D=00016605B18C76523DC52B07EEDC8A3B16B306FC
D=000168038F6A58340302815D3705D2805DB30571
D=00017308B491734F38F0A98573590CA07DB30780
D=00017714A07D4723EC2C21FDC8B2B79E7BB30845
D=00017813BF9A684433D3C09C68521CC7A2B307E4
D=00017813BF9A684433EB2602CEBCA1AD88B307E9
D=00017912BE9B694532D2D3AF857761724FB307E9
D=00017A11BD986A4631E903DFB684598762B307BB
D=00017E1DA9847E5A25E54C2808F2F7A07DB307DF
D=00018F2C58350FEBD453916D4735299D78B306D4
D=00019437431EE4C08F8AB8945624372401B306BE
D=00019D3E4A271DF9C640
D=0001A7C4F0CDB7937CB8C9A5917B6106E3B30A1D
D=0001ACCFFBD6AC8877B36A463319C35D38B308B1
D=0001BBD0FCD9AB8770AC97735E2C3DE4C1B309D7
D=0001E784300DF7D3BC44B591665402B491B3086C
D=0001ED8E3A17EDC9B64F18F4C18B54310CB30823
D=0001F9923E1BE9C5B26AA9856F5D0003DEB3083C
D=0001FC9F2B06FCD8A767EFCB8
D=0001FC9F2B06FCD8A767EFCB8
D=0001FF9C2805FFDBA45C14F0C28855C5A0B3095D

.... sind das dann meine Nachrichten??

Oh... indeed :-O

https://gchq.github.io/CyberChef/#recipe=From_Hex('Auto')NOT()To_Hex('Space',0)&input=MDAwMTNENUU2QTQ3M0QxOUU2MUQwMkRFQjQ4NjU3RUZDQUIzMDc4Mg

Werde die mal durch meinen Algo schicken, ob diese sich sauber in ein Datagramm decodieren lassen.

Was muss ich denn nun genau tun, um daraus eine Nachricht zu bauen, die vom Modul 64_ESA2000.pm verarbeitet werden kann?

Dieses will ja einen Hexstring der Art S[A-F0-9]{34}.

Ich muss ja nun als erstes erreichen, dass ich diesen Hexbuffer erstmal invertiere, so dass ich einen 0xfffe.... Puffer bekommen und dann diese Custom-Rolling-XOR Routine drüber laufen lassen, wie es in CUL FW in C macht.

Wie mache ich das? Muss ich dazu ein neues Protokoll in Deinem Modul definieren das via Regex auf diese D=... Werte matcht und  dann dort eine Perl Funktion angeben, dass den XOR Decode macht und einen S.... String daraus bastelt und das dann sozusagen an das Modul 64_ESA2000.pm weiterreicht?

Gibt es hierfür ein Anfänger-kompatibles Beispiel? 

daubsi

Somit sind ja wirklich diese Maverick/Grothe Mistral Nachrichten in Wirklichkeit mein ESA2000, so wie Anfangs schon irgendwie vermutet...

2024.09.13 19:43:47 5: ESA2000 msg s014750011e0013e429001116390d01b3
2024.09.13 19:43:47 5: ESA2000 seq 01
2024.09.13 19:43:47 5: ESA2000 device 4750
2024.09.13 19:43:47 5: ESA2000 code 011e
2024.09.13 19:43:48 4: sduino/msg READ: ^BMC;LL=-509;LH=505;SL=-243;SH=254;D=00017714A07D4723EC2C21FDC8B2B79E7BB30845;C=251;L=160;R=241;s30;b1;^C
2024.09.13 19:43:48 4: sduino: Found manchester Protocol id 47 clock 251 RSSI = -81.5 -> Maverick
2024.09.13 19:43:48 5: sduino: extracted data 0000000000000001011101110001010010100000011111010100011100100011111011000010110000100001111111011100100010110010101101111001111001111011101100110000100001000101 (bin)
2024.09.13 19:43:48 5: sduino: protocol does not match return from method: (header not found)
2024.09.13 19:43:48 4: sduino: Found manchester Protocol id 96 clock 251 RSSI = -81.5 -> Grothe Mistral SE
2024.09.13 19:43:48 5: sduino: extracted data 0000000000000001011101110001010010100000011111010100011100100011111011000010110000100001111111011100100010110010101101111001111001111011101100110000100001000101 (bin)

0000000000000001011101110001010010100000011111010100011100100011111011000010110000100001111111011100100010110010101101111001111001111011101100110000100001000101 == ff fe 88 eb 5f 82 b8 dc 13 d3 de 02 37 4d 48 61 84 4c f7 ba  (https://gchq.github.io/CyberChef/#recipe=From_Binary('Space',8)NOT()To_Hex('Space',0)&input=MDAwMDAwMDAwMDAwMDAwMTAxMTEwMTExMDAwMTAxMDAxMDEwMDAwMDAxMTExMTAxMDEwMDAxMTEwMDEwMDAxMTExMTAxMTAwMDAxMDExMDAwMDEwMDAwMTExMTExMTAxMTEwMDEwMDAxMDExMDAxMDEwMTEwMTExMTAwMTExMTAwMTExMTAxMTEwMTEwMDExMDAwMDEwMDAwMTAwMDEwMQ)

Ralf9

Ja, da bei Maverick und Grothe Mistral SE der Clock auch passt, werden diese auch geprüft, es wird aber dann erkannt, dass diese nicht passen.

Bitte poste mal die Custom-Rolling-XOR Routine, diese muss dann noch nach Perl umgeschrieben werden

Bitte poste auch wie z.B. das "FF FE A4 8F E3 06 34 58 6F A1 87 AB C0 F1 98 1A 3F 4C F7 E7" nach der XOR Routine aussieht

Wie wird dann mit dem Ergebnis der Rolling-XOR Routine der Hexstring für das 64_ESA2000.pm Modul gemacht?
FHEM auf Cubietruck mit Igor-Image, SSD und  hmland + HM-CFG-USB-2,  HMUARTLGW Lan,   HM-LC-Bl1PBU-FM, HM-CC-RT-DN, HM-SEC-SC-2, HM-MOD-Re-8, HM-MOD-Em-8
HM-Wired:  HMW_IO_12_FM, HMW_Sen_SC_12_DR, Selbstbau IO-Module HBW_IO_SW
Maple-SIGNALduino, WH3080,  Hideki, Id 7

daubsi

Bitte sehr!

Die entstammt mehr oder weniger 1:1 der culfw 1.67, Datei rf_receive.c.
Für genau diesen Anwendungsfall kann man es sicher optimieren und ohne die ganzen globalen Variablen usw. auskommen, ich wollte aber erstmal einen funktionierenden Code haben...
 
#include <stdio.h>
#include <stdint.h>

#define MAXMSG 20
#define _BV(bit) (1 << (bit))

typedef struct {
  uint8_t hightime, lowtime;
} wave_t;


typedef struct {
  uint8_t state, byteidx, sync, bitidx;
  uint8_t data[MAXMSG];         // contains parity and checksum, but no sync
  wave_t zero, one;
} bucket_t;

typedef struct  {
  uint8_t *data;
  uint8_t byte, bit;
} input_t;

static uint8_t oby, obuf[MAXMSG], nibble; // parity-stripped output


uint8_t getbit(input_t *in);
uint8_t analyze_esa(bucket_t *b);
uint8_t getbits(input_t* in, uint8_t nbits, uint8_t msb);

int8_t goodone = -1;
bucket_t my_bucket;
// 2024.09.08 19:13:31 5: CUL_0: dispatch S584750011E0013357B002515903101B3
char *reference = "S584750011E0013357B002515903101B3";

// Strip the 0xff 0xfe at the beginning from the inverted de-manchestered input                   
uint8_t data[] =  { /* 0xFF,0xFE,*/ 0xA4,0x8F,0xE3,0x06,0x34,0x58,0x6F,0xA1,0x87,0xAB,0xC0,0xF1,0x98,0x1A,0x3F,0x4C,0xF7,0xE7};

int main(int argc, char **argv) {
    for (uint8_t idx = 0; idx<18; idx++) {
        my_bucket.data[idx] = data[idx];
   
    }
    my_bucket.state = 5;
    my_bucket.byteidx = 18;
    my_bucket.bitidx = 7;
    uint8_t result = 0;
    uint8_t temp = 0;
   
    if (analyze_esa(&my_bucket)) {
      printf("Reference: %s\n", reference);
      printf("My decode: S");
      for (uint8_t idx=0; idx<=oby; idx++) {
        printf("%02X", obuf[idx]);
      }
      printf("\n");
    }
}

uint8_t analyze_esa(bucket_t *b)
{
  input_t in;
  in.byte = 0;
  in.bit = 7;
  in.data = b->data;

  if (b->state != 5)
       return 0;

  if( (b->byteidx*8 + (7-b->bitidx)) != 144 ) {
       printf("Check: %d != 144\n", b->byteidx*8 + (7-b->bitidx));
       return 0;
  }

  //printf("Checks passed\n");
  uint8_t salt = 0x89;
  uint16_t crc = 0xf00f;
 
  for (oby = 0; oby < 15; oby++) {
       uint8_t byte = getbits(&in, 8, 1);     
       crc += byte;
       obuf[oby] = byte ^ salt;
       salt = byte + 0x24;
  }
 
  obuf[oby] = getbits(&in, 8, 1);
  crc += obuf[oby];
  obuf[oby++] ^= 0xff;
 
  crc -= (getbits(&in, 8, 1)<<8);
  crc -= getbits(&in, 8, 1);

  if (crc) {
    printf("Checksum fail :-()\n");
    return 0;
  }

  return 1;
}

uint8_t
getbits(input_t* in, uint8_t nbits, uint8_t msb)
{
  uint8_t ret = 0, i;
  for (i = 0; i < nbits; i++) {
    if (getbit(in) )
      ret = ret | _BV( msb ? nbits-i-1 : i );
  }
  return ret;
}


uint8_t
getbit(input_t *in)
{
  uint8_t bit = (in->data[in->byte] & _BV(in->bit)) ? 1 : 0;
  if(in->bit-- == 0) {
    in->byte++;
    in->bit=7;
  }
  return bit;
}


Ralf9

Danke.

Mir ist noch nicht klar was bei getbits das   
if (getbit(in) )
      ret = ret | _BV( msb ? nbits-i-1 : i );
macht? msb ist hier immer 1
FHEM auf Cubietruck mit Igor-Image, SSD und  hmland + HM-CFG-USB-2,  HMUARTLGW Lan,   HM-LC-Bl1PBU-FM, HM-CC-RT-DN, HM-SEC-SC-2, HM-MOD-Re-8, HM-MOD-Em-8
HM-Wired:  HMW_IO_12_FM, HMW_Sen_SC_12_DR, Selbstbau IO-Module HBW_IO_SW
Maple-SIGNALduino, WH3080,  Hideki, Id 7

daubsi

Das ist wie gesagt aus der rf_receive.c welche eine ganze Reihe von Inputs versucht zu matchen/decodieren. Vermutlich ist das einfach nur generisch geschrieben... Ggf. kann man es weglassen...

Der Kollege aus dem Internet hat das Programm wie folgt nach Perl konvertiert ;-)

#!/usr/bin/perl

#  https://chatgpt.com/c/66e499d5-ec38-8002-ab3d-cc4b482ec671


use strict;
use warnings;

# Konstanten definieren
use constant MAXMSG => 20;
use constant _BV    => sub { 1 << $_[0] };

# Struktur simulieren
my $my_bucket = {
    state   => 0,
    byteidx => 0,
    bitidx  => 0,
    data    => [],
};

my @obuf = (0) x MAXMSG;
my $oby = 0;
my $nibble;

# Demodulierte und invertierte Eingangs-Daten (strip 0xFF 0xFE)
my @data = (0xA4, 0x8F, 0xE3, 0x06, 0x34, 0x58, 0x6F, 0xA1, 0x87, 0xAB, 0xC0, 0xF1, 0x98, 0x1A, 0x3F, 0x4C, 0xF7, 0xE7);

# Referenz für die Ausgabe
my $reference = "S584750011E0013357B002515903101B3";

# Main
for my $idx (0 .. 17) {
    $my_bucket->{data}->[$idx] = $data[$idx];
}
$my_bucket->{state}   = 5;
$my_bucket->{byteidx} = 18;
$my_bucket->{bitidx}  = 7;

if (analyze_esa($my_bucket)) {
    print "Reference: $reference\n";
    print "My decode: S";
    for my $idx (0 .. $oby - 1) {
        printf "%02X", $obuf[$idx];
    }
    print "\n";
}

# Funktion zum Analysieren der Daten
sub analyze_esa {
    my ($b) = @_;
    my $in = {
        byte => 0,
        bit  => 7,
        data => $b->{data},
    };

    return 0 if $b->{state} != 5;

    if (($b->{byteidx} * 8 + (7 - $b->{bitidx})) != 144) {
        print "Check: ", ($b->{byteidx} * 8 + (7 - $b->{bitidx})), " != 144\n";
        return 0;
    }

    my $salt = 0x89;
    my $crc  = 0xf00f;

    for ($oby = 0; $oby < 15; $oby++) {
        my $byte = getbits($in, 8, 1);
        $crc += $byte;
        $obuf[$oby] = $byte ^ $salt;
        $salt = $byte + 0x24;
    }

    $obuf[$oby] = getbits($in, 8, 1);
    $crc += $obuf[$oby];
    $obuf[$oby++] ^= 0xff;

    $crc -= (getbits($in, 8, 1) << 8);
    $crc -= getbits($in, 8, 1);

    if ($crc) {
        print "Checksum fail :-(\n";
        return 0;
    }

    return 1;
}

# Funktion zum Holen von Bits
sub getbits {
    my ($in, $nbits, $msb) = @_;
    my $ret = 0;

    for my $i (0 .. $nbits - 1) {
        if (getbit($in)) {
            $ret |= _BV->($msb ? $nbits - $i - 1 : $i);
        }
    }

    return $ret;
}

# Funktion zum Holen eines Bits
sub getbit {
    my ($in) = @_;
    my $bit = ($in->{data}->[$in->{byte}] & _BV->($in->{bit})) ? 1 : 0;

    if ($in->{bit}-- == 0) {
        $in->{byte}++;
        $in->{bit} = 7;
    }

    return $bit;
}

Ralf9

#55
Danke, das macht es ein klein wenig einfacher.
Kann chatgpt c Routinen nach Perl wandeln?


Dann werde ich die Routinen erst mal so ausführen müssen um es zu verstehen, damit ich es ins 00_SIGNALduinoAdv.pm Modul einbauen kann.
Kann etwas dauern.

Die Protokolldefinition habe ich schon
    "216" => #
             #
             #
             #
      {
        name            => 'ESA2000',
        #comment         => '',
        changed         => '20240913 new',
        id              => '216',
        clockrange      => [240,260],     # min , max
        format          => 'manchester',
        #clientmodule    => 'ESA2000',
        #modulematch     => '',
        preamble        => 'S',
        length_min      => '153',
        length_max      => '160',
        method          => \&main::SIGNALduino_ESA2000, # Call to process this message
        polarity        => 'invert',
      }



FHEM auf Cubietruck mit Igor-Image, SSD und  hmland + HM-CFG-USB-2,  HMUARTLGW Lan,   HM-LC-Bl1PBU-FM, HM-CC-RT-DN, HM-SEC-SC-2, HM-MOD-Re-8, HM-MOD-Em-8
HM-Wired:  HMW_IO_12_FM, HMW_Sen_SC_12_DR, Selbstbau IO-Module HBW_IO_SW
Maple-SIGNALduino, WH3080,  Hideki, Id 7

daubsi

"Kann chatgpt c Routinen nach Perl wandeln?" - Aye, ich hab ihm gesagt er soll das folgende C Program 1:1 nach Perl konvertieren und darauf achten, dass es exakt das gleiche macht und verifizieren, dass die Berechnung korrekt ist und dann das Programm gepastet... hat auf Anhieb funktioniert... erschreckend...

Ich war aber vor allem auch angenehm überrascht, dass das Perl so gut lesbar war... Perl ist nicht so meins :-/

Als wäre das nicht schon genug, sehe ich dass rtl_433 ja bereits einen Decoder hatte, der nur deaktiviert war... Ich habe also meinen Decoder ganz umsonst entwickelt :-) Aber zumindest war er auch korrekt :-D

https://github.com/merbanan/rtl_433/blob/master/src/devices/esa.c

Denke dieser Code ist leichter verständlich ;-)

Ralf9

Wenn ich die Perl Routine von chatgpt in einem Perl online compiler ausführe passt es nicht:
Reference: S584750011E0013357B002515903101B3
My decode: S2D47501011E00133242000F1518DA601B3
FHEM auf Cubietruck mit Igor-Image, SSD und  hmland + HM-CFG-USB-2,  HMUARTLGW Lan,   HM-LC-Bl1PBU-FM, HM-CC-RT-DN, HM-SEC-SC-2, HM-MOD-Re-8, HM-MOD-Em-8
HM-Wired:  HMW_IO_12_FM, HMW_Sen_SC_12_DR, Selbstbau IO-Module HBW_IO_SW
Maple-SIGNALduino, WH3080,  Hideki, Id 7

Ralf9

Mit dem Code vom rtl_433 hab ichs hinbekommen.

Ich kann noch ein paar Nachrichten von cul und sduino brauchen zum testen.

Z.B.
CUL_Parse: CUL_0 S3F4750011E0013DF44001116352801B303 -72.5
MC;LL=-514;LH=505;SL=-247;SH=261;D=000A4B137259C8AF130BCAA907579F3E159840E0;C=254;L=157;R=241;s24;b1;
FHEM auf Cubietruck mit Igor-Image, SSD und  hmland + HM-CFG-USB-2,  HMUARTLGW Lan,   HM-LC-Bl1PBU-FM, HM-CC-RT-DN, HM-SEC-SC-2, HM-MOD-Re-8, HM-MOD-Em-8
HM-Wired:  HMW_IO_12_FM, HMW_Sen_SC_12_DR, Selbstbau IO-Module HBW_IO_SW
Maple-SIGNALduino, WH3080,  Hideki, Id 7

daubsi

Gerne doch!

2024.09.14 10:47:30 5: CUL_0: dispatch S664750011E0013F4960010164E2801B3
2024.09.14 10:47:30 5: ESA2000 msg s664750011e0013f4960010164e2801b3
2024.09.14 10:47:30 5: ESA2000 seq 66
2024.09.14 10:47:30 5: ESA2000 device 4750
2024.09.14 10:47:30 5: ESA2000 code 011e
2024.09.14 10:47:30 4: sduino/msg READ: ^BMC;LL=-511;LH=501;SL=-255;SH=236;D=000442AF5ECA41B16F0C279746EF6675E2CC25E4;C=250;L=158;R=241;s30;b5;^C
2024.09.14 10:47:30 4: sduino: Found manchester Protocol id 47 clock 250 RSSI = -81.5 -> Maverick
2024.09.14 10:47:30 5: sduino: extracted data 0000000000000100010000101010111101011110110010100100000110110001011011110000110000100111100101110100011011101111011001100111010111100010110011000010010111100100 (bin)
2024.09.14 10:47:30 5: sduino: protocol does not match return from method: (header not found)
2024.09.14 10:47:30 4: sduino: Found manchester Protocol id 96 clock 250 RSSI = -81.5 -> Grothe Mistral SE
2024.09.14 10:47:30 5: sduino: extracted data 0000000000000100010000101010111101011110110010100100000110110001011011110000110000100111100101110100011011101111011001100111010111100010110011000010010111100100 (bin)
2024.09.14 10:47:30 5: sduino: protocol does not match return from method: (Start pattern (01000111) not found)
...
2024.09.14 10:50:18 5: CUL_0: dispatch S674750011E0013F4A4000E164E3801B3
2024.09.14 10:50:18 5: ESA2000 msg s674750011e0013f4a4000e164e3801b3
2024.09.14 10:50:18 5: ESA2000 seq 67
2024.09.14 10:50:18 5: ESA2000 device 4750
2024.09.14 10:50:18 5: ESA2000 code 011e
2024.09.14 10:50:19 4: sduino/msg READ: ^BMC;LL=-507;LH=504;SL=-250;SH=246;D=000111AAD6B3916D5AC23A16FCCEE4F8D5B309DC;C=251;L=160;R=243;s30;b1;^C
2024.09.14 10:50:19 4: sduino: Found manchester Protocol id 47 clock 251 RSSI = -80.5 -> Maverick
2024.09.14 10:50:19 5: sduino: extracted data 0000000000000001000100011010101011010110101100111001000101101101010110101100001000111010000101101111110011001110111001001111100011010101101100110000100111011100 (bin)
2024.09.14 10:50:19 5: sduino: protocol does not match return from method: (header not found)
2024.09.14 10:50:19 4: sduino: Found manchester Protocol id 96 clock 251 RSSI = -80.5 -> Grothe Mistral SE
2024.09.14 10:50:19 5: sduino: extracted data 0000000000000001000100011010101011010110101100111001000101101101010110101100001000111010000101101111110011001110111001001111100011010101101100110000100111011100 (bin)
2024.09.14 10:50:19 5: sduino: protocol does not match return from method: (Start pattern (01000111) not found)

...
2024.09.14 10:52:53 5: CUL_0: dispatch SE84750011E0013F4B1000D164E4801B3
2024.09.14 10:52:53 5: ESA2000 msg se84750011e0013f4b1000d164e4801b3
2024.09.14 10:52:53 5: ESA2000 seq e8
2024.09.14 10:52:53 5: ESA2000 device 4750
2024.09.14 10:52:53 5: ESA2000 code 011e
2024.09.14 10:52:54 4: sduino/keepalive ok, retry = 0
2024.09.14 10:53:32 4: sduino/msg READ: ^BMC;LL=-511;LH=495;SL=-259;SH=247;D=9CB30771EA4920F7D62AAC02E1A83D6E0CE5983A78;C=251;L=165;R=243;s1;b1;^C
2024.09.14 10:53:32 4: sduino: Found manchester Protocol id 47 clock 251 RSSI = -80.5 -> Maverick
2024.09.14 10:53:32 5: sduino: extracted data 100111001011001100000111011100011110101001001001001000001111011111010110001010101010110000000010111000011010100000111101011011100000110011100101100110000011101001111000 (bin)
2024.09.14 10:53:32 5: sduino: protocol does not match return from method: (header not found)
2024.09.14 10:53:32 4: sduino: Found manchester Protocol id 96 clock 251 RSSI = -80.5 -> Grothe Mistral SE
2024.09.14 10:53:32 5: sduino: extracted data 100111001011001100000111011100011110101001001001001000001111011111010110001010101010110000000010111000011010100000111101011011100000110011100101100110000011101001111000 (bin)
2024.09.14 10:53:32 5: sduino: protocol does not match return from method: (Start pattern (01000111) not found)

...
2024.09.14 10:57:17 5: CUL_0: dispatch S6A4750011E0013F4C7000A164E6201B3
2024.09.14 10:57:17 5: ESA2000 msg s6a4750011e0013f4c7000a164e6201b3
2024.09.14 10:57:17 5: ESA2000 seq 6a
2024.09.14 10:57:17 5: ESA2000 device 4750
2024.09.14 10:57:17 5: ESA2000 code 011e
2024.09.14 10:57:18 4: sduino/msg READ: ^BMC;LL=-503;LH=507;SL=-258;SH=243;D=011CBFCBA69C7847D774502614BEF8D5B308BA;C=251;L=152;R=241;s30;b17;^C
2024.09.14 10:57:18 4: sduino: Found manchester Protocol id 47 clock 251 RSSI = -81.5 -> Maverick
2024.09.14 10:57:18 5: sduino: extracted data 00000001000111001011111111001011101001101001110001111000010001111101011101110100010100000010011000010100101111101111100011010101101100110000100010111010 (bin)
2024.09.14 10:57:18 5: sduino: protocol does not match return from method: (header not found)
2024.09.14 10:57:18 4: sduino: Found manchester Protocol id 96 clock 251 RSSI = -81.5 -> Grothe Mistral SE
2024.09.14 10:57:18 5: sduino: extracted data 00000001000111001011111111001011101001101001110001111000010001111101011101110100010100000010011000010100101111101111100011010101101100110000100010111010 (bin)
2024.09.14 10:57:18 5: sduino: protocol does not match return from method: (Start pattern (01000111) not found)
...
2024.09.14 11:00:13 5: CUL_0: dispatch S6B4750011E0013F4D6000F164E7401B3
2024.09.14 11:00:13 5: ESA2000 msg s6b4750011e0013f4d6000f164e7401b3
2024.09.14 11:00:13 5: ESA2000 seq 6b
2024.09.14 11:00:13 5: ESA2000 device 4750
2024.09.14 11:00:13 5: ESA2000 code 011e
2024.09.14 11:00:13 4: sduino/msg READ: ^BMC;LL=-503;LH=502;SL=-255;SH=253;D=ECAA79D7946D6644013F99B03DEB3085D;C=252;L=132;R=241;s5;b0;^C
2024.09.14 11:00:13 4: sduino: Found manchester Protocol id 47 clock 252 RSSI = -81.5 -> Maverick
2024.09.14 11:00:13 5: sduino: extracted data 111011001010101001111001110101111001010001101101011001100100010000000001001111111001100110110000001111011110101100110000100001011101 (bin)
2024.09.14 11:00:13 5: sduino: protocol does not match return from method: (header not found)
2024.09.14 11:00:13 4: sduino: Found manchester Protocol id 96 clock 252 RSSI = -81.5 -> Grothe Mistral SE
2024.09.14 11:00:13 5: sduino: extracted data 111011001010101001111001110101111001010001101101011001100100010000000001001111111001100110110000001111011110101100110000100001011101 (bin)
2024.09.14 11:00:13 5: sduino: protocol does not match return from method: (Start pattern (01000111) not found)