MQTT Counter reset in Tasmota

I have a question:
I want to reset a counter in Tasmota via MQTT but I don't understand which topic I have to use or which command. Whenever I try it I always get
{"Command": "Unknown"}
...I hope someone can help me from the console I attach a picture to show the TOPIC. The counter C1 is the one it is about

Could you try the following ?

msg.topic = "cmnd/testtopic/_luca/SENSOR"
msg.payload = {COUNTER:{C1:your_value}}

return msg

No This does not work. I have made the setup like the pictures ? Or is the construction wrong thought

Instead of setting it to msg, set it to json (and note the double quotes):

If this does not work, then try the topic:


with json:


Tasmota is not very clear on this cmnd structure

It doesn't work either. When I send the first idea, the deploy= The workspace contains some nodes that are not set properly.
The second idea can send but in the console there is no message of an incoming MQTT command. I tried it once with

cmnd/testtopic/_luca/SENSOR/COUNTER := 0000

then the console says

15:11:13.348 MQT: stat/testtopic/_luca/RESULT = {"Command": "Unknown"}

I can't find any guidelines or commands that help.
Do you have another solution?

Try this -

msg.topic = "cmnd/testtopic/_luca/Counter1"

1 Like

How it works is you use a MQTT out brick and inject a 0 / the desired number you want to set for the counter. thanks @smcgann99

Glad to help

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.