I have been playing around with the steel series gauges to use on my heating system controller and now have a really smart dashboard working well on my ryzen laptop. Problem is the wall controllers which are old android tablets, the heating page has 12 gauges on it as well as many buttons and switches and takes the android tablets about 30seconds to load / refresh (an i-Pad pro II takes about 6seconds). So i need to make a different dashboard (less processor intensive for the slow devices). So will replaced the steelseries with the standard dash board gauges (as i have used many of these on same page with no problem.
But i need to modify the standard gauge slightly. The label can be set by a message property by setting the field to the name of the property, for example {{msg.label}}
, but i want to be able to do the same for the 'units' field. if I enter, for example {{msg.units}} then send this in the payload it does change but only after entire page deploy.
So i have got the gauge.html and .js files up in atom and having a play around. I am a bit of a newbie to this and most of what i have learned is by trial and error. can anyone give me a few pointers on this.
many thanks Chris
You can customize the ui_gauge by adding the property msg.ui_control to the msg that is sent to the ui_gauge node.
References:
UI Widget configuration via msg.ui_control
Testing flow:
[{"id":"da76ae66.c9f3b","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"9f0d196c.3094c8","type":"ui_gauge","z":"da76ae66.c9f3b","name":"","group":"df1e821.a662d8","order":0,"width":"6","height":"6","gtype":"gage","title":"","label":"","format":"{{value}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":710,"y":220,"wires":[]},{"id":"aa3c3245.f077b","type":"change","z":"da76ae66.c9f3b","name":"","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\t \"gtype\":\"donut\",\t \"min\":0,\t \"max\":100,\t \"seg1\":30,\t \"seg2\":60,\t \"colors\":[\"blue\",\"orange\",\"lime\"],\t \"options\":{\t \"width\":50,\t \"valueFontFamily\":\"D14C\",\t \"gaugeWidthScale\":0.5,\t \"labelFontColor\":\"#d11d3e\",\t \"label\": unit\t }\t}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":220,"wires":[["9f0d196c.3094c8"]]},{"id":"a8416c2b.5a2a9","type":"inject","z":"da76ae66.c9f3b","name":"","topic":"","payload":"10","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":220,"wires":[["b91523a8.455d7"]]},{"id":"b91523a8.455d7","type":"change","z":"da76ae66.c9f3b","name":"","rules":[{"t":"set","p":"unit","pt":"msg","to":"psi","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":220,"wires":[["aa3c3245.f077b"]]},{"id":"43d1bff5.9912c","type":"change","z":"da76ae66.c9f3b","name":"","rules":[{"t":"set","p":"unit","pt":"msg","to":"bar","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":280,"wires":[["aa3c3245.f077b"]]},{"id":"a93aacb2.d1584","type":"inject","z":"da76ae66.c9f3b","name":"","topic":"","payload":"40","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":280,"wires":[["43d1bff5.9912c"]]},{"id":"df1e821.a662d8","type":"ui_group","z":"","name":"LED-3","tab":"ecbd446f.119948","order":3,"disp":false,"width":"6","collapse":false},{"id":"ecbd446f.119948","type":"ui_tab","z":"","name":"LED","icon":"fa-fire","order":18}]
Thank you. I thought i was going to have to edit the gauge js & html files.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.