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

Add Lidl Auriol 4-LD6313 and 4-LD5972 temperature/rain sensor #2633

Merged
merged 18 commits into from
Sep 25, 2023

Conversation

soosp
Copy link
Contributor

@soosp soosp commented Sep 22, 2023

This code is heavily based on auriol_4ld5661.c. It contains minor modifications to support Lidl Auriol 4-LD6313 sensor.

Communication of Lidl Auriol 4-LD6313 temperature/rain sensor (https://ugyfelszolgalat.lidl.hu/SelfServiceHU/s/product2?productId=01t6N000002QZ4PQAW&q=ian%20415894) is very similar to Lidl Auriol 4-LD5661 temperature/rain sensor but the ID and the tips to rain gauge conversion ratio is different.

@zuckschwerdt
Copy link
Collaborator

Isn't this the exact same protocol (ID is variable anyway) and you just went with a different rain conversion?
With the Auriol 4-LD5661 it was found that the display (at ~ 0.3mm /tip) is way off.

@soosp
Copy link
Contributor Author

soosp commented Sep 23, 2023

Yes this is same protocol. The conversion ratio was got on the following way:
Make 100 tip by hand and see the increasement of rain gauge the display. In this case I got 24.2 mm at every 100 tips.
But if you doubt it should be better to report the tip counter (too), and user can use his/her own conversion ratio.

@zuckschwerdt
Copy link
Collaborator

tip by hand and see the increasement of rain gauge the display. In this case I got 24.2 mm at every 100 tips.

Yes, that is roughly the display on the Auriol 4-LD5661 as well. But it was found to be bad. Can you test with actual water?
See the discussion in #1837

But if you doubt it should be better to report the tip counter (too), and user can use his/him own conversion ratio.

That's the usual way rtl_433 handles values: report just the data and let the user do advanced calculations. But I with simple values we try to give a standard units output.

@soosp
Copy link
Contributor Author

soosp commented Sep 23, 2023

tip by hand and see the increasement of rain gauge the display. In this case I got 24.2 mm at every 100 tips.

Yes, that is roughly the display on the Auriol 4-LD5661 as well. But it was found to be bad. Can you test with actual water? See the discussion in #1837

Yes, I can test but I had to buy an analog meter before :). And have to wait for rain :).

But if you doubt it should be better to report the tip counter (too), and user can use his/him own conversion ratio.

That's the usual way rtl_433 handles values: report just the data and let the user do advanced calculations. But I with simple values we try to give a standard units output.

OK, but as @merbanan wrote:

If the display unit uses 0.3 then that is the "correct" value. But we can also report more keys, like steps and custom values based on command line options. Then a user can supply its own multiplier and select another key. But presenting the same value as the display unit is sort of the rule we follow. All devices deviate but we can only do so much to correct it.

So what do you think about merge these drivers (4-LD5661 and 4-LD6313) into a common driver and report the tip counter, the rain gauge based on factory conversion factor, and optionally the corrected value? The last two can be based on the device ID.

@soosp
Copy link
Contributor Author

soosp commented Sep 23, 2023

Meanwhile I measured the capacity of the spoon of seesaw in the sensor: it tips at 7.2 ml gauge. The upper diameter of the collector funnel is 96 mm, so the calculations of @Gollam seems can be apply for this sensor too: 7.2 ml / ((96 mm/2)^2*pi) ~= 1 mm (more exactly 0.995 mm)

@zuckschwerdt
Copy link
Collaborator

Yes, we usually follow the conversion or standards of a display /head unit. But in this special case we found with good evidence that the display is really broken.

Thanks for doing the measurements and tests to confirm the findings. I hope this helps you to get more accurate values from your device. They should have recalled the displays.

@Gollam
Copy link
Contributor

Gollam commented Sep 23, 2023

@soosp by the way, I had 4 products of the other type I made the driver for. Those counted the gauge tips very hectically, two did not work at all, one counted only the beginning of rain (the measure on display stayed on 0.3 when I knew for sure that at least 5 mm had fell), and one just randomly missed counts. So I'm just warning you, it's not a very accurate product :) I sold all of them, but writing the decoder was a fun task.

@soosp
Copy link
Contributor Author

soosp commented Sep 23, 2023

@Gollam Thank you for the warning :). I'll make some comparsion with an analog meter, and longer time tests too. We'll see ;)

@soosp
Copy link
Contributor Author

soosp commented Sep 23, 2023

Hi, I updated the PR. Merged the two sensors into a single file. Rain tips are reported now. The conversion factor was not touched, it remained 1 as discussed above.

@zuckschwerdt
Copy link
Collaborator

Thanks. Are we sure the ID is a fixed type code? Seems it could be a random factory code.

@Gollam
Copy link
Contributor

Gollam commented Sep 24, 2023

@zuckschwerdt is correct, it is just a factory hardcoded random ID, you cannot decide the type based on it.

