rtl_433 icon indicating copy to clipboard operation
rtl_433 copied to clipboard

Bresser Lightning Sensor.

Open AndreyMihaylov85 opened this issue 2 years ago • 54 comments

Hello,

recently i bought mentioned lightning sensor, but not supported yet.

i followed the suggestion by recording sample here is the result.

est mode active. Reading samples from file: g045_868M_1000k.cu8 baseband_demod_FM: low pass filter for 250000 Hz at cutoff 25000 Hz, 40.0 us Detected FSK package @0.088888s Analyzing pulses... Total count: 57, width: 71.66 ms (17915 S) Pulse width distribution: [ 0] count: 6, width: 1500 us [1456;1712] ( 375 S) [ 1] count: 47, width: 484 us [480;492] ( 121 S) [ 2] count: 4, width: 976 us [972;980] ( 244 S) Gap width distribution: [ 0] count: 47, width: 484 us [480;492] ( 121 S) [ 1] count: 4, width: 1456 us [1456;1460] ( 364 S) [ 2] count: 1, width: 1936 us [1936;1936] ( 484 S) [ 3] count: 3, width: 968 us [968;972] ( 242 S) [ 4] count: 1, width: 2428 us [2428;2428] ( 607 S) Pulse period distribution: [ 0] count: 10, width: 2116 us [1944;2432] ( 529 S) [ 1] count: 41, width: 968 us [968;976] ( 242 S) [ 2] count: 3, width: 1452 us [1452;1456] ( 363 S) [ 3] count: 2, width: 2912 us [2908;2916] ( 728 S) Pulse timing distribution: [ 0] count: 10, width: 1484 us [1456;1712] ( 371 S) [ 1] count: 94, width: 484 us [480;492] ( 121 S) [ 2] count: 7, width: 972 us [968;980] ( 243 S) [ 3] count: 1, width: 1936 us [1936;1936] ( 484 S) [ 4] count: 1, width: 2428 us [2428;2428] ( 607 S) [ 5] count: 1, width: 36060 us [36060;36060] (9015 S) Level estimates [high, low]: 15927, 424 RSSI: -0.1 dB SNR: 15.7 dB Noise: -15.9 dB Frequency offsets [F1, F2]: 22601, 2388 (+86.2 kHz, +9.1 kHz) Guessing modulation: Pulse Code Modulation (Not Return to Zero) view at https://triq.org/pdv/#AAB031060105CC01E403CC0790097C8CDC8191919191919191919191919191919191919191919191919091A1819190918091819355+AAB014060105CC01E403CC0790097C8CDCA1A28291919455+AAB01E060105CC01E403CC0790097C8CDC91919192A0919191819191919191919555 Attempting demodulation... short_width: 484, long_width: 484, reset_limit: 495616, sync_width: 0 Use a flex decoder with -X 'n=name,m=FSK_PCM,s=484,l=484,r=495616' pulse_demod_pcm(): Analyzer Device bitbuffer:: Number of rows: 1 [00] {222} f5 55 55 55 55 55 51 6e a2 e2 e8 6c e5 41 54 c5 5d 55 50 00 00 00 00 00 00 00 00 00

Flex decoder data:

X 'n=test,m=FSK_PCM,s=484,l=484,r=495616

time : 2022-08-08 18:26:49 model : test count : 1 num_rows : 1 rows : len : 35 data : 6ae500000 codes : {35}6ae500000

is there already decoder which i can use or someone who have decode it ?

thank you in advance,

AndreyMihaylov85 avatar Aug 09 '22 11:08 AndreyMihaylov85

It does not look like the Acurite lightning detector we have and does no exactly match the FineOffset-W57.

Get raw codes with -X 'n=Bresser-Lightning,m=FSK_PCM,s=484,l=484,r=5000,preamble=aa2dd4'

The lenght is 8 to 10 bytes, not sure with the trailer in that codes above.

Record a few different codes and post here.

zuckschwerdt avatar Aug 09 '22 11:08 zuckschwerdt

Btw. the code above is aaaaaaaaaaaa 2dd4 5c5d0d9ca82a98abaaaa 00... With -X it should show as 5c5d0d9ca82a98abaaaa00...

zuckschwerdt avatar Aug 09 '22 11:08 zuckschwerdt

no data with -X 'n=Bresser-Lightning,m=FSK_PCM,s=484,l=484,r=5000,preamble=aa2dd4'

but following without preamble=aa2dd4


time : 2022-08-09 17:12:44 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 26 data : 6ae5000 codes : {26}6ae5000


time : 2022-08-09 17:13:43 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 26 data : 6ae5000 codes : {26}6ae5000


