roussell wrote:So let's say I have an Indigo Device "Master Bedroom Lights' with a device id of '303008679', what would be the correct topic/payload to publish to turn on/off or dim that device from outside of Indigo (Using MQTTLens and Home Assistant to test)?
Totally up to you.
First, you don't need to publish anything to get MQTT->Indigo control to work. Publishing is for sending data out from Indigo to be used somewhere else.
Second, the plugin doesn't have a built in mechanism to control Indigo devices. That's a dangerous thing to implement in any kind of generic fashion. But you can do it.
- Decide how you want the control topic structured. Something like 'indigo/<<deviceID>>/command/<<cmd>>' work work.
- Subscribe to 'indigo/#'
Now you have a choice of two ways to do things. The no-script way for a few selected devices, or the Python script way which can handle arbitrary devices or commands.
The no-scripting way is to create an MQTT Topic Component Match trigger that matches one exact combination of deviceID and command. IE, it matches the exact topic. Then just put whatever command(s) you want in the action group. You will need two or more triggers for every device.
The more generic way is to creat an MQTT Topic Component Match trigger which has the components 'Match: indigo', 'Any', 'Match: command', 'Any'. That will fire when you get any command message. Then write a Python script which looks at the "last_topic" and "last_payload" states and does whatever it needs to do.