OK so thats pretty easy to start with
- Capture the input from the ST Virtual Switch. Using the ST Webhook integration - push the output into a switch node
Try this below (configure the MQTT broker as appropriate)
[{"id":"af6902ab.0659","type":"inject","z":"e9a79db6.6c277","name":"Simulate Turn on from ST","props":[{"p":"payload.value","v":"1","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":260,"y":340,"wires":[["17bc015e.d3238f"]]},{"id":"1620309d.3cba1f","type":"inject","z":"e9a79db6.6c277","name":"Simulate Turn off from ST","props":[{"p":"payload.value","v":"0","vt":"num"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":260,"y":420,"wires":[["17bc015e.d3238f"]]},{"id":"17bc015e.d3238f","type":"switch","z":"e9a79db6.6c277","name":"Check for ST Turn on/off ","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":630,"y":380,"wires":[["9838a3f3.19757"],["dfe441c8.bfdfa"]]},{"id":"9838a3f3.19757","type":"change","z":"e9a79db6.6c277","name":"Output Off to Aqualink","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"aqualinkd/Aux_4/set","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":340,"wires":[["3e17efff.6b27a"]]},{"id":"dfe441c8.bfdfa","type":"change","z":"e9a79db6.6c277","name":"Send on to Aqualink","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"aqualinkd/Aux_4/set","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":940,"y":440,"wires":[["3e17efff.6b27a"]]},{"id":"3e17efff.6b27a","type":"mqtt out","z":"e9a79db6.6c277","name":"","topic":"","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","x":1200,"y":400,"wires":[]}]