Signalduino - Atlantic und Focus Security China Devices

Begonnen von Ralf9, 05 Januar 2019, 13:05:34

Vorheriges Thema - Nächstes Thema

Ralf9

Zitat von: Harst am 11 April 2018, 20:49:28
Hallo,

ich habe bei Ali eingekauft mit dem Bewusstsein, dass es schief gehen kann:

https://de.aliexpress.com/item/MD-210R-433MHz-Wireless-Door-Window-Magnetic-Contact-for-GSM-PSTN-Home-Alarm-System/32298074783.html
https://de.aliexpress.com/item/PB-2018R-Wireless-Vibration-Shock-Sensor-Window-Vibration-Detector-Sensitivity-Adjustable-for-ST-V-ST-IIIB/32618141282.html
https://de.aliexpress.com/item/MD-2001R-433MHz-Family-House-Safety-Wireless-Combustible-CO-Gas-Leak-Detector-Fire-Alarm-Sensor-for/32620003651.html

Der Fensterkontakt hat einiges an Inhalt:

Links oben der Sabottageschalter, geht auf wenn man das Gehäuse entfernt
links mitte ein Schraubanschluss für einen externen Kontakt
unten und oben je ein Red-Kontakt
Alle erzeugen unterschiedliche Codes und unterscheiden zwischen öffnen und schließen.

Leider werden die Schalter nicht erkannt. Aber ganz so einfach gebe ich nicht auf:

In der Doku stehen 36 Bit, davon 8 Bit Daten, das war schon ein Anfang.


Zitat von: jochen_f am 26 Dezember 2018, 23:16:03
es scheint sich hier um eine Familie an Sensoren zu handeln, die beim Chinesen unter Atlantic'S oder Fokus kompatibel bezeichnet werden.

In meinem Fall ist es ein MD-210R, ein Tür- bzw Fenstersensor. Dieser meldet alle Zustandsänderungen. Zu bekommen ist er z.B. als Original hier:

https://www.amazon.de/dp/B00FGSFV5K/

Ein Manual findet man hier:

https://fccid.io/QOAMD-210R/User-Manual/User-Manual-1853455

Das Protokoll scheint aber entgegen dem Manual eher wie folgt zu sein:

1. 24bit Device-ID
2. 8bit Kommando
3. 4bit Prüfsumme

Beim Türkontakt scheint das Kommando zu sein:

1ab10001
a:Tür zu = 1
b: Sabotage Kontakt zu = 1
Möglich, dass es auch noch ein Bit für Batterie leer gibt.

Wie die Prüfsumme genau gebildet wird, weiß ich nicht, es scheint mir aber eine gewichtete Summe zu sein. Definitiv keine CRC oder ähnliche komplexere Funktion.

Es gibt aber noch weitere Sensoren mit dem selben Protokoll. Auf Seite 64 dieses Themas hat jemand CO Sensoren und Erschüttetungsmelder. Es gibt wohl auch noch Fernbedienungen.
Das ganze wahlweise mit 433 oder 868 MHz.

Gruß, Jochen
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

HomeAuto_User

#1
Danke Ralf!

hier ist vermutlich ein anderer Typ von Horst!

Zitat von: Harst am 05 Januar 2019, 12:01:29
Hallo,
ich habe jetzt mal die Raw-Messages mitgeschnitten für den Erschütterungsmelder.