time : 2022-08-09 17:14:41 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 16 data : 6ae5 codes : {16}6ae5

AndreyMihaylov85 avatar Aug 09 '22 14:08 AndreyMihaylov85

Can you upload g045_868M_1000k.cu8 as zip here?

zuckschwerdt avatar Aug 09 '22 14:08 zuckschwerdt

here is,

g045_868M_1000k.zip

AndreyMihaylov85 avatar Aug 09 '22 14:08 AndreyMihaylov85

I see. It was a confusion about the sample rate. Use this: -X 'n=Bresser-Lightning,m=FSK_PCM,s=120,l=120,r=2000,preamble=aa2dd4'

zuckschwerdt avatar Aug 09 '22 14:08 zuckschwerdt

here is the output


time : 2022-08-09 17:34:11 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : 5c5d0d9ca82a98abaaaa0000 codes : {95}5c5d0d9ca82a98abaaaa0000


time : 2022-08-09 17:35:10 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 96 data : 5c5d0d9ca82a98abaaaa0000 codes : {96}5c5d0d9ca82a98abaaaa0000


time : 2022-08-09 17:36:08 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : 5c5d0d9ca82a98abaaaa0000 codes : {95}5c5d0d9ca82a98abaaaa0000


time : 2022-08-09 17:37:07 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : 5c5d0d9ca82a98abaaaa0000 codes : {95}5c5d0d9ca82a98abaaaa0000

AndreyMihaylov85 avatar Aug 09 '22 14:08 AndreyMihaylov85

This is only always the same code 5c5d0d9ca82a98abaaaa0000 we need a few different ones. Then we can check what changes, if there is a checksum and such. Try to collect codes for a few days and then only show distinct (different) codes.

zuckschwerdt avatar Aug 09 '22 14:08 zuckschwerdt

its also 5c5d0d9ca82a98abaaa8, but i will collect more codes and paste them here.

thank you a lot !

AndreyMihaylov85 avatar Aug 09 '22 14:08 AndreyMihaylov85

Hello,

i collect some more codes last night, not sure whether these help for further checks or not.

5c5d0d9ca82a98abaaaa0000000 5c5d0d9ca82a98abaaa8 5c5d0d9ca855315755540000 78ba1b39505531575550 5c5d0d9ca82a98affffc 5c7ffffffffffffffffffffffffffffffffffe 5c5d0d9ca82a98bfffffffffffffffffffffff8


time : 2022-08-09 18:19:02 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 105 data : 5c5d0d9ca82a98abaaaa0000000 codes : {105}5c5d0d9ca82a98abaaaa0000000



time : 2022-08-09 18:44:23 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 78 data : 5c5d0d9ca82a98abaaa8 codes : {78}5c5d0d9ca82a98abaaa8



time : 2022-08-10 03:00:38 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 94 data : 5c5d0d9ca855315755540000 codes : {94}5c5d0d9ca855315755540000



time : 2022-08-10 03:09:25 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 77 data : 78ba1b39505531575550 codes : {77}78ba1b39505531575550



time : 2022-08-10 03:32:49 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 78 data : 5c5d0d9ca82a98affffc codes : {78}5c5d0d9ca82a98affffc


time : 2022-08-10 03:33:47 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 151 data : 5c7ffffffffffffffffffffffffffffffffffe codes : {151}5c7ffffffffffffffffffffffffffffffffffe



time : 2022-08-10 03:43:32 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 153 data : 5c5d0d9ca82a98bfffffffffffffffffffffff8 codes : {153}5c5d0d9ca82a98bfffffffffffffffffffffff8


regards,

AndreyMihaylov85 avatar Aug 10 '22 06:08 AndreyMihaylov85

It might be two codes: 5c5d0d9ca82a98abaaaa0 5c5d0d9ca82a98abaaa8 but they could be the same, not sure.

Maybe simulate a lightning? Use a heavy motor near the sensor. Like a power drill or vacuum cleaner?

@MksRasp and @rct might know some trick to trigger a lightning sensor.

zuckschwerdt avatar Aug 10 '22 08:08 zuckschwerdt

i follow your advice and use power drill which trigger a lighting sensor here is the results.

time : 2022-08-10 16:52:45 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : c87e0d9ca9ca98a2aaaa0000 codes : {95}c87e0d9ca9ca98a2aaaa0000


time : 2022-08-10 16:53:03 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : 3ac80d9ca92a98afaaaa0000 codes : {95}3ac80d9ca92a98afaaaa0000


time : 2022-08-10 16:53:12 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : 216f0d9ca93a98afaaaa0000 codes : {95}216f0d9ca93a98afaaaa0000


