Skip to content

Conversation

@jack77er
Copy link

Adding device decoder for TFA Dostmann 30.3905 (temperature, humidity, external temperature) and 30.3902 (temperature, external temperature).

Adding device decoder for TFA Dostmann 30.3905 (temperature, humidity, external temperature) and 30.3902 (temperature, external temperature).
@zuckschwerdt
Copy link
Collaborator

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. 0x4b 2dd4 2b. The first byte is the msg_type of 24 or 1e.
And the CRC is now a very plain "CRC-32": poly=0x04c11db7 init=0xffffffff refin=true refout=true xorout=0xffffffff.

@@ -0,0 +1,357 @@
/** @file
TFA Dostmann 30.3905 T/H pro sensor with external temp sensor.
Copy link
Collaborator

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.

*/

/*
TFA Dostmann 30.3905.02 T/H outdoor sensor at 868.025 Mhz.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above ,

*/

/*
TFA Dostmann 30.3905.02 T/H outdoor sensor at 868.025 Mhz.
Copy link
Collaborator

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.

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.
#####
Copy link
Collaborator

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:


#####
| 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______
Copy link
Collaborator

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.

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};
Copy link
Collaborator

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.

temp_c_int = decode_value(b, start_idx, 8);


switch(b[start_idx-1]) {
Copy link
Collaborator

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.

.name = "TFA Dostmann 30.3905/02 T/H sensor with external sensor",
.modulation = FSK_PULSE_PCM,
.short_width = 61,
.long_width = 61, // unused
Copy link
Collaborator

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.

@jack77er
Copy link
Author

Sorry for my late response. I've been quite offline for the last two weeks.
Today, i've got additional sensors from the TFA.ID series (30.3908.02, 30.3901.02, 30.3906.02) I'd like to add to the decoder. My question is: should I add a single decoder function for each device or summarize all into one single function? Each one has the same protocol but other datafields like internal temperature, external temperature and humidity.
When using the same function all non available data could be displayed as "n/a". Otherwise the output fields can be reduces to the available data for each sensor.

@zuckschwerdt
Copy link
Collaborator

If it's the same protocol and some fields are just empty then yes, use the same decoder (with DATA_COND to make fields optional).
If it's just the same timing but different payload then write new decoders. If the decoders are related you can keep them all in the same C file.

Adding more sensors to the decoder.
Currently untested, just sync with repo.
@jack77er jack77er changed the title Add support for TFA Dostmann 30.3905/3902 Add support for TFA Dostmann 30.390X temperature and humidity sensor series Jan 27, 2026
@jack77er jack77er marked this pull request as draft January 28, 2026 15:48
@jack77er jack77er marked this pull request as ready for review January 28, 2026 21:20
@jack77er
Copy link
Author

Check symbol errors failed, but I don't really understand whats the problem here? Could you help maybe?

Thanks in advance.

@zuckschwerdt
Copy link
Collaborator

I think it was about sticky parens? Put a space between parens and braces, do not put spaces inside parens.
Also you need /** for the doc-comments (doxygen), e.g. line 18. Don't use it anywhere else.

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

Successfully merging this pull request may close these issues.

2 participants