mqtt command from Tastmota to Shelly

8 views
Skip to first unread message

David Vazquez

unread,
Jan 7, 2026, 5:33:46 PM (4 days ago) Jan 7
to TasmotaUsers
Hi everyone,

I am almost there but I am failing in the last step... someone can help me maybe??
  • I have a Shelly Dimmer 2 connected to my mqtt-server
  • I have a tasmota device connected to the same mqtt-server
  • I manage (after many many trial and error) to turn on/off the shelly from the tasmota console, with the following commands
    • publish shellies/shelly_D03/light/0/command on
    • publish shellies/shelly_D03/light/0/command off
      (everywhere I looked it said it had to be "set" but the right word is actually "command") (I have set the custom mqtt-prefix to "shelly_D03" in the shellys internet/advanced settings)
But now I am failing in sending the command for dimming the shelly. As far as I can read here and there, I have to send a JSON payload {"brightness":50}, so it should be something like
  • publish shellies/shelly_D03/light/0/command  {"brightness":50}
But it is not working, the light stays at 100% no mater what. I have tried every combination with or without brackets, quotes, slashes and what not.

Any suggestions, or someone that has both tasmota and shelly and can try?

Regards,
//David

David Vazquez

unread,
Jan 7, 2026, 6:12:09 PM (4 days ago) Jan 7
to TasmotaUsers
Well, some advance...
From home assistant dev console i can successfully send mqtt.publish with topic shellies/shelly_D03/light/0/set and payload {"brightness":10} in order to dim the shelly to 10%
So I understand now that "command" is for switching on/off, but "set" is for dimming.
But still, I am not getting it to work from Tasmotas console when I send
  • publish shellies/shelly_D03/light/0/set {"brightness":10}
So something still seems to be missing in my console command... Any ideas?
//David

David Vazquez

unread,
Jan 7, 2026, 6:25:57 PM (4 days ago) Jan 7
to TasmotaUsers
Someting strange... looking in MQTT-Explorer, both "set" and "status" blink when I send the command from home assistant dev console (and then the dim level changes), but when I send the command from tasmotas console, only the "set" blinks (and the value changes) but the "status" doesn´t blink (and the dim level doesn´t change).

Skärmbild 2026-01-08 002424.png

Philip Knowles

unread,
Jan 8, 2026, 4:07:39 AM (4 days ago) Jan 8
to David Vazquez, TasmotaUsers
Please take this the right way but you are asking how to control a non-Tasmota device on a Tasmota forum


Using MQTT Explorer if I send
Shellies/BathDimmer/light/0/set {"brightness": 70, "turn", "on"}
when the light is off - the light turns on at 70%
BathDimmer
light
0 = on
status = {"ison":true,"source":"mqtt","has_timer":false,"timer_started":0,"timer_duration":0,"timer_remaining":0,"mode":"white","brightness":70,"transition":0}
power = 9.61
energy = 17161
set = {"brightness": 70, "turn": "on"}
If I then send
Shellies/BathDimmer/light/0/set {"brightness": 30}
I get
BathDimmer
light
0 = on
status = {"ison":true,"source":"mqtt","has_timer":false,"timer_started":0,"timer_duration":0,"timer_remaining":0,"mode":"white","brightness":30,"transition":0}
power = 3.52
energy = 17214
set = {"brightness": 30}
Notice that the Power changed (9.61W to 3.52W) but yours is at 0.00 which implies that it's off )or you have a Minimum Brightness set)

If I then do this in Tasmota Console
09:52:33.628 CMD: publish shellies/BathDimmer/light/0/set {"brightness": 30, "turn": "on"}
09:52:33.633 MQT: shellies/BathDimmer/light/0/set = {"brightness": 30, "turn": "on"}
I get
BathDimmer
light
0 = on
status = {"ison":true,"source":"mqtt","has_timer":false,"timer_started":0,"timer_duration":0,"timer_remaining":0,"mode":"white","brightness":30,"transition":0}
power = 3.52
energy = 17231
set = {"brightness": 30, "turn": "on"}

If I then do
09:55:50.307 CMD:  publish shellies/BathDimmer/light/0/set {"brightness": 70}
09:55:50.312 MQT: shellies/BathDimmer/light/0/set = {"brightness": 70}
I then get
BathDimmer
light
0 = on
status = {"ison":true,"source":"mqtt","has_timer":false,"timer_started":0,"timer_duration":0,"timer_remaining":0,"mode":"white","brightness":70,"transition":0}
power = 9.61
energy = 17243
set = {"brightness": 70}
So it works for me.


From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of David Vazquez <faz...@gmail.com>
Sent: Wednesday, January 07, 2026 23:25
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Re: mqtt command from Tastmota to Shelly
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/sonoffusers/d2b51712-fa60-486d-8f37-c3b308ef656bn%40googlegroups.com.

David Vazquez

unread,
Jan 10, 2026, 10:29:07 AM (2 days ago) Jan 10
to TasmotaUsers
Hi!
Thanks for your answer. I know it is a grey-zone, but I really thought it was a Tasmota issue. I didn´t understand why a message sent from home assistant (or from MQTT Explorer like you) was working, but the exact same message sent from Tasmota console didn´t work.

It turns out it was something wrong with my network, I reconfigured all my access points after seeing that it was workning for you, but if I copy-pasted your commands they didn´t work or me. I really don´t understand what was the problem, but now it is working (even the exact same command that I wrote in my second post, that didn´t work then... spookie). 

For anyone coming here in future searchs, these commands work for me in order to control a shelly dimmer 2 by sending MQTT messages from a Tasmota console:
  • publish shellies/shelly_D03/light/0/set {"brightness":10}
  • publish shellies/shelly_D03/light/0/set {"turn": "off"}
  • publish shellies/shelly_D03/light/0/set {"turn": "on"}
  • publish shellies/shelly_D03/light/0/set {"brightness": 50, "turn": "on"}
  • publish shellies/shelly_D03/light/0/command off
  • publish shellies/shelly_D03/light/0/command on
** shelly_D03 has to be changed to the name you give your device in the shellys web interface, menu Internet > Advanced > Enable MQTT > Use custom MQTT prefix

Cheers //David
Reply all
Reply to author
Forward
0 new messages