Dynamic min max limit to gauge

I am new in Node red following code i have created following example with 3 gauges in it.
I wants to show limit of all gauges dynamically by single function not individual function for each


[{"id":"ca33fa4c.a42348","type":"mqtt in","z":"b0c1d592.40c9b8","name":"loadprofileout","topic":"LOAD PROFILE","qos":"2","datatype":"auto","broker":"f52c9088.7d7c1","x":110,"y":340,"wires":[["61549806.8da518"]]},{"id":"86c9ba30.a128a8","type":"mqtt out","z":"b0c1d592.40c9b8","name":"loadprofile","topic":"LOAD PROFILE","qos":"0","retain":"","broker":"f52c9088.7d7c1","x":129,"y":260,"wires":[]},{"id":"61549806.8da518","type":"json","z":"b0c1d592.40c9b8","name":"","property":"payload","action":"","pretty":false,"x":250,"y":340,"wires":[["81fee1bc.eaa1e"]]},{"id":"7c9fcf1d.f0cae","type":"split","z":"b0c1d592.40c9b8","name":"","splt":":","spltType":"str","arraySplt":"3","arraySpltType":"len","stream":false,"addname":"","x":250,"y":400,"wires":[["4e001d06.b60404"]]},{"id":"4e001d06.b60404","type":"function","z":"b0c1d592.40c9b8","name":"","func":"var parts = msg.payload.split('\":\"');\nmsg.key = parts[0].replace('\"', \"\");\nmsg.val = parts[1]\nmsg.ui_control = {max:parseInt(msg.payload)-100};\n/*var x = parseInt(msg.val)+100;\nvar y = parseInt(msg.val)-100;\nmsg = {ui_control:{max:x,min:y}};\n*/\n\nreturn msg;\n","outputs":1,"noerr":0,"x":270,"y":460,"wires":[["a836199b.351868"]]},{"id":"a836199b.351868","type":"join","z":"b0c1d592.40c9b8","name":"","mode":"custom","build":"array","property":"","propertyType":"full","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":430,"y":400,"wires":[["8dfa8b92.b80a58","f417118a.a172b","c0f916de.079f68","c6adacbd.bd3ae","3eaaa0c.783c36"]]},{"id":"81fee1bc.eaa1e","type":"split","z":"b0c1d592.40c9b8","name":"","splt":":","spltType":"str","arraySplt":"3","arraySpltType":"len","stream":false,"addname":"","x":370,"y":340,"wires":[["7c9fcf1d.f0cae"]]},{"id":"c0f916de.079f68","type":"debug","z":"b0c1d592.40c9b8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":510,"y":480,"wires":[]},{"id":"3eaaa0c.783c36","type":"ui_gauge","z":"b0c1d592.40c9b8","name":"","group":"98ad6404.0f5d38","order":4,"width":"4","height":"4","gtype":"gage","title":"{{payload[3].parts.key}}","label":"units","format":"{{payload[3].key}}","min":0,"max":"3000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":770,"y":440,"wires":[]},{"id":"c6adacbd.bd3ae","type":"ui_gauge","z":"b0c1d592.40c9b8","name":"","group":"98ad6404.0f5d38","order":3,"width":"4","height":"4","gtype":"gage","title":"{{payload[2].parts.key}}","label":"units","format":"{{payload[2].key}}","min":0,"max":"2000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":770,"y":380,"wires":[]},{"id":"f417118a.a172b","type":"ui_gauge","z":"b0c1d592.40c9b8","name":"","group":"98ad6404.0f5d38","order":2,"width":"4","height":"4","gtype":"gage","title":"{{msg.payload[1].parts.key}}","label":"units","format":"{{msg.payload[1].key}}","min":"0","max":"80000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":770,"y":320,"wires":[],"info":"# h1 Heading 8-)"},{"id":"8dfa8b92.b80a58","type":"ui_text","z":"b0c1d592.40c9b8","group":"98ad6404.0f5d38","order":1,"width":0,"height":0,"name":"","label":"{{msg.payload[0].parts.key}} :","format":"{{msg.payload[0].key}}","layout":"row-left","x":770,"y":240,"wires":[\*],"info":"`ui_{msg.payload[0].parts.key}`"},{"id":"f52c9088.7d7c1","type":"mqtt-broker","z":"","name":"loadprofileout","broker":"localhost","port":"1884","tls":"","clientid":"caa9f223-0c0d-4a27-9fe5-0311949d3145","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"Demo","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"98ad6404.0f5d38","type":"ui_group","z":"","name":"Load Profile Data EM","tab":"6c03b571.83fb1c","disp":true,"width":"10","collapse":false},{"id":"6c03b571.83fb1c","type":"ui_tab","z":"","name":"Load Profile","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

mqtt string:
{"d":{"DatetimeLP":"1/23/2018 0:30","LP12":"450","LP14":"860","LP24":"1000"}}

Before we get to your issue, there is something wrong with your fro because it won't import. I've narrowed it down to the ui_text node.

Please open the ui-text node and take a screen shot of it's contents and paste it to a reply. Also

  1. what version of NR and node.js (can be found in startup log)
  2. what platform are you running on? (rpi, macOS, windoes etc)

Now on to your problem. Can you explain what you mean a bit more. Your flow shows all three gagues connected to the same join node.

[{"id":"86c9ba30.a128a8","type":"mqtt out","z":"b0c1d592.40c9b8","name":"loadprofile","topic":"LOAD PROFILE","qos":"0","retain":"","broker":"f52c9088.7d7c1","x":130,"y":220,"wires":[]},{"id":"ca33fa4c.a42348","type":"mqtt in","z":"b0c1d592.40c9b8","name":"loadprofileout","topic":"LOAD PROFILE","qos":"2","datatype":"auto","broker":"f52c9088.7d7c1","x":130,"y":280,"wires":[["61549806.8da518"]]},{"id":"61549806.8da518","type":"json","z":"b0c1d592.40c9b8","name":"","property":"payload","action":"","pretty":false,"x":150,"y":340,"wires":[["81fee1bc.eaa1e"]]},{"id":"81fee1bc.eaa1e","type":"split","z":"b0c1d592.40c9b8","name":"","splt":":","spltType":"str","arraySplt":"3","arraySpltType":"len","stream":false,"addname":"","x":250,"y":400,"wires":[["7c9fcf1d.f0cae"]]},{"id":"7c9fcf1d.f0cae","type":"split","z":"b0c1d592.40c9b8","name":"","splt":":","spltType":"str","arraySplt":"3","arraySpltType":"len","stream":false,"addname":"","x":350,"y":360,"wires":[["4e001d06.b60404"]]},{"id":"4e001d06.b60404","type":"function","z":"b0c1d592.40c9b8","name":"","func":"var parts = msg.payload.split('\":\"');\nmsg.key = parts[0].replace('\"', \"\");\nmsg.val = parts[1]\nmsg.ui_control = {max:parseInt(msg.payload)+100};\n/*var x = parseInt(msg.val)+100;\nvar y = parseInt(msg.val)-100;\nmsg = {ui_control:{max:x,min:y}};\n*/\n\nreturn msg;\n","outputs":1,"noerr":0,"x":490,"y":420,"wires":[["a836199b.351868"]]},{"id":"a836199b.351868","type":"join","z":"b0c1d592.40c9b8","name":"","mode":"custom","build":"array","property":"","propertyType":"full","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":570,"y":360,"wires":[["8dfa8b92.b80a58","f417118a.a172b","c0f916de.079f68","c6adacbd.bd3ae","3eaaa0c.783c36"]]},{"id":"8dfa8b92.b80a58","type":"ui_text","z":"b0c1d592.40c9b8","group":"98ad6404.0f5d38","order":1,"width":0,"height":0,"name":"","label":"{{msg.payload[0].parts.key}} :","format":"{{msg.payload[0].key}}","layout":"row-left","x":770,"y":280,"wires":[],"info":"`ui_{msg.payload[0].parts.key}`"},{"id":"f417118a.a172b","type":"ui_gauge","z":"b0c1d592.40c9b8","name":"","group":"98ad6404.0f5d38","order":2,"width":"4","height":"4","gtype":"gage","title":"{{msg.payload[1].parts.key}}","label":"units","format":"{{msg.payload[1].key}}","min":"0","max":"80000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":770,"y":320,"wires":[]},{"id":"c6adacbd.bd3ae","type":"ui_gauge","z":"b0c1d592.40c9b8","name":"","group":"98ad6404.0f5d38","order":3,"width":"4","height":"4","gtype":"gage","title":"{{payload[2].parts.key}}","label":"units","format":"{{payload[2].key}}","min":0,"max":"2000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":770,"y":360,"wires":[]},{"id":"3eaaa0c.783c36","type":"ui_gauge","z":"b0c1d592.40c9b8","name":"","group":"98ad6404.0f5d38","order":4,"width":"4","height":"4","gtype":"gage","title":"{{payload[3].parts.key}}","label":"units","format":"{{payload[3].key}}","min":0,"max":"3000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":770,"y":400,"wires":[]},{"id":"c0f916de.079f68","type":"debug","z":"b0c1d592.40c9b8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":770,"y":440,"wires":[]},{"id":"f52c9088.7d7c1","type":"mqtt-broker","z":"","name":"loadprofileout","broker":"localhost","port":"1884","tls":"","clientid":"caa9f223-0c0d-4a27-9fe5-0311949d3145","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"Demo","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"98ad6404.0f5d38","type":"ui_group","z":"","name":"Load Profile Data EM","tab":"6c03b571.83fb1c","disp":true,"width":"10","collapse":false},{"id":"6c03b571.83fb1c","type":"ui_tab","z":"","name":"Load Profile","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

platform : windows
Node-RED version: v1.0.2
Node.js version: v10.16.3
[info] Windows_NT 10.0.17763 x64 LE

Well that export imports fine!

So can you explain what you mean a bit more. Your flow shows all three gagues connected to the same join node. I'm not clear what you are asking

thank you sir.

through join node i am passing values to gauges by using payload.

you can see there is ui_control value is present in payload. i wants to show that value in gauge as max limit

I have gone through examples they are showing how to assign value of min-max just for single gauge.

Here i have array and i want that values can populate dynamically

Jumping in with side note:
In your setup you are going to change gauge max every time when value changes. This makes gauge pretty hard to read as you need to always compare value with limits. What you probably need to achieve is that max limit will be changed only if value gets higher than limit.

Lower limit will be always 0.

Application is like I will get some values through MQTT. I Wants to show that values on gauge and limit of gauge will min : 0 , Max : Value+100

See the difference. Gauge with max changed with every payload shows needle pretty much at same angle. This is the readability issue I'm talking about.

[{"id":"be3de971.5ca098","type":"inject","z":"5d9558bc.413538","name":"","topic":"","payload":"","payloadType":"date","repeat":"2","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":200,"wires":[["448bfb4f.01eaf4"]]},{"id":"448bfb4f.01eaf4","type":"random","z":"5d9558bc.413538","name":"","low":"50","high":"100","inte":"true","property":"payload","x":350,"y":200,"wires":[["415ed978.900d28","f4d21c3c.bf389"]]},{"id":"415ed978.900d28","type":"function","z":"5d9558bc.413538","name":"","func":"msg.ui_control = {max:msg.payload +100}\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":250,"wires":[["a7f80d7d.42e9f"]]},{"id":"f4d21c3c.bf389","type":"ui_gauge","z":"5d9558bc.413538","name":"","group":"a2c09fe8.458d6","order":0,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"units","format":"{{value}}","min":0,"max":"110","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":650,"y":150,"wires":[]},{"id":"a7f80d7d.42e9f","type":"ui_gauge","z":"5d9558bc.413538","name":"","group":"a2c09fe8.458d6","order":0,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"units","format":"{{value}}","min":0,"max":"110","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":660,"y":240,"wires":[]},{"id":"a2c09fe8.458d6","type":"ui_group","z":"","name":"Default","tab":"5074feb8.5be66","disp":true,"width":"6","collapse":false},{"id":"5074feb8.5be66","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

In addition, change of min and max makes gauge to refresh.

Thank you sir,

I have imported your project.

I want both value to be change but without using 2 different functions.

e.g.

eg

but using only one function for both

Create topics for outgoing messages in your function where you parse the data.
And then use switch node where you send messages with different topics to different gauges.

Maybe LP12 and LP14 and LP24 (the objcet keys) are best choice for your topic names.