@soosp
Copy link
Contributor Author

soosp commented Sep 24, 2023

So it seems better to refer these model by a generic name (e.g.: Auriol-4LDxxxx or Auriol-4LD). What do you think?

@soosp
Copy link
Contributor Author

soosp commented Sep 24, 2023

After some Google search it seems that there are a lot of Auriol weather station with product code 4-LDxxxx. Maybe 4-LD is acronym of "For Lidl"? :) So the driver name should be Auriol-4LD-Rain or Auriol-4LDxxxxx-Rain.

@zuckschwerdt
Copy link
Collaborator

At least for the model we need to stick with Auriol-4LD5661 for now. There are people using this and we should not break that name. We document that also 4-LD6313 is supported and wait if other similar sensors are reported.

@soosp
Copy link
Contributor Author

soosp commented Sep 24, 2023

OK, I'll keep the name and add 4-LD6313 to the documentation and comments. BTW the 4-LD5972 seems to be same device. See issue #2631

@zuckschwerdt
Copy link
Collaborator

Good catch on the other sensor type, thanks!

@zuckschwerdt
Copy link
Collaborator

Can you change the ID docs (line 25) to something like "- I: ID, 8 bit: factory hardcoded random ID"

@soosp
Copy link
Contributor Author

soosp commented Sep 24, 2023

Sure

@soosp
Copy link
Contributor Author

soosp commented Sep 24, 2023

I have updated the PR as discussed above. Reporting of the rain tips for further processing is left in the driver. It maybe do not break anything.

@zuckschwerdt
Copy link
Collaborator

Looks good to merge to me.

@soosp
Copy link
Contributor Author

soosp commented Sep 24, 2023

@MatejsLab Could you confirm that Auriol 4-LD5972 sensor works with rtl_433 -R 200. Just for documentation purposes :)

@soosp
Copy link
Contributor Author

soosp commented Sep 24, 2023

Looks good to merge to me.

Thanks! May us wait for confirmation 4-LD5972 and add both to the documentation?

@MatejsLab
Copy link

MatejsLab commented Sep 24, 2023

I see some serious activity here

Yes, my Auriol 4-LD5972 seems to work with protocol 200.
My only observation is that the rain_mm counts by 2 mm/tip on RTL_433, but it should be by 1 mm/tip.

Also, the original clock station from LIDL is mismatched with the sensor, it increments by 0.5mm/tip it should be 1 mm.

It has a dual 7ml tipping cup (I measured 7g on a scale).
It has a 95mm capture diameter, so 7088 mm2 capture area, 1mm rain x area = 7088 mm3 = 7ml.

Which converts 1mm rain = 7ml captured = 1 tip
I guess I am correct.

The only odd thing is that devices change their IDs, but luckily my Auriol seems to come back to ID91 often enough to give good reading. I had RTL off over night, otherwise connection seems somewhat reliable.

image

@soosp soosp changed the title Add Lidl Auriol 4-LD6313 temperature/rain sensor Add Lidl Auriol 4-LD6313 and 4-LD5972 temperature/rain sensor Sep 24, 2023
@soosp
Copy link
Contributor Author

soosp commented Sep 24, 2023

@MatejsLab Thank you for the quick confirmation. Special thanks for the calculations confirms the previous ones.

Added 4-LD5972 to the PR.

@soosp
Copy link
Contributor Author

soosp commented Sep 24, 2023

My only observation is that the rain_mm counts by 2 mm/tip on RTL_433, but it should be by 1 mm/tip.

Maybe your sensor is bouncing?

@MatejsLab
Copy link

Maybe is not debounced, I am not too bothered if it shows 2x as much and I can compensate in openhab code.

I like this RTL reading is cumulative and way more responsive than that LCD station.
The LCD station is so lazy, we got a bunch of rain, and shows 5mm. the RTL shows 23mm increase which means 11,5mm for sure.

@soosp
Copy link
Contributor Author

soosp commented Sep 24, 2023

OK, thanks! It seems we are ready :)

@zuckschwerdt
Copy link
Collaborator

Yes, looks good! One minor thing: the "s" in sensors is missing from the line in conf/rtl_433.example.conf

@soosp
Copy link
Contributor Author

soosp commented Sep 25, 2023

Fixed.

@zuckschwerdt
Copy link
Collaborator

So sorry, I missed another thing: the new "rain" key needs to be registered in "output_fields", add below line 93 ("rain_mm").

@soosp
Copy link
Contributor Author

soosp commented Sep 25, 2023

Sorry, it's my mistake. The missing field has been added.

@zuckschwerdt zuckschwerdt merged commit 2cbf3e5 into merbanan:master Sep 25, 2023
5 checks passed
andrewjw pushed a commit to andrewjw/rtl_433 that referenced this pull request Sep 29, 2023
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.

4 participants