2019.01.05 11:45:57 4 : sduino433/msg READredu: MU;P0=-404;P1=393;P2=784;P3=-788;P4=-3929;D=0102310231020231020202310202313131024102020231023131023102020202020231310231023102310202310202023102023131310241020202310231310231020202020202313102310231023102023102020231020231313102410202023102313102310202020202023131023102310231020231020202310202313;CP=1;R=0;O;
2019.01.05 11:45:57 5 : sduino433: Starting demodulation (StartStr: 41 first found at 36 regex: (?:41)((?:31|02){36,}) Pos 36) length_min_max (36..36) length=36
2019.01.05 11:45:57 5 : sduino433: dispatching hex: u91#1681AA44E
2019.01.05 11:45:57 4 : sduino433: decoded matched MU Protocol id 91 dmsg u91#1681AA44E length 36 dispatch(1/4) RSSI = -74
2019.01.05 11:45:57 5 : sduino433 Dispatch: u91#1681AA44E, test ungleich: disabled
2019-01-05 11:45:57 SIGNALduino sduino433 DMSG u91#1681AA44E
2019.01.05 11:45:57 5 : sduino433 Dispatch: u91#1681AA44E, -74 dB, dispatch
2019.01.05 11:45:57 5 : sduino433: dispatch u91#1681AA44E
2019.01.05 11:45:57 4 : SIGNALduino_unknown incomming msg: u91#1681AA44E
2019.01.05 11:45:57 4 : SIGNALduino_unknown rawData: 1681AA44E
2019.01.05 11:45:57 4 : SIGNALduino_unknown Protocol: 91
2019.01.05 11:45:57 4 : SIGNALduino_unknown converted to bits: 000101101000000110101010010001001110
2019.01.05 11:45:57 5 : SIGNALduino_unknown: sduino433 Protocol 191 found in AttrVal development!
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_91 bitMsg: 000101101000000110101010010001001110
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_91 bitMsg_invert: 111010010111111001010101101110110001
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_91 bitCount: 36
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_91 hexMsg: 1681AA44E
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_91 hexMsg_invert: E97E55BB1
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_91 hexCount_or_nibble: 9
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_91 lastInputDev: sduino433
2019.01.05 11:45:57 5 : part is 020202310231310231020202020202313102310231023102023102020231020231313102 starts at position 74 and ends at 148
2019.01.05 11:45:57 5 : sduino433: 2. try demodulation at Pos 74
2019.01.05 11:45:57 5 : sduino433: dispatching hex: u91#1681AA44E
2019.01.05 11:45:57 4 : sduino433: decoded matched MU Protocol id 91 dmsg u91#1681AA44E length 36 dispatch(2/4) RSSI = -74
2019.01.05 11:45:57 5 : sduino433 Dispatch: u91#1681AA44E, test gleich
2019.01.05 11:45:57 4 : sduino433 Dispatch: u91#1681AA44E, Dropped due to short time or equal msg
2019.01.05 11:45:57 5 : sduino433: start pattern for MU Protocol id 92 -> KRINNER Lumix not found, aborting


2019.01.05 11:45:57 4 : sduino433/msg READredu: MU;P0=-775;P1=382;P2=-436;P3=776;P4=-3940;D=0123412323230123010123012323232323230101230123012320;CP=1;R=0;

2019.01.05 11:45:57 4 : sduino433/msg READredu: MU;P0=-401;P1=383;P2=779;P3=-798;D=01023131023102020202020231310231023102310202310202023102023131310;CP=1;R=0;

2019.01.05 11:45:57 4 : sduino433/msg READredu: MU;P0=-1416;P1=796;P2=-596;P3=400;P4=-386;P6=-782;P7=3308;D=123416341416341414163414163636347034141416341636341634141414141416363416341634163414163414141634141636363410;CP=3;R=0;
2019.01.05 11:45:57 5 : sduino433: Starting demodulation ( regex: (?:)((?:1|0){24,}) Pos 0) length_min_max (24..) length=24
2019.01.05 11:45:57 5 : sduino433: dispatching hex: u63#008000
2019.01.05 11:45:57 4 : sduino433: decoded matched MU Protocol id 63 dmsg u63#008000 length 24 dispatch(1/4) RSSI = -74
2019.01.05 11:45:57 5 : sduino433 Dispatch: u63#008000, test ungleich: disabled
2019-01-05 11:45:57 SIGNALduino sduino433 DMSG u63#008000
2019.01.05 11:45:57 5 : sduino433 Dispatch: u63#008000, -74 dB, dispatch
2019.01.05 11:45:57 5 : sduino433: dispatch u63#008000
2019.01.05 11:45:57 4 : SIGNALduino_unknown incomming msg: u63#008000
2019.01.05 11:45:57 4 : SIGNALduino_unknown rawData: 008000
2019.01.05 11:45:57 4 : SIGNALduino_unknown Protocol: 63
2019.01.05 11:45:57 4 : SIGNALduino_unknown converted to bits: 000000001000000000000000
2019.01.05 11:45:57 5 : SIGNALduino_unknown: sduino433 Protocol 163 found in AttrVal development!
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_63 bitMsg: 000000001000000000000000
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_63 bitMsg_invert: 111111110111111111111111
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_63 bitCount: 24
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_63 hexMsg: 008000
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_63 hexMsg_invert: FF7FFF
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_63 hexCount_or_nibble: 6
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_63 lastInputDev: sduino433

