Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with values for short_limit, long_limit and reset_limit #23

Closed
barrie0482 opened this issue Jan 5, 2014 · 36 comments
Closed

Help with values for short_limit, long_limit and reset_limit #23

barrie0482 opened this issue Jan 5, 2014 · 36 comments

Comments

@barrie0482
Copy link

Hi Benjamin,

I am trying to add decoding of data for the Oregon Scientific RMR382 (Sender THN132N) to rtl_433. I am having difficulty understanding how to work out the values for short_limit, long_limit and reset_limit. I have had a go, but I don't think I have the correct values set. I have detailed my values below.

I have also included rtl_433 -a output for an Oregon Scientific THN132N sender and rtl_433 -a output for a Holman Industries iWeather WS5029 sender.

Any assistance in working out these values would be appreciated.

Thanks.

Cheers, Barrie

r_device iweather = {
    /* .id             = */ 9,
    /* .name           = */ "iWeather Weather Station",
    /* .modulation     = */ OOK_PWM_D,
    /* .short_limit    = */ 126,
    /* .long_limit     = */ 248,
    /* .reset_limit    = */ 3000,
    /* .json_callback  = */ &iweather_callback,
};

Registering protocol[01] Rubicson Temperature Sensor
Registering protocol[02] Prologue Temperature Sensor
Registering protocol[03] Silvercrest Remote Control
Registering protocol[04] ELV EM 1000
Registering protocol[05] ELV WS 2000
Registering protocol[06] Waveman Switch Transmitter
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Exact sample rate is: 250000.000414 Hz
Sample rate set to 250000.
Sample rate decimation set to 0. 250000->250000
Bit detection level set to 10000.
Tuner gain set to Auto.
Reading samples in async mode...
Tuned to 433920000 Hz.

rtl_433 -a output for an Oregon Scientific THN132N sender

*** signal_start = 5476938, signal_end = 5581042
signal_len = 104104,  pulses = 196
Iteration 1. t: 174    min: 112 (56)    max: 236 (140)    delta 117
Iteration 2. t: 174    min: 112 (56)    max: 236 (140)    delta 0
Pulse coding: Short pulse length 112 - Long pulse length 236

Short distance: 131, long distance: 252, packet distance: 2324

p_limit: 174

[00] {98} ff ff 24 eb 57 ea 9f 7d 2d be dd 7f 80 : 11111111 11111111 00100100 11101011 01010111 11101010 10011111 01111101 00101101 10111110 11011101 01111111 10000000 
[01] {98} ff ff 24 eb 57 ea 9f 7d 2d be dd 7f 80 : 11111111 11111111 00100100 11101011 01010111 11101010 10011111 01111101 00101101 10111110 11011101 01111111 10000000 

rtl_433 -a output for a Holman Industries iWeather WS5029 sender

*** signal_start = 6262899, signal_end = 6499663
signal_len = 236764,  pulses = 576
Iteration 1. t: 178    min: 118 (347)    max: 238 (229)    delta 10049
Iteration 2. t: 179    min: 119 (351)    max: 240 (225)    delta 5
Iteration 3. t: 179    min: 119 (352)    max: 240 (224)    delta 0
Pulse coding: Short pulse length 119 - Long pulse length 240

Short distance: 125, long distance: 247, packet distance: 1225

p_limit: 179

[00] {7} 00 : 00000000 
[01] {96} aa a5 98 5f 01 36 3e 01 30 58 d8 80 00 : 10101010 10100101 10011000 01011111 00000001 00110110 00111110 00000001 00110000 01011000 11011000 10000000 00000000 
[02] {96} aa a5 98 5f 01 36 3e 01 30 58 d8 00 00 : 10101010 10100101 10011000 01011111 00000001 00110110 00111110 00000001 00110000 01011000 11011000 00000000 00000000 
[03] {96} aa a5 98 5f 01 36 3e 01 30 58 d8 00 00 : 10101010 10100101 10011000 01011111 00000001 00110110 00111110 00000001 00110000 01011000 11011000 00000000 00000000 
[04] {96} aa a5 98 5f 01 36 3e 01 30 58 d8 00 00 : 10101010 10100101 10011000 01011111 00000001 00110110 00111110 00000001 00110000 01011000 11011000 00000000 00000000 
[05] {96} aa a5 98 5f 01 36 3e 01 30 58 d8 80 00 : 10101010 10100101 10011000 01011111 00000001 00110110 00111110 00000001 00110000 01011000 11011000 10000000 00000000 
[06] {89} aa a5 98 5f 01 36 3e 01 30 58 d8 00 : 10101010 10100101 10011000 01011111 00000001 00110110 00111110 00000001 00110000 01011000 11011000 00000000 
@gkoh
Copy link

gkoh commented Jan 5, 2014

I believe the following to be true, others may correct me:

  • use the 'p_limit' from the '-a' output for the short_limit
  • use the 'packet distance' (or a value somewhat greater) from the '-a' output for the long_limit
  • use a reset_limit much greater than the long_limit (some value to indicate protocol sync is lost)

@merbanan
Copy link
Owner

merbanan commented Jan 5, 2014

Look in issue #5 for some details. If you post a debug output it will be easy to tell for sure.

@barrie0482
Copy link
Author

Hi Benjamin and Guo-Rong,

Thank you for your comments. I have added the debug output for both the Holman iWeather and the Oregon devices. Sorry about the length, but I don't think I can attach files here. I have snipped a lot of lines in the middle of each output.

I'll go now and have a read of Issue #5 and also try Guo-Rong's suggestion.

Thanks,

Cheers, Barrie

Registering protocol[01] Rubicson Temperature Sensor
Registering protocol[02] Prologue Temperature Sensor
Registering protocol[03] Silvercrest Remote Control
Registering protocol[04] ELV EM 1000
Registering protocol[05] ELV WS 2000
Registering protocol[06] Waveman Switch Transmitter
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Exact sample rate is: 250000.000414 Hz
Sample rate set to 250000.
Sample rate decimation set to 0. 250000->250000
Bit detection level set to 10000.
Tuner gain set to Auto.
Reading samples in async mode...
Tuned to 433920000 Hz.

Holman iWeather Debug Output

