Add support for TFA Dostmann 30.390X temperature and humidity sensor series#3446
Add support for TFA Dostmann 30.390X temperature and humidity sensor series#3446jack77er wants to merge 9 commits intomerbanan:masterfrom
Conversation
Adding device decoder for TFA Dostmann 30.3905 (temperature, humidity, external temperature) and 30.3902 (temperature, external temperature).
|
Thanks! Great work! The second mention of 30.3905 (line 50) is a typo and should be 30.3902, right? The sync should be two words, i.e. |
src/devices/tfa_30_3905.c
Outdated
| @@ -0,0 +1,357 @@ | |||
| /** @file | |||
| TFA Dostmann 30.3905 T/H pro sensor with external temp sensor. | |||
There was a problem hiding this comment.
Needs to be one sentence, use a comma.
src/devices/tfa_30_3905.c
Outdated
| */ | ||
|
|
||
| /* | ||
| TFA Dostmann 30.3905.02 T/H outdoor sensor at 868.025 Mhz. |
src/devices/tfa_30_3905.c
Outdated
| */ | ||
|
|
||
| /* | ||
| TFA Dostmann 30.3905.02 T/H outdoor sensor at 868.025 Mhz. |
There was a problem hiding this comment.
Indent level here is 0, start at the first column.
src/devices/tfa_30_3905.c
Outdated
| TFA Dostmann 30.3902.02 T outdoor sensor at 868.025 Mhz. | ||
|
|
||
| This device is part of the ID+ sensor system with tfa.me cloud ability. | ||
| ##### |
There was a problem hiding this comment.
The proper markdown heading would be ## Example for 30.3905:
src/devices/tfa_30_390X.c
Outdated
|
|
||
| ##### | ||
| | Current Frame | Current Frame -1 | Current Frame -2 | | ||
| ID S CNT__ T_INT HUMID T_EXT ????? T_INT HUMID T_EXT ????? T_INT HUMID T_EXT ????? CRC32______ |
There was a problem hiding this comment.
Keep an indent of 4 spaces for these preformatted blocks.
src/devices/tfa_30_3905.c
Outdated
| int i = 0; // counter variable | ||
| int start_idx = 5; // offset for b array skipping the preamble | ||
| int16_t tmp = 0; | ||
| char id_str[30] = {0}; |
There was a problem hiding this comment.
Try to declare vars just when they are used, esp. id_str should be the line above sprintf.
src/devices/tfa_30_390X.c
Outdated
| temp_c_int = decode_value(b, start_idx, 8); | ||
|
|
||
|
|
||
| switch(b[start_idx-1]) { |
There was a problem hiding this comment.
Turn this into a simple if / if else / else, preferably.
src/devices/tfa_30_3905.c
Outdated
| .name = "TFA Dostmann 30.3905/02 T/H sensor with external sensor", | ||
| .modulation = FSK_PULSE_PCM, | ||
| .short_width = 61, | ||
| .long_width = 61, // unused |
There was a problem hiding this comment.
It is used ;) Decides between NRZ/RZ.
|
Sorry for my late response. I've been quite offline for the last two weeks. |
|
If it's the same protocol and some fields are just empty then yes, use the same decoder (with |
Adding more sensors to the decoder. Currently untested, just sync with repo.
…protocol decoding.
|
Check symbol errors failed, but I don't really understand whats the problem here? Could you help maybe? Thanks in advance. |
|
I think it was about sticky parens? Put a space between parens and braces, do not put spaces inside parens. |
Adding device decoder for TFA Dostmann 30.3905 (temperature, humidity, external temperature) and 30.3902 (temperature, external temperature).