Help with shell command to get a result in a node

Yet another way - grep the result from the original command via a pipe

df --output=used / | grep -v Used

then just feed into the gauge (as it will cope with simple text.)

[{"id":"425a6c38.bcad84","type":"inject","z":"df0a9f4b.bc75b","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":200,"wires":[["4f93063c.c91df8"]]},{"id":"4f93063c.c91df8","type":"exec","z":"df0a9f4b.bc75b","command":"df --output=used / | grep -v Used","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":370,"y":200,"wires":[["3af9a86f.268f78"],[],[]]},{"id":"3af9a86f.268f78","type":"ui_gauge","z":"df0a9f4b.bc75b","name":"","group":"1fc20d40.3dd9d3","order":0,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"units","format":"{{value}}","min":0,"max":"10000000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":630,"y":200,"wires":[]},{"id":"1fc20d40.3dd9d3","type":"ui_group","z":"","name":"Default","tab":"92544f31.05d25","disp":true,"width":"6","collapse":false},{"id":"92544f31.05d25","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
1 Like