This may (or not) do what you want.
But it should give you enough of a model to see what I am doing and allow you to tweak it to do what you want.
IMPORTANT
You must set an upper
and lower
value first.
Then press the example value.
[{"id":"1391aea053d0b763","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"11","payloadType":"num","x":160,"y":3460,"wires":[["ab38a0c438852e21"]]},{"id":"e28aed7312460bb9","type":"comment","z":"7e987ddf260bdf0d","name":"Upper limit","info":"","x":170,"y":3410,"wires":[]},{"id":"71b7c4a538659240","type":"comment","z":"7e987ddf260bdf0d","name":"Lower limit","info":"","x":540,"y":3410,"wires":[]},{"id":"cfa2e0312fd1d286","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"12","payloadType":"num","x":160,"y":3500,"wires":[["ab38a0c438852e21"]]},{"id":"7c8ae1ee774304e2","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"13","payloadType":"num","x":160,"y":3540,"wires":[["ab38a0c438852e21"]]},{"id":"79b639b13389a50d","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"5","payloadType":"num","x":530,"y":3450,"wires":[["a13c908cc2a78060"]]},{"id":"6b1dd7effd8b13e6","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"4","payloadType":"num","x":530,"y":3490,"wires":[["a13c908cc2a78060"]]},{"id":"43c766be1a5df05c","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"3","payloadType":"num","x":530,"y":3530,"wires":[["a13c908cc2a78060"]]},{"id":"ab38a0c438852e21","type":"change","z":"7e987ddf260bdf0d","name":"","rules":[{"t":"set","p":"upper","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":3460,"wires":[[]]},{"id":"a13c908cc2a78060","type":"change","z":"7e987ddf260bdf0d","name":"","rules":[{"t":"set","p":"lower","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":3450,"wires":[[]]},{"id":"bbd53fa092d0bb58","type":"comment","z":"7e987ddf260bdf0d","name":"Example Real time values","info":"","x":220,"y":3590,"wires":[]},{"id":"f1b03f28eace87e9","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":160,"y":3630,"wires":[["d84e6f051c3797f9"]]},{"id":"084fa00f00b06c0e","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"2","payloadType":"num","x":160,"y":3670,"wires":[["d84e6f051c3797f9"]]},{"id":"ef2c0598f1b58063","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"3","payloadType":"num","x":160,"y":3710,"wires":[["d84e6f051c3797f9"]]},{"id":"8101479fee05cb8d","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"4","payloadType":"num","x":160,"y":3750,"wires":[["d84e6f051c3797f9"]]},{"id":"d5278eb76663d965","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"5","payloadType":"num","x":160,"y":3790,"wires":[["d84e6f051c3797f9"]]},{"id":"ee93a6eee365aa37","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"6","payloadType":"num","x":310,"y":3630,"wires":[["d84e6f051c3797f9"]]},{"id":"6938bc8c4444f712","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"7","payloadType":"num","x":310,"y":3670,"wires":[["d84e6f051c3797f9"]]},{"id":"6046c5de03f00523","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"8","payloadType":"num","x":310,"y":3710,"wires":[["d84e6f051c3797f9"]]},{"id":"d04201212261678e","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"9","payloadType":"num","x":310,"y":3750,"wires":[["d84e6f051c3797f9"]]},{"id":"dfac70ac840a4185","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"10","payloadType":"num","x":310,"y":3790,"wires":[["d84e6f051c3797f9"]]},{"id":"b0f1adfe843b6938","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"11","payloadType":"num","x":450,"y":3630,"wires":[["d84e6f051c3797f9"]]},{"id":"62e6cd64cddd4e0d","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"12","payloadType":"num","x":450,"y":3670,"wires":[["d84e6f051c3797f9"]]},{"id":"f5296e20e2128fd2","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"13","payloadType":"num","x":450,"y":3710,"wires":[["d84e6f051c3797f9"]]},{"id":"f9800ecdbcab8e5a","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"14","payloadType":"num","x":450,"y":3750,"wires":[["d84e6f051c3797f9"]]},{"id":"6556b8f102074047","type":"inject","z":"7e987ddf260bdf0d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"15","payloadType":"num","x":450,"y":3790,"wires":[["d84e6f051c3797f9"]]},{"id":"d84e6f051c3797f9","type":"change","z":"7e987ddf260bdf0d","name":"","rules":[{"t":"set","p":"upper","pt":"msg","to":"upper","tot":"flow"},{"t":"set","p":"lower","pt":"msg","to":"lower","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":3630,"wires":[["d8357b79cab8a74d"]]},{"id":"d8357b79cab8a74d","type":"switch","z":"7e987ddf260bdf0d","name":"which","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"upper","vt":"msg"},{"t":"lte","v":"lower","vt":"msg"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":630,"y":3750,"wires":[["8e7ae331061e2715"],["a331757d56ce0dc6"],["2dea12e2e6a3994f"]]},{"id":"8e7ae331061e2715","type":"debug","z":"7e987ddf260bdf0d","name":"> Upper","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":790,"y":3700,"wires":[]},{"id":"a331757d56ce0dc6","type":"debug","z":"7e987ddf260bdf0d","name":"<= Lower","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":790,"y":3750,"wires":[]},{"id":"2dea12e2e6a3994f","type":"debug","z":"7e987ddf260bdf0d","name":"Ignore","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":780,"y":3800,"wires":[]}]
Once you have see how it works, you can then try changing the upper
and lower
values and see how that works with the 1 - 15
input value range.