Slider Label Update Issue, Did I miss something?

I used a single slider to control six gauges. Based on the servo (gauge) selected, the label and value of slider change. This works perfectly throughout except for a minor issue ie when I change the servo (gauge) and do not change the slider (happens only initially ie when the slider value is 0 ), the slider label does not change to next selection. Enclosing the flow which is still under dev (sorry for size as this is for the mobile screen). Kindly try selecting Manual mode.

I have just started using Node-Red, so a basic conceptual omission may be expected and highlighted.

Thanks and regards.

[{"id":"d23d43db.8dc31","type":"tab","label":"Android ui","disabled":false,"info":""},{"id":"264c0d12.7c6782","type":"inject","z":"d23d43db.8dc31","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":370,"y":80,"wires":[["a0929dd8.2788f"]]},{"id":"976d3c9d.24d85","type":"ui_gauge","z":"d23d43db.8dc31","name":"","group":"2ba382f5.480bce","order":5,"width":3,"height":2,"gtype":"gage","title":"Swing","label":"","format":"{{value | number}}°","min":"0","max":"180","colors":["#ca3838","#00b500","#ca3838"],"seg1":"30","seg2":"150","x":370,"y":360,"wires":[]},{"id":"68577bb3.83cd94","type":"ui_gauge","z":"d23d43db.8dc31","name":"","group":"2ba382f5.480bce","order":1,"width":3,"height":2,"gtype":"gage","title":"Rotate","label":"","format":"{{value|number}}°","min":"0","max":"180","colors":["#ca3838","#00b500","#ca3838"],"seg1":"30","seg2":"150","x":370,"y":280,"wires":[]},{"id":"18dd4dd0.b60d72","type":"ui_gauge","z":"d23d43db.8dc31","name":"","group":"2ba382f5.480bce","order":3,"width":3,"height":2,"gtype":"gage","title":"Lift","label":"","format":"{{value | number}}°","min":"0","max":"180","colors":["#ca3838","#00b500","#ca3838"],"seg1":"30","seg2":"150","x":370,"y":320,"wires":[]},{"id":"872acfef.ba58d","type":"ui_gauge","z":"d23d43db.8dc31","name":"","group":"2ba382f5.480bce","order":4,"width":3,"height":2,"gtype":"gage","title":"Neck","label":"","format":"{{value | number}}°","min":"0","max":"180","colors":["#ca3838","#00b500","#ca3838"],"seg1":"30","seg2":"150","x":370,"y":480,"wires":[]},{"id":"93d49e18.b2d32","type":"ui_gauge","z":"d23d43db.8dc31","name":"","group":"2ba382f5.480bce","order":2,"width":3,"height":2,"gtype":"gage","title":"Clutch","label":"","format":"{{value | number}}°","min":"0","max":"180","colors":["#ca3838","#00b500","#ca3838"],"seg1":"30","seg2":"150","x":370,"y":440,"wires":[]},{"id":"a134316b.f3a15","type":"ui_gauge","z":"d23d43db.8dc31","name":"","group":"2ba382f5.480bce","order":6,"width":3,"height":2,"gtype":"gage","title":"Elbow","label":"","format":"{{value | number}}°","min":"0","max":"180","colors":["#ca3838","#00b500","#ca3838"],"seg1":"30","seg2":"150","x":370,"y":520,"wires":[]},{"id":"dbe1c3d2.270a3","type":"ui_dropdown","z":"d23d43db.8dc31","name":"","label":"Mode: ","tooltip":"","place":"Select mode","group":"460ae6cb.692b28","order":4,"width":5,"height":1,"passthru":true,"options":[{"label":"Manual","value":"Manual Mode Activated","type":"str"},{"label":"Sensor Slaved","value":"Sensor Slaved Mode Activated","type":"str"},{"label":"Colour Picker","value":"In Color Picker Mode","type":"str"}],"payload":"","topic":"","x":630,"y":320,"wires":[["64af4a48.b94104","504e39e3.8d8e88"]]},{"id":"9b4051c3.8ffbf","type":"ui_button","z":"d23d43db.8dc31","name":"BL Connect","group":"460ae6cb.692b28","order":2,"width":3,"height":1,"passthru":false,"label":"<i class=\"fa fa-bluetooth fa-2x\"></i> Connect","tooltip":"","color":"#0eb8c0","bgcolor":"","icon":"","payload":"start","payloadType":"str","topic":"","x":590,"y":380,"wires":[[]]},{"id":"64af4a48.b94104","type":"ui_toast","z":"d23d43db.8dc31","position":"top right","displayTime":"3","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","raw":false,"topic":"","name":"","x":670,"y":200,"wires":[]},{"id":"d893724f.1f98e","type":"ui_switch","z":"d23d43db.8dc31","name":"","label":"Mirror:","tooltip":"","group":"8feee98.7f9b318","order":4,"width":5,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":110,"y":500,"wires":[["fb33b913.178188"]]},{"id":"53dd2de0.6ebab4","type":"ui_dropdown","z":"d23d43db.8dc31","name":"","label":"Color","tooltip":"","place":"Select Color","group":"51e27c79.447a84","order":1,"width":5,"height":1,"passthru":false,"options":[{"label":"Red","value":"red","type":"str"},{"label":"Green","value":"green","type":"str"},{"label":"Blue","value":"blue","type":"str"}],"payload":"","topic":"","x":570,"y":500,"wires":[[]]},{"id":"f2fdaaf3.7463f8","type":"ui_ui_control","z":"d23d43db.8dc31","name":"","events":"all","x":640,"y":120,"wires":[[]]},{"id":"504e39e3.8d8e88","type":"change","z":"d23d43db.8dc31","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"Sensor Slaved Mode Activated","fromt":"str","to":"{\"group\":{\"hide\":[\"Arti_Ebony_Android_Slider\",\"Arti_Ebony_Android_Color\",\"Arti_Ebony_Android_startup\"],\"show\":[\"Arti_Ebony_Android_Servos\",\"Arti_Ebony_Android_Main_Controls\"]}}","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"Manual Mode Activated","fromt":"str","to":"{\"group\":{\"hide\":[\"Arti_Ebony_Android_startup\",\"Arti_Ebony_Android_Color\"],\"show\":[\"Arti_Ebony_Android_Main_Controls\",\"Arti_Ebony_Android_Servos\",\"Arti_Ebony_Android_Slider\"]}}","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"In Color Picker Mode","fromt":"str","to":"{\"group\":{\"hide\":[\"Arti_Ebony_Android_startup\",\"Arti_Ebony_Android_Slider\"],\"show\":[\"Arti_Ebony_Android_Main_Controls\",\"Arti_Ebony_Android_Servos\",\"Arti_Ebony_Android_Color\"]}}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":160,"wires":[["f2fdaaf3.7463f8"]]},{"id":"7acd57d2.038a98","type":"ui_slider","z":"d23d43db.8dc31","name":"slider","label":"{{msg.label}}","tooltip":"","group":"8feee98.7f9b318","order":2,"width":4,"height":1,"passthru":true,"outs":"all","topic":"","min":0,"max":"180","step":1,"x":90,"y":200,"wires":[["4d76b58d.ed6f2c"]]},{"id":"d30cd8c3.f04608","type":"inject","z":"d23d43db.8dc31","name":"Init","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":"0.2","x":630,"y":40,"wires":[["cbabd0a8.0e0fc","40f8feb6.adda","dbe1c3d2.270a3"]]},{"id":"9f956354.d280e","type":"ui_dropdown","z":"d23d43db.8dc31","name":"","label":"Servo:","tooltip":"","place":"Select option","group":"8feee98.7f9b318","order":1,"width":5,"height":1,"passthru":true,"options":[{"label":"Rotate","value":"Rotate:","type":"str"},{"label":"Lift","value":"Lift:","type":"str"},{"label":"Swing","value":"Swing:","type":"str"},{"label":"Clutch","value":"Clutch:","type":"str"},{"label":"Neck","value":"Neck:","type":"str"},{"label":"Elbow","value":"Elbow:","type":"str"}],"payload":"","topic":"","x":90,"y":100,"wires":[["e3bde05b.6198a"]]},{"id":"e3bde05b.6198a","type":"function","z":"d23d43db.8dc31","name":"Servo Label","func":"msg.label=msg.payload;\nglobal.set(\"servo\",msg.payload);\nswitch(global.get(\"servo\")){\n    case \"Rotate:\":\n    msg.payload=global.get(\"sRotate\")\n    break;\n    case \"Lift:\":\n    msg.payload=global.get(\"sLift\")\n    break;\n    case \"Swing:\":\n    msg.payload=global.get(\"sSwing\")\n    break;\n    case \"Clutch:\":\n    msg.payload=global.get(\"sClutch\")\n    break;\n    case \"Neck:\":\n    msg.payload=global.get(\"sNeck\")\n    break;\n    case \"Elbow:\":\n    msg.payload=global.get(\"sElbow\");\n}\nreturn msg;","outputs":1,"noerr":0,"x":110,"y":160,"wires":[["7acd57d2.038a98"]]},{"id":"2f5a32c1.11327e","type":"switch","z":"d23d43db.8dc31","name":"","property":"servo","propertyType":"global","rules":[{"t":"eq","v":"Rotate:","vt":"str"},{"t":"eq","v":"Lift:","vt":"str"},{"t":"eq","v":"Swing:","vt":"str"},{"t":"eq","v":"Clutch:","vt":"str"},{"t":"eq","v":"Neck:","vt":"str"},{"t":"eq","v":"Elbow:","vt":"str"}],"checkall":"false","repair":false,"outputs":6,"x":110,"y":400,"wires":[["68577bb3.83cd94"],["18dd4dd0.b60d72"],["976d3c9d.24d85"],["93d49e18.b2d32"],["872acfef.ba58d"],["a134316b.f3a15"]]},{"id":"eda51933.3fac18","type":"ui_template","z":"d23d43db.8dc31","group":"d5554539.2e0268","name":"","order":1,"width":6,"height":6,"format":"<!--h3><font style=\"color:#0eb8c0;\">Arti Ebony</font></h3-->\n<div>This <em>articulated</em> arm demonstrates the working in three modes</div><br>\n<b style=\"color:#0eb8c0;\">Manual</b>\n<div>Each of six servos can be adjusted to desired position</div><br>\n<b style=\"color:#0eb8c0;\">Sensor Slaved</b>\n<div>The arm follows the orientation sensor and is automated</div><br>\n<b style=\"color:#0eb8c0;\">Color Picker</b>\n<div>The arm picks the object based on color selected and is automated</div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":700,"y":240,"wires":[[]]},{"id":"cbabd0a8.0e0fc","type":"change","z":"d23d43db.8dc31","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"group\":{\"hide\":[\"Arti_Ebony_Android_Servos\",\"Arti_Ebony_Android_Slider\",\"Arti_Ebony_Android_Color\"],\"show\":[\"Arti_Ebony_Android_startup\",\"Arti_Ebony_Android_Main_Controls\"]}}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":80,"wires":[["f2fdaaf3.7463f8"]]},{"id":"fb33b913.178188","type":"change","z":"d23d43db.8dc31","name":"","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"options\":{\"reverse\":true}}","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"ui_control","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":220,"y":560,"wires":[[]]},{"id":"a0929dd8.2788f","type":"function","z":"d23d43db.8dc31","name":"UI controls","func":"\nvar ui_c1={\"ui_control\":{\"options\":{\"gaugeWidthScale\":0.7,\"minTxt\":\"Lt\",\"maxTxt\":\"Rt\"}}};\nvar ui_c2={\"ui_control\":{\"options\":{\"gaugeWidthScale\":0.7,\"minTxt\":\"Dn\",\"maxTxt\":\"Up\"}}};\nvar ui_c3={\"ui_control\":{\"options\":{\"gaugeWidthScale\":0.7,\"minTxt\":\"C\",\"maxTxt\":\"O\"}}};\n\nreturn [[msg,ui_c1],[msg,ui_c2],[msg,ui_c1],[msg,ui_c3],[msg,ui_c2],[msg,ui_c2]];","outputs":6,"noerr":0,"x":370,"y":160,"wires":[["68577bb3.83cd94"],["18dd4dd0.b60d72"],["976d3c9d.24d85"],["93d49e18.b2d32"],["872acfef.ba58d"],["a134316b.f3a15"]]},{"id":"4d76b58d.ed6f2c","type":"function","z":"d23d43db.8dc31","name":"Slider Clamp","func":"switch(global.get(\"servo\")){\n    case \"Rotate:\":\n    global.set(\"sRotate\",msg.payload)\n    break\n    case \"Lift:\":\n    global.set(\"sLift\",msg.payload)\n    break\n    case \"Swing:\":\n    global.set(\"sSwing\",msg.payload)\n    break\n    case \"Clutch:\":\n    global.set(\"sClutch\",msg.payload)\n    break\n    case \"Neck:\":\n    global.set(\"sNeck\",msg.payload)\n    break\n    case \"Elbow:\":\n    global.set(\"sElbow\",msg.payload)\n}\nreturn msg;","outputs":1,"noerr":0,"x":110,"y":260,"wires":[["2f5a32c1.11327e"]]},{"id":"40f8feb6.adda","type":"change","z":"d23d43db.8dc31","name":"","rules":[{"t":"set","p":"servo","pt":"global","to":"Rotate:","tot":"str"},{"t":"set","p":"sRotate","pt":"global","to":"0","tot":"num"},{"t":"set","p":"sLift","pt":"global","to":"0","tot":"num"},{"t":"set","p":"sClutch","pt":"global","to":"0","tot":"num"},{"t":"set","p":"sNeck","pt":"global","to":"0","tot":"num"},{"t":"set","p":"sElbow","pt":"global","to":"0","tot":"num"},{"t":"set","p":"payload","pt":"msg","to":"Rotate:","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":120,"y":60,"wires":[["9f956354.d280e"]]},{"id":"2f1af37b.23b72c","type":"range","z":"d23d43db.8dc31","minin":"0","maxin":"180","minout":"180","maxout":"0","action":"clamp","round":true,"property":"payload","name":"","x":270,"y":640,"wires":[[]]},{"id":"2ba382f5.480bce","type":"ui_group","z":"","name":"Servos","tab":"ff7f7fd1.305d8","order":2,"disp":false,"width":"6","collapse":false},{"id":"460ae6cb.692b28","type":"ui_group","z":"","name":"Main Controls","tab":"ff7f7fd1.305d8","order":3,"disp":false,"width":"5","collapse":false},{"id":"8feee98.7f9b318","type":"ui_group","z":"","name":"Slider","tab":"ff7f7fd1.305d8","order":4,"disp":false,"width":"5","collapse":false},{"id":"51e27c79.447a84","type":"ui_group","z":"","name":"Color","tab":"ff7f7fd1.305d8","order":5,"disp":false,"width":"5","collapse":false},{"id":"d5554539.2e0268","type":"ui_group","z":"","name":"startup","tab":"ff7f7fd1.305d8","order":1,"disp":false,"width":"6","collapse":false},{"id":"ff7f7fd1.305d8","type":"ui_tab","z":"","name":"Arti Ebony Android","icon":"dashboard","order":3,"disabled":false,"hidden":false}]

Enclosing pics to reflect the issue
When it works


Once it's a problem

(I edited your flow so it would import)
so to reproduct this

  1. move the slider (rotate) to some value
  2. in the Servo pulldown, select 'Lift' - the slider changes to 'Lift' - and move the slider
  3. next in the pulldown select 'Neck' - the slider changes to 'Neck' - but do not move the slider
  4. next in the pulldown select 'Clutch' - note the slider name remains 'Neck' but if you move the slider, the 'Clutch' guage moves.

Ok I know what is happening so I'll help you figure it out.
Stick a debug node (set to display the Complete msg object) on the output of both the servo and another on the 'Servo Label' function.

Now go thru the steps I outliend above and what do you see happen?

Thanks for your guidance and correcting my post, will do as suggested

@zenofmud
Tried using debug nodes on both points as indicated but was unable to trace the problem. As a way out took help of text node to display the label instead of label generated by slider node itself. There is an additional issue which I observed now. Whenever, I select Swing Servo in the beginning, the slider automatically jumps to a certain random value. Latest flow is as under

[{"id":"b23452fd.08c41","type":"tab","label":"Android ui","disabled":false,"info":""},{"id":"fbe63bbb.560a98","type":"inject","z":"b23452fd.08c41","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":370,"y":80,"wires":[["9633540a.a78828"]]},{"id":"ea31225c.2eec3","type":"ui_gauge","z":"b23452fd.08c41","name":"","group":"e9b7d41f.5071b8","order":5,"width":3,"height":2,"gtype":"gage","title":"Swing","label":"","format":"{{value | number}}°","min":"0","max":"180","colors":["#ca3838","#00b500","#ca3838"],"seg1":"30","seg2":"150","x":370,"y":360,"wires":[]},{"id":"7ba8e2d.d383a1c","type":"ui_gauge","z":"b23452fd.08c41","name":"","group":"e9b7d41f.5071b8","order":1,"width":3,"height":2,"gtype":"gage","title":"Rotate","label":"","format":"{{value|number}}°","min":"0","max":"180","colors":["#ca3838","#00b500","#ca3838"],"seg1":"30","seg2":"150","x":370,"y":280,"wires":[]},{"id":"158537f1.085548","type":"ui_gauge","z":"b23452fd.08c41","name":"","group":"e9b7d41f.5071b8","order":3,"width":3,"height":2,"gtype":"gage","title":"Lift","label":"","format":"{{value | number}}°","min":"0","max":"180","colors":["#ca3838","#00b500","#ca3838"],"seg1":"30","seg2":"150","x":370,"y":320,"wires":[]},{"id":"eedd55f9.d6ed18","type":"ui_gauge","z":"b23452fd.08c41","name":"","group":"e9b7d41f.5071b8","order":4,"width":3,"height":2,"gtype":"gage","title":"Neck","label":"","format":"{{value | number}}°","min":"0","max":"180","colors":["#ca3838","#00b500","#ca3838"],"seg1":"30","seg2":"150","x":370,"y":480,"wires":[]},{"id":"9a565ac2.823458","type":"ui_gauge","z":"b23452fd.08c41","name":"","group":"e9b7d41f.5071b8","order":2,"width":3,"height":2,"gtype":"gage","title":"Clutch","label":"","format":"{{value | number}}°","min":"0","max":"180","colors":["#ca3838","#00b500","#ca3838"],"seg1":"30","seg2":"150","x":370,"y":440,"wires":[]},{"id":"5fed8857.6d8c88","type":"ui_gauge","z":"b23452fd.08c41","name":"","group":"e9b7d41f.5071b8","order":6,"width":3,"height":2,"gtype":"gage","title":"Elbow","label":"","format":"{{value | number}}°","min":"0","max":"180","colors":["#ca3838","#00b500","#ca3838"],"seg1":"30","seg2":"150","x":370,"y":520,"wires":[]},{"id":"98ca2ebb.4a739","type":"ui_dropdown","z":"b23452fd.08c41","name":"","label":"Mode: ","tooltip":"","place":"Select mode","group":"ef427f69.94666","order":4,"width":5,"height":1,"passthru":true,"options":[{"label":"Manual","value":"Manual Mode Activated","type":"str"},{"label":"Sensor Slaved","value":"Sensor Slaved Mode Activated","type":"str"},{"label":"Colour Picker","value":"In Color Picker Mode","type":"str"}],"payload":"","topic":"","x":630,"y":320,"wires":[["df11d5dc.c3c8d8","a4c548ed.bcaf78"]]},{"id":"4abfb51b.e620cc","type":"ui_button","z":"b23452fd.08c41","name":"BL Connect","group":"ef427f69.94666","order":2,"width":3,"height":1,"passthru":false,"label":"<i class=\"fa fa-bluetooth fa-2x\"></i> Connect","tooltip":"","color":"#0eb8c0","bgcolor":"","icon":"","payload":"start","payloadType":"str","topic":"","x":630,"y":400,"wires":[[]]},{"id":"a4c548ed.bcaf78","type":"ui_toast","z":"b23452fd.08c41","position":"top right","displayTime":"3","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","raw":false,"topic":"","name":"","x":670,"y":200,"wires":[]},{"id":"a6f27fe7.1b22e","type":"ui_switch","z":"b23452fd.08c41","name":"","label":"Mirror:","tooltip":"","group":"42e62a88.e41f44","order":5,"width":5,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":110,"y":500,"wires":[["68735a45.4d1384"]]},{"id":"37a6190b.0c7236","type":"ui_dropdown","z":"b23452fd.08c41","name":"","label":"Color","tooltip":"","place":"Select Color","group":"902e587b.848858","order":1,"width":5,"height":1,"passthru":false,"options":[{"label":"Red","value":"red","type":"str"},{"label":"Green","value":"green","type":"str"},{"label":"Blue","value":"blue","type":"str"}],"payload":"","topic":"","x":570,"y":520,"wires":[[]]},{"id":"6e6b930.5e4806c","type":"ui_ui_control","z":"b23452fd.08c41","name":"","events":"all","x":640,"y":120,"wires":[[]]},{"id":"df11d5dc.c3c8d8","type":"change","z":"b23452fd.08c41","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"Sensor Slaved Mode Activated","fromt":"str","to":"{\"group\":{\"hide\":[\"Arti_Ebony_Android_Slider\",\"Arti_Ebony_Android_Color\",\"Arti_Ebony_Android_startup\"],\"show\":[\"Arti_Ebony_Android_Servos\",\"Arti_Ebony_Android_Main_Controls\"]}}","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"Manual Mode Activated","fromt":"str","to":"{\"group\":{\"hide\":[\"Arti_Ebony_Android_startup\",\"Arti_Ebony_Android_Color\"],\"show\":[\"Arti_Ebony_Android_Main_Controls\",\"Arti_Ebony_Android_Servos\",\"Arti_Ebony_Android_Slider\"]}}","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"In Color Picker Mode","fromt":"str","to":"{\"group\":{\"hide\":[\"Arti_Ebony_Android_startup\",\"Arti_Ebony_Android_Slider\"],\"show\":[\"Arti_Ebony_Android_Main_Controls\",\"Arti_Ebony_Android_Servos\",\"Arti_Ebony_Android_Color\"]}}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":160,"wires":[["6e6b930.5e4806c"]]},{"id":"75b2cf59.15ebf","type":"ui_slider","z":"b23452fd.08c41","name":"slider","label":"","tooltip":"","group":"42e62a88.e41f44","order":4,"width":3,"height":1,"passthru":true,"outs":"all","topic":"","min":0,"max":"180","step":1,"x":90,"y":200,"wires":[["273397b3.c09a58"]]},{"id":"b8af8624.60e448","type":"inject","z":"b23452fd.08c41","name":"Init","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":"0.2","x":630,"y":40,"wires":[["fb5e9a07.72add8","e790dead.38fa5","98ca2ebb.4a739"]]},{"id":"81722e99.5c905","type":"ui_dropdown","z":"b23452fd.08c41","name":"Servo","label":"Servo:","tooltip":"","place":"Select option","group":"42e62a88.e41f44","order":1,"width":5,"height":1,"passthru":true,"options":[{"label":"Rotate","value":"Rotate:","type":"str"},{"label":"Lift","value":"Lift:","type":"str"},{"label":"Swing","value":"Swing:","type":"str"},{"label":"Clutch","value":"Clutch:","type":"str"},{"label":"Neck","value":"Neck:","type":"str"},{"label":"Elbow","value":"Elbow:","type":"str"}],"payload":"","topic":"","x":90,"y":100,"wires":[["f5516599.245268"]]},{"id":"f5516599.245268","type":"function","z":"b23452fd.08c41","name":"Servo Label","func":"//msg.label=msg.payload;\nvar label=msg.payload\nvar value=0\nglobal.set(\"servo\",msg.payload);\nswitch(global.get(\"servo\")){\n    case \"Rotate:\":\n    value=global.get(\"sRotate\")\n    break;\n    case \"Lift:\":\n    value=global.get(\"sLift\")\n    break;\n    case \"Swing:\":\n    value=global.get(\"sSwing\")\n    break;\n    case \"Clutch:\":\n    value=global.get(\"sClutch\")\n    break;\n    case \"Neck:\":\n    value=global.get(\"sNeck\")\n    break;\n    case \"Elbow:\":\n    value=global.get(\"sElbow\");\n}\nmsg.payload=value\nmsg.label=label\nreturn msg;","outputs":1,"noerr":0,"x":110,"y":160,"wires":[["75b2cf59.15ebf","21f6ffe6.456b1"]]},{"id":"499ec67c.31cfd8","type":"switch","z":"b23452fd.08c41","name":"","property":"servo","propertyType":"global","rules":[{"t":"eq","v":"Rotate:","vt":"str"},{"t":"eq","v":"Lift:","vt":"str"},{"t":"eq","v":"Swing:","vt":"str"},{"t":"eq","v":"Clutch:","vt":"str"},{"t":"eq","v":"Neck:","vt":"str"},{"t":"eq","v":"Elbow:","vt":"str"}],"checkall":"false","repair":false,"outputs":6,"x":110,"y":400,"wires":[["7ba8e2d.d383a1c"],["158537f1.085548"],["ea31225c.2eec3"],["9a565ac2.823458"],["eedd55f9.d6ed18"],["5fed8857.6d8c88"]]},{"id":"b177261b.c03fe8","type":"ui_template","z":"b23452fd.08c41","group":"19952597.a0e71a","name":"","order":1,"width":6,"height":6,"format":"<!--h3><font style=\"color:#0eb8c0;\">Arti Ebony</font></h3-->\n<div>This <em>articulated</em> arm demonstrates the working in three modes</div><br>\n<b style=\"color:#0eb8c0;\">Manual</b>\n<div>Each of six servos can be adjusted to desired position</div><br>\n<b style=\"color:#0eb8c0;\">Sensor Slaved</b>\n<div>The arm follows the orientation sensor and is automated</div><br>\n<b style=\"color:#0eb8c0;\">Color Picker</b>\n<div>The arm picks the object based on color selected and is automated</div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":700,"y":240,"wires":[[]]},{"id":"fb5e9a07.72add8","type":"change","z":"b23452fd.08c41","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"group\":{\"hide\":[\"Arti_Ebony_Android_Servos\",\"Arti_Ebony_Android_Slider\",\"Arti_Ebony_Android_Color\"],\"show\":[\"Arti_Ebony_Android_startup\",\"Arti_Ebony_Android_Main_Controls\"]}}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":80,"wires":[["6e6b930.5e4806c"]]},{"id":"68735a45.4d1384","type":"change","z":"b23452fd.08c41","name":"","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"options\":{\"reverse\":true}}","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"ui_control","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":220,"y":560,"wires":[[]]},{"id":"9633540a.a78828","type":"function","z":"b23452fd.08c41","name":"UI controls","func":"\nvar ui_c1={\"ui_control\":{\"options\":{\"gaugeWidthScale\":0.7,\"minTxt\":\"Lt\",\"maxTxt\":\"Rt\"}}};\nvar ui_c2={\"ui_control\":{\"options\":{\"gaugeWidthScale\":0.7,\"minTxt\":\"Dn\",\"maxTxt\":\"Up\"}}};\nvar ui_c3={\"ui_control\":{\"options\":{\"gaugeWidthScale\":0.7,\"minTxt\":\"C\",\"maxTxt\":\"O\"}}};\n\nreturn [[msg,ui_c1],[msg,ui_c2],[msg,ui_c1],[msg,ui_c3],[msg,ui_c2],[msg,ui_c2]];","outputs":6,"noerr":0,"x":370,"y":160,"wires":[["7ba8e2d.d383a1c"],["158537f1.085548"],["ea31225c.2eec3"],["9a565ac2.823458"],["eedd55f9.d6ed18"],["5fed8857.6d8c88"]]},{"id":"273397b3.c09a58","type":"function","z":"b23452fd.08c41","name":"Slider Clamp","func":"switch(global.get(\"servo\")){\n    case \"Rotate:\":\n    global.set(\"sRotate\",msg.payload)\n    break\n    case \"Lift:\":\n    global.set(\"sLift\",msg.payload)\n    break\n    case \"Swing:\":\n    global.set(\"sSwing\",msg.payload)\n    break\n    case \"Clutch:\":\n    global.set(\"sClutch\",msg.payload)\n    break\n    case \"Neck:\":\n    global.set(\"sNeck\",msg.payload)\n    break\n    case \"Elbow:\":\n    global.set(\"sElbow\",msg.payload)\n}\nreturn msg;","outputs":1,"noerr":0,"x":110,"y":260,"wires":[["499ec67c.31cfd8"]]},{"id":"e790dead.38fa5","type":"change","z":"b23452fd.08c41","name":"","rules":[{"t":"set","p":"servo","pt":"global","to":"Rotate:","tot":"str"},{"t":"set","p":"sRotate","pt":"global","to":"0","tot":"num"},{"t":"set","p":"sLift","pt":"global","to":"0","tot":"num"},{"t":"set","p":"sClutch","pt":"global","to":"0","tot":"num"},{"t":"set","p":"sNeck","pt":"global","to":"0","tot":"num"},{"t":"set","p":"sElbow","pt":"global","to":"0","tot":"num"},{"t":"set","p":"sSwitch","pt":"global","to":"0","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"","fromt":"str","to":"Rotate:","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":120,"y":60,"wires":[["81722e99.5c905"]]},{"id":"d5838c2a.6bc72","type":"range","z":"b23452fd.08c41","minin":"0","maxin":"180","minout":"180","maxout":"0","action":"clamp","round":true,"property":"payload","name":"","x":270,"y":640,"wires":[[]]},{"id":"21f6ffe6.456b1","type":"ui_text","z":"b23452fd.08c41","group":"42e62a88.e41f44","order":2,"width":1,"height":1,"name":"","label":"","format":"{{msg.label}}","layout":"col-center","x":230,"y":200,"wires":[]},{"id":"e9b7d41f.5071b8","type":"ui_group","z":"","name":"Servos","tab":"3fdbf56d.81bcba","order":2,"disp":false,"width":"6","collapse":false},{"id":"ef427f69.94666","type":"ui_group","z":"","name":"Main Controls","tab":"3fdbf56d.81bcba","order":3,"disp":false,"width":"5","collapse":false},{"id":"42e62a88.e41f44","type":"ui_group","z":"","name":"Slider","tab":"3fdbf56d.81bcba","order":4,"disp":false,"width":"5","collapse":false},{"id":"902e587b.848858","type":"ui_group","z":"","name":"Color","tab":"3fdbf56d.81bcba","order":5,"disp":false,"width":"5","collapse":false},{"id":"19952597.a0e71a","type":"ui_group","z":"","name":"startup","tab":"3fdbf56d.81bcba","order":1,"disp":false,"width":"6","collapse":false},{"id":"3fdbf56d.81bcba","type":"ui_tab","z":"","name":"Arti Ebony Android","icon":"dashboard","order":3,"disabled":false,"hidden":false}]

@zenofmud

Thanks, found typo declaring var in initialization change node. The issue related to Swing resolved. However, the initial issue is mitigated using text node. I do consider this to be a way out. If otherwise, will like to go with your suggestions. Grateful for involvement and guidance, certainly appreciate that.

Sorry, been tied up all day.

The issue is that if the payload value doesn't change then the label is not changed. If you send in a msg with msg.payload of 10 and a msg.label of 'Elbow' and the next msg.payload has a value of 10 and msg.label of 'Sensor' the label will not change. If the second msg has a msg.payload of 39 and msg.label of 'Sensor' the label will change.

@dceejay should the node look to see if the incoming value of what you put in the label has changed and then change the label? The

'if msg arrives on input, set slider to new payload value:'

is set but it looks like the way it works is:

'if msg arrives on input and the value has changed, set slider to new payload value and update the label:'

Can this be changed? Here is a simple flow showing the issue:

[{"id":"9a5840b5.56b048","type":"ui_slider","z":"2fcfed31.2c6cb2","name":"slider","label":"{{msg.topic}}","tooltip":"","group":"68214941.0f4c38","order":2,"width":4,"height":1,"passthru":true,"outs":"all","topic":"","min":"0","max":"180","step":1,"x":390,"y":180,"wires":[["6b674875.81fd18"]]},{"id":"6b674875.81fd18","type":"debug","z":"2fcfed31.2c6cb2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":550,"y":200,"wires":[]},{"id":"aa2b53e1.be7508","type":"inject","z":"2fcfed31.2c6cb2","name":"","topic":"Swing","payload":"50","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":140,"wires":[["9a5840b5.56b048"]]},{"id":"a23ed3be.156198","type":"inject","z":"2fcfed31.2c6cb2","name":"","topic":"Elbow","payload":"50","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":200,"wires":[["9a5840b5.56b048"]]},{"id":"7d21ece6.c7f78c","type":"inject","z":"2fcfed31.2c6cb2","name":"","topic":"Swing","payload":"10","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":80,"wires":[["9a5840b5.56b048"]]},{"id":"1baab0d0.df6e1f","type":"inject","z":"2fcfed31.2c6cb2","name":"","topic":"Elbow","payload":"10","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":260,"wires":[["9a5840b5.56b048"]]},{"id":"68214941.0f4c38","type":"ui_group","z":"","name":"Slider","tab":"270d08.1e42e2f8","order":4,"disp":false,"width":"5","collapse":false},{"id":"270d08.1e42e2f8","type":"ui_tab","z":"","name":"Arti Ebony Android","icon":"dashboard","order":3,"disabled":false,"hidden":false}]

note: I did look at the node's code but I'm at a loss :woozy_face:

1 Like

Thanks for pinpointing and consolidating the problem statement nicely, that's exactly what's happening.

The dashboard only saves the previous payload - so only has that to compare against when a new message comes in. High speed performance is bad enough as it is, so we aren't going to start firing lots of extra properties around just in case, (or indeed rewire the guts to start saving complete messages). When you change label I'm sure you can also set the payload to be something different also. You could of course send the label and no payload (delete msg.payload) - as that is "different" so gets sent - but not a real value so won't change the actual value.

1 Like

Thanks, it worked

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.