I have object var a = {
"a1": 0,
"a2": 0,
"a3": 0,
"a4": 0,
"a5": 0,
"a6": 0,
"a7": 1,
}
How to check changed value with RBE.
How to create new topic for each value and send to RBE?
[
{
"id": "6404444bc697d3b4",
"type": "rbe",
"z": "77aa57dc9b449835",
"name": "",
"func": "rbei",
"gap": "",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "topic",
"x": 270,
"y": 100,
"wires": [
[
"981b751314734123"
]
]
},
{
"id": "e2dc086d7ccb4383",
"type": "inject",
"z": "77aa57dc9b449835",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "0",
"payloadType": "num",
"x": 90,
"y": 60,
"wires": [
[
"6404444bc697d3b4"
]
]
},
{
"id": "5ab06ea56ae9e4a5",
"type": "inject",
"z": "77aa57dc9b449835",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "1",
"payloadType": "num",
"x": 90,
"y": 120,
"wires": [
[
"6404444bc697d3b4"
]
]
},
{
"id": "981b751314734123",
"type": "debug",
"z": "77aa57dc9b449835",
"name": "debug 398",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 410,
"y": 100,
"wires": []
},
{
"id": "a3bd23215374c9d7",
"type": "function",
"z": "77aa57dc9b449835",
"name": "function 503",
"func": "msg.payload = {\n \"a1\": 0,\n \"a2\": 0,\n \"a3\": 0,\n \"a4\": 0,\n \"a5\": 0,\n \"a6\": 0,\n \"a7\": 0,\n \n }\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 250,
"y": 220,
"wires": [
[
"d102b09971b8fdb9"
]
]
},
{
"id": "beaf3671431508ac",
"type": "function",
"z": "77aa57dc9b449835",
"name": "function 504",
"func": "msg.payload = {\n \"a1\": 0,\n \"a2\": 0,\n \"a3\": 0,\n \"a4\": 0,\n \"a5\": 0,\n \"a6\": 0,\n \"a7\": 1,\n \n }\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 250,
"y": 280,
"wires": [
[
"d102b09971b8fdb9"
]
]
},
{
"id": "687f3640c739891c",
"type": "inject",
"z": "77aa57dc9b449835",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 100,
"y": 220,
"wires": [
[
"a3bd23215374c9d7"
]
]
},
{
"id": "63c4abf560daaec9",
"type": "inject",
"z": "77aa57dc9b449835",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 100,
"y": 280,
"wires": [
[
"beaf3671431508ac"
]
]
},
{
"id": "d102b09971b8fdb9",
"type": "rbe",
"z": "77aa57dc9b449835",
"name": "",
"func": "rbei",
"gap": "",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "topic",
"x": 410,
"y": 240,
"wires": [
[
"2d44c67ec6a8ce4a"
]
]
},
{
"id": "2d44c67ec6a8ce4a",
"type": "debug",
"z": "77aa57dc9b449835",
"name": "debug 399",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 570,
"y": 240,
"wires": []
}
]