Duplication with rtl_433

I have and esp32 based gateway working with CC1101 receiver and the RTL_433 library. Works great but for one thing. It is not deduplicating messages. I am using it with a number of Acurite sensors and they each send 3 messages for each reading. Any ideas as to why deduplication is not working here?

Hi billy27607,

in what time frame are these 3 duplicates sent?

Could it be a similar issue as here?

But you might want a higher value for time_avoid_duplicate.

P.S.: Actually looking at it, this might not apply to ZgatewayRTL_433

Thank you for responding. This is an issue with RF to MQTT similarly. But if I am understanding the issue correctly, I that case dedup was working and filtering desired messages.

In my case, it does not appear to be working. The messages from each bridge all arrive within a second. The mqtt broker is receiving all three messages and I expected the duplicates to be removed. I have time_avoid_duplicate set to 3000 which should be enough. But I will try it with a higher value and see what happens.

Ok, if I understand you right, you have 3 OMG gateways (bridges?!) and they all obviously receive the broadcasts from your Acurite sensors, so your MQTT broker has duplicates from each of the gateways/bridges?

Or did I get that wrong?

Thank you for your response. I have a single gateway and I am trying to eliminate the duplicate messages from the sensors so that I do not flood the database with three entries from each sensor.

One gateway, three messages from the actual sensor. Dedup time set at 3000 ms.

Thanks again.

Also, sorry for the confusing post about bridges.

As stated in the P.S. of my previous post, looking at

#if defined(ZgatewayRF) || defined(ZgatewayIR) || defined(ZgatewaySRFB) || defined(ZgatewayWeatherStation)
// variable to avoid duplicates
#  ifndef time_avoid_duplicate
#    define time_avoid_duplicate 3000 // if you want to avoid duplicate mqtt message received set this to > 0, the value is the time in milliseconds during which we don't publish duplicates
#  endif
#endif

does not include ZgatewayRTL_433, so the time_avoid_duplicate setting is not applicable.

But other than creating some extra - flooding - your database all is working fine for you? What database are you using, is it with HA, openHAB or some other receiver of the MQTT messages … ? I’m asking because it might be best to implement some dedupe routine on the back end there, as many other sensors create regular duplicate messages (i.e. BLE sensors sending their status, even if it hasn’t changes constantly every minute through OMG) where deduping with time_avoid_duplicate is all but impossbile and also needs to be done on the receiving side, if it is required to only log unique status updates to a database. Just saying as I also had to just do the same with BLE messages from my weight scale :wink:

Other than that you could log an issue on github to suggest the inclusion of ZgatewayRTL_433 to be included in the isAduplicateSignal time_avoid_duplicate routine.

The messages are being picked up by and HAA and they are also being pushed into InfluxDB by Telegraf. I am using Grafana to blend these data with other data in a report.

And you are correct, even if I define time_avoid_duplicate in the build flags, the code to use it to dedup is not in ZgatewayRTL_433.ino is not there. I will put in the issue and maybe try to do it myself in the short run.

Thanks for all of your help.