So – in the last blog entry we took a look at the NEW Thermostat – this article looks at an even newer GAUGE - top left corner of the stat on the right – instead of a simple node-red-dashboard level node to show the temperature I have a pretty new gauge. All working as well! Indeed it is so useful I’ve decided to separate this out as I’m sure many of you will have a use for one or more of these. Don’t get hung up on it being a thermometer – you can use it for anything – humidity, speed – whatever – completely programmable.
Here is the link to the gauge code. Pretty impressive stuff – there are examples over there – but the trick is, importing them into Node-Red-Dashboard. So – there is a library – under downloads – all in one. Grab that .JS file and in my case I put it in a directory called /home/pi/.node-red/public/myjs - that’s where I keep my .js files and Node-Red is aware of this. I’ve covered this before.
Anyway – here’s the code for the dial you see here – to be inserted into the template note node to replace the existing gauge – and don’t forget to load in that .js file and make the template 3x3.
[pcsh lang="js" tab_size="4" message="" hl_lines="" provider="manual"]
ToDo – reduce the grey box from a float to an integer with 2 digits and get a 7-segment font into that grey box.
I’ve updated the original Thermostat page here..