Hi,
I use Nodered as a graphic interface for PLC. Communication between the PLC and Nodered is via EtherNet/IP (cyclic reading of information every 500ms). I have two variables BOOL and INTEGER. I send their status to the Pushover using Nodered. This state is unchanged for 12 hours, but I receive the information 3 times in that time. For filtering I use the RBE function.
What more can I do to prevent new messages from being sent without changing the state of the variable? Thank you for your help.
Code:
[
{
"id": "5d083a808ecd934c",
"type": "comment",
"z": "efb7d2d2b6e3c987",
"name": "PRIORITA: NORMAL________________________________________Info o zamčení/odemčení bytu________________________________________",
"info": "",
"x": 653,
"y": 782,
"wires": []
},
{
"id": "ad8f434bdc771f7d",
"type": "comment",
"z": "efb7d2d2b6e3c987",
"name": "PRIORITA: NORMAL________________________________________Info o vypnutí/zapnutí bytu________________________________________",
"info": "",
"x": 643,
"y": 918,
"wires": []
},
{
"id": "922de915ad452dcf",
"type": "link in",
"z": "efb7d2d2b6e3c987",
"name": "",
"links": [
"772014ef.1db5cc"
],
"x": 168,
"y": 1020,
"wires": [
[
"f90fef14f58eb873"
]
]
},
{
"id": "f90fef14f58eb873",
"type": "rbe",
"z": "efb7d2d2b6e3c987",
"name": "",
"func": "rbe",
"gap": "0",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "topic",
"x": 288,
"y": 1020,
"wires": [
[
"0e13eb57dd0ddae3"
]
]
},
{
"id": "07a1e75174b0b799",
"type": "link in",
"z": "efb7d2d2b6e3c987",
"name": "",
"links": [
"edede8e9.684b88"
],
"x": 168,
"y": 850,
"wires": [
[
"6368f49550aeafe3",
"155fc72718b51181"
]
]
},
{
"id": "33af2ed61102b39a",
"type": "switch",
"z": "efb7d2d2b6e3c987",
"name": "TRUE/FALSE",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "true",
"vt": "jsonata"
},
{
"t": "eq",
"v": "false",
"vt": "jsonata"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 675,
"y": 850,
"wires": [
[
"87ac6df4ac3c48ef"
],
[
"27e317e17074b1ca"
]
]
},
{
"id": "0e13eb57dd0ddae3",
"type": "switch",
"z": "efb7d2d2b6e3c987",
"name": "Režim bytu",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
},
{
"t": "eq",
"v": "2",
"vt": "num"
},
{
"t": "eq",
"v": "3",
"vt": "num"
},
{
"t": "eq",
"v": "4",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 4,
"x": 461,
"y": 1020,
"wires": [
[
"9c881ba76b909762"
],
[
"f1015e91e9389cea"
],
[
"b1161fda29b01e4e"
],
[
"c043f59197503e53"
]
]
},
{
"id": "27e317e17074b1ca",
"type": "function",
"z": "efb7d2d2b6e3c987",
"name": "Informace: byt odemknut",
"func": "msg = {\n topic : \"ODEMČENO\",\n payload : \"Byt byl odemknut.\",\n} ;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 926,
"y": 867,
"wires": [
[
"44666a63f396464c"
]
]
},
{
"id": "44666a63f396464c",
"type": "pushover",
"z": "efb7d2d2b6e3c987",
"name": "Stav zamku",
"device": "",
"title": "",
"priority": "-2",
"sound": "pushover",
"url": "",
"url_title": "",
"html": true,
"x": 1226,
"y": 850,
"wires": []
},
{
"id": "719c41da0cf82cd3",
"type": "pushover",
"z": "efb7d2d2b6e3c987",
"name": "stav režimu bytu",
"device": "",
"title": "",
"priority": "-2",
"sound": "mechanical",
"url": "",
"url_title": "",
"html": true,
"x": 1270,
"y": 1020,
"wires": []
},
{
"id": "87ac6df4ac3c48ef",
"type": "function",
"z": "efb7d2d2b6e3c987",
"name": "Informace: byt zamknut",
"func": "msg = {\n topic : \"ZAMČENO\",\n payload : \"Byt byl zamknut.\",\n} ;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 926,
"y": 833,
"wires": [
[
"44666a63f396464c"
]
]
},
{
"id": "9c881ba76b909762",
"type": "function",
"z": "efb7d2d2b6e3c987",
"name": "Informace: byt v režimu 1 (voda, elektřina, světla = ON)",
"func": "msg = {\n topic : \"BYT: MODE 1\",\n payload : \"Byt přepnut do režimu 1 (voda, elektřina, světla = ON)\",\n} ;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 812,
"y": 969,
"wires": [
[
"719c41da0cf82cd3"
]
]
},
{
"id": "f1015e91e9389cea",
"type": "function",
"z": "efb7d2d2b6e3c987",
"name": "Informace: byt v režimu 2 (voda a elektřina = ON, světla = OFF)",
"func": "msg = {\n topic : \"BYT: MODE 2\",\n payload : \"Byt přepnut do režimu 2 (voda a elektřina = ON, světla = OFF)\",\n} ;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 842,
"y": 1003,
"wires": [
[
"719c41da0cf82cd3"
]
]
},
{
"id": "b1161fda29b01e4e",
"type": "function",
"z": "efb7d2d2b6e3c987",
"name": "Informace: byt v režimu 3 (světla = ON, voda a elektřina = OFF)",
"func": "msg = {\n topic : \"BYT: MODE 3\",\n payload : \"Byt přepnut do režimu 3 (světla = ON, voda a elektřina = OFF)\",\n} ;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 842,
"y": 1037,
"wires": [
[
"719c41da0cf82cd3"
]
]
},
{
"id": "c043f59197503e53",
"type": "function",
"z": "efb7d2d2b6e3c987",
"name": "Informace: byt v režimu 4 (voda,elektřina,světla = OFF)",
"func": "msg = {\n topic : \"BYT: MODE 4\",\n payload : \"Byt přepnut do režimu 4 (voda, elektřina, světla = OFF)\",\n} ;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 812,
"y": 1071,
"wires": [
[
"719c41da0cf82cd3"
]
]
},
{
"id": "6368f49550aeafe3",
"type": "debug",
"z": "efb7d2d2b6e3c987",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 343,
"y": 816,
"wires": []
},
{
"id": "155fc72718b51181",
"type": "rbe",
"z": "efb7d2d2b6e3c987",
"name": "",
"func": "rbe",
"gap": "0",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "topic",
"x": 322,
"y": 850,
"wires": [
[
"33af2ed61102b39a"
]
]
}
]