2019.01.05 11:45:57 4 : sduino433/msg READredu: MU;P0=-3941;P1=387;P2=-410;P3=771;P4=-788;D=0123232341234141234123232323232341412341234123412323412323234123234141412301232323412341412341232323232323414123412341234123234123232341232341414123012323234123414123412323232323234141234123412341232341232323412323414141230123232341234141234123232323232;CP=1;R=0;O;
2019.01.05 11:45:57 5 : sduino433: Starting demodulation ( regex: (?:)((?:1|1){24,}) Pos 0) length_min_max (24..) length=76
2019.01.05 11:45:57 5 : sduino433: Starting demodulation (StartStr: 01 first found at 0 regex: (?:01)((?:41|23){36,}) Pos 0) length_min_max (36..36) length=36
2019.01.05 11:45:57 5 : sduino433: dispatching hex: u91#1681AA44E
2019.01.05 11:45:57 4 : sduino433: decoded matched MU Protocol id 91 dmsg u91#1681AA44E length 36 dispatch(1/4) RSSI = -74
2019.01.05 11:45:57 5 : sduino433 Dispatch: u91#1681AA44E, test ungleich: disabled
2019-01-05 11:45:57 SIGNALduino sduino433 DMSG u91#1681AA44E
2019.01.05 11:45:57 5 : sduino433 Dispatch: u91#1681AA44E, -74 dB, dispatch
2019.01.05 11:45:57 5 : sduino433: dispatch u91#1681AA44E
2019.01.05 11:45:57 4 : SIGNALduino_unknown incomming msg: u91#1681AA44E
2019.01.05 11:45:57 4 : SIGNALduino_unknown rawData: 1681AA44E
2019.01.05 11:45:57 4 : SIGNALduino_unknown Protocol: 91
2019.01.05 11:45:57 4 : SIGNALduino_unknown converted to bits: 000101101000000110101010010001001110
2019.01.05 11:45:57 5 : SIGNALduino_unknown: sduino433 Protocol 191 found in AttrVal development!
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_91 bitMsg: 000101101000000110101010010001001110
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_91 bitMsg_invert: 111010010111111001010101101110110001
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_91 bitCount: 36
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_91 hexMsg: 1681AA44E
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_91 hexMsg_invert: E97E55BB1
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_91 hexCount_or_nibble: 9
2019-01-05 11:45:57 SIGNALduino_un SIGNALduino_unknown_91 lastInputDev: sduino433
2019.01.05 11:45:57 5 : part is 232323412341412341232323232323414123412341234123234123232341232341414123 starts at position 74 and ends at 148
2019.01.05 11:45:57 5 : sduino433: 2. try demodulation at Pos 74
2019.01.05 11:45:57 5 : sduino433: dispatching hex: u91#1681AA44E
2019.01.05 11:45:57 4 : sduino433: decoded matched MU Protocol id 91 dmsg u91#1681AA44E length 36 dispatch(2/4) RSSI = -74
2019.01.05 11:45:57 5 : sduino433 Dispatch: u91#1681AA44E, test gleich
2019.01.05 11:45:57 4 : sduino433 Dispatch: u91#1681AA44E, Dropped due to short time or equal msg
2019.01.05 11:45:57 5 : part is 232323412341412341232323232323414123412341234123234123232341232341414123 starts at position 148 and ends at 222
2019.01.05 11:45:57 5 : sduino433: 3. try demodulation at Pos 148
2019.01.05 11:45:57 5 : sduino433: dispatching hex: u91#1681AA44E
2019.01.05 11:45:57 4 : sduino433: decoded matched MU Protocol id 91 dmsg u91#1681AA44E length 36 dispatch(3/4) RSSI = -74
2019.01.05 11:45:57 5 : sduino433 Dispatch: u91#1681AA44E, test gleich
2019.01.05 11:45:57 4 : sduino433 Dispatch: u91#1681AA44E, Dropped due to short time or equal msg
2019.01.05 11:45:57 5 : sduino433: start pattern for MU Protocol id 92 -> KRINNER Lumix not found, aborting

