Portisch / RF-Bridge-EFM8BB1

Alternative Firmware for the Sonoff RF Bridge EFM8BB1 chip
293 stars 124 forks source link

RfRaw 177 produces 3 lines/codes for every button press - need to merge? How to extend sniff length? #173

Open JulianNaumann opened 4 years ago

JulianNaumann commented 4 years ago

I am trying to sniff the B1 codes for my remote socket, which results in mostly 2 or 3 lines of sniffed codes (see below). Taking only the longest code, converting to B0 and sending results in about 5-10% chance of the code working. Probably it has to do with the lines before/after the longest code, which come in at the exact same time, so I am assuming its actually part of the code and not noise as i thought before. Simply merging (stripping the sync bucket at the appropriate places) did not work (see sample below).

Anybody got any idea? Maybe somebody knows how to extend the maximum length for codes so the sniffing works correctly?

Latest firmware used?

Tasmota reports 00:40:24 MQT: tele/sonoff/RESULT = {"Time":"2020-06-10T00:40:24","RfRaw":{"Data":"AA0355"}} == v03 (kinda strange, I used the latest version from ./releases/ , so it should be 04 instead? Was the version string updated in the firmware?!)

Information on RF device

Trying to control a "Bearware indoor remote socket" https://www.amazon.de/CSL-Funksteckdosen-Fernbedienung-LEDStatusanzeige-Kindersicherungsschutz/dp/B081K73NY3

Sniffed data

