[fixed] Dispatch-Funktion bei Signalduino u. IT V3 mit freezes

Begonnen von KölnSolar, 08 Januar 2022, 21:54:58

Vorheriges Thema - Nächstes Thema

KölnSolar

Hi Ralf,

freezemon zeigt mir in meinem Testsystem andauernd freezes zwischen dispatch und Verarbeitung von 3-4s an. So richtig glauben konnte ich es nicht. mit verbose=5 gelogged ist es scheinbar tatsächlich so. Ne Idee woran das liegen könnte ? Hier noch ein Log zu einem IT V3 Bwm
2022.01.08 21:09:51 4: Sduino/msg READredu: MU;P0=-273;P1=249;P2=-1070;P3=-9472;P4=-2564;CP=1;R=29;D=01212101314101210121012121012101012121012101012101210121210101210121210101210121210101210121012101212101012121010121012121012101012101212101;e;
2022.01.08 21:09:51 4: Sduino: Fingerprint for MU Protocol id 17.1 -> Intertechno matches, trying to demodulate
2022.01.08 21:09:51 5: Sduino: Starting demodulation (StartStr: 4 cut Pos 10; Signal: (?:1210|1012){28,} Pos 0) length_min_max (28..36) length=32
2022.01.08 21:09:51 5: Sduino: applying postDemodulation , value before : 0 0 0 1 1 0 1 1 0 0 0 1 0 0 1 0 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1
2022.01.08 21:09:51 5: Sduino: rcode=1, modified after postDemodulation: 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 0 1 0 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0
2022.01.08 21:09:51 5: Sduino: dispatching bits: 0101011010011010010101100101100101100101010110011001011010010110
2022.01.08 21:09:51 4: Sduino: decoded matched MU Protocol id 17.1 dmsg i569A565965599696 length 64 RSSI = -59.5
2022.01.08 21:09:51 4: Sduino: equalDMS i569A565965599696 (1)
2022.01.08 21:09:51 5: Sduino Dispatch: i569A565965599696, test ungleich: disabled
2022.01.08 21:09:51 4: Sduino Dispatch: i569A565965599696, -59.5 dB, dispatch
2022.01.08 21:09:51 5: Sduino: dispatch i569A565965599696
************************* 4s Verzug ****************************************
2022.01.08 21:09:55 4: Sduino IT: message "i569A565965599696" (17)
2022.01.08 21:09:55 4: Sduino ITv3: bin message "0101011010011010010101100101100101100101010110011001011010010110" (64)
2022.01.08 21:09:55 4: Sduino IT: msgcode "00011011000100100100001010011001" (32) bin = 0101011010011010010101100101100101100101010110011001011010010110
2022.01.08 21:09:55 3: Sduino IT: IT_V3_d892149 on->on
2022.01.08 21:09:55 4: Sduino: Fingerprint for MU Protocol id 29 -> HT12e remote matches, trying to demodulate
2022.01.08 21:09:55 5: Sduino: regex ((?:31)((?:01|01){12,})) did not match, aborting
2022.01.08 21:09:55 5: Sduino applied filterfunc: SIGNALduino_compPattern, count=0
2022.01.08 21:09:55 4: Sduino: Fingerprint for MU Protocol id 61 -> FS10 matches, trying to demodulate
2022.01.08 21:09:55 5: Sduino: Starting demodulation (Signal: (?:12|10){30,} Pos 11) length_min_max (30..48) length=64
2022.01.08 21:09:55 5: Sduino: skip demodulation (length 64 is to long)
2022.01.08 21:09:55 4: Sduino: Fingerprint for MU Protocol id 70 -> FHT80TF matches, trying to demodulate
2022.01.08 21:09:55 5: Sduino: regex ((?:)((?:10|10){50,})) did not match, aborting
2022.01.08 21:09:55 4: Sduino: Fingerprint for MU Protocol id 73 -> FHT80 matches, trying to demodulate
2022.01.08 21:09:55 5: Sduino: regex ((?:)((?:10|10){59,})) did not match, aborting
2022.01.08 21:09:55 4: Sduino: Fingerprint for MU Protocol id 74 -> FS20 matches, trying to demodulate
2022.01.08 21:09:55 5: Sduino: regex ((?:)((?:10|10){50,})) did not match, aborting
2022.01.08 21:09:55 4: Sduino: Fingerprint for MU Protocol id 78 -> BeSmart_Sx matches, trying to demodulate
2022.01.08 21:09:55 5: Sduino: regex ((?:4)((?:10|10){19,}(?:1)?)) did not match, aborting
2022.01.08 21:09:55 4: Sduino: Fingerprint for MU Protocol id 80 -> EM1000WZ matches, trying to demodulate
2022.01.08 21:09:55 5: Sduino: regex ((?:)((?:12|10){104,})) did not match, aborting
2022.01.08 21:09:55 4: Sduino: Fingerprint for MU Protocol id 95 -> Techmar matches, trying to demodulate
2022.01.08 21:09:55 5: Sduino: regex ((?:12)((?:10|10){50,})) did not match, aborting
2022.01.08 21:09:55 4: Sduino: Fingerprint for MU Protocol id 99 -> Navaris 44344.04 matches, trying to demodulate
2022.01.08 21:09:55 5: Sduino: regex ((?:10)((?:10|10){24,})) did not match, aborting
2022.01.08 21:09:55 3: [Freezemon] freezedetect: possible freeze starting at 21:09:52, delay is 3.687 possibly caused by: tmr-SamsungAV_Init(Fernseher) tmr-SamsungAV_Init(Fernseher2) tmr-SIGNALduino_KeepAlive(Sduino)