2019.01.05 11:45:57 4 : sduino433/msg READredu: MU;P0=-803;P1=377;P2=-412;P3=773;P4=-6196;D=01012301230123012323012323230123230101012340;CP=1;R=0;

2019.01.05 11:45:58 4 : sduino433/msg READredu: MU;P0=-100;P1=787;P2=-785;P3=403;P4=-397;P5=-3923;D=0123414141414141232341234123412341412341414123414123232341534141412341232341234141414141412323412341234123414123414141234141232323415341414123412323412341414141414123234123412341234141234141412341412323234153414141234123234123414141414141232341234123412;CP=3;R=0;O;
2019.01.05 11:45:58 5 : sduino433: Starting demodulation ( regex: (?:)((?:0|0){24,}) Pos 0) length_min_max (24..) length=48
2019.01.05 11:45:58 5 : sduino433: dispatching hex: u63#000000000000
2019.01.05 11:45:58 4 : sduino433: decoded matched MU Protocol id 63 dmsg u63#000000000000 length 48 dispatch(1/4) RSSI = -74
2019.01.05 11:45:58 5 : sduino433 Dispatch: u63#000000000000, test ungleich: disabled
2019-01-05 11:45:58 SIGNALduino sduino433 DMSG u63#000000000000
2019.01.05 11:45:58 5 : sduino433 Dispatch: u63#000000000000, -74 dB, dispatch
2019.01.05 11:45:58 5 : sduino433: dispatch u63#000000000000
2019.01.05 11:45:58 4 : SIGNALduino_unknown incomming msg: u63#000000000000
2019.01.05 11:45:58 4 : SIGNALduino_unknown rawData: 000000000000
2019.01.05 11:45:58 4 : SIGNALduino_unknown Protocol: 63
2019.01.05 11:45:58 4 : SIGNALduino_unknown converted to bits: 000000000000000000000000000000000000000000000000
2019.01.05 11:45:58 5 : SIGNALduino_unknown: sduino433 Protocol 163 found in AttrVal development!
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_63 bitMsg: 000000000000000000000000000000000000000000000000
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_63 bitMsg_invert: 111111111111111111111111111111111111111111111111
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_63 bitCount: 48
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_63 hexMsg: 000000000000
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_63 hexMsg_invert: FFFFFFFFFFFF
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_63 hexCount_or_nibble: 12
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_63 lastInputDev: sduino433
2019.01.05 11:45:58 5 : sduino433: Starting demodulation (StartStr: 53 first found at 58 regex: (?:53)((?:23|41){36,}) Pos 58) length_min_max (36..36) length=36
2019.01.05 11:45:58 5 : sduino433: dispatching hex: u91#1681AA44E
2019.01.05 11:45:58 4 : sduino433: decoded matched MU Protocol id 91 dmsg u91#1681AA44E length 36 dispatch(1/4) RSSI = -74
2019.01.05 11:45:58 5 : sduino433 Dispatch: u91#1681AA44E, test ungleich: disabled
2019-01-05 11:45:58 SIGNALduino sduino433 DMSG u91#1681AA44E
2019.01.05 11:45:58 5 : sduino433 Dispatch: u91#1681AA44E, -74 dB, dispatch
2019.01.05 11:45:58 5 : sduino433: dispatch u91#1681AA44E
2019.01.05 11:45:58 4 : SIGNALduino_unknown incomming msg: u91#1681AA44E
2019.01.05 11:45:58 4 : SIGNALduino_unknown rawData: 1681AA44E
2019.01.05 11:45:58 4 : SIGNALduino_unknown Protocol: 91
2019.01.05 11:45:58 4 : SIGNALduino_unknown converted to bits: 000101101000000110101010010001001110
2019.01.05 11:45:58 5 : SIGNALduino_unknown: sduino433 Protocol 191 found in AttrVal development!
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_91 bitMsg: 000101101000000110101010010001001110
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_91 bitMsg_invert: 111010010111111001010101101110110001
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_91 bitCount: 36
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_91 hexMsg: 1681AA44E
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_91 hexMsg_invert: E97E55BB1
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_91 hexCount_or_nibble: 9
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_91 lastInputDev: sduino433
2019.01.05 11:45:58 5 : part is 414141234123234123414141414141232341234123412341412341414123414123232341 starts at position 74 and ends at 148
2019.01.05 11:45:58 5 : sduino433: 2. try demodulation at Pos 74
2019.01.05 11:45:58 5 : sduino433: dispatching hex: u91#1681AA44E
2019.01.05 11:45:58 4 : sduino433: decoded matched MU Protocol id 91 dmsg u91#1681AA44E length 36 dispatch(2/4) RSSI = -74
2019.01.05 11:45:58 5 : sduino433 Dispatch: u91#1681AA44E, test gleich
2019.01.05 11:45:58 4 : sduino433 Dispatch: u91#1681AA44E, Dropped due to short time or equal msg
2019.01.05 11:45:58 5 : sduino433: start pattern for MU Protocol id 92 -> KRINNER Lumix not found, aborting

