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.