Редизайн на основе текущей ветки мейнстрима + новые устройства.
[rtl-433.git] / src / devices / ec3k.c
1 /* EC3k Energy Count Control
2  * 
3  * "Voltcraft Energy Count 3000" sensor sold by Conrad
4  * aka “Velleman NETBSEM4” 
5  * aka “La Crosse Techology Remote Cost Control Monitor – RS3620”.
6  * aka "ELV Cost Control"
7  *
8  * Stub driver
9  * 
10  * Copyright (C) 2015 Tommy Vestermark
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  */
16 #include "rtl_433.h"
17 #include "util.h"
18
19 static int ec3k_callback(bitbuffer_t *bitbuffer) {
20         bitrow_t *bb = bitbuffer->bb;
21
22         // Validate package
23         unsigned bits = bitbuffer->bits_per_row[0];
24         if (bits >= 550 && bits <= 590) {       // Package should be around 578?!
25                 fprintf(stdout, "Energy Count 3000:\n");
26                 bitbuffer_print(bitbuffer);
27                 return 1;
28         }
29         return 0;
30 }
31
32
33 r_device ec3k = {
34         .name           = "Energy Count 3000 (868.3 MHz)",
35         .modulation     = FSK_PULSE_PCM,
36         .short_limit    = 50,   // NRZ decoding
37         .long_limit     = 50,   // Bit width
38         .reset_limit    = 800,  // 16 zeros (up to 12 seen)...
39         .json_callback  = &ec3k_callback,
40         .disabled       = 1,
41         .demod_arg      = 0,
42 };
43
44
45