This is really hard to explain quickly and/or easily.
Really trying to keep it short:
I can change the colour of button backgrounds depending on things happening.
It is not CONSTANT. It is only when things change.
I am using a pulsed event to determine if devices are on or off line.
I have a "one off" event to set the colours of the buttons. Works, but I want to make it better.
If the device is OFF LINE, the colour changes accordingly.
To stop "flooding" with unneeded messages I put the RBE node in.
But it doesn't seem to be working as I expect.
I accept that if it receives two messages saying the device is OFF LINE it won't send the second.
So what I did to get around that (or so I thought) was to add an INJECT node just before the RBE.
Doesn't matter what it injects. It won't be the same as the previous packet so it should allow that packet through, and in so doing, allow the next of the WANTED packets through too.
It isn't.
This is THE part of the flow:
[{"id":"3e3949d5.1b3b26","type":"function","z":"381d953d.4cf092","name":"EXISTING NODE","func":"var colour = (msg.payload === \"On-line\")?\"lime\":\"brown\";\n//node.warn(\"Selected colour is \" + colour);\nnode.status({text:colour});\nmsg.background = colour;\nmsg.device_ID = \"ALL\";\nmsg.state = 0;\nreturn msg\n","outputs":1,"noerr":0,"x":1660,"y":3310,"wires":[["da102b23.c13568"]]},{"id":"da102b23.c13568","type":"rbe","z":"381d953d.4cf092","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":1860,"y":3310,"wires":[[]]},{"id":"74f8d5df.cae62c","type":"inject","z":"381d953d.4cf092","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":1710,"y":3260,"wires":[["da102b23.c13568"]]}]
The wanted data is coming in from the left to the "EXISTING" node. Goes through the RBE and out.
The messages are basically ON of OFF messages with colour information in them.
To get one of them to pass through, I press the INJECT button on the inject node and expect to see that come out and then the next ON/OFF signal (one of) go through.
It isn't happening.
Where's that elephant hiding?