I would do something like this:
Where each location would be on a tab of it's own (in my example I have them all on one tab).
You build a link call
flow for each action/location (Smoking Shelter Light, Carpark Alarm etc) and in it define the actions to be taken. (in my example I have one action for on and off. You might need to split this into several if multiple actions needed to be done))
You build a link call
flow for each Cause
that links to each device you will control. You add as many as needed to deal with that Cause
.
Once you have them all created, it will be just a matter of tying them together. Here is the sample flow:
[{"id":"67aa08691d6ea6c3","type":"tab","label":"Flow 4","disabled":false,"info":"","env":[]},{"id":"b9a26efeb089b3ab","type":"group","z":"67aa08691d6ea6c3","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["2639f75b28291139","dd05d4e38a41f36b","f2095e363ed8f841","07c3c54067d5c74f","41607734f9f9ef06"],"x":114,"y":579,"w":712,"h":122},{"id":"d7a993850e0ca402","type":"group","z":"67aa08691d6ea6c3","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["5d6ff60b369ac3b1","43f626ca6affd403","f4efff21199f7543","c1449acf83e42581","88b75e04bd3f55ab"],"x":114,"y":719,"w":712,"h":122},{"id":"95febce1c94afef0","type":"group","z":"67aa08691d6ea6c3","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["52fcb93174a25a00","d7b567decc286a35","bd8739e3ea16cef7","714c8ca6777bed20","0d8ffd44d9cb5b70","07b8250f0d44a5d7"],"x":74,"y":359,"w":922,"h":82},{"id":"625f8219a1e020f9","type":"group","z":"67aa08691d6ea6c3","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["a72f573232bcfdb7","918e3a35baad49ac","faf34bd25867df6e","390f4764d68ccbdf"],"x":74,"y":459,"w":922,"h":82},{"id":"5eb7062cae8db8fb","type":"group","z":"67aa08691d6ea6c3","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["0414954a30bcbe50","83094489e43e3ed0","33f863949d40b65e","567dac9cc1ee5d2c","9e162c3686b1ce5a"],"x":114,"y":859,"w":712,"h":122},{"id":"22d95cbaffe5b632","type":"switch","z":"67aa08691d6ea6c3","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Cam 1 Line Crossing","vt":"str"},{"t":"eq","v":"Cam 2 Line Crossing","vt":"str"},{"t":"eq","v":"Cam 3 Line Crossing","vt":"str"},{"t":"eq","v":"Cam 4 Line Crossing","vt":"str"},{"t":"eq","v":"Intruder Alarm Activate","vt":"str"},{"t":"eq","v":"Fire Alarm Activate","vt":"str"},{"t":"eq","v":"Recption Light Timer","vt":"str"}],"checkall":"false","repair":false,"outputs":7,"x":350,"y":160,"wires":[["3d7836222e90f9a1"],["6dc38b628a45528c"],["ce57489cec6bd0fb"],["b86dbd3c436f8bfb"],["8e0c2e85884394f3"],["84fdeb98bf46d024"],["9e3e0c305c5a4959"]]},{"id":"3d7836222e90f9a1","type":"link call","z":"67aa08691d6ea6c3","name":"Cam 1 Line Crossing","links":[],"linkType":"static","timeout":"30","x":580,"y":60,"wires":[[]]},{"id":"6dc38b628a45528c","type":"link call","z":"67aa08691d6ea6c3","name":"Cam 2 Line Crossing","links":[],"linkType":"static","timeout":"30","x":580,"y":100,"wires":[[]]},{"id":"ce57489cec6bd0fb","type":"link call","z":"67aa08691d6ea6c3","name":"Cam 3 Line Crossing","links":[],"linkType":"static","timeout":"30","x":580,"y":140,"wires":[[]]},{"id":"b86dbd3c436f8bfb","type":"link call","z":"67aa08691d6ea6c3","name":"Cam 4 Line Crossing","links":[],"linkType":"static","timeout":"30","x":580,"y":180,"wires":[[]]},{"id":"8e0c2e85884394f3","type":"link call","z":"67aa08691d6ea6c3","name":"to Intruder Alarm Activate","links":["52fcb93174a25a00"],"linkType":"static","timeout":"30","x":590,"y":220,"wires":[["938fa47a10c459ad"]]},{"id":"84fdeb98bf46d024","type":"link call","z":"67aa08691d6ea6c3","name":"Fire Alarm Activate","links":[],"linkType":"static","timeout":"30","x":570,"y":260,"wires":[[]]},{"id":"a54dfa1e70e07453","type":"inject","z":"67aa08691d6ea6c3","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Intruder Alarm Activate","payloadType":"str","x":160,"y":160,"wires":[["22d95cbaffe5b632"]]},{"id":"52fcb93174a25a00","type":"link in","z":"67aa08691d6ea6c3","g":"95febce1c94afef0","name":"Intruder Alarm Activate","links":[],"x":200,"y":400,"wires":[["d7b567decc286a35"]],"l":true},{"id":"2639f75b28291139","type":"link in","z":"67aa08691d6ea6c3","g":"b9a26efeb089b3ab","name":"Smoking Shelter Light on/off","links":[],"x":260,"y":640,"wires":[["dd05d4e38a41f36b"]],"l":true},{"id":"dd05d4e38a41f36b","type":"switch","z":"67aa08691d6ea6c3","g":"b9a26efeb089b3ab","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"FON","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":490,"y":640,"wires":[["f2095e363ed8f841"],["07c3c54067d5c74f"]]},{"id":"d7b567decc286a35","type":"change","z":"67aa08691d6ea6c3","g":"95febce1c94afef0","name":"FON","rules":[{"t":"set","p":"payload","pt":"msg","to":"FON","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":400,"wires":[["bd8739e3ea16cef7"]]},{"id":"f2095e363ed8f841","type":"function","z":"67aa08691d6ea6c3","g":"b9a26efeb089b3ab","name":"FON","func":"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":650,"y":620,"wires":[["41607734f9f9ef06"]]},{"id":"07c3c54067d5c74f","type":"function","z":"67aa08691d6ea6c3","g":"b9a26efeb089b3ab","name":"FOFF","func":"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":650,"y":660,"wires":[["41607734f9f9ef06"]]},{"id":"bd8739e3ea16cef7","type":"link call","z":"67aa08691d6ea6c3","g":"95febce1c94afef0","name":"SSL ON","links":["2639f75b28291139"],"linkType":"static","timeout":"30","x":520,"y":400,"wires":[["714c8ca6777bed20"]]},{"id":"41607734f9f9ef06","type":"link out","z":"67aa08691d6ea6c3","g":"b9a26efeb089b3ab","name":"SSL return","mode":"return","links":[],"x":785,"y":640,"wires":[]},{"id":"938fa47a10c459ad","type":"debug","z":"67aa08691d6ea6c3","name":"debug 37","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":880,"y":220,"wires":[]},{"id":"5d6ff60b369ac3b1","type":"link in","z":"67aa08691d6ea6c3","g":"d7a993850e0ca402","name":"Carpark Light on/off","links":[],"x":230,"y":780,"wires":[["43f626ca6affd403"]],"l":true},{"id":"43f626ca6affd403","type":"switch","z":"67aa08691d6ea6c3","g":"d7a993850e0ca402","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"FON","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":490,"y":780,"wires":[["f4efff21199f7543"],["c1449acf83e42581"]]},{"id":"f4efff21199f7543","type":"function","z":"67aa08691d6ea6c3","g":"d7a993850e0ca402","name":"FON","func":"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":650,"y":760,"wires":[["88b75e04bd3f55ab"]]},{"id":"c1449acf83e42581","type":"function","z":"67aa08691d6ea6c3","g":"d7a993850e0ca402","name":"FOFF","func":"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":650,"y":800,"wires":[["88b75e04bd3f55ab"]]},{"id":"88b75e04bd3f55ab","type":"link out","z":"67aa08691d6ea6c3","g":"d7a993850e0ca402","name":"SSL return","mode":"return","links":[],"x":785,"y":780,"wires":[]},{"id":"0414954a30bcbe50","type":"link in","z":"67aa08691d6ea6c3","g":"5eb7062cae8db8fb","name":"Recption on/off","links":[],"x":220,"y":920,"wires":[["83094489e43e3ed0"]],"l":true},{"id":"83094489e43e3ed0","type":"switch","z":"67aa08691d6ea6c3","g":"5eb7062cae8db8fb","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"FON","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":490,"y":920,"wires":[["33f863949d40b65e"],["567dac9cc1ee5d2c"]]},{"id":"33f863949d40b65e","type":"function","z":"67aa08691d6ea6c3","g":"5eb7062cae8db8fb","name":"FON","func":"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":650,"y":900,"wires":[["9e162c3686b1ce5a"]]},{"id":"567dac9cc1ee5d2c","type":"function","z":"67aa08691d6ea6c3","g":"5eb7062cae8db8fb","name":"FOFF","func":"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":650,"y":940,"wires":[["9e162c3686b1ce5a"]]},{"id":"9e162c3686b1ce5a","type":"link out","z":"67aa08691d6ea6c3","g":"5eb7062cae8db8fb","name":"SSL return","mode":"return","links":[],"x":785,"y":920,"wires":[]},{"id":"714c8ca6777bed20","type":"link call","z":"67aa08691d6ea6c3","g":"95febce1c94afef0","name":"CP ON","links":["5d6ff60b369ac3b1"],"linkType":"static","timeout":"30","x":680,"y":400,"wires":[["0d8ffd44d9cb5b70"]]},{"id":"0d8ffd44d9cb5b70","type":"link call","z":"67aa08691d6ea6c3","g":"95febce1c94afef0","name":"Recption ON","links":["0414954a30bcbe50"],"linkType":"static","timeout":"30","x":850,"y":400,"wires":[["07b8250f0d44a5d7"]]},{"id":"07b8250f0d44a5d7","type":"link out","z":"67aa08691d6ea6c3","g":"95febce1c94afef0","name":"link out 4","mode":"return","links":[],"x":955,"y":400,"wires":[]},{"id":"a72f573232bcfdb7","type":"link in","z":"67aa08691d6ea6c3","g":"625f8219a1e020f9","name":"Recption Light Timer","links":[],"x":190,"y":500,"wires":[["918e3a35baad49ac"]],"l":true},{"id":"918e3a35baad49ac","type":"change","z":"67aa08691d6ea6c3","g":"625f8219a1e020f9","name":"FON","rules":[{"t":"set","p":"payload","pt":"msg","to":"FON","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":500,"wires":[["faf34bd25867df6e"]]},{"id":"faf34bd25867df6e","type":"link call","z":"67aa08691d6ea6c3","g":"625f8219a1e020f9","name":"Recption ON","links":["0414954a30bcbe50"],"linkType":"static","timeout":"30","x":850,"y":500,"wires":[["390f4764d68ccbdf"]]},{"id":"390f4764d68ccbdf","type":"link out","z":"67aa08691d6ea6c3","g":"625f8219a1e020f9","name":"link out 5","mode":"return","links":[],"x":955,"y":500,"wires":[]},{"id":"9e3e0c305c5a4959","type":"link call","z":"67aa08691d6ea6c3","name":"Recption Light Timer","links":["a72f573232bcfdb7"],"linkType":"static","timeout":"30","x":580,"y":300,"wires":[["1f975a32acfaf49d"]]},{"id":"1f975a32acfaf49d","type":"debug","z":"67aa08691d6ea6c3","name":"debug 38","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":880,"y":300,"wires":[]}]