@totallyinformation/node-red-contrib-events
Version:
Event broadcast and receive nodes for Node-RED.
828 lines • 20.1 kB
JSON
[
{
"id": "b8d40388d72e6e0e",
"type": "event-in",
"z": "f8f450e5112b3528",
"name": "",
"topic": "examples/**",
"x": 790,
"y": 320,
"wires": [
[
"9bba81f838846069"
]
]
},
{
"id": "9bba81f838846069",
"type": "debug",
"z": "f8f450e5112b3528",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "msg",
"x": 990,
"y": 320,
"wires": []
},
{
"id": "0d0a35162e82055a",
"type": "debug",
"z": "f8f450e5112b3528",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "msg",
"x": 990,
"y": 380,
"wires": []
},
{
"id": "67928932778fceff",
"type": "group",
"z": "f8f450e5112b3528",
"name": "Valid Input Messages \\n ",
"style": {
"stroke": "#92d04f",
"fill": "#c8e7a7",
"fill-opacity": "0.26",
"label": true,
"color": "#0070c0"
},
"nodes": [
"cd7e74689f80d6d8",
"b6e339b8d119ffd2",
"fc38ec1067519f20",
"80372eb0451d3972",
"dc2785b950617d59",
"80f0d09ccb354a9d",
"76d3d6e0b6559112",
"18205a9c2c4b3b4a"
],
"x": 34,
"y": 23,
"w": 572,
"h": 318
},
{
"id": "cd7e74689f80d6d8",
"type": "inject",
"z": "f8f450e5112b3528",
"g": "67928932778fceff",
"name": "Expect 6 outputs",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
},
{
"p": "anything",
"v": "{\"some\":\"thing\"}",
"vt": "json"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "examples/example1",
"payload": "I am example 1",
"payloadType": "str",
"x": 160,
"y": 80,
"wires": [
[
"80372eb0451d3972"
]
]
},
{
"id": "b6e339b8d119ffd2",
"type": "inject",
"z": "f8f450e5112b3528",
"g": "67928932778fceff",
"name": "Expect 5 outputs",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
},
{
"p": "anything",
"v": "{\"some\":\"other thing\"}",
"vt": "json"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "examples/example2",
"payload": "I am example 2",
"payloadType": "str",
"x": 160,
"y": 120,
"wires": [
[
"80372eb0451d3972"
]
]
},
{
"id": "fc38ec1067519f20",
"type": "inject",
"z": "f8f450e5112b3528",
"g": "67928932778fceff",
"name": "Multi-level: Expect 2 outputs",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
},
{
"p": "anything",
"v": "{\"some\":\"more thing\"}",
"vt": "json"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "examples/example3/another/level",
"payload": "I am example 3",
"payloadType": "str",
"x": 200,
"y": 160,
"wires": [
[
"80372eb0451d3972"
]
]
},
{
"id": "80372eb0451d3972",
"type": "event-out",
"z": "f8f450e5112b3528",
"g": "67928932778fceff",
"name": "",
"topic": "defaultTopic",
"passthrough": "none",
"outputs": 0,
"x": 510,
"y": 80,
"wires": []
},
{
"id": "dc2785b950617d59",
"type": "inject",
"z": "f8f450e5112b3528",
"g": "67928932778fceff",
"name": "No topic (default enabled): Expect 1 output",
"props": [
{
"p": "payload"
},
{
"p": "anything",
"v": "{\"some\":\"a thing with no topic\"}",
"vt": "json"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "No topic example",
"payloadType": "str",
"x": 240,
"y": 200,
"wires": [
[
"80372eb0451d3972"
]
]
},
{
"id": "80f0d09ccb354a9d",
"type": "inject",
"z": "f8f450e5112b3528",
"g": "67928932778fceff",
"name": "Passthrough",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
},
{
"p": "anything",
"v": "{\"some\":\"other thing\"}",
"vt": "json"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "examples/example2",
"payload": "I am example 2",
"payloadType": "str",
"x": 150,
"y": 300,
"wires": [
[
"76d3d6e0b6559112"
]
]
},
{
"id": "76d3d6e0b6559112",
"type": "event-out",
"z": "f8f450e5112b3528",
"g": "67928932778fceff",
"name": "",
"topic": "",
"passthrough": "input",
"outputs": 1,
"x": 320,
"y": 300,
"wires": [
[
"18205a9c2c4b3b4a"
]
]
},
{
"id": "18205a9c2c4b3b4a",
"type": "debug",
"z": "f8f450e5112b3528",
"g": "67928932778fceff",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 490,
"y": 300,
"wires": []
},
{
"id": "883e090d8eb4b74f",
"type": "group",
"z": "f8f450e5112b3528",
"name": "Outputs - See the debug panel for valid and error outputs \\n ",
"style": {
"stroke": "#0070c0",
"fill": "#bfdbef",
"fill-opacity": "0.26",
"label": true,
"color": "#000000"
},
"nodes": [
"8db94251f4bfc582",
"99ae35911f9beb07",
"357d18d1dc7409ba",
"bcbb58dc68b2cdd2",
"5d32ccc5f6501aa8",
"93371ee03ba7cd9a",
"e67d203a6f91357e",
"4dedcf6a355b32bf",
"2bd5446ca5b41eda",
"2406573246c81ef6",
"2140cf56b552fe1b",
"1f588e99bd69a8f9",
"559741411257c600"
],
"x": 694,
"y": 23,
"w": 392,
"h": 518
},
{
"id": "8db94251f4bfc582",
"type": "debug",
"z": "f8f450e5112b3528",
"g": "883e090d8eb4b74f",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "msg",
"x": 990,
"y": 80,
"wires": []
},
{
"id": "99ae35911f9beb07",
"type": "debug",
"z": "f8f450e5112b3528",
"g": "883e090d8eb4b74f",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "msg",
"x": 990,
"y": 140,
"wires": []
},
{
"id": "357d18d1dc7409ba",
"type": "debug",
"z": "f8f450e5112b3528",
"g": "883e090d8eb4b74f",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "msg",
"x": 990,
"y": 200,
"wires": []
},
{
"id": "bcbb58dc68b2cdd2",
"type": "event-in",
"z": "f8f450e5112b3528",
"g": "883e090d8eb4b74f",
"name": "Example 1a",
"topic": "examples/example1",
"x": 790,
"y": 80,
"wires": [
[
"8db94251f4bfc582"
]
]
},
{
"id": "5d32ccc5f6501aa8",
"type": "event-in",
"z": "f8f450e5112b3528",
"g": "883e090d8eb4b74f",
"name": "Example 1b ",
"topic": "examples/example1",
"x": 790,
"y": 140,
"wires": [
[
"99ae35911f9beb07"
]
]
},
{
"id": "93371ee03ba7cd9a",
"type": "event-in",
"z": "f8f450e5112b3528",
"g": "883e090d8eb4b74f",
"name": "",
"topic": "examples/example2",
"x": 810,
"y": 200,
"wires": [
[
"357d18d1dc7409ba"
]
]
},
{
"id": "e67d203a6f91357e",
"type": "debug",
"z": "f8f450e5112b3528",
"g": "883e090d8eb4b74f",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "msg",
"x": 990,
"y": 260,
"wires": []
},
{
"id": "4dedcf6a355b32bf",
"type": "event-in",
"z": "f8f450e5112b3528",
"g": "883e090d8eb4b74f",
"name": "",
"topic": "examples/*",
"x": 780,
"y": 260,
"wires": [
[
"e67d203a6f91357e"
]
]
},
{
"id": "2bd5446ca5b41eda",
"type": "debug",
"z": "f8f450e5112b3528",
"g": "883e090d8eb4b74f",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "msg",
"x": 990,
"y": 500,
"wires": []
},
{
"id": "2406573246c81ef6",
"type": "event-in",
"z": "f8f450e5112b3528",
"g": "883e090d8eb4b74f",
"name": "",
"topic": "defaultTopic",
"x": 790,
"y": 500,
"wires": [
[
"2bd5446ca5b41eda"
]
]
},
{
"id": "2140cf56b552fe1b",
"type": "event-in",
"z": "f8f450e5112b3528",
"g": "883e090d8eb4b74f",
"name": "",
"topic": "examples/+",
"x": 790,
"y": 380,
"wires": [
[
"0d0a35162e82055a"
]
]
},
{
"id": "1f588e99bd69a8f9",
"type": "event-in",
"z": "f8f450e5112b3528",
"g": "883e090d8eb4b74f",
"name": "",
"topic": "examples/#",
"x": 790,
"y": 440,
"wires": [
[
"559741411257c600"
]
]
},
{
"id": "559741411257c600",
"type": "debug",
"z": "f8f450e5112b3528",
"g": "883e090d8eb4b74f",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "msg",
"x": 990,
"y": 440,
"wires": []
},
{
"id": "f1d57f2323376d4f",
"type": "group",
"z": "f8f450e5112b3528",
"name": "Error Tests \\n ",
"style": {
"stroke": "#ff0000",
"fill": "#ffbfbf",
"fill-opacity": "0.2",
"label": true,
"color": "#6f2fa0"
},
"nodes": [
"48cff9ebf7f43376",
"8962a5fe0b8d6288",
"88fae359279f773c",
"0972a2d7180549c3",
"27976301ca819020",
"2936bcef3b54a656",
"f432f577fc0b19f2",
"6ec3e8743317f01e",
"88f335a6657f3025",
"cbd27c0740d2df2c"
],
"x": 34,
"y": 363,
"w": 572,
"h": 358
},
{
"id": "48cff9ebf7f43376",
"type": "inject",
"z": "f8f450e5112b3528",
"g": "f1d57f2323376d4f",
"name": "Topic >255 characters (error)",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/123/456/789/0/",
"payload": "This topic is >255 chars - should generate an error",
"payloadType": "str",
"x": 200,
"y": 420,
"wires": [
[
"8962a5fe0b8d6288"
]
]
},
{
"id": "8962a5fe0b8d6288",
"type": "event-out",
"z": "f8f450e5112b3528",
"g": "f1d57f2323376d4f",
"name": "Error Tests",
"topic": "",
"outputs": 0,
"x": 510,
"y": 420,
"wires": []
},
{
"id": "88fae359279f773c",
"type": "inject",
"z": "f8f450e5112b3528",
"g": "f1d57f2323376d4f",
"name": "No topic and no default (error)",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "No topic example & no default (should error)",
"payloadType": "str",
"x": 200,
"y": 460,
"wires": [
[
"8962a5fe0b8d6288"
]
]
},
{
"id": "0972a2d7180549c3",
"type": "inject",
"z": "f8f450e5112b3528",
"g": "f1d57f2323376d4f",
"name": "Topic contains `#` (error)",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "some/text#/blurb",
"payload": "Topic contains # (should error)",
"payloadType": "str",
"x": 210,
"y": 500,
"wires": [
[
"8962a5fe0b8d6288"
]
]
},
{
"id": "27976301ca819020",
"type": "inject",
"z": "f8f450e5112b3528",
"g": "f1d57f2323376d4f",
"name": "Topic contains `*` (error)",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "some/text*/blurb",
"payload": "Topic contains * (should error)",
"payloadType": "str",
"x": 220,
"y": 540,
"wires": [
[
"8962a5fe0b8d6288"
]
]
},
{
"id": "2936bcef3b54a656",
"type": "inject",
"z": "f8f450e5112b3528",
"g": "f1d57f2323376d4f",
"name": "Topic contains `+` (error)",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "some/text+/blurb",
"payload": "Topic contains + (should error)",
"payloadType": "str",
"x": 210,
"y": 580,
"wires": [
[
"8962a5fe0b8d6288"
]
]
},
{
"id": "f432f577fc0b19f2",
"type": "inject",
"z": "f8f450e5112b3528",
"g": "f1d57f2323376d4f",
"name": "Several errors (error)",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "some/+text#/blurb/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/",
"payload": "Topic contains # (should error)",
"payloadType": "str",
"x": 220,
"y": 620,
"wires": [
[
"8962a5fe0b8d6288"
]
]
},
{
"id": "6ec3e8743317f01e",
"type": "inject",
"z": "f8f450e5112b3528",
"g": "f1d57f2323376d4f",
"name": "Passthrough",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
},
{
"p": "anything",
"v": "{\"some\":\"other thing\"}",
"vt": "json"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "examples/example+2",
"payload": "I am example 2",
"payloadType": "str",
"x": 150,
"y": 680,
"wires": [
[
"88f335a6657f3025"
]
]
},
{
"id": "88f335a6657f3025",
"type": "event-out",
"z": "f8f450e5112b3528",
"g": "f1d57f2323376d4f",
"name": "Expect only error",
"topic": "",
"passthrough": "input",
"outputs": 1,
"x": 330,
"y": 680,
"wires": [
[
"cbd27c0740d2df2c"
]
]
},
{
"id": "cbd27c0740d2df2c",
"type": "debug",
"z": "f8f450e5112b3528",
"g": "f1d57f2323376d4f",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 490,
"y": 680,
"wires": []
}
]