Grouping MQTT topics, creating scenes

96 views
Skip to first unread message

Mike C

unread,
Jan 17, 2018, 7:16:52 PM1/17/18
to MQTT
Hi, this might be very basic but I cannot find any info on this. I have a raspberry pi 3 (raspbian stretch) with mosquitto 1.4.14  set up as my broker on my wifi network. I have several sonoff switches reflashed with tasmota v5.11.1b firmware and I have been controlling them using the "MTQQ dash" app from an android phone.

Here's the deal, I have a 4 channel sonoff (non pro). Lets say the topic is 'workshop/front_lights' so the commands to turn each light on would be:

cmnd workshop/front_lights/power1 on
cmnd workshop/front_lights/power2 on
cmnd workshop/front_lights/power3 on
cmnd workshop/front_lights/power4 on

So that is straightforward and works fine. I can turn off each light individually with four different buttons. What if I want a total of five buttons, one button that will turn all four (or two or three) lights on and off but will not interfere with the ability to control the lights individually. This would be something like a scene where I can have a group that overlaps multiple topics without having them be of the same topic. How can this be done while adding the minimum amount of software/scripts/apps etc?
Thanks,
Mike

ran...@bevywise.com

unread,
Jan 21, 2018, 1:55:54 AM1/21/18
to MQTT
Hi Mike, 

As part of our MQTTRoute and Platform, we support rules engine which can help you achieve this.  You can define an All OFF topic and publish the command from the Mobile APP and you can define the 4 rules stating when the broker receives this command, it will publish the individual OFF message from the Broker. 

You can create an account at www.mqttserver.com , connect your devices, configure rules and set this up and working. 

Hope this helps. 

Best Regards, 
Ranjith 
Reply all
Reply to author
Forward
0 new messages