valeu por complementar o tópico!
vou deixar aqui o código tbm pra quem quiser, basta trocar o server do MQTT e o primeiro node igual o user acima ensinou:
[
{
"id": "1c464346878b8feb",
"type": "tab",
"label": "Scene_Switch",
"disabled": false,
"info": "",
"env": []
},
{
"id": "5b56768d15bad6b7",
"type": "group",
"z": "1c464346878b8feb",
"style": {
"stroke": "#999999",
"stroke-opacity": "1",
"fill": "none",
"fill-opacity": "1",
"label": true,
"label-position": "nw",
"color": "#a4a4a4"
},
"nodes": [
"81267387956382de",
"7d601517f66396ae",
"4c838ae12c46bdbc",
"29a245e1fd26111a",
"12bd584d6248314b"
],
"x": 614,
"y": 159,
"w": 372,
"h": 202
},
{
"id": "cd6bb17853a14b82",
"type": "group",
"z": "1c464346878b8feb",
"style": {
"stroke": "#999999",
"stroke-opacity": "1",
"fill": "none",
"fill-opacity": "1",
"label": true,
"label-position": "nw",
"color": "#a4a4a4"
},
"nodes": [
"b81bab76538e7823",
"408d23ef33a73d4e",
"abcd99c347929ab8",
"dddf061f0d9b1a9e",
"321663f03a6b84d1"
],
"x": 614,
"y": 439,
"w": 372,
"h": 202
},
{
"id": "028af30c2b39e937",
"type": "group",
"z": "1c464346878b8feb",
"style": {
"stroke": "#999999",
"stroke-opacity": "1",
"fill": "none",
"fill-opacity": "1",
"label": true,
"label-position": "nw",
"color": "#a4a4a4"
},
"nodes": [
"c838591f74f8ffef",
"a8c1e29c3f3d7165",
"ed41b5dc2a0ae1c2",
"c319032744d476f6",
"241804e8b297e4f6"
],
"x": 614,
"y": 719,
"w": 372,
"h": 202
},
{
"id": "81267387956382de",
"type": "switch",
"z": "1c464346878b8feb",
"g": "5b56768d15bad6b7",
"name": "Single",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1_single",
"vt": "str"
},
{
"t": "eq",
"v": "2_single",
"vt": "str"
},
{
"t": "eq",
"v": "3_single",
"vt": "str"
},
{
"t": "eq",
"v": "4_single",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 4,
"x": 690,
"y": 260,
"wires": [
[
"7d601517f66396ae"
],
[
"4c838ae12c46bdbc"
],
[
"29a245e1fd26111a"
],
[
"12bd584d6248314b"
]
]
},
{
"id": "7d601517f66396ae",
"type": "debug",
"z": "1c464346878b8feb",
"g": "5b56768d15bad6b7",
"name": "debug 8",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 200,
"wires": []
},
{
"id": "4c838ae12c46bdbc",
"type": "debug",
"z": "1c464346878b8feb",
"g": "5b56768d15bad6b7",
"name": "debug 9",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 240,
"wires": []
},
{
"id": "29a245e1fd26111a",
"type": "debug",
"z": "1c464346878b8feb",
"g": "5b56768d15bad6b7",
"name": "debug 10",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 280,
"wires": []
},
{
"id": "12bd584d6248314b",
"type": "debug",
"z": "1c464346878b8feb",
"g": "5b56768d15bad6b7",
"name": "debug 11",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 320,
"wires": []
},
{
"id": "b81bab76538e7823",
"type": "switch",
"z": "1c464346878b8feb",
"g": "cd6bb17853a14b82",
"name": "Double",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1_double",
"vt": "str"
},
{
"t": "eq",
"v": "2_double",
"vt": "str"
},
{
"t": "eq",
"v": "3_double",
"vt": "str"
},
{
"t": "eq",
"v": "4_double",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 4,
"x": 700,
"y": 540,
"wires": [
[
"408d23ef33a73d4e"
],
[
"abcd99c347929ab8"
],
[
"dddf061f0d9b1a9e"
],
[
"321663f03a6b84d1"
]
]
},
{
"id": "408d23ef33a73d4e",
"type": "debug",
"z": "1c464346878b8feb",
"g": "cd6bb17853a14b82",
"name": "debug 12",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 480,
"wires": []
},
{
"id": "abcd99c347929ab8",
"type": "debug",
"z": "1c464346878b8feb",
"g": "cd6bb17853a14b82",
"name": "debug 13",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 520,
"wires": []
},
{
"id": "dddf061f0d9b1a9e",
"type": "debug",
"z": "1c464346878b8feb",
"g": "cd6bb17853a14b82",
"name": "debug 14",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 560,
"wires": []
},
{
"id": "321663f03a6b84d1",
"type": "debug",
"z": "1c464346878b8feb",
"g": "cd6bb17853a14b82",
"name": "debug 15",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 600,
"wires": []
},
{
"id": "c838591f74f8ffef",
"type": "switch",
"z": "1c464346878b8feb",
"g": "028af30c2b39e937",
"name": "Hold",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1_hold",
"vt": "str"
},
{
"t": "eq",
"v": "2_hold",
"vt": "str"
},
{
"t": "eq",
"v": "3_hold",
"vt": "str"
},
{
"t": "eq",
"v": "4_hold",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 4,
"x": 690,
"y": 820,
"wires": [
[
"a8c1e29c3f3d7165"
],
[
"ed41b5dc2a0ae1c2"
],
[
"c319032744d476f6"
],
[
"241804e8b297e4f6"
]
]
},
{
"id": "a8c1e29c3f3d7165",
"type": "debug",
"z": "1c464346878b8feb",
"g": "028af30c2b39e937",
"name": "debug 16",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 760,
"wires": []
},
{
"id": "ed41b5dc2a0ae1c2",
"type": "debug",
"z": "1c464346878b8feb",
"g": "028af30c2b39e937",
"name": "debug 17",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 800,
"wires": []
},
{
"id": "c319032744d476f6",
"type": "debug",
"z": "1c464346878b8feb",
"g": "028af30c2b39e937",
"name": "debug 18",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 840,
"wires": []
},
{
"id": "241804e8b297e4f6",
"type": "debug",
"z": "1c464346878b8feb",
"g": "028af30c2b39e937",
"name": "debug 19",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 880,
"wires": []
},
{
"id": "7878f147d5f3d34d",
"type": "mqtt in",
"z": "1c464346878b8feb",
"name": "",
"topic": "zigbee2mqtt/cenas/action",
"qos": "2",
"datatype": "auto-detect",
"broker": "b14029f34927d922",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 250,
"y": 560,
"wires": [
[
"81267387956382de",
"b81bab76538e7823",
"c838591f74f8ffef"
]
]
},
{
"id": "b14029f34927d922",
"type": "mqtt-broker",
"name": "MQTT",
"broker": "mqtt",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "",
"birthQos": "0",
"birthRetain": "false",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closeRetain": "false",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willRetain": "false",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
}
]