2019.01.05 11:45:58 4 : sduino433/msg READredu: MU;P0=-172;P1=782;P2=-400;P3=-798;P4=382;P5=-3944;D=0121213421343421342121212121213434213421342134212134212121342121343434215421212134213434213421212121212134342134213421342121342121213421213434342;CP=4;R=0;
2019.01.05 11:45:58 5 : sduino433: Starting demodulation ( regex: (?:)((?:1|0){24,}) Pos 0) length_min_max (24..) length=43
2019.01.05 11:45:58 5 : sduino433: dispatching hex: u63#1FFFFFFFFFE
2019.01.05 11:45:58 4 : sduino433: decoded matched MU Protocol id 63 dmsg u63#1FFFFFFFFFE length 44 dispatch(1/4) RSSI = -74
2019.01.05 11:45:58 5 : sduino433 Dispatch: u63#1FFFFFFFFFE, test ungleich: disabled
2019-01-05 11:45:58 SIGNALduino sduino433 DMSG u63#1FFFFFFFFFE
2019.01.05 11:45:58 5 : sduino433 Dispatch: u63#1FFFFFFFFFE, -74 dB, dispatch
2019.01.05 11:45:58 5 : sduino433: dispatch u63#1FFFFFFFFFE
2019.01.05 11:45:58 4 : SIGNALduino_unknown incomming msg: u63#1FFFFFFFFFE
2019.01.05 11:45:58 4 : SIGNALduino_unknown rawData: 1FFFFFFFFFE
2019.01.05 11:45:58 4 : SIGNALduino_unknown Protocol: 63
2019.01.05 11:45:58 4 : SIGNALduino_unknown converted to bits: 00011111111111111111111111111111111111111110
2019.01.05 11:45:58 5 : SIGNALduino_unknown: sduino433 Protocol 163 found in AttrVal development!
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_63 bitMsg: 00011111111111111111111111111111111111111110
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_63 bitMsg_invert: 11100000000000000000000000000000000000000001
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_63 bitCount: 44
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_63 hexMsg: 1FFFFFFFFFE
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_63 hexMsg_invert: E0000000001
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_63 hexCount_or_nibble: 11
2019-01-05 11:45:58 SIGNALduino_un SIGNALduino_unknown_63 lastInputDev: sduino433


Es sind ein paar drin, die nicht auf 91 getriggert haben (dringelassen, weil ich es nicht genau weiss). Es kommt immer auch ein #63 mit, das ist nicht Zufall, sondern wirklich immer so. Allerdings habe ich vorher kein Update gemacht, also Stand:

version          V 3.3.1-RC10 SIGNALduino - compiled at Dec 29 2018 01:43:10
versionmodu lv3.3.3-dev_30.12.


Grüße

Horst

EDIT: @Jochen, du kannst gern mal die Datei testen ob dein Sensor dann angelegt wird und dir auch schon was anzeigt. Die Prüfung habe ich derzeit mal auskommentiert.
"Developer" heißt nicht, das man alles wissen kann!
- FHEM v5.9 | Rasberry PI 3
- radino CC1101 433Mhz (SIGNALduino)| - radino CC1101 868Mhz (CUL) | nano 433Mhz (SIGNALduino) - Sensoren: purer Dschungel querbeet

