arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
21.7k stars 4.72k forks source link

IrReceived generates a lot of unnecessary mqtt messages #21570

Closed Continuous2Discrete closed 4 weeks ago

Continuous2Discrete commented 4 weeks ago

PROBLEM DESCRIPTION

A clear and concise description of what the problem is.

I am trying to capture some buttons from my TV remote but only specific ones.

Tasmota immediately publishes any received IR code in MQTT in /tele topic, no matter how TelePeriod is set (I tried 0, 1, 300). A long press on e.g. the volume button sends hundreds of messages in 2-3 seconds, but I don't even need this information, my MQTT broker doesn't need to be notified hundreds of times that I have changed the channel or turned up the TV.

Instead, I would like to be able to decide which data from IrReceived will be published to MQTT broker using Rules e.g. only if the red button on the TV remote control is pressed publish this information in MQTT and then... HA will close my curtains. HA does not have to check which button was pressed, Tasmota can do that and transmit only what is necessary.

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

- [ ] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:
```lua
  Rules output here:
- [x] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:
15:36:19.700 CMD: weblog 4
15:36:19.706 MQT: stat/tasmota_E035B0/RESULT = {"WebLog":4}
15:36:20.073 CFG: Saved to flash at F9, Count 89, Bytes 4096
15:36:22.503 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x4FB50AF","DataLSB":"0x20DF0AF5","Repeat":0}}
15:36:23.253 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x4FB906F","DataLSB":"0x20DF09F6","Repeat":0}}
15:36:25.251 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x4FB906F","DataLSB":"0x20DF09F6","Repeat":0}}
15:36:26.503 WIF: Checking connection...
15:36:27.501 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x4FB8877","DataLSB":"0x20DF11EE","Repeat":0}}
15:36:37.767 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x4FB906F","DataLSB":"0x20DF09F6","Repeat":0}}
15:36:39.802 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x4FB906F","DataLSB":"0x20DF09F6","Repeat":0}}
15:36:40.501 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x4FB906F","DataLSB":"0x20DF09F6","Repeat":0}}
15:36:41.902 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x4FB906F","DataLSB":"0x20DF09F6","Repeat":0}}
15:36:45.251 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x4FB50AF","DataLSB":"0x20DF0AF5","Repeat":0}}
15:36:46.301 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x4FB906F","DataLSB":"0x20DF09F6","Repeat":0}}
15:36:46.503 WIF: Checking connection...
15:36:47.201 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x4FB40BF","DataLSB":"0x20DF02FD","Repeat":0}}
15:36:47.298 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":0,"Data":"0xFFFFFFFFFFFFFFFF","DataLSB":"0xFFFFFFFFFFFFFFFF","Repeat":1}}
15:36:47.448 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":0,"Data":"0xFFFFFFFFFFFFFFFF","DataLSB":"0xFFFFFFFFFFFFFFFF","Repeat":1}}
15:36:47.713 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":0,"Data":"0xFFFFFFFFFFFFFFFF","DataLSB":"0xFFFFFFFFFFFFFFFF","Repeat":1}}
15:36:47.848 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":0,"Data":"0xFFFFFFFFFFFFFFFF","DataLSB":"0xFFFFFFFFFFFFFFFF","Repeat":1}}
15:36:47.948 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":0,"Data":"0xFFFFFFFFFFFFFFFF","DataLSB":"0xFFFFFFFFFFFFFFFF","Repeat":1}}
15:36:48.098 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":0,"Data":"0xFFFFFFFFFFFFFFFF","DataLSB":"0xFFFFFFFFFFFFFFFF","Repeat":1}}
15:36:48.298 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":0,"Data":"0xFFFFFFFFFFFFFFFF","DataLSB":"0xFFFFFFFFFFFFFFFF","Repeat":1}}
15:36:48.398 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":0,"Data":"0xFFFFFFFFFFFFFFFF","DataLSB":"0xFFFFFFFFFFFFFFFF","Repeat":1}}
15:36:48.498 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":0,"Data":"0xFFFFFFFFFFFFFFFF","DataLSB":"0xFFFFFFFFFFFFFFFF","Repeat":1}}
15:36:48.598 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":0,"Data":"0xFFFFFFFFFFFFFFFF","DataLSB":"0xFFFFFFFFFFFFFFFF","Repeat":1}}
15:36:48.748 MQT: tele/tasmota_E035B0/RESULT = {"IrReceived":{"Protocol":"NEC","Bits":0,"Data":"0xFFFFFFFFFFFFFFFF","DataLSB":"0xFFFFFFFFFFFFFFFF","Repeat":1}}
15:37:03.240 WIF: Sending Gratuitous ARP
15:37:06.503 WIF: Checking connection...

TO REPRODUCE

Steps to reproduce the behavior:

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen. I would like to be able to decide which data from IrReceived will be published to MQTT broker using Rules.

I found something similar but only for SSerialReceived

You could activate SetOption147 to disable publishing SSerialReceived MQTT messages. If disabled, you must use event trigger rules instead (SSerialReceived#Data=) to control what, when and how is being published to your MQTT broker or whatever you want.

How can I achieve this with IrReceived?

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

ADDITIONAL CONTEXT

Add any other context about the problem here.

(Please, remember to close the issue when the problem has been addressed)