pulse_distance 10087107
pulse_start distance 10087333
pulse_start[1] found at sample 13181117, value = 10146
pulse_end  [1] found at sample 13181224, pulse length = 107, pulse avg length = 38801
pulse_distance 257
pulse_start distance 364
pulse_start[2] found at sample 13181481, value = 10213
pulse_end  [2] found at sample 13181594, pulse length = 113, pulse avg length = 19457
pulse_distance 259
pulse_start distance 372
pulse_start[3] found at sample 13181853, value = 10166
pulse_end  [3] found at sample 13181958, pulse length = 105, pulse avg length = 13006
pulse_distance 257
pulse_start distance 362
pulse_start[4] found at sample 13182215, value = 10184
pulse_end  [4] found at sample 13182326, pulse length = 111, pulse avg length = 9782
pulse_distance 259
pulse_start distance 370
pulse_start[5] found at sample 13182585, value = 10001
pulse_end  [5] found at sample 13182691, pulse length = 106, pulse avg length = 7847
pulse_distance 258
pulse_start distance 364
pulse_start[6] found at sample 13182949, value = 10081
pulse_end  [6] found at sample 13183054, pulse length = 105, pulse avg length = 6556
pulse_distance 263
pulse_start distance 368
pulse_start[7] found at sample 13183317, value = 10022
pulse_end  [7] found at sample 13183424, pulse length = 107, pulse avg length = 5635
pulse_distance 1229
pulse_start distance 1336
pulse_start[8] found at sample 13184653, value = 10147
pulse_end  [8] found at sample 13184889, pulse length = 236, pulse avg length = 4960
pulse_distance 131
pulse_start distance 367
pulse_start[9] found at sample 13185020, value = 10098
pulse_end  [9] found at sample 13185135, pulse length = 115, pulse avg length = 4422
pulse_distance 252
pulse_start distance 367
pulse_start[10] found at sample 13185387, value = 10342
pulse_end  [10] found at sample 13185621, pulse length = 234, pulse avg length = 4003
pulse_distance 130
pulse_start distance 364
pulse_start[11] found at sample 13185751, value = 10022
pulse_end  [11] found at sample 13185868, pulse length = 117, pulse avg length = 3650
pulse_distance 254
pulse_start distance 371
pulse_start[12] found at sample 13186122, value = 10204
pulse_end  [12] found at sample 13186354, pulse length = 232, pulse avg length = 3365
pulse_distance 133
pulse_start distance 365
pulse_start[13] found at sample 13186487, value = 10160
pulse_end  [13] found at sample 13186600, pulse length = 113, pulse avg length = 3115
pulse_distance 247
pulse_start distance 360
pulse_start[14] found at sample 13186847, value = 10144
pulse_end  [14] found at sample 13187085, pulse length = 238, pulse avg length = 2909
pulse_distance 132
pulse_start distance 370
pulse_start[15] found at sample 13187217, value = 10119
pulse_end  [15] found at sample 13187333, pulse length = 116, pulse avg length = 2723
pulse_distance 247
pulse_start distance 363
pulse_start[16] found at sample 13187580, value = 10229
pulse_end  [16] found at sample 13187820, pulse length = 240, pulse avg length = 2568
pulse_distance 130
pulse_start distance 370
pulse_start[17] found at sample 13187950, value = 10375
pulse_end  [17] found at sample 13188067, pulse length = 117, pulse avg length = 2423
pulse_distance 245
pulse_start distance 362
pulse_start[18] found at sample 13188312, value = 10094
pulse_end  [18] found at sample 13188552, pulse length = 240, pulse avg length = 2302
pulse_distance 132
pulse_start distance 372
pulse_start[19] found at sample 13188684, value = 10105
pulse_end  [19] found at sample 13188799, pulse length = 115, pulse avg length = 2187
pulse_distance 244
pulse_start distance 359
pulse_start[20] found at sample 13189043, value = 10068
pulse_end  [20] found at sample 13189160, pulse length = 117, pulse avg length = 2083
pulse_distance 251
pulse_start distance 368
pulse_start[21] found at sample 13189411, value = 10194
pulse_end  [21] found at sample 13189652, pulse length = 241, pulse avg length = 1996
pulse_distance 125
pulse_start distance 366
pulse_start[22] found at sample 13189777, value = 10065
pulse_end  [22] found at sample 13189893, pulse length = 116, pulse avg length = 1910
pulse_distance 251
pulse_start distance 367
pulse_start[23] found at sample 13190144, value = 10317
pulse_end  [23] found at sample 13190385, pulse length = 241, pulse avg length = 1838
pulse_distance 124
pulse_start distance 365
pulse_start[24] found at sample 13190509, value = 10055
pulse_end  [24] found at sample 13190749, pulse length = 240, pulse avg length = 1771
pulse_distance 126
pulse_start distance 366
pulse_start[25] found at sample 13190875, value = 10034
pulse_end  [25] found at sample 13190998, pulse length = 123, pulse avg length = 1705
pulse_distance 244
pulse_start distance 367
pulse_start[26] found at sample 13191242, value = 10063
pulse_end  [26] found at sample 13191358, pulse length = 116, pulse avg length = 1644
pulse_distance 251
pulse_start distance 367
pulse_start[27] found at sample 13191609, value = 10232
pulse_end  [27] found at sample 13191851, pulse length = 242, pulse avg length = 1592
pulse_distance 123
pulse_start distance 365
pulse_start[28] found at sample 13191974, value = 10263
pulse_end  [28] found at sample 13192215, pulse length = 241, pulse avg length = 1544
pulse_distance 126
pulse_start distance 367
pulse_start[29] found at sample 13192341, value = 10388
pulse_end  [29] found at sample 13192456, pulse length = 115, pulse avg length = 1494
pulse_distance 252
pulse_start distance 367
pulse_start[30] found at sample 13192708, value = 10069
pulse_end  [30] found at sample 13192823, pulse length = 115, pulse avg length = 1448
pulse_distance 252
pulse_start distance 367
pulse_start[31] found at sample 13193075, value = 10136
pulse_end  [31] found at sample 13193191, pulse length = 116, pulse avg length = 1405
pulse_distance 253
pulse_start distance 369
pulse_start[32] found at sample 13193444, value = 10052
pulse_end  [32] found at sample 13193556, pulse length = 112, pulse avg length = 1365
pulse_distance 253
pulse_start distance 365
pulse_start[33] found at sample 13193809, value = 10160
pulse_end  [33] found at sample 13194042, pulse length = 233, pulse avg length = 1331
pulse_distance 130
pulse_start distance 363
pulse_start[34] found at sample 13194172, value = 10212
pulse_end  [34] found at sample 13194289, pulse length = 117, pulse avg length = 1295
pulse_distance 253
pulse_start distance 370
pulse_start[35] found at sample 13194542, value = 10085
pulse_end  [35] found at sample 13194774, pulse length = 232, pulse avg length = 1265
pulse_distance 130
pulse_start distance 362
pulse_start[36] found at sample 13194904, value = 10243
pulse_end  [36] found at sample 13195147, pulse length = 243, pulse avg length = 1236
pulse_distance 124
pulse_start distance 367
pulse_start[37] found at sample 13195271, value = 10124
pulse_end  [37] found at sample 13195512, pulse length = 241, pulse avg length = 1209
pulse_distance 126
pulse_start distance 367
pulse_start[38] found at sample 13195638, value = 10199
pulse_end  [38] found at sample 13195877, pulse length = 239, pulse avg length = 1184
pulse_distance 128
pulse_start distance 367
pulse_start[39] found at sample 13196005, value = 10253
pulse_end  [39] found at sample 13196243, pulse length = 238, pulse avg length = 1159
pulse_distance 130
pulse_start distance 368
pulse_start[40] found at sample 13196373, value = 10137
pulse_end  [40] found at sample 13196490, pulse length = 117, pulse avg length = 1133
pulse_distance 252
pulse_start distance 369
pulse_start[41] found at sample 13196742, value = 10079
pulse_end  [41] found at sample 13196855, pulse length = 113, pulse avg length = 1109
pulse_distance 248
pulse_start distance 361
pulse_start[42] found at sample 13197103, value = 10136
pulse_end  [42] found at sample 13197217, pulse length = 114, pulse avg length = 1085
pulse_distance 252
pulse_start distance 366
pulse_start[43] found at sample 13197469, value = 10228
pulse_end  [43] found at sample 13197586, pulse length = 117, pulse avg length = 1062
pulse_distance 251
pulse_start distance 368
pulse_start[44] found at sample 13197837, value = 10189
pulse_end  [44] found at sample 13197952, pulse length = 115, pulse avg length = 1041
pulse_distance 252
pulse_start distance 367

************  Snip 500 lines **************