Ralf9

#2
Es gibt das Protokoll 91 für MU-Nachrichten und
das Protokoll 91.1 für MS-Nachrichten.

Momentan ist
zero => [-2,1],
one => [-1,2],


Das Problem hier ist, daß dies eigentlich keine MS-Nachricht ist.
MS;P1=-403;P2=813;P3=-812;P4=396;P5=-4005;D=45412123434123412123434341234123434121234123412121212121234343434121234343;CP=4;SP=5;R=39;

34 ist zero
12 ist one
54 ist start

Ende der vorh msg,   Anfang der nächsten msg       
       1212343434    54 1212343412341


Da in der firmware beim Testen ob es eine  MS-Nachricht ist nach clock + sync gesucht wird, wird das 45 als clock + sync erkannt und es wird als MS-Nachricht ausgegeben.
Nun sieht es als MS-Nachrichten so aus:

Ende der vorh msg,   Anfang der nächsten msg       
       121234343    454 1212343412341

Die 4 fehlt nun am Ende, da sie zum clock + sync am Anfang gehört.

In der sub SIGNALduino_Parse_MS werden dadurch nur 35 Bit decodiert. Das fehlende Zero am Ende wird durch das padding wieder auf 36 Bit ergänzt, dadurch passt es trotzdem.

Nachtrag für MU (91) und MS (91.1) kann dadurch die gleiche preamble 91 verwendet werden.

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

Ralf9

Anscheinend muß das Signal invertiert werden, damit das xor passt.
Da gibt es 2 Möglichkeiten
entweder das one und zero tauschen, dann muss bei der MS-Nachricht mit dem paddiing eine 1 ergänzt werden,
oder im Modul invertieren.

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

HomeAuto_User

#4
@Ralf, muss ich da bei MS ein padding hinzufügen?

lass uns mal von der Definition
zero => [-2,1],
one => [-1,2],

ausgehen. bei MS und Mu gleich definiert.
"Developer" heißt nicht, das man alles wissen kann!
- FHEM v5.9 | Rasberry PI 3
- radino CC1101 433Mhz (SIGNALduino)| - radino CC1101 868Mhz (CUL) | nano 433Mhz (SIGNALduino) - Sensoren: purer Dschungel querbeet

Ralf9

#5
Nein per default wird die decodierte MS-Nachricht per padding mit Nullen auf eine durch 4 teilbare Anzahl aufgefüllt.
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

HomeAuto_User

#6
Bei MS mit der oben genannten Definition
zero => [-2,1],
one => [-1,2],


kommt

check XOR (2067) FAILED! rawData=CB14D7214
heraus und bei MU

check XOR (2063) FAILED! rawData=CB14D7F19

Wenn ich die Definition herumdrehe 0 & 1 dann ging es m.e. bei MS aber bei MU nicht. Nun ist die Überlegung was man wie vernünftig anpasst.

##################################

Bei

one => [-2,1],
zero => [-1,2],


kommt das bei MU
MU;P0=406;P1=-402;P2=802;P3=-805;P4=-3994;D=012123012301212121212121230303012123030124012123030123012123030301230123030121230123012121212121212303030121230301240121230301230121230303012301230301212301230121212121212123030301212303012;CP=0;R=52;
check XOR OK
heraus und bei MS
MS;P1=-410;P2=807;P3=-803;P4=394;P5=-3994;D=45412123434123412123434341234123434121234123412121234341234343434123412343;CP=4;SP=5;R=30;O;m2;
check XOR (27) FAILED! rawData=34EB28DEA
"Developer" heißt nicht, das man alles wissen kann!
- FHEM v5.9 | Rasberry PI 3
- radino CC1101 433Mhz (SIGNALduino)| - radino CC1101 868Mhz (CUL) | nano 433Mhz (SIGNALduino) - Sensoren: purer Dschungel querbeet

Ralf9

mit
one => [-2,1],
zero => [-1,2],


muss bei MS-Nachrichten per padding eine 1 ergänzt werden dann kommt heraus:
34EB28DEB
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

HomeAuto_User

