Receiving IR to MQTT only all 3 sec

Hallo everybody :slight_smile:
First off all thanks for all the work you have done!

I have a little (I hope so) probelm with my IR2MQTT Bridge. From MQTT to IR works perfect, but from IR to MQTT only every 3 sec a pressed button will cause in a new message.
I use a ESP8266 and on every button hit the blue LED lights up, but only every 3 sec a new message arrives at the MQTT server and i don´t know why?

Any ideas? Every help wellcome!
Thanks in front


OpenMQTTGateway use a deduplication mechanism to avoid the saturation of your broker. If the code is different it should be received right away, if it is the same it will be every 3s.

1 Like

Thanks for the answer!

And is there a way to change that? Because if I have to press the up arrow, for example, I have to be able to press it several times in a row.

Have a look at the User_config.h

#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

or define it in your environment with


or something like that.

All the best

1 Like

Works perfect! Thanks a lot!
I have put it on 250ms and that works fine for me.