pulse_start[549] found at sample 13387975, value = 10210
pulse_end  [549] found at sample 13388208, pulse length = 233, pulse avg length = 236
pulse_distance 131
pulse_start distance 364
pulse_start[550] found at sample 13388339, value = 10093
pulse_end  [550] found at sample 13388456, pulse length = 117, pulse avg length = 235
pulse_distance 250
pulse_start distance 367
pulse_start[551] found at sample 13388706, value = 10193
pulse_end  [551] found at sample 13388941, pulse length = 235, pulse avg length = 235
pulse_distance 130
pulse_start distance 365
pulse_start[552] found at sample 13389071, value = 10032
pulse_end  [552] found at sample 13389305, pulse length = 234, pulse avg length = 235
pulse_distance 131
pulse_start distance 365
pulse_start[553] found at sample 13389436, value = 10067
pulse_end  [553] found at sample 13389554, pulse length = 118, pulse avg length = 235
pulse_distance 251
pulse_start distance 369
pulse_start[554] found at sample 13389805, value = 10028
pulse_end  [554] found at sample 13390039, pulse length = 234, pulse avg length = 235
pulse_distance 131
pulse_start distance 365
pulse_start[555] found at sample 13390170, value = 10085
pulse_end  [555] found at sample 13390286, pulse length = 116, pulse avg length = 235
pulse_distance 253
pulse_start distance 369
pulse_start[556] found at sample 13390539, value = 10048
pulse_end  [556] found at sample 13390654, pulse length = 115, pulse avg length = 235
pulse_distance 244
pulse_start distance 359
pulse_start[557] found at sample 13390898, value = 10233
pulse_end  [557] found at sample 13391021, pulse length = 123, pulse avg length = 235
pulse_distance 245
pulse_start distance 368
pulse_start[558] found at sample 13391266, value = 10074
pulse_end  [558] found at sample 13391383, pulse length = 117, pulse avg length = 234
pulse_distance 251
pulse_start distance 368
pulse_start[559] found at sample 13391634, value = 10314
pulse_end  [559] found at sample 13391748, pulse length = 114, pulse avg length = 234
pulse_distance 256
pulse_start distance 370
pulse_start[560] found at sample 13392004, value = 10242
pulse_end  [560] found at sample 13392116, pulse length = 112, pulse avg length = 234
pulse_distance 253
pulse_start distance 365
pulse_start[561] found at sample 13392369, value = 10341
pulse_end  [561] found at sample 13392485, pulse length = 116, pulse avg length = 234
pulse_distance 250
pulse_start distance 366
pulse_start[562] found at sample 13392735, value = 10128
pulse_end  [562] found at sample 13392969, pulse length = 234, pulse avg length = 234
pulse_distance 130
pulse_start distance 364
pulse_start[563] found at sample 13393099, value = 10182
pulse_end  [563] found at sample 13393217, pulse length = 118, pulse avg length = 234
pulse_distance 251
pulse_start distance 369
pulse_start[564] found at sample 13393468, value = 10262
pulse_end  [564] found at sample 13393703, pulse length = 235, pulse avg length = 234
pulse_distance 130
pulse_start distance 365
pulse_start[565] found at sample 13393833, value = 10014
pulse_end  [565] found at sample 13394068, pulse length = 235, pulse avg length = 234
pulse_distance 129
pulse_start distance 364
pulse_start[566] found at sample 13394197, value = 10138
pulse_end  [566] found at sample 13394315, pulse length = 118, pulse avg length = 233
pulse_distance 250
pulse_start distance 368
pulse_start[567] found at sample 13394565, value = 10204
pulse_end  [567] found at sample 13394800, pulse length = 235, pulse avg length = 233
pulse_distance 131
pulse_start distance 366
pulse_start[568] found at sample 13394931, value = 10009
pulse_end  [568] found at sample 13395047, pulse length = 116, pulse avg length = 233
pulse_distance 253
pulse_start distance 369
pulse_start[569] found at sample 13395300, value = 10080
pulse_end  [569] found at sample 13395531, pulse length = 231, pulse avg length = 233
pulse_distance 132
pulse_start distance 363
pulse_start[570] found at sample 13395663, value = 10182
pulse_end  [570] found at sample 13395780, pulse length = 117, pulse avg length = 233
pulse_distance 250
pulse_start distance 367
pulse_start[571] found at sample 13396030, value = 10187
pulse_end  [571] found at sample 13396264, pulse length = 234, pulse avg length = 233
pulse_distance 132
pulse_start distance 366
pulse_start[572] found at sample 13396396, value = 10231
pulse_end  [572] found at sample 13396630, pulse length = 234, pulse avg length = 233
pulse_distance 131
pulse_start distance 365
pulse_start[573] found at sample 13396761, value = 10153
pulse_end  [573] found at sample 13396877, pulse length = 116, pulse avg length = 233
pulse_distance 251
pulse_start distance 367
pulse_start[574] found at sample 13397128, value = 10287
pulse_end  [574] found at sample 13397363, pulse length = 235, pulse avg length = 233
pulse_distance 132
pulse_start distance 367
pulse_start[575] found at sample 13397495, value = 10019
pulse_end  [575] found at sample 13397728, pulse length = 233, pulse avg length = 233
pulse_distance 131
pulse_start distance 364
pulse_start[576] found at sample 13397859, value = 10318
pulse_end  [576] found at sample 13397870, pulse length = 11, pulse avg length = 232
*** signal_start = 13171117, signal_end = 13407871
signal_len = 236754,  pulses = 576
Iteration 1. t: 174    min: 114 (331)    max: 234 (245)    delta 10709
Iteration 2. t: 174    min: 114 (331)    max: 234 (245)    delta 0
Pulse coding: Short pulse length 114 - Long pulse length 234

Short distance: 129, long distance: 251, packet distance: 1228

p_limit: 174

[00] {7} 00 : 00000000 
[01] {96} aa a5 98 5f 00 df 64 05 a0 2d 5b 80 00 : 10101010 10100101 10011000 01011111 00000000 11011111 01100100 00000101 10100000 00101101 01011011 10000000 00000000 
[02] {96} aa a5 98 5f 00 df 64 05 a0 2d 5b 80 00 : 10101010 10100101 10011000 01011111 00000000 11011111 01100100 00000101 10100000 00101101 01011011 10000000 00000000 
[03] {96} aa a5 98 5f 00 df 64 05 a0 2d 5b 80 00 : 10101010 10100101 10011000 01011111 00000000 11011111 01100100 00000101 10100000 00101101 01011011 10000000 00000000 
[04] {96} aa a5 98 5f 00 df 64 05 a0 2d 5b 80 00 : 10101010 10100101 10011000 01011111 00000000 11011111 01100100 00000101 10100000 00101101 01011011 10000000 00000000 
[05] {96} aa a5 98 5f 00 df 64 05 a0 2d 5b 80 00 : 10101010 10100101 10011000 01011111 00000000 11011111 01100100 00000101 10100000 00101101 01011011 10000000 00000000 
[06] {89} aa a5 98 5f 00 df 64 05 a0 2d 5b 00 : 10101010 10100101 10011000 01011111 00000000 11011111 01100100 00000101 10100000 00101101 01011011 00000000 

Oregon Debug Output