Das habe ich nun verstanden Ralf, wie lösen wir es. Im Modul oder wäre es nicht gescheiter dies versuchen gleich im Decoder zu richten?
"Developer" heißt nicht, das man alles wissen kann!
- FHEM v5.9 | Rasberry PI 3
- radino CC1101 433Mhz (SIGNALduino)| - radino CC1101 868Mhz (CUL) | nano 433Mhz (SIGNALduino) - Sensoren: purer Dschungel querbeet

elektron-bbs

Da wir das letzte Nibbel für die Prüfung benötigen, ist ein Auffüllen mit 0 oder 1 falsch. Wir brauchen immer die komplette Anzahl an Bits von der Originalnachricht.
Intel(R) Atom(TM) CPU N270 mit 2 SIGNALduino nanoCC1101 + ESPEasy 2x serial server SIGNALduino nanoCC1101, Raspberry Pi 2 mit 2 CUL Stackable CC1101, Raspberry Pi 3 mit SIGNALduino radino + nano328 + 2 x SIGNAL-ESP CC1101 + 2 x rf_Gateway

Ralf9

Z.B. mit einem neuen
padbit => '1',
in der Protokolldefinition 91.1
und in der sub SIGNALduino_Parse_MS(
my $padwith = defined($ProtocolListSIGNALduino{$id}{paddingbits}) ? $ProtocolListSIGNALduino{$id}{paddingbits} : 4;
my $padbit = 0;
$padbit = $ProtocolListSIGNALduino{$id}{padbit} if (defined($ProtocolListSIGNALduino{$id}{padbit}));

my $i=0;
while (scalar @bit_msg % $padwith > 0)  ## will pad up full nibbles per default or full byte if specified in protocol
{
push(@bit_msg,$padbit);
$i++;
}
Debug "$name padded $i bits to bit_msg array" if ($debug);

if ($i == 0) {
SIGNALduino_Log3 $name, 5, "$name: dispatching bits: @bit_msg";
} else {
SIGNALduino_Log3 $name, 5, "$name: dispatching bits: @bit_msg with $i Paddingbits $padbit";
}


damit wird das fehlende one wieder ergänzt und es sieht es dann so aus:
2019.01.05 10:52:54.309 4 : sduinoD/msg get raw: MS;P1=-410;P2=807;P3=-803;P4=394;P5=-3994;D=45412123434123412123434341234123434121234123412121234341234343434123412343;CP=4;SP=5;R=30;
2019.01.05 10:52:54.309 4 : sduinoD: Matched MS Protocol id 91.1 -> Atlantic security, bitLen=36
2019.01.05 10:52:54.309 5 : sduinoD: Starting demodulation at Position 3
2019.01.05 10:52:54.309 5 : sduinoD: Found wrong signalpattern, catched 35 bits, aborting demodulation
2019.01.05 10:52:54.309 5 : sduinoD: dispatching bits: 0 0 1 1 0 1 0 0 1 1 1 0 1 0 1 1 0 0 1 0 1 0 0 0 1 1 0 1 1 1 1 0 1 0 1 1 with 1 Paddingbits 1
2019.01.05 10:52:54.309 4 : sduinoD: Decoded MS Protocol id 91.1 dmsg u91#34EB28DEB length 36 RSSI = -59


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

elektron-bbs

Immer eine 1 anhängen klappt nicht - man könnte ja auch mal eine 0 brauchen :-)
Das Problem mit dem "halben Bit" am Ende einer Nachricht besteht ja schon immer und ist physikalisch bedingt auch nicht zu ändern.

Aber eigentlich müsste es ja auch möglich sein, im Modul das richtige Bit zu ergänzen.
Hier im Beispiel steht z.B. die Pulsfolge 12 für eine 0 und 34 für eine 1 - Schlussfolgerung: Wenn am Ende ein "halbes Bit" mit einer 1 steht, wird eine 0 ergänzt und bei einer 3 am Ende halt eine 1.
Intel(R) Atom(TM) CPU N270 mit 2 SIGNALduino nanoCC1101 + ESPEasy 2x serial server SIGNALduino nanoCC1101, Raspberry Pi 2 mit 2 CUL Stackable CC1101, Raspberry Pi 3 mit SIGNALduino radino + nano328 + 2 x SIGNAL-ESP CC1101 + 2 x rf_Gateway

