Sorry about that, must have missed the previous message.
Here is my nodered flow:
[
{
"id": "f93515bd.20cbf",
"type": "tab",
"label": "Last Camera",
"disabled": false,
"info": ""
},
{
"id": "a7fd4877.20e9d",
"type": "mqtt in",
"z": "f93515bd.20cbf",
"name": "",
"topic": "blue_iris/#",
"qos": "2",
"datatype": "auto",
"broker": "2e6fb66b.d1d872",
"x": 100,
"y": 40,
"wires": [
[
"8f608c79.90e86"
]
]
},
{
"id": "ee80dd2b.e87248",
"type": "debug",
"z": "f93515bd.20cbf",
"name": "Your Notification Service",
"active": true,
"tosidebar": true,
"console": true,
"tostatus": true,
"complete": "true",
"targetType": "full",
"x": 800,
"y": 100,
"wires": []
},
{
"id": "eacec533.39cd8",
"type": "mqtt out",
"z": "f93515bd.20cbf",
"name": "Last Camera",
"topic": "blue_iris/last_camera",
"qos": "",
"retain": "",
"broker": "2e6fb66b.d1d872",
"x": 730,
"y": 40,
"wires": []
},
{
"id": "b41b835c.35ec78",
"type": "function",
"z": "f93515bd.20cbf",
"name": "Select Camera",
"func": "var topic=msg.topic;\nif (topic==\"blue_iris/binary_sensor/front/state\"){\n msg.payload=\"1\";\n}\nelse if (topic==\"blue_iris/binary_sensor/kitchen/state\"){\n msg.payload=\"2\";\n}\nelse if (topic==\"blue_iris/binary_sensor/office/state\"){\n msg.payload=\"3\";\n}\nelse if (topic==\"blue_iris/binary_sensor/backyardnw/state\"){\n msg.payload=\"4\";\n}\nelse if (topic==\"blue_iris/binary_sensor/livingroom/state\"){\n msg.payload=\"5\";\n}\nelse if (topic==\"blue_iris/binary_sensor/tbd/state\"){\n msg.payload=\"6\";\n}\nelse if (topic==\"blue_iris/binary_sensor/driveway/state\"){\n msg.payload=\"7\";\n}\nelse if (topic==\"blue_iris/binary_sensor/garage1/state\"){\n msg.payload=\"8\";\n}\nelse if (topic==\"blue_iris/binary_sensor/garage2/state\"){\n msg.payload=\"9\";\n}\nelse if (topic==\"blue_iris/binary_sensor/backdoorgate/state\"){\n msg.payload=\"10\";\n}\nelse if (topic==\"blue_iris/binary_sensor/backdoor/state\"){\n msg.payload=\"11\";\n}\nelse if (topic==\"blue_iris/binary_sensor/backyardne/state\"){\n msg.payload=\"12\";\n}\nelse if (topic==\"blue_iris/binary_sensor/backyardsw/state\"){\n msg.payload=\"13\";\n}\nelse {\n msg.payload=\"0\";\n}\nmsg.topic = \"blue_iris/last_camera/state\"\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"x": 520,
"y": 40,
"wires": [
[
"ee80dd2b.e87248",
"eacec533.39cd8"
]
]
},
{
"id": "8f608c79.90e86",
"type": "switch",
"z": "f93515bd.20cbf",
"name": "ready or blink",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "ready",
"vt": "str"
},
{
"t": "eq",
"v": "blink",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 300,
"y": 40,
"wires": [
[
"ee80dd2b.e87248"
],
[
"b41b835c.35ec78",
"ee80dd2b.e87248"
]
]
},
{
"id": "2e6fb66b.d1d872",
"type": "mqtt-broker",
"z": "",
"name": "MQTT Server",
"broker": "11.0.0.71",
"port": "1883",
"clientid": "",
"usetls": false,
"compatmode": true,
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"willTopic": "",
"willQos": "0",
"willPayload": ""
}
]