time : 2022-08-10 16:53:15 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : 4ce00d9caeaa98abaaaa0000 codes : {95}4ce00d9caeaa98abaaaa0000


time : 2022-08-10 16:54:13 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : 4ce00d9caeaa98abaaaa0000 codes : {95}4ce00d9caeaa98abaaaa0000


time : 2022-08-10 16:55:18 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 153 data : 57470d9caeba98afffffffffffffffffffffff8 codes : {153}57470d9caeba98afffffffffffffffffffffff8


time : 2022-08-10 16:56:41 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : 7bae0d9cae8a98abaaaa0000 codes : {95}7bae0d9cae8a98abaaaa0000


time : 2022-08-10 16:57:25 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 113 data : 60090d9cae9a98abaaaa000000000 codes : {113}60090d9cae9a98abaaaa000000000


time : 2022-08-10 16:59:22 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 153 data : 6009ffffffffffffffffffffffffffffffffff8 codes : {153}6009ffffffffffffffffffffffffffffffffff8


time : 2022-08-10 16:59:32 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 94 data : 227c0d9caeeab15755540000 codes : {94}227c0d9caeeab15755540000

AndreyMihaylov85 avatar Aug 10 '22 14:08 AndreyMihaylov85

Very good. Here is a BitBench with that data. It seems like there is a checksum in the first two bytes. Strange that it's in the front. It does not work as CRC but seems like one.

Maybe @rct can spot which fields encode things like distance and count.

zuckschwerdt avatar Aug 10 '22 15:08 zuckschwerdt