Ralf9

Nur wenn die Nachricht mit einem clock endet, wird sie fälschlicherweise als MS erkannt.
Damit
one => [-2,1],
zero => [-1,2],

wird eine Nachricht mit dem letzten Bit = 0 als MU-Nachricht erkannt, sie kann nicht als MS-Nachricht erkannt 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

HomeAuto_User

#13
Ich lese hier 2 Dinge heraus.
- entweder einen Workaround indem man etwas anpasst was vermutlich auch anders sein kann order
- sich an die richtige Erkennung wagen müsste.

@Ralf, du schreibst was von Anpassung

Zitat von: Ralf9 am 05 Januar 2019, 15:20:11
Z.B. mit einem neuen
padbit => '1',
in der Protokolldefinition 91.1
und in der sub SIGNALduino_Parse_MS(
my $padwith = defined($ProtocolListSIGNALduino{$id}{paddingbits}) ? $ProtocolListSIGNALduino{$id}{paddingbits} : 4;
my $padbit = 0;
$padbit = $ProtocolListSIGNALduino{$id}{padbit} if (defined($ProtocolListSIGNALduino{$id}{padbit}));

my $i=0;
while (scalar @bit_msg % $padwith > 0)  ## will pad up full nibbles per default or full byte if specified in protocol
{
push(@bit_msg,$padbit);
$i++;
}
Debug "$name padded $i bits to bit_msg array" if ($debug);

if ($i == 0) {
SIGNALduino_Log3 $name, 5, "$name: dispatching bits: @bit_msg";
} else {
SIGNALduino_Log3 $name, 5, "$name: dispatching bits: @bit_msg with $i Paddingbits $padbit";
}


damit wird das fehlende one wieder ergänzt und es sieht es dann so aus:
2019.01.05 10:52:54.309 4 : sduinoD/msg get raw: MS;P1=-410;P2=807;P3=-803;P4=394;P5=-3994;D=45412123434123412123434341234123434121234123412121234341234343434123412343;CP=4;SP=5;R=30;
2019.01.05 10:52:54.309 4 : sduinoD: Matched MS Protocol id 91.1 -> Atlantic security, bitLen=36
2019.01.05 10:52:54.309 5 : sduinoD: Starting demodulation at Position 3
2019.01.05 10:52:54.309 5 : sduinoD: Found wrong signalpattern, catched 35 bits, aborting demodulation
2019.01.05 10:52:54.309 5 : sduinoD: dispatching bits: 0 0 1 1 0 1 0 0 1 1 1 0 1 0 1 1 0 0 1 0 1 0 0 0 1 1 0 1 1 1 1 0 1 0 1 1 with 1 Paddingbits 1
2019.01.05 10:52:54.309 4 : sduinoD: Decoded MS Protocol id 91.1 dmsg u91#34EB28DEB length 36 RSSI = -59


Gruß Ralf

Es stellt aber nur ein Around dar weil es ja auch mal anders sein kann oder sollte der Fall nie eintreten???
"Developer" heißt nicht, das man alles wissen kann!
- FHEM v5.9 | Rasberry PI 3
- radino CC1101 433Mhz (SIGNALduino)| - radino CC1101 868Mhz (CUL) | nano 433Mhz (SIGNALduino) - Sensoren: purer Dschungel querbeet

elektron-bbs

Zitat von: Ralf9 am 05 Januar 2019, 18:14:03
Nur wenn die Nachricht mit einem clock endet, wird sie fälschlicherweise als MS erkannt.

Was meinst du damit? Eine Nachricht beginnt immer mit einem Puls und endet auch immer mit einem Puls.
Oder meinst du, das als MS nur erkannt wird, wenn der letzte Puls gleich dem Clockpuls ist?
Intel(R) Atom(TM) CPU N270 mit 2 SIGNALduino nanoCC1101 + ESPEasy 2x serial server SIGNALduino nanoCC1101, Raspberry Pi 2 mit 2 CUL Stackable CC1101, Raspberry Pi 3 mit SIGNALduino radino + nano328 + 2 x SIGNAL-ESP CC1101 + 2 x rf_Gateway