Remember RBE - Persistent Filter Node
This is a flow that mimics the "block unless value changes" behavior of the Filter/RBE but it will write the payload value to a file so that it can survive a reset / reboot. There are probably many better ways of doing this, but this works for me and I wanted to share it in case someone finds it useful.
***Note: You must set the device name on the node, this will become the file name that it saves the payload value to
[{"id":"d83e6c14.d12798","type":"subflow","name":"Remember RBE","info":"","category":"","in":[{"x":80,"y":320,"wires":[{"id":"eb0fd8af.9b39a"}]}],"out":[{"x":1240,"y":300,"wires":[{"id":"21fc5254.1c3a1e","port":0}]}],"env":[{"name":"devicename","type":"str","value":""}],"meta":{},"color":"#ff1111","status":{"x":1240,"y":180,"wires":[{"id":"21fc5254.1c3a1e","port":0}]}},{"id":"1eebab24.5c8c85","type":"file","z":"d83e6c14.d12798","name":"file out","filename":"","appendNewline":false,"createDir":true,"overwriteFile":"true","encoding":"none","x":850,"y":460,"wires":[[]]},{"id":"3d9f0e6a.7316aa","type":"file in","z":"d83e6c14.d12798","name":"file in","filename":"","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":610,"y":280,"wires":[["2d7a341a.8c5d24"]]},{"id":"8f1f589a.8932a8","type":"function","z":"d83e6c14.d12798","name":"","func":"var devicename = flow.get(\"devicename\");\n\nmsg.filename = \"/data/RememberRbe/\" + devicename + \".txt\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":480,"y":280,"wires":[["3d9f0e6a.7316aa"]]},{"id":"2717b75c.21bb48","type":"catch","z":"d83e6c14.d12798","name":"","scope":["3d9f0e6a.7316aa"],"uncaught":false,"x":550,"y":460,"wires":[["675cf8b5.1ca9e8"]]},{"id":"675cf8b5.1ca9e8","type":"switch","z":"d83e6c14.d12798","name":"","property":"error.message","propertyType":"msg","rules":[{"t":"cont","v":"no such file or directory","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":690,"y":460,"wires":[["1eebab24.5c8c85"]]},{"id":"eb0fd8af.9b39a","type":"change","z":"d83e6c14.d12798","name":"","rules":[{"t":"set","p":"incoming","pt":"flow","to":"payload","tot":"msg"},{"t":"set","p":"devicename","pt":"flow","to":"devicename","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":280,"wires":[["8f1f589a.8932a8"]]},{"id":"2d7a341a.8c5d24","type":"function","z":"d83e6c14.d12798","name":"","func":"var filevalue = String(msg.payload);\n//node.warn(filevalue);\n\nvar incomingvalue = String(flow.get(\"incoming\"));\n//node.warn(incomingvalue);\n\nif (filevalue == incomingvalue) {\n //node.warn(\"match\");\n} else {\n\n\nvar newMsg = { payload: \"nomatch\" };\nreturn newMsg;\n\n \n}\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":740,"y":280,"wires":[["6a5474a9.2eb3b4"]]},{"id":"6a5474a9.2eb3b4","type":"switch","z":"d83e6c14.d12798","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"nomatch","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":870,"y":280,"wires":[["21fc5254.1c3a1e"]]},{"id":"21fc5254.1c3a1e","type":"change","z":"d83e6c14.d12798","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"incoming","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":280,"wires":[["e4612782.177f88"]]},{"id":"e4612782.177f88","type":"function","z":"d83e6c14.d12798","name":"","func":"var devicename = flow.get(\"devicename\");\nmsg.filename = \"/data/RememberRbe/\" + devicename + \".txt\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":960,"y":380,"wires":[["1eebab24.5c8c85"]]}]