pulse_distance 3010153
pulse_start distance 3010153
pulse_start[1] found at sample 3010153, value = 10172
pulse_end  [1] found at sample 3010383, pulse length = 230, pulse avg length = 230
pulse_distance 256
pulse_start distance 486
pulse_start[2] found at sample 3010639, value = 10095
pulse_end  [2] found at sample 3010870, pulse length = 231, pulse avg length = 230
pulse_distance 257
pulse_start distance 488
pulse_start[3] found at sample 3011127, value = 10164
pulse_end  [3] found at sample 3011366, pulse length = 239, pulse avg length = 233
pulse_distance 250
pulse_start distance 489
pulse_start[4] found at sample 3011616, value = 10142
pulse_end  [4] found at sample 3011848, pulse length = 232, pulse avg length = 233
pulse_distance 255
pulse_start distance 487
pulse_start[5] found at sample 3012103, value = 10140
pulse_end  [5] found at sample 3012334, pulse length = 231, pulse avg length = 232
pulse_distance 257
pulse_start distance 488
pulse_start[6] found at sample 3012591, value = 10009
pulse_end  [6] found at sample 3012828, pulse length = 237, pulse avg length = 233
pulse_distance 250
pulse_start distance 487
pulse_start[7] found at sample 3013078, value = 10188
pulse_end  [7] found at sample 3013315, pulse length = 237, pulse avg length = 233
pulse_distance 256
pulse_start distance 493
pulse_start[8] found at sample 3013571, value = 10012
pulse_end  [8] found at sample 3013802, pulse length = 231, pulse avg length = 233
pulse_distance 254
pulse_start distance 485
pulse_start[9] found at sample 3014056, value = 10107
pulse_end  [9] found at sample 3014289, pulse length = 233, pulse avg length = 233
pulse_distance 254
pulse_start distance 487
pulse_start[10] found at sample 3014543, value = 10148
pulse_end  [10] found at sample 3014776, pulse length = 233, pulse avg length = 233
pulse_distance 259
pulse_start distance 492
pulse_start[11] found at sample 3015035, value = 10212
pulse_end  [11] found at sample 3015266, pulse length = 231, pulse avg length = 233
pulse_distance 258
pulse_start distance 489
pulse_start[12] found at sample 3015524, value = 10225
pulse_end  [12] found at sample 3015753, pulse length = 229, pulse avg length = 232
pulse_distance 255
pulse_start distance 484
pulse_start[13] found at sample 3016008, value = 10186
pulse_end  [13] found at sample 3016246, pulse length = 238, pulse avg length = 233
pulse_distance 250
pulse_start distance 488
pulse_start[14] found at sample 3016496, value = 10326
pulse_end  [14] found at sample 3016733, pulse length = 237, pulse avg length = 233
pulse_distance 258
pulse_start distance 495
pulse_start[15] found at sample 3016991, value = 10283
pulse_end  [15] found at sample 3017220, pulse length = 229, pulse avg length = 233
pulse_distance 257
pulse_start distance 486
pulse_start[16] found at sample 3017477, value = 10285
pulse_end  [16] found at sample 3017707, pulse length = 230, pulse avg length = 233
pulse_distance 135
pulse_start distance 365
pulse_start[17] found at sample 3017842, value = 10230
pulse_end  [17] found at sample 3017954, pulse length = 112, pulse avg length = 225
pulse_distance 250
pulse_start distance 362
pulse_start[18] found at sample 3018204, value = 10146
pulse_end  [18] found at sample 3018321, pulse length = 117, pulse avg length = 219
pulse_distance 132
pulse_start distance 249
pulse_start[19] found at sample 3018453, value = 10162
pulse_end  [19] found at sample 3018684, pulse length = 231, pulse avg length = 220
pulse_distance 139
pulse_start distance 370
pulse_start[20] found at sample 3018823, value = 10252
pulse_end  [20] found at sample 3018928, pulse length = 105, pulse avg length = 214
pulse_distance 258
pulse_start distance 363
pulse_start[21] found at sample 3019186, value = 10248
pulse_end  [21] found at sample 3019304, pulse length = 118, pulse avg length = 210
pulse_distance 126
pulse_start distance 244
pulse_start[22] found at sample 3019430, value = 10235
pulse_end  [22] found at sample 3019661, pulse length = 231, pulse avg length = 211
pulse_distance 141
pulse_start distance 372
pulse_start[23] found at sample 3019802, value = 10334
pulse_end  [23] found at sample 3019902, pulse length = 100, pulse avg length = 206
pulse_distance 259
pulse_start distance 359
pulse_start[24] found at sample 3020161, value = 10243
pulse_end  [24] found at sample 3020275, pulse length = 114, pulse avg length = 202
pulse_distance 133
pulse_start distance 247
pulse_start[25] found at sample 3020408, value = 10452
pulse_end  [25] found at sample 3020639, pulse length = 231, pulse avg length = 203
pulse_distance 257
pulse_start distance 488
pulse_start[26] found at sample 3020896, value = 10101
pulse_end  [26] found at sample 3021126, pulse length = 230, pulse avg length = 204
pulse_distance 257
pulse_start distance 487
pulse_start[27] found at sample 3021383, value = 10341
pulse_end  [27] found at sample 3021613, pulse length = 230, pulse avg length = 205
pulse_distance 141
pulse_start distance 371
pulse_start[28] found at sample 3021754, value = 10166
pulse_end  [28] found at sample 3021860, pulse length = 106, pulse avg length = 201
pulse_distance 256
pulse_start distance 362
pulse_start[29] found at sample 3022116, value = 10126
pulse_end  [29] found at sample 3022348, pulse length = 232, pulse avg length = 202
pulse_distance 255
pulse_start distance 487
pulse_start[30] found at sample 3022603, value = 10032
pulse_end  [30] found at sample 3022723, pulse length = 120, pulse avg length = 200
pulse_distance 127
pulse_start distance 247
pulse_start[31] found at sample 3022850, value = 10257
pulse_end  [31] found at sample 3023080, pulse length = 230, pulse avg length = 201
pulse_distance 256
pulse_start distance 486
pulse_start[32] found at sample 3023336, value = 10173
pulse_end  [32] found at sample 3023567, pulse length = 231, pulse avg length = 202
pulse_distance 135
pulse_start distance 366
pulse_start[33] found at sample 3023702, value = 10151
pulse_end  [33] found at sample 3023814, pulse length = 112, pulse avg length = 199
pulse_distance 252
pulse_start distance 364
pulse_start[34] found at sample 3024066, value = 10429
pulse_end  [34] found at sample 3024302, pulse length = 236, pulse avg length = 200
pulse_distance 254
pulse_start distance 490
pulse_start[35] found at sample 3024556, value = 10199
pulse_end  [35] found at sample 3024670, pulse length = 114, pulse avg length = 197
pulse_distance 138
pulse_start distance 252
pulse_start[36] found at sample 3024808, value = 10097
pulse_end  [36] found at sample 3025031, pulse length = 223, pulse avg length = 198
pulse_distance 144
pulse_start distance 367
pulse_start[37] found at sample 3025175, value = 10221
pulse_end  [37] found at sample 3025275, pulse length = 100, pulse avg length = 195
pulse_distance 256
pulse_start distance 356
pulse_start[38] found at sample 3025531, value = 10036
pulse_end  [38] found at sample 3025767, pulse length = 236, pulse avg length = 197
pulse_distance 256
pulse_start distance 492
pulse_start[39] found at sample 3026023, value = 10292
pulse_end  [39] found at sample 3026254, pulse length = 231, pulse avg length = 197
pulse_distance 258
pulse_start distance 489
pulse_start[40] found at sample 3026512, value = 10150
pulse_end  [40] found at sample 3026741, pulse length = 229, pulse avg length = 198
pulse_distance 255
pulse_start distance 484
pulse_start[41] found at sample 3026996, value = 10397
pulse_end  [41] found at sample 3027234, pulse length = 238, pulse avg length = 199
pulse_distance 252
pulse_start distance 490
pulse_start[42] found at sample 3027486, value = 10157
pulse_end  [42] found at sample 3027718, pulse length = 232, pulse avg length = 200
pulse_distance 255
pulse_start distance 487
pulse_start[43] found at sample 3027973, value = 10039
pulse_end  [43] found at sample 3028214, pulse length = 241, pulse avg length = 201
pulse_distance 250
pulse_start distance 491
pulse_start[44] found at sample 3028464, value = 10333
pulse_end  [44] found at sample 3028582, pulse length = 118, pulse avg length = 199
pulse_distance 127