This appears to follow the protocol of Bresser 7-in-1 messages (both OEM'd by CCL Electronics). It looks like a 16 bit digest followed by a 16 bit ID followed by a 12? bit BCD count and then the rest.

anthyz avatar Aug 10 '22 16:08 anthyz

@anthyz oh, of course! very good find! After undoing the whitening (0xaa) it's LFSR-16 gen 8810 key abf9 final xor 899e (link update with whitening)

zuckschwerdt avatar Aug 10 '22 16:08 zuckschwerdt

From reading the manual apparently the sensor does some basic loud noise detection, too. No indication it's reported in a message, though. Might be good to experiment with that as well as triggering messages with different sensitivity levels selected.

anthyz avatar Aug 10 '22 17:08 anthyz

here is some messages with different sensitivity levels selected.

Sensitivity LOW + triggering the sensor.


time : 2022-08-11 17:20:39 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 78 data : 0e950d9caeda98abaaa8 codes : {78}0e950d9caeda98abaaa8


time : 2022-08-11 17:21:15 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 78 data : 91d80d9cae2a98abaaa8 codes : {78}91d80d9cae2a98abaaa8


time : 2022-08-11 17:22:13 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : 91d80d9cae2a98abaaaa0000 codes : {95}91d80d9cae2a98abaaaa0000

Sensitivity - Medium + triggering the sensor


time : 2022-08-11 17:24:43 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 78 data : e6b10d9cafaa98abaaa8 codes : {78}e6b10d9cafaa98abaaa8


time : 2022-08-11 17:24:45 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : fd160d9cafba98abaaaa0000 codes : {95}fd160d9cafba98abaaaa0000


time : 2022-08-11 17:25:20 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : d1ff0d9caf8a98abaaaa0000 codes : {95}d1ff0d9caf8a98abaaaa0000


time : 2022-08-11 17:25:30 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : ca580d9caf9a98abaaaa0000 codes : {95}ca580d9caf9a98abaaaa0000

AndreyMihaylov85 avatar Aug 11 '22 14:08 AndreyMihaylov85

I've update the BitBench link above. At least an event counter is visible. There could be a strength or distance indicator in the middle and maybe flags (interference detected?) at the very end?

zuckschwerdt avatar Aug 11 '22 16:08 zuckschwerdt

The sensitivity setting is not in the message, and it looks like there's occasionally a bad bit flip at the end (see the two examples with digest 0x3b72). For distance, byte[7] could be a candidate. I wonder if experimenting with the sensitivity set to high would get more varied results.

anthyz avatar Aug 11 '22 20:08 anthyz

Good morning,

messages i've posted in the begging were with sensitivity level - High,

i follow your advice and use power drill which trigger a lighting sensor here is the results.

time : 2022-08-10 16:52:45 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : c87e0d9ca9ca98a2aaaa0000 codes : {95}c87e0d9ca9ca98a2aaaa0000

time : 2022-08-10 16:53:03 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : 3ac80d9ca92a98afaaaa0000 codes : {95}3ac80d9ca92a98afaaaa0000

time : 2022-08-10 16:53:12 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : 216f0d9ca93a98afaaaa0000 codes : {95}216f0d9ca93a98afaaaa0000

time : 2022-08-10 16:53:15 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : 4ce00d9caeaa98abaaaa0000 codes : {95}4ce00d9caeaa98abaaaa0000

time : 2022-08-10 16:54:13 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : 4ce00d9caeaa98abaaaa0000 codes : {95}4ce00d9caeaa98abaaaa0000

time : 2022-08-10 16:55:18 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 153 data : 57470d9caeba98afffffffffffffffffffffff8 codes : {153}57470d9caeba98afffffffffffffffffffffff8

time : 2022-08-10 16:56:41 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 95 data : 7bae0d9cae8a98abaaaa0000 codes : {95}7bae0d9cae8a98abaaaa0000

time : 2022-08-10 16:57:25 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 113 data : 60090d9cae9a98abaaaa000000000 codes : {113}60090d9cae9a98abaaaa000000000

time : 2022-08-10 16:59:22 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 153 data : 6009ffffffffffffffffffffffffffffffffff8 codes : {153}6009ffffffffffffffffffffffffffffffffff8

time : 2022-08-10 16:59:32 model : Bresser-Lightning count : 1 num_rows : 1 rows : len : 94 data : 227c0d9caeeab15755540000 codes : {94}227c0d9caeeab15755540000

AndreyMihaylov85 avatar Aug 12 '22 05:08 AndreyMihaylov85

@zuckschwerdt, what might be the decoder for distance and eventually for distance as per suggestion above for byte [7]. im in area where the forecast for the next days is heavy thunderstorms, which could be good opportunity for testing.

thank you in advance,

AndreyMihaylov85 avatar Aug 15 '22 14:08 AndreyMihaylov85

Sorry, I don't have any experience with lightning sensors. Log all data if you can and maybe note down some prominent events (with the "every 3 seconds between lightning and thunder equals a kilometer" estimate).

zuckschwerdt avatar Aug 15 '22 14:08 zuckschwerdt

Just a wild guess, but IF the sensor uses an "AS3935 Franklin Lightning Sensor IC" by AMS, the datasheet (e.g. https://www.digikey.de/htmldatasheets/production/1124289/0/0/1/as3935.html) might provide some insights about the kind of data and encoding to be expected.

matthias-bs avatar Aug 15 '22 15:08 matthias-bs

Just a wild guess, but IF the sensor uses an "AS3935 Franklin Lightning Sensor IC" by AMS, the datasheet (e.g. https://www.digikey.de/htmldatasheets/production/1124289/0/0/1/as3935.html) might provide some insights about the kind of data and encoding to be expected.

here is the picture of the board, there is RFID transponder coil ma5532-ae, google says Developed to work with austriamicrosystems AS3935 Franklin Lightning Sensor IC (e.g. https://www.coilcraft.com/en-us/products/rf/rfid-transponders/x-y-axis-transponder-coil-2mhz/ma5532/) IMG_4849

AndreyMihaylov85 avatar Aug 15 '22 15:08 AndreyMihaylov85

I would like to bet on what kind of IC U3 is... And we have nice little labelled test points (I²C interface) on the PCB! There shines a little light into the black box!

matthias-bs avatar Aug 15 '22 16:08 matthias-bs

And there is a serial interface (RX, TX), too! Maybe it has something to tell you, too!

matthias-bs avatar Aug 15 '22 16:08 matthias-bs

Excellent finds! According to Table 17 in section 8.9.3 of the AS3935 datasheet there are 16 possible distance values. The byte[7] values seen so far in the bitbench data (01, 05, and 08) are consistent with this table.

anthyz avatar Aug 15 '22 16:08 anthyz

more data from the heavy thunderstorms we just had + video :)

https://user-images.githubusercontent.com/110809838/184691686-d7a2e7e2-96a9-4662-abaf-8e88b6de5ecb.MP4

data.docx

AndreyMihaylov85 avatar Aug 15 '22 18:08 AndreyMihaylov85

Removing dups and broken codes this BitBench shows 4 events, the first at 21 km, then 3 overhead ;) Nothing apparent in the remaining 12+16 bits. Might be good enough for a decoder, then watch the unknown fields long term, maybe some pattern reveals someday.

zuckschwerdt avatar Aug 15 '22 18:08 zuckschwerdt

more data from the heavy thunderstorms we just had + video :) 1660585221297348.MP4

data.docx

Nice test setup! :-)

matthias-bs avatar Aug 15 '22 18:08 matthias-bs