-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add support for TFA Dostmann 30.390X temperature and humidity sensor series #3446
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
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above ,
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).