Node-red-contrib-ui-level

I have been struggerling with the node-red-contrib-ui-level for a while now and I can't se why this is not working properly.

I use the latest release of both Node Red and node-red-contrib-ui-level.

After deploying the project, everything is working fine but after a while or switching dashboard the values for seqments and max/min disappear. I'm using msg.control to control this values.

Can someone please help?Capture Capture1

Hi, what browser you are using?
And what do you mean by "switching dashboard" ?

Hi, Thank you for quick response...

I'm using Chrome Browser.

By switching dashboard I mean switching to another tab and then back to the one containing the level indicators. After doing so teh values is gone...

This is expected behavior. If you change widget options on fly, those changes are not permanent.
To get your last options back after tab change, use ui_control node. ui-control node fires message on every new dashboard connection as well as at every tab change. This way you can collect last known option data and send it to the ui-level node right after such events happen so the ui-level will be always with up to date options.

Example flow:

[{"id":"29e44bca.6d2594","type":"inject","z":"5f1bed63.cb2a94","name":"","topic":"","payload":"","payloadType":"date","repeat":"5","crontab":"","once":false,"onceDelay":"0.62","x":200,"y":170,"wires":[["158f5773.e739c9"]]},{"id":"158f5773.e739c9","type":"random","z":"5f1bed63.cb2a94","name":"","low":"1","high":"10","inte":"true","property":"payload","x":360,"y":170,"wires":[["8e83f123.8bd27"]]},{"id":"8e83f123.8bd27","type":"ui_level","z":"5f1bed63.cb2a94","group":"e6872d71.b8a78","order":2,"width":"3","height":"5","name":"","label":"","colorHi":"#e60000","colorWarn":"#ff9900","colorNormal":"#00b33c","colorOff":"#595959","min":0,"max":"10","segWarn":"2","segHigh":"8","unit":"","layout":"sv","channelA":"","channelB":"","decimals":0,"animations":"soft","shape":2,"colorschema":"fixed","textoptions":"default","colorText":"#eeeeee","fontLabel":"","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":false,"hideValue":false,"tickmode":"segments","peakmode":false,"peaktime":3000,"x":600,"y":170,"wires":[]},{"id":"eb0fdb28.9d0af8","type":"change","z":"5f1bed63.cb2a94","name":"change ui-level options","rules":[{"t":"set","p":"control.seg2","pt":"msg","to":"6","tot":"num"},{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":90,"wires":[["8e83f123.8bd27"]]},{"id":"cd17881c.b82f98","type":"inject","z":"5f1bed63.cb2a94","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":190,"y":110,"wires":[["eb0fdb28.9d0af8"]]},{"id":"7067bfc4.a1657","type":"ui_ui_control","z":"5f1bed63.cb2a94","name":"","events":"all","x":180,"y":50,"wires":[["eb0fdb28.9d0af8"]]},{"id":"e6872d71.b8a78","type":"ui_group","z":"","name":"Default","tab":"8fcdaa26.bd37d8","disp":true,"width":16,"collapse":false},{"id":"8fcdaa26.bd37d8","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
1 Like

Actually I see there is something wrong. Change with ui_control does not happen always. At least for me right now, with just updated node-red.. I will investigate tomorrow. If you are seeing similar issues, feel free to report here or at widget github page.

1 Like

Actually I was too lazy to wait til tomorrow.
v0.1.24 is available and fixes msg.control issues

3 Likes

This is awsome!!
Thank you for your support.

BTW. Would it be possible to rotate the value 90 degrees?

For vertical layout?
If you adjust widget size 1 unit width , then it should turn value 90 degrees. (called slim layout)
But not for wider layouts. (at least currently)

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