{"Time":"2020-06-23T13:28:42","RfRaw":{"Data":"AA B1 04 0140 047E 00B4 226A 3818282818281818282818182818281828182828181828281828182818281818281828182818281828182818281828182818282818281818281828182818281828 55"}}
{"Time":"2020-06-23T13:28:42","RfRaw":{"Data":"AA B1 04 0136 00BE 0492 0488 381828 55"}}
{"Time":"2020-06-23T13:28:46","RfRaw":{"Data":"AA B1 04 0140 0474 00B4 226A 3818282818281818282818182818281828182828181828281828182818281818281828182818281828182818281828182818282818281818281828182818281828 55"}}
{"Time":"2020-06-23T13:28:46","RfRaw":{"Data":"AA B1 04 0122 00D2 04A6 049C 381828 55"}}
{"Time":"2020-06-23T13:28:51","RfRaw":{"Data":"AA B1 04 0140 047E 00B4 226A 3818282818281818282818182818281828182828181828281828182818281818281828182818281828182818281828182818282818281818281828182818281828 55"}}
{"Time":"2020-06-23T13:28:51","RfRaw":{"Data":"AA B1 04 0118 00C8 04A6 049C 381828 55"}}
{"Time":"2020-06-23T13:28:56","RfRaw":{"Data":"AA B1 04 0140 047E 00B4 226A 3818282818281818282818182818281828182828181828281828182818281818281828182818281828182818281828182818282818281818281828182818281828 55"}}
{"Time":"2020-06-23T13:28:56","RfRaw":{"Data":"AA B1 04 0118 00C8 04A6 049C 381828 55"}}
{"Time":"2020-06-23T13:28:59","RfRaw":{"Data":"AA B1 03 0136 0276 04B0 281918 55"}} //not my button press, probably noise
{"Time":"2020-06-23T13:28:59","RfRaw":{"Data":"AA B1 02 0320 047E 180808 55"}} //not my button press, probably noise
{"Time":"2020-06-23T13:28:59","RfRaw":{"Data":"AA B1 03 032A 0168 0442 280908 55"}} //not my button press, probably noise
{"Time":"2020-06-23T13:29:00","RfRaw":{"Data":"AA B1 04 0136 047E 00BE 226A 3818282818281818282818182818281828182828181828281828182818281818281828182818281828182818281828182818282818281818281828182818281828 55"}}
{"Time":"2020-06-23T13:29:00","RfRaw":{"Data":"AA B1 04 0118 00C8 04A6 049C 381828 55"}}
{"Time":"2020-06-23T13:29:05","RfRaw":{"Data":"AA B1 04 015E 046A 0078 0460 381828 55"}}
{"Time":"2020-06-23T13:29:05","RfRaw":{"Data":"AA B1 04 0136 047E 00B4 226A 3818282818281818282818182818281828182828181828281828182818281818281828182818281828182818281828182818282818281818281828182818281828 55"}}
{"Time":"2020-06-23T13:29:05","RfRaw":{"Data":"AA B1 04 0122 00C8 049C 0492 381828 55"}}
{"Time":"2020-06-23T13:29:10","RfRaw":{"Data":"AA B1 04 0140 047E 00B4 226A 3818282818281818282818182818281828182828181828281828182818281818281828182818281828182818281828182818282818281818281828182818281828 55"}}
{"Time":"2020-06-23T13:29:10","RfRaw":{"Data":"AA B1 04 0122 00C8 04A6 049C 381828 55"}}
{"Time":"2020-06-23T13:29:14","RfRaw":{"Data":"AA B1 04 015E 0456 00A0 044C 381828 55"}}
{"Time":"2020-06-23T13:29:14","RfRaw":{"Data":"AA B1 04 0136 047E 00B4 226A 3818282818281818282818182818281828182828181828281828182818281818281828182818281828182818281828182818282818281818281828182818281828 55"}}
{"Time":"2020-06-23T13:29:14","RfRaw":{"Data":"AA B1 04 0122 00D2 04A6 049C 381828 55"}}
{"Time":"2020-06-23T13:29:19","RfRaw":{"Data":"AA B1 04 0136 047E 00B4 226A 3818282818281818282818182818281828182828181828281828182818281818281828182818281828182818281828182818282818281818281828182818281828 55"}}
{"Time":"2020-06-23T13:29:19","RfRaw":{"Data":"AA B1 03 0118 04A6 049C 280818 55"}}
{"Time":"2020-06-23T13:29:24","RfRaw":{"Data":"AA B1 04 0136 047E 00B4 2274 3818282818281818282818182818281828182828181828281828182818281818281828182818281828182818281828182818282818281818281828182818281828 55"}}
{"Time":"2020-06-23T13:29:24","RfRaw":{"Data":"AA B1 04 0118 00C8 04A6 0492 381828 55"}}
{"Time":"2020-06-23T13:29:28","RfRaw":{"Data":"AA B1 04 0136 047E 00B4 226A 3818282818281818282818182818281828182828181828281828182818281818281828182818281828182818281828182818282818281818281828182818281828 55"}}
{"Time":"2020-06-23T13:29:28","RfRaw":{"Data":"AA B1 04 0118 00C8 04A6 0492 381828 55"}}
{"Time":"2020-06-23T13:29:32","RfRaw":{"Data":"AA B1 04 014A 0474 00A0 046A 381828 55"}}
{"Time":"2020-06-23T13:29:33","RfRaw":{"Data":"AA B1 04 0140 047E 00B4 226A 3818282818281818282818182818281828182828181828281828182818281818281828182818281828182818281828182818282818281818281828182818281828 55"}}
{"Time":"2020-06-23T13:29:33","RfRaw":{"Data":"AA B1 04 0122 00C8 04A6 049C 381828 55"}}
{"Time":"2020-06-23T13:29:37","RfRaw":{"Data":"AA B1 04 0140 047E 00B4 226A 3818282818281818282818182818281828182828181828281828182818281818281828182818281828182818281828182818282818281818281828182818281828 55"}}
{"Time":"2020-06-23T13:29:37","RfRaw":{"Data":"AA B1 04 0118 00C8 04A6 0492 381828 55"}}
{"Time":"2020-06-23T13:29:38","RfRaw":{"Data":"AA B1 04 0122 02A8 04A6 04B0 381929 55"}}
{"Time":"2020-06-23T13:29:38","RfRaw":{"Data":"AA B1 02 032A 0492 180808 55"}}
{"Time":"2020-06-23T13:29:38","RfRaw":{"Data":"AA B1 04 0154 026C 26C0 0456 381929 55"}}
{"Time":"2020-06-23T13:29:42","RfRaw":{"Data":"AA B1 04 0140 0474 00B4 2274 3818282818281818282818182818281828182828181828281828182818281818281828182818281828182818281828182818282818281818281828182818281828 55"}}
{"Time":"2020-06-23T13:29:42","RfRaw":{"Data":"AA B1 04 0122 00C8 049C 0492 381828 55"}}
{"Time":"2020-06-23T13:29:46","RfRaw":{"Data":"AA B1 04 0136 047E 00AA 226A 3818282818281818282818182818281828182828181828281828182818281818281828182818281828182818281828182818282818281818281828182818281828 55"}}
{"Time":"2020-06-23T13:29:46","RfRaw":{"Data":"AA B1 04 0118 00C8 04A6 049C 381828 55"}}
{"Time":"2020-06-23T13:29:51","RfRaw":{"Data":"AA B1 04 0154 00A0 047E 0460 381828 55"}}
{"Time":"2020-06-23T13:29:51","RfRaw":{"Data":"AA B1 04 0140 0474 00B4 226A 3818282818281818282818182818281828182828181828281828182818281818281828182818281828182818281828182818282818281818281828182818281828 55"}}
{"Time":"2020-06-23T13:29:51","RfRaw":{"Data":"AA B1 04 0122 00C8 049C 0492 381828 55"}}

Sample of merging

The codes I used:

AA B1 04 0168 0456 008C 0442 381828 55
AA B1 04 0136 047E 00AA 2274 3818282818281818282818182818281828182828181828281828182818281818281828182818281828182818281828182818282818281818281828182818281828 55
AA B1 04 0118 00C8 04A6 0492 381828 55

Working the codes:

AA B1 04 0136 047E 00AA 2274 // most consistent buckets
1828 // code snippet 1
182828182818182828181828182818281828281818282818281828182818182818281828182818 28182818281828182818282818281818281828182818281828 // code snippet 2
1828 // code snippet 3

Merge:

AA B1 04 0136 047E 00B4 227E 1828182828182818182828181828182818281828281818282818281828182818182818281828182818281828182818281828182828182818182818281828182818281828 55

Convert to B0 using BitBucketConverter.py:

AA B0 4E 04 08 0136 047E 00B4 227E 1828182828182818182828181828182818281828281818282818281828182818182818281828182818281828182818281828182828182818182818281828182818281828 55

Anybody got any ideas?

Lippo89 commented 4 years ago

Hi, I'm struggling with a same problem. I usually take the longest one and It usually works some time.