`ui_level` node. Not really *working*

Although I have previously complained about it and so on. I have now reinstalled the latest version to server a purpose.

Monitor usage of a USB stick.

This is the flow - basically.

[{"id":"e39cfe2.e1d558","type":"function","z":"1c428643.6f708a","name":"","func":"var used = msg.payload[8].capacity;\nmsg.payload = used * 100;\nreturn msg;","outputs":1,"noerr":0,"x":860,"y":3460,"wires":[["6d4bd79f.570d98","91566f76.ec5378","3ec85c19.04ae9c"]]},{"id":"646ec1b4.1521c8","type":"Drives","z":"1c428643.6f708a","name":"","x":710,"y":3460,"wires":[["e39cfe2.e1d558"]]},{"id":"6d4bd79f.570d98","type":"switch","z":"1c428643.6f708a","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"90","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1010,"y":3460,"wires":[["6227a836.cc07b8"]]},{"id":"91566f76.ec5378","type":"debug","z":"1c428643.6f708a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1120,"y":3380,"wires":[]},{"id":"3ec85c19.04ae9c","type":"ui_level","z":"1c428643.6f708a","group":"c914d93f.e69b48","order":1,"width":"2","height":"3","name":"USB memory used","label":"","colorHi":"#e60000","colorWarn":"#ff9900","colorNormal":"#00b33c","colorOff":"#595959","min":0,"max":100,"segWarn":"65","segHigh":"85","unit":"% used","layout":"sv","channelA":"","channelB":"","decimals":0,"animations":"off","shape":"3","colorschema":"fixed","textoptions":"default","colorText":"#eeeeee","fontLabel":"","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":false,"x":1140,"y":3420,"wires":[]},{"id":"dec15223.972468","type":"inject","z":"1c428643.6f708a","name":"Start / test","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":"2","x":760,"y":3380,"wires":[["646ec1b4.1521c8"]]},{"id":"57568cbb.235914","type":"delay","z":"1c428643.6f708a","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"hours","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":550,"y":3540,"wires":[["646ec1b4.1521c8"]]},{"id":"a90e7002.f851","type":"gate","z":"1c428643.6f708a","name":"A","controlTopic":"control","defaultState":"closed","openCmd":"GO","closeCmd":"STOP","toggleCmd":"toggle","defaultCmd":"default","persist":false,"x":550,"y":3410,"wires":[["646ec1b4.1521c8"]]},{"id":"6227a836.cc07b8","type":"fan","z":"1c428643.6f708a","x":1120,"y":3540,"wires":[["334e0a65.5aa23e"]]},{"id":"a8eed775.8c81d","type":"gate","z":"1c428643.6f708a","name":"B","controlTopic":"control","defaultState":"closed","openCmd":"STOP","closeCmd":"GO","toggleCmd":"toggle","defaultCmd":"default","persist":false,"x":550,"y":3490,"wires":[["57568cbb.235914"]]},{"id":"e1ecf945.7253a","type":"link in","z":"1c428643.6f708a","name":"Heart Beat","links":["b4aa1ba4.4dc758"],"x":425,"y":3410,"wires":[["a90e7002.f851"]]},{"id":"8b8d5fcb.6e57c","type":"inject","z":"1c428643.6f708a","name":"B","topic":"CONTROL","payload":"STOP","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":550,"y":3370,"wires":[["a90e7002.f851","a8eed775.8c81d"]],"icon":"node-red/arrow-in.png"},{"id":"74d65fa.edc5aa","type":"inject","z":"1c428643.6f708a","name":"A","topic":"CONTROL","payload":"GO","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":"2","x":550,"y":3330,"wires":[["a90e7002.f851","a8eed775.8c81d"]]},{"id":"334e0a65.5aa23e","type":"function","z":"1c428643.6f708a","name":"","func":"msg.payload = {\n    payload: \"TelePi USB stick memory low\",\n    who: \"TelePi\"\n}\nreturn msg;\n","outputs":1,"noerr":0,"x":1280,"y":3590,"wires":[["1f4a5729.8cc0a9","670fa7af.bfa3c"]]},{"id":"50bbe2dd.527854","type":"link in","z":"1c428643.6f708a","name":"","links":["115fcab8.9005ad"],"x":425,"y":3490,"wires":[["a8eed775.8c81d"]]},{"id":"1f4a5729.8cc0a9","type":"debug","z":"1c428643.6f708a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1460,"y":3550,"wires":[]},{"id":"670fa7af.bfa3c","type":"mqtt out","z":"1c428643.6f708a","name":"","topic":"MESSAGE","qos":"","retain":"","broker":"1ecd3a9e.dc5bfd","x":1480,"y":3590,"wires":[]},{"id":"299c1a5e.60b73e","type":"inject","z":"1c428643.6f708a","name":"test","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":1120,"y":3590,"wires":[["334e0a65.5aa23e"]]},{"id":"c914d93f.e69b48","type":"ui_group","z":"","name":"Free space on USB","tab":"a1877b46.0cc8c","order":6,"disp":false,"width":"4","collapse":false},{"id":"1ecd3a9e.dc5bfd","type":"mqtt-broker","z":"","name":"MQTT host","broker":"192.168.0.99","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"SOM","birthQos":"0","birthPayload":"TelePi comms up","closeTopic":"EOM","closePayload":"TelePi shutting down","willTopic":"EOM","willQos":"0","willPayload":"TelePi Comms Failure"},{"id":"a1877b46.0cc8c","type":"ui_tab","z":"","name":"Logging","icon":"list","order":3,"disabled":false,"hidden":false}]

Non standard nodes needed:
node-red-contrib-os
fan
gate
(and)
ui level

Walk through:
input selectable between daily or every n seconds.
pulse node-red-contrib-os node to get used disc (%) of USB stick.
convert to number.
display on ui_level node. (3x2) vertical.
Other stuff there that if over x% used generate message about USB getting full.
There is also an inject node in there for testing. (I'll get back to that soon)

This machine is on 24/7.
This morning I looked at the page and this is what I get:

Which to me shows 100% in use.

Pressing the inject node it changes to this:

Sorry, but what am I missing that if I don't look at the page, it defaults to 100% full display?

You hit a bug. :slight_smile:

Sorry.

I don't want to really say "bug". I've been caught a few times with my pants around my ankles because of something stupid I did.

This is what is happening. I'm not sure I'm not missing something or not.

(ui_control?) (:stuck_out_tongue_winking_eye: cheeky wink)

image
This is something you should never see.
value = 1 but shown as 100%
Definitely bug. :slight_smile:

Thanks for the update.

Installed and working a lot better now.