Sonoff MQTT topic question

I have a pile of Sonoff basic’s running Tasmota firmware and I have recently started trying to organize them into logical groups instead of the randomness that they currently are. Also rewatched a few of the videos Jon made about them as well. I am not seeing what i think I should be and I am sure it’s me.

I am creating a group for outside lighting as I have a number of outside lights that I want to be able to do timers with and group toggling and such. The group I have is ‘outside’, the topic is ’ lighting’ and each individual unit has a name like, ‘back_porch’. So outside/lighting/back_porch is the full topic, obviously. SO in the Tasmota interface, The client_id is the individual name - back_porch, the topic is outside/lighting and the way I figure it is that I should be able to publish a message like cmnd/outside/lighting/power TOGGLE and it should toggle all the modules that have the outside/lighting topic. It doesn’t work. I publish that command and I get a message on a terminal of TOGGLE on a terminal subscribed to outside/lighting but the Sonoff’s do not respond. I can publish cmnd/back_porch/power TOGGLE and the individual one will toggle. So what am I missing here?

Aha it so a small gotcha, you need the action /cmnd/ before toggle I think that is the sequence but I am not at a computer at present.
David

I figured it out…

I had set up a rule on a Shelly 1 for a long press action that would publish a MQTT topic that should toggle all the outside lighting. I followed a tutorial on this and used their syntax, well, because it worked. THEN I did an upgrade to Tasmota from 6.5 to 6.6 and didn’t account for that in my troubleshooting. Which is stupid. Mostly because I do troubleshooting all day long and “remember what you did last, even if it was a week ago”, is troubleshooting 101.

So the actual problem was that I was trying to publish cmnd/outside/lighting/POWER TOGGLE instead of cmnd/outside/lighting/power TOGGLE. It didn’t know what POWER was so would not actually publish the command. It looks and works better now… From my console screen…

16:04:28 RUL: SWITCH1#STATE=3 performs "publish cmnd/outside/lighting/power TOGGLE"
16:04:28 MQT: cmnd/outside/lighting/power = TOGGLE

Its always the stupid stuff that gets ya.

2 Likes