I have an application where there are two irrigation controllers. One, OpenSprinkler, implements ETo (Evapotranspiration) control while the other, LinkTap, is fairly dumb in terms of adjusting the amount of water delivered. On the other hand, the LinkTap is wireless and has allowed me to place control valves in a number of difficult to reach places. Since OpenSprinkler supports virtual zones, I have been using a hacked version of the HTTPd plugin to receive messages from OpenSprinkler and then have a script that sends out an MQTT message to the LInkTap gateway. This all works.
However, while OpenSprinkler claimed to support MQTT as well, it never actually worked. But, after a recent upgrade, I see they have fixed it. So, I can now dispense with the HTTPd server and just use MQTT for OpenSprinkler to Indigo, and then MQTT from Indigo to the LinkTap. The message formats are quite different, so some translation needs to be done. But, fortunately my current script can be easily adapted. An added advantage is that while OpenSprinkler does not support duration in their http interface, the do transmit it in the MQTT message. That is not a big deal as they transmit an off message away.
So, my question is about architecture. I can easily trigger on a received MQTT message from OpenSprinkler, and then use my script to pull the topic and payload from the MQTT Connector, format my outgoing message, and send it.
But, I am wondering it there might be some other means of doing this by publishing devices from the MQTT controller devices. To be honest, I do not really understand how this works, so that is why I am asking here.
BTW, I have also created MQTT Shim switch devices to represent each valve on the LinkTap gateway. That way I can track watering state and also do manual control from Indigo. But, those devices are not involved in the messaging connection between OpenSprinkler and LinkTap.