************  Snip 200 lines **************

pulse_start distance 252
pulse_start[165] found at sample 3080111, value = 10339
pulse_end  [165] found at sample 3080336, pulse length = 225, pulse avg length = 195
pulse_distance 140
pulse_start distance 365
pulse_start[166] found at sample 3080476, value = 10256
pulse_end  [166] found at sample 3080583, pulse length = 107, pulse avg length = 194
pulse_distance 257
pulse_start distance 364
pulse_start[167] found at sample 3080840, value = 10227
pulse_end  [167] found at sample 3081071, pulse length = 231, pulse avg length = 195
pulse_distance 257
pulse_start distance 488
pulse_start[168] found at sample 3081328, value = 10108
pulse_end  [168] found at sample 3081445, pulse length = 117, pulse avg length = 194
pulse_distance 129
pulse_start distance 246
pulse_start[169] found at sample 3081574, value = 10365
pulse_end  [169] found at sample 3081803, pulse length = 229, pulse avg length = 194
pulse_distance 138
pulse_start distance 367
pulse_start[170] found at sample 3081941, value = 10357
pulse_end  [170] found at sample 3082047, pulse length = 106, pulse avg length = 194
pulse_distance 259
pulse_start distance 365
pulse_start[171] found at sample 3082306, value = 10321
pulse_end  [171] found at sample 3082538, pulse length = 232, pulse avg length = 194
pulse_distance 250
pulse_start distance 482
pulse_start[172] found at sample 3082788, value = 10258
pulse_end  [172] found at sample 3082904, pulse length = 116, pulse avg length = 194
pulse_distance 130
pulse_start distance 246
pulse_start[173] found at sample 3083034, value = 10199
pulse_end  [173] found at sample 3083267, pulse length = 233, pulse avg length = 194
pulse_distance 138
pulse_start distance 371
pulse_start[174] found at sample 3083405, value = 10098
pulse_end  [174] found at sample 3083511, pulse length = 106, pulse avg length = 193
pulse_distance 258
pulse_start distance 364
pulse_start[175] found at sample 3083769, value = 10323
pulse_end  [175] found at sample 3084000, pulse length = 231, pulse avg length = 194
pulse_distance 259
pulse_start distance 490
pulse_start[176] found at sample 3084259, value = 10204
pulse_end  [176] found at sample 3084490, pulse length = 231, pulse avg length = 194
pulse_distance 255
pulse_start distance 486
pulse_start[177] found at sample 3084745, value = 10041
pulse_end  [177] found at sample 3084977, pulse length = 232, pulse avg length = 194
pulse_distance 255
pulse_start distance 487
pulse_start[178] found at sample 3085232, value = 10378
pulse_end  [178] found at sample 3085464, pulse length = 232, pulse avg length = 194
pulse_distance 255
pulse_start distance 487
pulse_start[179] found at sample 3085719, value = 10173
pulse_end  [179] found at sample 3085957, pulse length = 238, pulse avg length = 194
pulse_distance 249
pulse_start distance 487
pulse_start[180] found at sample 3086206, value = 10045
pulse_end  [180] found at sample 3086328, pulse length = 122, pulse avg length = 194
pulse_distance 126
pulse_start distance 248
pulse_start[181] found at sample 3086454, value = 10229
pulse_end  [181] found at sample 3086686, pulse length = 232, pulse avg length = 194
pulse_distance 136
pulse_start distance 368
pulse_start[182] found at sample 3086822, value = 10140
pulse_end  [182] found at sample 3086930, pulse length = 108, pulse avg length = 194
pulse_distance 257
pulse_start distance 365
pulse_start[183] found at sample 3087187, value = 10256
pulse_end  [183] found at sample 3087418, pulse length = 231, pulse avg length = 194
pulse_distance 258
pulse_start distance 489
pulse_start[184] found at sample 3087676, value = 10198
pulse_end  [184] found at sample 3087789, pulse length = 113, pulse avg length = 194
pulse_distance 126
pulse_start distance 239
pulse_start[185] found at sample 3087915, value = 10224
pulse_end  [185] found at sample 3088153, pulse length = 238, pulse avg length = 194
pulse_distance 135
pulse_start distance 373
pulse_start[186] found at sample 3088288, value = 10216
pulse_end  [186] found at sample 3088394, pulse length = 106, pulse avg length = 193
pulse_distance 259
pulse_start distance 365
pulse_start[187] found at sample 3088653, value = 10163
pulse_end  [187] found at sample 3088882, pulse length = 229, pulse avg length = 193
pulse_distance 258
pulse_start distance 487
pulse_start[188] found at sample 3089140, value = 10195
pulse_end  [188] found at sample 3089253, pulse length = 113, pulse avg length = 193
pulse_distance 133
pulse_start distance 246
pulse_start[189] found at sample 3089386, value = 10349
pulse_end  [189] found at sample 3089617, pulse length = 231, pulse avg length = 193
pulse_distance 139
pulse_start distance 370
pulse_start[190] found at sample 3089756, value = 10019
pulse_end  [190] found at sample 3089861, pulse length = 105, pulse avg length = 193
pulse_distance 259
pulse_start distance 364
pulse_start[191] found at sample 3090120, value = 10094
pulse_end  [191] found at sample 3090356, pulse length = 236, pulse avg length = 193
pulse_distance 251
pulse_start distance 487
pulse_start[192] found at sample 3090607, value = 10192
pulse_end  [192] found at sample 3090837, pulse length = 230, pulse avg length = 193
pulse_distance 256
pulse_start distance 486
pulse_start[193] found at sample 3091093, value = 10115
pulse_end  [193] found at sample 3091208, pulse length = 115, pulse avg length = 193
pulse_distance 125
pulse_start distance 240
pulse_start[194] found at sample 3091333, value = 10114
pulse_end  [194] found at sample 3091572, pulse length = 239, pulse avg length = 193
pulse_distance 255
pulse_start distance 494
pulse_start[195] found at sample 3091827, value = 10359
pulse_end  [195] found at sample 3092059, pulse length = 232, pulse avg length = 193
pulse_distance 255
pulse_start distance 487
pulse_start[196] found at sample 3092314, value = 10082
pulse_end  [196] found at sample 3092546, pulse length = 232, pulse avg length = 193
pulse_distance 138
pulse_start distance 370
pulse_start[197] found at sample 3092684, value = 10281
pulse_end  [197] found at sample 3092790, pulse length = 106, pulse avg length = 193
pulse_distance 255
pulse_start distance 361
pulse_start[198] found at sample 3093045, value = 10026
pulse_end  [198] found at sample 3093162, pulse length = 117, pulse avg length = 193
pulse_distance 127
pulse_start distance 244
pulse_start[199] found at sample 3093289, value = 10137
pulse_end  [199] found at sample 3093526, pulse length = 237, pulse avg length = 193
pulse_distance 258
pulse_start distance 495
pulse_start[200] found at sample 3093784, value = 10034
pulse_end  [200] found at sample 3094010, pulse length = 226, pulse avg length = 193
*** signal_start = 3000153, signal_end = 3104011
signal_len = 103858,  pulses = 200
Iteration 1. t: 171    min: 110 (64)    max: 232 (136)    delta 244
Iteration 2. t: 171    min: 110 (64)    max: 232 (136)    delta 0
Pulse coding: Short pulse length 110 - Long pulse length 232

