How to I stop tasmota spamming MQTT stat topic with rule commands results?

I have a rule that runs every second, assigning a value to a variable
But tasmota posts the “result” every time it’s calculated, to stat/devicename/RESULT topic

How can I STOP it doing that?

My rule is ON energy#power DO var1 %value% ENDON

Thanks

It doesn’t look like you can. At least, I couldn’t see a setOption for it.

Is openHAB triggering something as a result of your device publishing to the RESULT topic?

Why don’t you ask to to official Tasmota support channel?

1 Like

I couldn’t see either.
Maybe there is a way to silence the result…

I don’t like the fact that mqtt server is constantly busy with the results.
I do publish the var1 to the mqtt server, but only once every X seconds, to avoid the spam.

Could I assign the variable in another way, so that it won’t make it publish the result?

Hi,
You can compile simply your own version.
Joerg

1 Like

It’s not spam, that’s a wrong statement. It’s how MQTT works, when a device has a state change/update it publishes it.

Change your Tasmota rule to stop this happening.

Maybe setoption4 1

That just changes the topic that Tasmota sends a result on. It doesn’t disable it.

I know it’s not actual spam, but as the rule runs every second, it looks like that :slight_smile:
Indeed changing the rule would help. How to I assign the variable without getting the “result” published?

Tasmota publishes every change to MQTT unless you disable MQTT.

My question is why do you want to do this?

You can use setoption4 to spread out your topics if you are having filtering issues or its filling up your oh log,

I want to prevent useless data from being published
But sfromis posted a smarter rule:
ON energy#power!=%var1% DO var1 %value% ENDON

This way only then the value changes it gets posted, so I can live with this :slight_smile:

1 Like