oder einem Oregon
2022.01.08 21:16:31.648 4: Sduino/msg READ: MC;LL=-1069;LH=894;SL=-538;SH=384;D=AAAAAAAA66959A65555969AA5599699555556955A6A55A65;C=480;L=192;R=87;s1;b1;O;w;
2022.01.08 21:16:31.652 4: Sduino: Found manchester Protocol id 10 clock 480 RSSI = -30.5 -> Oregon Scientific v2|v3
2022.01.08 21:16:31.653 5: Sduino: extracted data 010101010101010101010101010101011001100101101010011001011001101010101010101001101001011001010101101010100110011010010110011010101010101010101010100101101010101001011001010110101010010110011010 (bin)
2022.01.08 21:16:31.654 4: Sduino: OSV2 protocol detected: preamble_pos = 32
2022.01.08 21:16:31.656 4: Sduino: OSV2 protocol converted to hex: (501A2D40F6501600063B2C) with length (88) bits
2022.01.08 21:16:31.657 5: Sduino Dispatch: 501A2D40F6501600063B2C, test ungleich: disabled
2022.01.08 21:16:31.658 4: Sduino Dispatch: 501A2D40F6501600063B2C, -30.5 dB, dispatch
2022.01.08 21:16:31.661 5: Sduino: dispatch 501A2D40F6501600063B2C
***********************3,5 s Verzug **************************************
2022.01.08 21:16:35.179 5: OREGON: decoding delay=8 hex=501A2D40F6501600063B2C
2022.01.08 21:16:35.180 5: OREGON: sensor_id=1a2d BitsMsg=80 Bits=80
2022.01.08 21:16:35.181 5: OREGON: checksum2 = 59 berechnet: 59
2022.01.08 21:16:35.207 4: Sduino: Found manchester Protocol id 12 clock 480 RSSI = -30.5 -> Hideki
2022.01.08 21:16:35.208 5: Sduino: extracted data 010101010101010101010101010101011001100101101010011001011001101010101010101001101001011001010101101010100110011010010110011010101010101010101010100101101010101001011001010110101010010110011010 (bin)
2022.01.08 21:16:35.210 5: Sduino: protocol does not match return from method: (Start pattern (10101110) not found)
2022.01.08 21:16:35.211 4: Sduino: Found manchester Protocol id 52 clock 480 RSSI = -30.5 -> Oregon Scientific PIR
2022.01.08 21:16:35.212 5: Sduino: extracted data 010101010101010101010101010101011001100101101010011001011001101010101010101001101001011001010101101010100110011010010110011010101010101010101010100101101010101001011001010110101010010110011010 (bin)
2022.01.08 21:16:35.214 5: Sduino: protocol does not match return from method: ( header not found)
2022.01.08 21:16:35.214 4: Sduino: Found manchester Protocol id 58 clock 480 RSSI = -30.5 -> TFA 30.3208.0
2022.01.08 21:16:35.215 5: Sduino: extracted data 010101010101010101010101010101011001100101101010011001011001101010101010101001101001011001010101101010100110011010010110011010101010101010101010100101101010101001011001010110101010010110011010 (bin)
2022.01.08 21:16:35.216 5: Sduino: protocol does not match return from method: (undef)
2022.01.08 21:16:35.227 3: [Freezemon] freezedetect: possible freeze starting at 21:16:32, delay is 3.223 possibly caused by: no bad guy found :-(


Ggfs. könnte ich den Signalduino gegen einen 433CUL mit aculfw zum Vergleich mal tauschen, denn eigentlich liegt ja zwischen Signalduino und der Verarbeitung des Signals die Dispatchfunktion, die sich bei beiden gleich verhalten sollte.

Grüße Markus
RPi3/2 buster/stretch-SamsungAV_E/N-RFXTRX-IT-RSL-NC5462-Oregon-CUL433-GT-TMBBQ-01e-CUL868-FS20-EMGZ-1W(GPIO)-DS18B20-CO2-USBRS232-USBRS422-Betty_Boop-EchoDot-OBIS(Easymeter-Q3/EMH-KW8)-PCA301(S'duino)-Deebot(mqtt2)-zigbee2mqtt

Ralf9

Hallo Markus,

kann ich bei mir nicht nachvollziehen

2022.01.08 22:26:25 4 : sduino/msg READredu: MS;P0=-1094;P2=314;P4=1010;P5=-414;P6=-11181;D=26204520202020202020202020202020202020204520452045;CP=2;SP=6;R=68;e;m1;
2022.01.08 22:26:25 4 : sduino: Matched MS Protocol id 3 -> itv1, bitLen=24
2022.01.08 22:26:25 4 : sduino: Decoded MS Protocol id 3 dmsg i400015 length 24 RSSI = -40
2022.01.08 22:26:25 4 : sduino Dispatch: i400015, -40 dB, dispatch
2022.01.08 22:26:25 4 : sduino IT: message "i400015" (7)
2022.01.08 22:26:25 4 : sduino IT: msgcode "F00000000FFF" (12) bin = 010000000000000000010101
2022.01.08 22:26:25 3 : sduino IT: IT_F00000000F_ITV1 on->on
2022-01-08 22:26:25 IT IT_F00000000F_ITV1 on
2022-01-08 22:26:25 IT IT_F00000000F_ITV1 RAWMSG: MS;P0=-1094;P2=314;P4=1010;P5=-414;P6=-11181;D=26204520202020202020202020202020202020204520452045;CP=2;SP=6;R=68;e;m1;
2022-01-08 22:26:25 IT IT_F00000000F_ITV1 DMSG: i400015
2022-01-08 22:26:25 IT IT_F00000000F_ITV1 Protocol_ID: 3
2022-01-08 22:26:25 IT IT_F00000000F_ITV1 RSSI: -40


2022.01.08 22:29:19 4 : sduino/msg READredu: MS;P1=482;P2=-1956;P3=-968;P4=-3890;D=14121313121312131212131313131313131212131213121312121212121313121312131213;CP=1;SP=4;R=8;O;m1;
2022.01.08 22:29:19 4 : sduino: Matched MS Protocol id 7 -> weatherID7, bitLen=36
2022.01.08 22:29:19 4 : sduino: Decoded MS Protocol id 7 dmsg P7#9580D5F2A length 36 RSSI = -70
2022.01.08 22:29:19 4 : sduino Dispatch: P7#9580D5F2A, -70 dB, dispatch
2022.01.08 22:29:19 4 : sduino SD_WS07: P7#9580D5F2A, length=9
2022.01.08 22:29:19 4 : sduino SD_WS07: model=SD_WS07_TH, id=95, channel=1, temp=21.3, hum=42, bat=ok
2022-01-08 22:29:19 SD_WS07 SD_WS07_TH_1 T: 21.3 H: 42


Gruß Ralf
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

KölnSolar

Hi Ralf,
das dachte ich mir. Ich glaube auch nicht, dass es am Modul liegt sondern an der dispatch-Funktion. Und an der selber wahrscheinlich auch nicht, sondern einer Besonderheit meines Testsystems. Ich ändere mal den Betreff.

Du kennst den dispatch-Prozess aber besser als ich und hast vielleicht eine Idee, wo ich weiter auf die Suche gehen kann.

Der Hintergrund bei mir ist, dass mein in der Entwicklung befindliches UPNP/DLNA Thema definitiv freezes verursacht. Wenn dann gleichzeitig noch eine weitere Fehlerquelle dazwischen funkt(im wahrsten Sinne des Wortes  ;D), ist eine Analyse für mich unmöglich(zumal die freezes durch UPNP/DLNA tw. nur User-Meldungen sind, auf deren System ich nicht zugreifen kann  :'( ) Will heißen: Ich muss freezes in meinem Modul entweder definitiv ausschließen oder wenigstens die Konstellationen kennen).

Grüße Markus
RPi3/2 buster/stretch-SamsungAV_E/N-RFXTRX-IT-RSL-NC5462-Oregon-CUL433-GT-TMBBQ-01e-CUL868-FS20-EMGZ-1W(GPIO)-DS18B20-CO2-USBRS232-USBRS422-Betty_Boop-EchoDot-OBIS(Easymeter-Q3/EMH-KW8)-PCA301(S'duino)-Deebot(mqtt2)-zigbee2mqtt

Ralf9

ZitatDer Hintergrund bei mir ist, dass mein in der Entwicklung befindliches UPNP/DLNA Thema definitiv freezes verursacht.
Will heißen: Ich muss freezes in meinem Modul entweder definitiv ausschließen oder wenigstens die Konstellationen kennen
Du solltest die freezes wegbekommen.
Beim Signalduino können dadurch bei slowrf (ASK) empfangene Nachrichten verloren gehen.
Bei einigen Protokollen sind die MU-Nachrichten sehr lang (z.B. bei der ID 9, WH3080 bis zu ca 450 Zeichen). Nachrichten die kurz danach empfangen werden, können bei freezes verloren gehen.

Du kannst ja mal bei "FHEM - Entwicklung - FHEM Development" nachfragen ob da jemand eine Idee hat, wie man die freezes wegbekommt
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

KölnSolar

1 Schritt weiter. Es liegt in der Dispatch-Funktion, wo die client-module über 2 verschachtelte Schleifen ermittelt werden. Die äußere über alle Module(nur über wirklich 2-stufige würde schon erheblich performance bringen. Geht das über clientArray ?). Die Innere über $hash->{Clients}. Hier sehe ich 10% Gewinn, wenn die Leerzeilen rausgenommen werden:
my $clientsSIGNALduino = ":IT:"
."CUL_TCM97001:"
."SD_RSL:"
."OREGON:"
."CUL_TX:"
."SD_AS:"
."Hideki:"
."SD_WS07:"
."SD_WS09:"
." :" # Zeilenumbruch
."SD_WS:"
."RFXX10REC:"
."Dooya:"
."SOMFY:"
."SD_BELL:" ## bells
."SD_UT:" ## universal - more devices with different protocols
        ."SD_WS_Maverick:"
        ."FLAMINGO:"
        ."CUL_WS:"
        ."Revolt:"
        ."FS10:"
." :" # Zeilenumbruch
        ."CUL_FHTTK:"
        ."Siro:"
."FHT:"
."FS20:"
."CUL_EM:"
."Fernotron:"
."SD_Keeloq:"
."SD_GT:"
."LaCrosse:"
."KOPP_FC:"
."PCA301:"
."SD_Rojaflex:"
."SD_Tool:"
      ."SIGNALduino_un:"
;

So sieht das auf meinem sonst gelangweilten Rpi2B+ aus, wo der freeze sich durch die tausenden zusätzlichen Logzeilen auf 25s ausgedehnt hat:

2022.01.09 18:39:13 5: Sduino Dispatch: P61#B2CAB32D2C, test ungleich: disabled
2022.01.09 18:39:13 4: Sduino Dispatch: P61#B2CAB32D2C, -61.5 dB, dispatch
2022.01.09 18:39:13 5: Sduino: dispatch P61#B2CAB32D2C
2022.01.09 18:39:13 5: SYSTEM: run dispatch
2022.01.09 18:39:13 5: SYSTEM: run dispatch not duplicate
2022.01.09 18:39:13 5: SYSTEM: run dispatch no clientArray
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray no ClientsKeepOrder
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray outer foreach Global
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach IT
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach CUL_TCM97001
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach SD_RSL
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach OREGON
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach CUL_TX
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach SD_AS
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach Hideki
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach SD_WS07
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach SD_WS09
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach 
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach SD_WS
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach RFXX10REC
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach Dooya
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach SOMFY
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach SD_BELL
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach SD_UT
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach SD_WS_Maverick
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach FLAMINGO
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach CUL_WS
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach Revolt
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach FS10
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach 
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach CUL_FHTTK
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach Siro
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach FHT
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach FS20
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach CUL_EM
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach Fernotron
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach SD_Keeloq
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach SD_GT
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach LaCrosse
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach KOPP_FC
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach PCA301
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach SD_Rojaflex
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach SD_Tool
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach SIGNALduino_un
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray outer foreach CM11
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach
2022.01.09 18:39:13 5: SYSTEM: run dispatch computeclientArray inner foreach IT
.
.
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray outer foreach myUtils
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach IT
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach CUL_TCM97001
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach SD_RSL
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach OREGON
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach CUL_TX
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach SD_AS
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach Hideki
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach SD_WS07
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach SD_WS09
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach 
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach SD_WS
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach RFXX10REC
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach Dooya
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach SOMFY
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach SD_BELL
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach SD_UT
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach SD_WS_Maverick
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach FLAMINGO
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach CUL_WS
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach Revolt
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach FS10
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach 
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach CUL_FHTTK
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach Siro
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach FHT
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach FS20
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach CUL_EM
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach Fernotron
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach SD_Keeloq
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach SD_GT
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach LaCrosse
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach KOPP_FC
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach PCA301
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach SD_Rojaflex
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach SD_Tool
2022.01.09 18:39:38 5: SYSTEM: run dispatch computeclientArray inner foreach SIGNALduino_un
2022.01.09 18:39:38 5: SYSTEM: run dispatch clientArray computed
2022.01.09 18:39:38 5: SYSTEM: run dispatch not duplicate
2022.01.09 18:39:38 5: Sduino: FS10_Parse Protocol 61, rawData B2CAB32D2C
2022.01.09 18:39:38 5: Sduino: FS10_Parse rawBitData 1011001011001010101100110010110100101100 (40)
2022.01.09 18:39:38 5: Sduino: FS10_Parse preamble 0 bit, bitData=1011001011001010101100110010110100101100 (40 bit)
2022.01.09 18:39:38 4: Sduino: FS10_Parse P61#B2CAB32D2C - ERROR parity/bit5 8 errors
2022.01.09 18:39:38 5: SYSTEM: run dispatch module found
2022.01.09 18:39:38 5: SYSTEM: run dispatch: inform raw
2022.01.09 18:39:38 4: Sduino: Fingerprint for MU Protocol id 70 -> FHT80TF matches, trying to demodulate
2022.01.09 18:39:38 5: Sduino: regex ((?:)((?:10|10){50,})) did not match, aborting
2022.01.09 18:39:38 4: Sduino: Fingerprint for MU Protocol id 73 -> FHT80 matches, trying to demodulate
2022.01.09 18:39:38 5: Sduino: regex ((?:)((?:10|10){59,})) did not match, aborting
2022.01.09 18:39:38 4: Sduino: Fingerprint for MU Protocol id 74 -> FS20 matches, trying to demodulate
2022.01.09 18:39:38 5: Sduino: regex ((?:)((?:10|10){50,})) did not match, aborting
2022.01.09 18:39:38 4: Sduino: Fingerprint for MU Protocol id 78 -> BeSmart_Sx matches, trying to demodulate
2022.01.09 18:39:38 5: Sduino: regex ((?:4)((?:10|10){19,}(?:1)?)) did not match, aborting
2022.01.09 18:39:38 4: Sduino: Fingerprint for MU Protocol id 80 -> EM1000WZ matches, trying to demodulate
2022.01.09 18:39:38 5: Sduino: regex ((?:)((?:12|10){104,})) did not match, aborting
2022.01.09 18:39:38 4: Sduino: Fingerprint for MU Protocol id 95 -> Techmar matches, trying to demodulate
2022.01.09 18:39:38 5: Sduino: regex ((?:12)((?:10|10){50,})) did not match, aborting
2022.01.09 18:39:38 4: Sduino: Fingerprint for MU Protocol id 99 -> Navaris 44344.04 matches, trying to demodulate
2022.01.09 18:39:38 5: Sduino: regex ((?:10)((?:10|10){24,})) did not match, aborting
2022.01.09 18:39:38 2: [Freezemon] freezedetect: possible freeze starting at 18:39:14, delay is 24.531 possibly caused by: tmr-FW_closeInactiveClients(N/A)


Lässt sich da was machen ? Muss Rudi evtl. ran ?

Grüße Markus
RPi3/2 buster/stretch-SamsungAV_E/N-RFXTRX-IT-RSL-NC5462-Oregon-CUL433-GT-TMBBQ-01e-CUL868-FS20-EMGZ-1W(GPIO)-DS18B20-CO2-USBRS232-USBRS422-Betty_Boop-EchoDot-OBIS(Easymeter-Q3/EMH-KW8)-PCA301(S'duino)-Deebot(mqtt2)-zigbee2mqtt

Ralf9

Mit der Dispatch-Funktion habe ich mich noch nicht näher befasst, da kann ich leider nicht weiterhelfen
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

KölnSolar

#6
ZitatMit der Dispatch-Funktion habe ich mich noch nicht näher befasst
Ich aber jetzt.  ;)
Das
ZitatGeht das über clientArray
ist der Schlüssel. Das hat Rudi schon eingebaut. Im Internal .clientArray stehen nach der 1. Ermittlung(also ein einziger freeze) die clients.

Das Problem ist, dass das Internal unter gewissen Umständen gelöscht wird und danach gibt es wieder einen freeze.

Das sieht dann bei mir permanent durch den IT V3 Bwm so aus
2022.01.09 20:32:47 3: Sduino IT: IT_V3_d892149 off->on
2022.01.09 20:32:47 3: Sduino IT: message "i569A56596559968" (16) too short!
2022.01.09 20:32:47 3: Sduino IT: message "i569A56596559968" (16) too short!
2022.01.09 20:32:47 2: SYSTEM : clientArray deleted
2022.01.09 20:32:47 3: Sduino: Unknown code i569A56596559968, help me!
2022.01.09 20:32:48 2: SYSTEM : run dispatch no clientArray ==> computeclientArray(cause for freezes) .clientArray:
2022.01.09 20:32:51 3: Sduino IT: message "i569A56596559969" (16) too short!
2022.01.09 20:32:51 3: Sduino IT: message "i569A56596559969" (16) too short!
2022.01.09 20:32:51 2: SYSTEM : clientArray deleted
2022.01.09 20:32:51 3: Sduino: Unknown code i569A56596559969, help me!
2022.01.09 20:32:51 2: SYSTEM : run dispatch no clientArray ==> computeclientArray(cause for freezes) .clientArray:
2022.01.09 20:32:55 3: Sduino IT: IT_V3_d892149 on->on
2022.01.09 20:32:55 3: Sduino IT: IT_V3_d892149 on->on
2022.01.09 20:32:55 3: [Freezemon] freezedetect: possible freeze starting at 20:32:52, delay is 3.764 possibly caused by: no bad guy found :-(
2022.01.09 20:32:55 3: Sduino IT: message "i569A56596559969" (16) too short!
2022.01.09 20:32:55 3: Sduino IT: message "i569A56596559969" (16) too short!
2022.01.09 20:32:55 2: SYSTEM : clientArray deleted
2022.01.09 20:32:56 3: Sduino: Unknown code i569A56596559969, help me!
2022.01.09 20:32:59 2: SYSTEM : run dispatch no clientArray ==> computeclientArray(cause for freezes) .clientArray:
2022.01.09 20:33:09 3: Sduino IT: IT_V3_d892149 on->off
2022.01.09 20:33:09 3: Sduino IT: message "i569A56596559959" (16) too short!
2022.01.09 20:33:09 3: Sduino IT: message "i569A56596559959" (16) too short!
2022.01.09 20:33:09 2: SYSTEM : clientArray deleted
2022.01.09 20:33:09 3: Sduino: Unknown code i569A56596559959, help me!
2022.01.09 20:33:10 2: SYSTEM : run dispatch no clientArray ==> computeclientArray(cause for freezes) .clientArray:
2022.01.09 20:33:13 3: Sduino IT: IT_V3_d892149 off->off
2022.01.09 20:33:14 3: Sduino IT: IT_V3_d892149 off->off
2022.01.09 20:33:14 3: Sduino IT: message "i569A56596559959" (16) too short!
2022.01.09 20:33:14 3: Sduino IT: message "i569A56596559959" (16) too short!
2022.01.09 20:33:14 2: SYSTEM : clientArray deleted
2022.01.09 20:33:14 3: Sduino: Unknown code i569A56596559959, help me!
2022.01.09 20:33:14 2: SYSTEM : run dispatch no clientArray ==> computeclientArray(cause for freezes) .clientArray:
2022.01.09 20:33:18 3: Sduino IT: IT_V3_d892149 off->off
2022.01.09 20:33:18 3: [Freezemon] freezedetect: possible freeze starting at 20:33:15, delay is 3.208 possibly caused by: no bad guy found :-(

Wir müssten dem Sduino bzw. dem IT-Modul also die Meldung abgewöhnen(der Bwm ist ein Original IT). Dazu ne Idee ?

Edit: Warum auch immer werden die letzten 4 bits "verschluckt" i569A565965599596
RPi3/2 buster/stretch-SamsungAV_E/N-RFXTRX-IT-RSL-NC5462-Oregon-CUL433-GT-TMBBQ-01e-CUL868-FS20-EMGZ-1W(GPIO)-DS18B20-CO2-USBRS232-USBRS422-Betty_Boop-EchoDot-OBIS(Easymeter-Q3/EMH-KW8)-PCA301(S'duino)-Deebot(mqtt2)-zigbee2mqtt

Ralf9

Kommt diese Meldung auch beim dispatch vom oregon Modul?
2022.01.09 20:32:47 2: SYSTEM : clientArray deleted

Was muß ich machen damit die SYSTEM  Meldungen im log angezeigt werden?
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

KölnSolar

ZitatKommt diese Meldung auch beim dispatch vom oregon Modul?
Ich denke nicht. Dass ich eingangs ein Bsp. für einen freeze beim Oregon hatte, lag sicherlich nur daran, dass zuvor vom Bwm das Internal gelöscht wurde.

ZitatWas muß ich machen damit die SYSTEM  Meldungen im log angezeigt werden?
Ich hab vor dem bedingten call der Funktion eine zusätzliche Logging-Zeile sub
Dispatch($$;$$)
{
  my ($hash, $dmsg, $addvals, $nounknown) = @_;
  my $module = $modules{$hash->{TYPE}};
  my $name = $hash->{NAME};

  if(GetVerbose($name) == 5) {
    Log3 $hash, 5, escapeLogLine("$name: dispatch $dmsg");
  }

  my ($isdup, $idx) = CheckDuplicate($name, $dmsg, $module->{FingerprintFn});
  return rejectDuplicate($name,$idx,$addvals) if($isdup);

  my @found;
  my $parserMod="";
  my $clientArray = $hash->{".clientArray"};
#  ################### additional logging
    Log3 $hash, 2, "SYSTEM $hash->{'name'}: run dispatch no clientArray ==> computeclientArray(cause for freezes) .clientArray: $hash->{'.clientArray'}" if(!$clientArray);
  $clientArray = computeClientArray($hash, $module) if(!$clientArray);
und dann eine vor dem delete   foreach my $m (@{$clientArray}) {
    # The message is not for this module
    next if($dmsg !~ m/$modules{$m}{Match}/s);

    if( my $ffn = $modules{$m}{FingerprintFn} ) {
      ($isdup, $idx) = CheckDuplicate($name, $dmsg, $ffn);
      return rejectDuplicate($name,$idx,$addvals) if($isdup);
    }

    no strict "refs"; $readingsUpdateDelayTrigger = 1;
    my @tfound = &{$modules{$m}{ParseFn}}($hash,$dmsg);
    use strict "refs"; $readingsUpdateDelayTrigger = 0;
    $parserMod = $m;
    if(int(@tfound) && defined($tfound[0])) {
      if($tfound[0] && $tfound[0] eq "[NEXT]") { # not a goodDeviceName, #95446
        shift(@tfound);
        push @found, @tfound;                   # continue feeding other modules
      } else {
        push @found, @tfound;
        last;
      }
    }
  }

  if((!int(@found) || !defined($found[0])) && !$nounknown) {
    my $h = $hash->{MatchList};
    $h = $module->{MatchList} if(!$h);
    if(defined($h)) {
      foreach my $m (sort keys %{$h}) {
        if($dmsg =~ m/$h->{$m}/s) {
          my ($order, $mname) = split(":", $m);

          if(AttrVal("global", "autoload_undefined_devices", 1)) {
            my $newm = LoadModule($mname);
            $mname = $newm if($newm ne "UNDEFINED");
            if($modules{$mname} && $modules{$mname}{ParseFn}) {
              no strict "refs"; $readingsUpdateDelayTrigger = 1;
              my @tfound = &{$modules{$mname}{ParseFn}}($hash,$dmsg);
              use strict "refs"; $readingsUpdateDelayTrigger = 0;
              $parserMod = $mname;

              if(int(@tfound) && defined($tfound[0])) {
                if($tfound[0] && $tfound[0] eq "[NEXT]") {
                  shift(@tfound);
                  push @found, @tfound;
                } else {
                  push @found, @tfound;
                  last;
                }
              }

            } else {
              Log 0, "ERROR: Cannot autoload $mname";
            }

          } else {
            Log3 $name, 3, "$name: Unknown $mname device detected, " .
                        "define one to get detailed information.";
            return undef;

          }
#  ################### additional logging
    Log3 $hash, 2, "SYSTEM $hash->{'name'}: clientArray deleted";
          delete($hash->{".clientArray"});
        }
      }
    }
    if((!int(@found) || !defined($found[0])) && !$nounknown) {
      DoTrigger($name, "UNKNOWNCODE $dmsg");
      Log3 $name, 3, "$name: Unknown code $dmsg, help me!";
      return undef;
    }
  }

  ################
  # Inform raw
  if(!$module->{noRawInform}) {
    foreach my $c (keys %inform) {
      if(!$defs{$c} || $defs{$c}{NR} != $inform{$c}{NR}) {
        delete($inform{$c});
        next;
      }
      next if($inform{$c}{type} ne "raw");
      syswrite($defs{$c}{CD}, "$hash->{TYPE} $name $dmsg\n");
    }
  }

  # Special return: Do not notify
  return undef if(!defined($found[0]) || $found[0] eq "");

  foreach my $found (@found) {

    if($found =~ m/^(UNDEFINED.*)/) {
      DoTrigger("global", $1);
      return undef;

    } else {
      if($defs{$found}) {
        if(!$defs{$found}{".noDispatchVars"}) { # CUL_HM special
          $defs{$found}{MSGCNT}++;
          my $avtrigger = ($attr{$name} && $attr{$name}{addvaltrigger});
          if($addvals) {
            foreach my $av (keys %{$addvals}) {
              $defs{$found}{"${name}_$av"} = $addvals->{$av};
              push(@{$defs{$found}{CHANGED}}, "$av: $addvals->{$av}")
                if($avtrigger);
            }
          }
          $defs{$found}{"${name}_MSGCNT"}++;
          $defs{$found}{"${name}_TIME"} = TimeNow();
          $defs{$found}{LASTInputDev} = $name;
        }
        delete($defs{$found}{".noDispatchVars"});

        DoTrigger($found, undef);

      } elsif(defined($found) && ($found eq "" || $found eq "[NEXT]")) {
        return undef;

      } else {
        Log 1, "ERROR: >$found< returned by the $parserMod ParseFn is invalid,".
               " notify the module maintainer";
        return undef;
      }
    }
  }

  $duplicate{$idx}{FND} = \@found
        if(defined($idx) && defined($duplicate{$idx}));

  return \@found;
}
in die fhem.pl eingebaut.
RPi3/2 buster/stretch-SamsungAV_E/N-RFXTRX-IT-RSL-NC5462-Oregon-CUL433-GT-TMBBQ-01e-CUL868-FS20-EMGZ-1W(GPIO)-DS18B20-CO2-USBRS232-USBRS422-Betty_Boop-EchoDot-OBIS(Easymeter-Q3/EMH-KW8)-PCA301(S'duino)-Deebot(mqtt2)-zigbee2mqtt

Ralf9

2022.01.09 20:32:47 3: Sduino IT: IT_V3_d892149 off->on
2022.01.09 20:32:47 3: Sduino IT: message "i569A56596559968" (16) too short!
2022.01.09 20:32:47 3: Sduino IT: message "i569A56596559968" (16) too short!
2022.01.09 20:32:47 2: SYSTEM : clientArray deleted
2022.01.09 20:32:47 3: Sduino: Unknown code i569A56596559968, help me!
2022.01.09 20:32:48 2: SYSTEM : run dispatch no clientArray ==> computeclientArray(cause for freezes) .clientArray:
2022.01.09 20:32:51 3: Sduino IT: message "i569A56596559969" (16) too short!
2022.01.09 20:32:51 3: Sduino IT: message "i569A56596559969" (16) too short!
2022.01.09 20:32:51 2: SYSTEM : clientArray deleted
2022.01.09 20:32:51 3: Sduino: Unknown code i569A56596559969, help me!


Bitte ändere mal im IT Modul das "return undef" in return ''
  if (length($msg) != 7 && length($msg) != 12 && length($msg) != 17 && length($msg) != 19 && length($msg) != 20) {
    Log3 $hash,3,"$ioname IT: message \"$msg\" (" . length($msg) . ") too short!";
    return undef;
  }


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

Beta-User

Wenn einfach das nächste client-Modul "befragt" werden soll: [NEXT] zurückgeben.
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: ZigBee2mqtt, MiLight@ESP-GW, BT@OpenMQTTGw | ZWave | SIGNALduino | MapleCUN | RHASSPY
svn: u.a Weekday-&RandomTimer, Twilight,  div. attrTemplate-files, MySensors

KölnSolar

ZitatWenn einfach das nächste client-Modul "befragt" werden soll: [NEXT] zurückgeben.
ZitatBitte ändere mal im IT Modul das "return undef" in return ''
Ändert leider beides nichts am Verhalten. .clientArray wird gelöscht.

Ich frag mich die ganze Zeit, ob da nun irgendein Konstruktionsfehler in fhem.pl oder Signalduino/IT vorliegt. Könnte vermutlich nur Rudi beantworten.

Grüße Markus
RPi3/2 buster/stretch-SamsungAV_E/N-RFXTRX-IT-RSL-NC5462-Oregon-CUL433-GT-TMBBQ-01e-CUL868-FS20-EMGZ-1W(GPIO)-DS18B20-CO2-USBRS232-USBRS422-Betty_Boop-EchoDot-OBIS(Easymeter-Q3/EMH-KW8)-PCA301(S'duino)-Deebot(mqtt2)-zigbee2mqtt

Beta-User

Na ja, sieht mir nach Absicht aus:
fhem.pl - Dispatch() schiebt das durch alle registrierten Module, bis eines meldet "hab's" (Devicename wird zurückgegeben).

Kommt was anderes, wird am Ende .clientArray gelöscht (#4143), damit beim nächsten Mal wieder alle möglichen Optionen neu ermittelt werden.

Ergo müßte man sicherstellen, dass sich für "kaputte" Meldungen ein exisiterendes Device "zuständig" fühlt (das könnte z.B. auch das IO-Device mit einem Fehler-Reading sein).
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: ZigBee2mqtt, MiLight@ESP-GW, BT@OpenMQTTGw | ZWave | SIGNALduino | MapleCUN | RHASSPY
svn: u.a Weekday-&RandomTimer, Twilight,  div. attrTemplate-files, MySensors

Ralf9

Zitatfhem.pl - Dispatch() schiebt das durch alle registrierten Module, bis eines meldet "hab's" (Devicename wird zurückgegeben).
wird es auch durch alle registrierten Module durchgeschoben, wenn das IT Modul im Fehlerfall anstatt "return undef" nur ein return "" zurückgibt?
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

Beta-User

Nach meinem Verständnis ist der Prozess nur "fertig", wenn (mind.) ein gültiger Devicename im Rückgabe-Array steht (es können auch mehrere Devices sowie zusätzlich [NEXT] zurückgegeben werden).
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: ZigBee2mqtt, MiLight@ESP-GW, BT@OpenMQTTGw | ZWave | SIGNALduino | MapleCUN | RHASSPY
svn: u.a Weekday-&RandomTimer, Twilight,  div. attrTemplate-files, MySensors