Short distance: 133, long distance: 255, packet distance: 2333

p_limit: 171

[00] {100} ff ff 24 eb 57 ea 9f 7e aa be aa b7 30 : 11111111 11111111 00100100 11101011 01010111 11101010 10011111 01111110 10101010 10111110 10101010 10110111 00110000 
[01] {100} ff ff 24 eb 57 ea 9f 7e aa be aa b7 30 : 11111111 11111111 00100100 11101011 01010111 11101010 10011111 01111110 10101010 10111110 10101010 10110111 00110000 

@barrie0482
Copy link
Author

Hi Benjamin,

These are the values I have come up with. I have had some success, but the output from my &iweather_callback function is not decoding the same as the output of rtl_433 -a.

If you have any suggestions, I'd appreciate it.

Thanks.

Cheers, Barrie

r_device iweather = {
    /* .id             = */ 9,
    /* .name           = */ "iWeather Weather Station",
    /* .modulation     = */ OOK_PWM_P,
    /* .short_limit    = */ 130,
    /* .long_limit     = */ 700,
    /* .reset_limit    = */ 10000,
    /* .json_callback  = */ &iweather_callback,
};

output of rtl_433 (I've modified the code a bit to get this output from my &iweather_callback function)

[00] fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : 11111100 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
[01] aa b4 cf 41 fe 3f 69 f3 3f 70 1a fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : 10101010 10110100 11001111 01000001 11111110 00111111 01101001 11110011 00111111 01110000 00011010 11111110 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
[02] aa b4 cf 41 fe 3f 69 f3 3f 70 1a fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : 10101010 10110100 11001111 01000001 11111110 00111111 01101001 11110011 00111111 01110000 00011010 11111110 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
[03] aa b4 cf 41 fe 3f 69 f3 3f 70 1a fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : 10101010 10110100 11001111 01000001 11111110 00111111 01101001 11110011 00111111 01110000 00011010 11111110 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
[04] aa b4 cf 41 fe 3f 69 f3 3f 70 1a fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : 10101010 10110100 11001111 01000001 11111110 00111111 01101001 11110011 00111111 01110000 00011010 11111110 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
[05] aa b4 cf 41 fe 3f 69 f3 3f 70 1a fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : 10101010 10110100 11001111 01000001 11111110 00111111 01101001 11110011 00111111 01110000 00011010 11111110 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
[06] aa b4 cf 41 fe 3f 69 f3 3f 70 1b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : 10101010 10110100 11001111 01000001 11111110 00111111 01101001 11110011 00111111 01110000 00011011 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 

Output of rtl_433 -a

[00] {7} 00 : 00000000 
[01] {96} aa a5 98 5f 00 eb 4d 06 60 07 1f 00 00 : 10101010 10100101 10011000 01011111 00000000 11101011 01001101 00000110 01100000 00000111 00011111 00000000 00000000 
[02] {96} aa a5 98 5f 00 eb 4d 06 60 07 1f 80 00 : 10101010 10100101 10011000 01011111 00000000 11101011 01001101 00000110 01100000 00000111 00011111 10000000 00000000 
[03] {96} aa a5 98 5f 00 eb 4d 06 60 07 1f 80 00 : 10101010 10100101 10011000 01011111 00000000 11101011 01001101 00000110 01100000 00000111 00011111 10000000 00000000 
[04] {96} aa a5 98 5f 00 eb 4d 06 60 07 1f 80 00 : 10101010 10100101 10011000 01011111 00000000 11101011 01001101 00000110 01100000 00000111 00011111 10000000 00000000 
[05] {96} aa a5 98 5f 00 eb 4d 06 60 07 1f 80 00 : 10101010 10100101 10011000 01011111 00000000 11101011 01001101 00000110 01100000 00000111 00011111 10000000 00000000 
[06] {89} aa a5 98 5f 00 eb 4d 06 60 07 1f 00 : 10101010 10100101 10011000 01011111 00000000 11101011 01001101 00000110 01100000 00000111 00011111 00000000 

@wherzig
Copy link

wherzig commented Apr 27, 2014

Did you have any success adding Oregon support for the THN132N?

Although it was easy for me to add X10-Security support, I failed to add Oregon. Both OOK_PWM_P and OOK_PWM_D seem not to fit for Oregon. See http://wmrx00.sourceforge.net/Arduino/OregonScientific-RF-Protocols.pdf for a detailed analysis of the Oregon protocol. Looks like a new pwm_decode routine is necessary which is beyond my capabilities.

@barrie0482
Copy link
Author

Hi,

I had similar problems. Unfortunately, it is beyond my capabilities
also. It's is something I'd like to get back to, but at present, I don't
have time.

Good luck.

Cheers, Barrie
On 28/04/2014 07:12, wherzig wrote:

Did you have any success adding Oregon support for the THN132N?

Although it was easy for me to add X10-Security support, I failed to
add Oregon. Both OOK_PWM_P and OOK_PWM_D seem not to fit for Oregon.
See
http://wmrx00.sourceforge.net/Arduino/OregonScientific-RF-Protocols.pdf for
a detailed analysis of the Oregon protocol. Looks like a new
pwm_decode routine is necessary which is beyond my capabilities.


Reply to this email directly or view it on GitHub
#23 (comment).

@gkoh
Copy link

gkoh commented Apr 28, 2014

My fork adds support for the WH3081 Fine Offset weather stations, which appears similar to Oregon stations.
The commit I published isn't properly split, but it contains 2 important bits that might help you (it sure had me confused for a while):

  1. demod bit output is swapped compared to analyse output
  2. support for a sync bit, otherwise the entire bitstream is missing one bit

@wherzig
Copy link

wherzig commented Apr 28, 2014

@gkoh Thx!
Looks like I have to integrate your changes to my file rtl_433.c. Right?

I will try to test your changes with Oregon. I have seen the support for the sync bit in the code. I did not see the demod output swapped (maybe I have overlooked this).

@gkoh
Copy link

gkoh commented Apr 28, 2014

Yes, the key changes are only in rtl_433.c, my other changes were just
peripheral.

I'm not 100% sure about the demod output swap, but changing it made it make sense for me.

@magellannh
Copy link

I'm also looking for decode logic for Oregon Scientific weather sensors. The OS sensor from the dump above seems to use the v2.1 protocol. At the stream level, the bits are encoded using manchester encoding (http://en.wikipedia.org/wiki/Manchester_code), which involves a variable pulse width and a variable distance between pulses. Data bits are 'clocked' at fixed intervals from the start of the first pulse of the message. This is neither pcm_d or pcm_p, so a new decode routine will be needed.

Below is a hand drawn timing diagram from the Oregon Scientific THN132N data dump above.
Each pulse is numbered and its width is shown above the pulse. The distances between the pulses are drawn to scale. Finally, the manchester encoding 'clocking' edges are shown with a tick mark just below the waveform. A data bit is recorded at each pulse edge with a tick mark below it (0 if start of pulse, 1 if end of pulse). The waveform gets interesting after the preamble, at pulse number 17.

capture

Based on the OS decode pdf posted above, v2.1 puts 2 bits in the stream for each real data bit. First, the complement of the data bit is sent, then the actual data bit is sent. So 0xFFFF will appear in the stream as 5555 5555.

In the diagram above, I crossed out the extra bits (the complement bits) to leave just the real bits. Also, the Oregon sensors send the bits in each nibble backwards, so to reassemble the nibbles, you have to read each nibble right to left. Decoding the dump above, the message has the preamble of FFFF, the sync nibble of A, then the Sensor ID, which decodes as EC40. That's all the data in the dump, but it seems to make sense at least.

I started coding the new decode routine and it's actually pretty simple (I think). I'll post that soon.

@magellannh
Copy link

I took a stab at the code for the new manchester decoder, but I don't have a USB dongle yet to test it. I'm a little torn about how much of the v2.1 decoding should happen in the decode routine vs in the higher layer packet decoder. So far, I did a straight manchester decoder that (hopefully) will return the full bit sequence exactly as it appeared in the stream. The resulting bit stream will need to get post processed for v2.1 to strip out every other bit, and to reverse the bits in each nibble.

This may not even compile, but I think it has a good shot of working, especially with some minor debug, which I'll probably get to in the next couple/few weeks after my hardware arrives.

...See issue #34 for working code

@wherzig
Copy link

wherzig commented May 13, 2014

Thanks for the efforts. I have added your new manchester_decode() to my code.
What timing paramters should I try?

Before I tryied
.id = 9,
.name = "Oregon",
.modulation = OOK_PWM_P,
.short_limit = 224, //224,
.long_limit = 10212, //10212,
.reset_limit = 10212,
.json_callback = &oregon_callback,
which at least produced some output.

Using the same timing with the new manchester decoding procuces just zeros:

[00] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[01] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[02] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[03] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[04] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

@magellannh
Copy link

I messed up and was calling demod_next_bits_packet() after both calls to demod_add_bit() above. I edited the code above. I don't really understand when next-bits-packet() needs to get called. Obviously at the end of a message, but is that it?

@magellannh
Copy link

Also, from the analyze output above, I think short limit should be 120 or 125. Long isn't used.

@wherzig
Copy link

wherzig commented May 13, 2014

I have done the changes you proposed.
Between lots of zero packets, from time to time I get

[00] 55 54 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
01010101 01010100 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[01] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[02] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[03] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

[00] 55 55 55 55 55 55 55 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
01010101 01010101 01010101 01010101 01010101 01010101 01010101 01000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[01] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[02] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[03] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

[00] 55 54 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
01010101 01010100 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[01] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[02] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[03] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

@magellannh
Copy link

I still have more bugs to fix. Sorry about that!

The message should start with 5555 5555 9995 A5A6 AAA? ...

Then, that raw bit stream data will need to get further processed by stripping every other bit and flipping bits in each nibble to get the actual message data of FFFF A EC40.

Once I have hardware, I planned on debugging the code above and writing a OS parser, which I think can handle the three different protocol versions.

@magellannh
Copy link

I edited the code above to hopefully fix the extra zeros bug. I was calling the callback even when there was no data received.

You should still only see data in the first packet of the bit array [00].

@wherzig
Copy link

wherzig commented May 13, 2014

Thx. I have tried the last changes. Now I do not receive any packets at all. Even no zeros....

@magellannh
Copy link

I made another fix to the code above.

If you're not tired of trying this, it will hopefully fix the no-data ever problem.

There's still something else going wrong with the decoder right after the preamble that I haven't figured out yet. I'm sure it's something dumb.

@wherzig
Copy link

wherzig commented May 13, 2014

Looks like the targes is nea.
I had a one time shot:

[00] aa aa aa ed 55 aa d5 75 5b 5a da ab aa f5 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 :
10101010 10101010 10101010 11101101 01010101 10101010 11010101 01110101 01011011 01011010 11011010 10101011 10101010 11110101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101

All other packets look like the following.

[00] 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 40 00 00 00 00 00 00 00 :
01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[01] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[02] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[03] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

[00] 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 40 00 00 00 00 00 00 00 :
01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[01] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[02] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[03] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

@magellannh
Copy link

I just realized that you're not the original poster, so my comment about the expected data sequence won't apply to you, since you probably have a different sensor. What's the model number of the sensor you're using? Also, could there be multiple things within range sending data at 433mhz

@magellannh
Copy link

If I understand the program options, I can play back previously recorded data samples from a file instead of using a USB dongle.

If that's true and anyone has or could create a data file with some saved Oregon Scientific weather sensor data, it would be much appreciated. I'll use the data to get a jump on the debug while waiting for my USB dongle.

@magellannh
Copy link

I tested my Oregon Scientific manchester decoder and wrote a parser for a handful of v2.1 sensors. I have a WMR968 weather station and tested this on the following sensors:
BHTR968 - indoor temp, humidity, pressure
THGR968 - outdoor temp, humidity
THGR268 - multi-channel indoor/outdoor temp/humidity
RGR968 - rain gauge

The code isn't completely polished, but it does v2.1 bit-level error detection and overall seems pretty robust. With my particular combination of sensors and USB dongle, tuning the frequency down a tad and lowering the detection level using "./rtl_433 -f 433810000 -l 7000" gave me the best results.

... See issue #34 for working code

@wherzig
Copy link

wherzig commented May 19, 2014

@magellannh Very nice work. I have lots of OS 2.1 and 3.0 Oregon sensors.

For me it works better, to just user ./rtl:433:

Rain Gauge RGR968 Rain Rate: 0mm/hr Total Rain 9790mm
Weather Sensor THGR268 Channel 3 Temp: 23.3�C 73.9�F Humidity: 49%
Weather Sensor THGR268 Channel 3 Temp: 23.3�C 73.9�F Humidity: 49%
Weather Sensor BHTR968 Indoor Temp: 23.2�C 73.8�F Humidity: 45% (Comfortable) Pressure: 998mbar (Rainy)
Weather Sensor BHTR968 Indoor Temp: 23.2�C 73.8�F Humidity: 45% (Comfortable) Pressure: 998mbar (Rainy)
Rain Gauge RGR968 Rain Rate: 0mm/hr Total Rain 9790mm
Rain Gauge RGR968 Rain Rate: 0mm/hr Total Rain 9790mm
Weather Sensor THGR268 Channel 3 Temp: 23.3�C 73.9�F Humidity: 49%
Weather Sensor THGR268 Channel 3 Temp: 23.3�C 73.9�F Humidity: 49%
Weather Sensor BHTR968 Indoor Temp: 23.2�C 73.8�F Humidity: 45% (Comfortable) Pressure: 998mbar (Rainy)
Weather Sensor BHTR968 Indoor Temp: 23.2�C 73.8�F Humidity: 45% (Comfortable) Pressure: 998mbar (Rainy)
DECODE ERROR on bit: 47 (Expected 153 valid bits for this sensor type)
Message: 1d 20 25 70 42 20 15 40 33 d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
(1d20 is a THGN123N).

It even works well without having a real 433 Mhz antenna. Have to get an adapter.....

Just can't wait for v3 decode. Is there anything I can do to test it?

@magellannh
Copy link

I'm glad it works for you! Could you post the model number for a basic temp/humidity v3 sensor so I can order one?

As far as adding v3 support, the low-level manchester decode logic should already handle v3. The callback needs v3 parsing logic that will be analogous to the v2.1 code that's there, but also a little different. v3 is probably less complicated than v2.1 overall, except I'm not sure how tough validating the checksum will be. v2.1 has bit-level redundancy coded into the messages, so I didn't bother trying to figure out the checksum algorithm.

I thought rtl_433 had a way to record and play back data to/from a file that could be fed back into my parsing logic, but I couldn't figure out how to get that to work.

If you're up for it, you can uncomment the "Unrecognized Msg" fprintf toward the bottom of the callback function, and send a printout with a few messages to me (should start with FFFF for v3). A few raw v3 messages should be enough to get me started on the v3 parser.

Do you code in C? If so, I'd be happy to rough in a basic parser and let you take it from there.

Also, my THGR268 has a sensor ID of 1d20, so some IDs must get reused by multiple sensor models.

@merbanan
Copy link
Owner

You need to use -m 0 and -m 1. It is possible to record the raw radio samples and the demodulated signal.

@wherzig
Copy link

wherzig commented May 19, 2014

According to http://www.oregonscientific.com/wcsstore/IDTStorefrontAssetStore/File/sensorchart.pdf I do have at least the following V3 sensors: WGR800, PCR800

These are some of the messages I receive (deleted the 00 00 00 messages):

Unrecognized Msg: 28 05 4d 4c ab 52 d5 2c b2 cc b4 aa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Unrecognized Msg: 02 10 84 58 f4 8a bf e0 30 00 00 1c ce c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Unrecognized Msg: ff af db d6 a3 de 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Unrecognized Msg: ff ff ff e7 be 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Unrecognized Msg: 7f f3 db b7 78 f0 cf 66 f1 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Unrecognized Msg: 2a aa 59 a6 a5 59 a6 a6 99 aa 54 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Unrecognized Msg: aa aa ac cc d3 2b 55 55 54 ca d5 55 55 55 54 b3 4d 4a b3 4d 35 34 ac b0 00 00 00 00 00 00 00 00 00 00
Unrecognized Msg: 0a aa 65 6a 9a aa aa aa 59 a6 a5 5f 5d 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Unrecognized Msg: f6 80 12 8d 21 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Unrecognized Msg: 04 44 01 14 44 22 00 00 b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Unrecognized Msg: 28 50 40 21 08 31 50 50 28 22 22 a8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Unrecognized Msg: 04 88 50 45 11 14 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Unrecognized Msg: 05 0a 08 82 10 82 15 12 81 48 88 8a a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

What I also get is the following other OS V 2.1 sensors:
DECODE ERROR on bit: 89 (Expected 185 valid bits for this sensor type)
Message: 5d 60 04 84 34 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

@wherzig
Copy link

wherzig commented May 19, 2014

I have noticed that with your code, my X10 security does no longer work.
The reason seems to be that you changed the default sample rate to 250000. Why did you change it?
How can I get your oregon code run with the DEFAULT_SAMPLE_RATE 1024000?
See also #30

@magellannh
Copy link

Hmmm. I didn't change the default sample rate. I grabbed the code from the tip version I think.

In any case, my decoder should still work with a different sample rate as long as you adjust the short limit and reset limit to compensate (I think you can multiply the values by 4, but I'm not sure).

Also, the DECODE ERROR on bit 89 looks like a corrupt message from a BHTR968 (indoor sensor 5d60). I usually get some decode errors right after start up, but then things settle down after 5 minutes or so. I have one sensor that isn't far away that was giving me a bunch of trouble until I adjusted the frequency down to 433810000. With that change I got reliable data from that sensor and all the others. I figured that was from normal clock inaccuracy from using a cheap USB dongle.

Also, I got the file save/load stuff to work (thanks merbanan!).

Use "./rtl_433 -m 1 tst" to create the file then "./rtl_433 -r tst" to read and process it.

There's no output while the file is writing, so you need to let the program run for a minute or two and hope you get what you're looking for. Then stop the program and restart it using the -r to read the file and process the data so you can see what you got.

If you email a file with some v3 packets (probably start with 7f ff or ff ff or something similar) to , I'll take a crack at the v3 parser.

@merbanan
Copy link
Owner

Actually you can run in auto mode and it will save and split the signal files automatically for you. Run with -t -a or something like that. It should split out .gcode files or so.

@wherzig
Copy link

wherzig commented May 19, 2014

Hmm. My RF environment is very noisy as I have lots of sensors.

What I am thinking is to take the OS 3 Oregon PCR800 sensor and my notebook to a place where there is no RF noise. I just thinking what this place would be the best as this can not be near to my house.

At this place I will do a ./rtl_433 -m 1 RF_PCR800" and will let you know.

@car2
Copy link

car2 commented May 30, 2014

Hi all,

I'm new here.. but I've read all your posts and I'm interested into get Oregon protocol running with rtl_433. In my case, I want to read energy meter sensor (owl CM160), which I've read that uses this protocol. At this point, I want to take a look on your code, magellannh , but I can't recover it from pastelink (web says it is under maintenance tasks)... so, is there any other way to check the source?

Thank you very much every body!

@magellannh
Copy link

I'm new to github and still learning. For now, you can find my changes to rtl_433.c through a pull request that I created:
#34

@car2
Copy link

car2 commented Jun 2, 2014

thank you very magellannh, I will take a look... and if I can add something, I will share it.
Regards!

@car2
Copy link

car2 commented Jun 7, 2014

Hi again,

my owl CM160 energy sensor is giving me this kind of data:
50 03 3c 13 00 aa e1 be 71 00 00 2d ac 30 00
50 03 3c f2 00 cb 92 be 71 00 00 ed 4f 20 00
50 03 3c f2 00 0a 43 be 71 00 00 eb e5 30 00
50 03 3c 13 00 08 f3 be 71 00 00 8d 21 20 00
50 03 3c f2 00 c5 a4 be 71 00 00 cc cf 20 00
54 03 3c 7e 00 66 95 be 71 00 00 ed 26 20 00
50 03 3c 5e 00 ad e6 be 71 00 00 ad 0f 30 00
50 03 3c f2 00 69 e9 be 71 00 00 2e 0b 30 00

after some searching in google... I've add this code inside the oregon_Scientific_v3_parser:

else if ((msg[0] >= 0x50) && (msg[0] <= 0x59) && (msg[1]== 0x03) ) 
     { 
       fprintf(stderr, "\n");
       fprintf(stderr,"\n\n");       
         fprintf(stderr, "Energy sensor  OWL CM160 event:\n");
         fprintf(stderr, "protocol      = Oregon Scientific v3\n");
         float rawAmp = (msg[4] >> 4 << 8 | (msg[3] & 0x0f )<< 4 | msg[3] >> 4);
         fprintf(stderr, "current measurement reading value   = %.0f\n", rawAmp);
         fprintf(stderr, "current watts (220v)   = %.0f\n", rawAmp /(0.6*220)*1000);
         fprintf(stderr, "Message: "); for (i=0 ; i<14 ; i++) fprintf(stderr, "%02x ", msg[i]); fprintf(stderr, "\n");
     } 

and this is the output:

Registering protocol[01] Rubicson Temperature Sensor
Registering protocol[02] Prologue Temperature Sensor
Registering protocol[03] Silvercrest Remote Control
Registering protocol[04] ELV EM 1000
Registering protocol[05] ELV WS 2000
Registering protocol[06] Waveman Switch Transmitter
Registering protocol[07] Steffen Switch Transmitter
Registering protocol[08] Oregon Scientific Protocol Sensors
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: ezcap USB 2.0 DVB-T/DAB/FM dongle
Found Rafael Micro R820T tuner
Exact sample rate is: 250000.000414 Hz
Sample rate set to 250000.
Sample rate decimation set to 0. 250000->250000
Bit detection level set to 10000.
Tuner gain set to Auto.
Reading samples in async mode...
Tuned to 433920000 Hz.
Energy sensor OWL CM160 event:
protocol = Oregon Scientific v3
current measurement reading value = 273
current watts (220v) = 2068
Message: 58 03 3c 11 10 26 c2 2a 91 00 00 2b 83 30

anyway, I don't know exactly what means every niblle....

Thank you very much to everybody...

@merbanan
Copy link
Owner

merbanan commented Dec 3, 2018

We changed the demodulator structure to more understandable names and limits. Closing.

@merbanan merbanan closed this as completed Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
@barrie0482 @merbanan @gkoh @wherzig @magellannh @car2 and others