# \`ui\_level\` node. Not really \*working\*

**URL:** <https://discourse.nodered.org/t/ui-level-node-not-really-working/15642>\
**Category:** Dashboard\
**Created:** [17 September 2019 20:55 UTC](https://discourse.nodered.org/t/ui-level-node-not-really-working/15642 "2019-09-17T20:55:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [17 September 2019 20:55 UTC](https://discourse.nodered.org/t/ui-level-node-not-really-working/15642/1 "2019-09-17T20:55:23Z")

</div>

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.

```auto
[{"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:

 ![Screenshot%20from%202019-09-18%2006-44-34](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/922bbbb30cbcdc1489d39be0270a31100db6b429.png)

Which to me shows 100% in use.

Pressing the `inject` node it changes to this:

 ![Screenshot%20from%202019-09-18%2006-54-00](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/f4b4eb2ab0edc87dab198876bc5a13e68bab0db9.png)

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

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [18 September 2019 04:54 UTC](https://discourse.nodered.org/t/ui-level-node-not-really-working/15642/2 "2019-09-18T04:54:15Z")

</div>

You hit a bug. 🙂

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [18 September 2019 04:55 UTC](https://discourse.nodered.org/t/ui-level-node-not-really-working/15642/3 "2019-09-18T04:55:54Z")

</div>

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`?) (😜 cheeky wink)

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [18 September 2019 06:25 UTC](https://discourse.nodered.org/t/ui-level-node-not-really-working/15642/4 "2019-09-18T06:25:53Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e7a7829112d8c63ff3696ad7a12f08b02d4ed7aa.png)  
This is something you should never see.  
_value = 1 but shown as 100%_  
Definitely bug. 🙂

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 September 2019 23:04 UTC](https://discourse.nodered.org/t/ui-level-node-not-really-working/15642/5 "2019-09-20T23:04:16Z")

</div>

Thanks for the update.

Installed and working a lot better now.
