Skip to content

Instantly share code, notes, and snippets.

@skylord123
Created October 23, 2019 01:48
Show Gist options
  • Save skylord123/0cf2d2e3c558b3c928be3bd242ebf4b7 to your computer and use it in GitHub Desktop.
Save skylord123/0cf2d2e3c558b3c928be3bd242ebf4b7 to your computer and use it in GitHub Desktop.
Node-RED flow only fire on payload changes
[{"id":"59ea6981.ad14b8","type":"mqtt in","z":"582717cf.467f78","name":"","topic":"some/input/channel","qos":"2","datatype":"auto","broker":"5a59e251.9e1d4c","x":1110,"y":260,"wires":[["fe4cd5f9.d74f98"]]},{"id":"577b26e7.fcf1c8","type":"change","z":"582717cf.467f78","name":"","rules":[{"t":"set","p":"someinput_last_value","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1470,"y":260,"wires":[["e47f530b.00cea"]]},{"id":"fe4cd5f9.d74f98","type":"switch","z":"582717cf.467f78","name":"","property":"someinput_last_value","propertyType":"flow","rules":[{"t":"neq","v":"payload","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":1270,"y":260,"wires":[["577b26e7.fcf1c8"]]},{"id":"5a59e251.9e1d4c","type":"mqtt-broker","z":"","name":"","broker":"192.168.1.10","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment