Brewing with Node-RED pt 2: My Dashboard

This post continues my discussion of Node-RED for brewing applications. Read part 1 here.

The most recent information and version of my brewing dashboard can always be found on github. I’ll improve it and add features from time to time, and it’s all there for you to borrow ideas from/copy/modify and otherwise jump start your own process of using Node-RED.

My brewing dashboard is quite specific to my 2 vessel brewery. Node-RED really encourages intensely personalized app/dashboard development. Notable features of my brewing dashboard are:

  • PID temperature control of mash (using RIMS), with output limiting functionality
  • PID temperature control and manual control options of a boil kettle
  • Output blocking to ensure only a single element is used at once
  • Volume sensing (not shown in screenshots below as I had my pressure transmitter disconnected)
  • Looks nice and has mobile friendly buttons and sliders
  • MIT opensource license (any my code anyways, Node-RED itself is licensed under Apache 2.0)

There’s a bit more detail in each of the below screenshots. Please let me know if you have any questions about what I have going on here!

This dashboard has worked incredibly well for me so far. I’ve been using it in some form to brew for the past year or so. Changes I make to my dashboard now have tended towards more aesthetics rather than function. A goal of mine is to eventually incorporate control of my pump VFD (beyond basic on/off functionality), through this dashboard.

This is the main view of my brewing dashboard. Works well on mobile too (using 1 column instead of 2). Ignore the missing temperatures, I took this UI screenshot while all of my sensors were disconnected for brewery modifications…
The mash settings page has all the advanced output and settings in regards to mash temperature control, that you may expect. One somewhat novel feature is that I have an output limiter for my RIMS inline heater. So for heating strike water I may use 100% output, but dial it back to 25% max for mash recirculation and temperature control. Also on this page, a temperature Δ may be specified (mash target vs. rims target). This may be necessary when brewing in situations with high heat loss (e.g. outside in the winter).
The boil settings page is a little simpler. Just basic PID settings and PID related outputs (these are useful for tuning and troubleshooting PID behaviour). A PID on the boil may be used for no-boil beers or kettle sours. Possibly as well for a hop stand, though I think that’d be overkill.

Brewing with Node-RED pt 1: Introduction

Node-RED is a popular framework for visual programming. It is included with Raspbian, the official operating system of Raspberry Pi, and sees wide use for interfacing IoT devices and task automation. Programming in Node-RED is flow orientated – essentially signals or messages propagate through nodes which each deliver some functionality (e.g. directing, modifying, or expanding a message)

These flows are created using a visual editor, and 1000s of user created and maintained nodes exist to do pretty much anything with a simple drag, drop, and route workflow. If the included and contributed nodes are not enough, and you have some basic programming experience, it is easy to write your own function nodes using JavaScript. You can even call code written in some other language if you wanted. Pretty damn flexible.

The messages themselves may be invoked through interaction from a user (e.g. a button click on an associated dashboard), some scheduled regular injection, various input nodes, etc. For example, you can have a node which streams messages from a DS18B20 temperature sensor. You may route that message to a node that provides some kind of smoothing functionality, then to to a UI element that displays the current temperature.

Example flows in which a temperature reading is triggered by regular insertation of a timestamp. This temperature reading is smoothed for display in UI, and it is also routed to a PID algorithm.

While a dashboard is not necessary for a Node-RED project, they are commonly used. Lots of basic UI widgets are included with Node-RED-dashboard, the default dashboard package. These should cover most of what you would want to use, but again, you can also write your own widgets. Elements from Angular Material can be used without any extra setup or configuration, and this makes it relatively easy to create fully customized, modern and attractive widgets. You are not restricted to using Node-RED-dashboard however, and can use essentially any other front end library (e.g. vue.js) that you may want to build your dashboard if you want further flexibility. Check out the short video below for a demo of a custom ui widget I made – the lightning bolts indicate power and ability to power each of my two brewery elements (I prevent powering of both elements simultaneously with my Node-RED dashboard)

From CraftBeerPi to Node-RED

It’s easy to see why Node-RED is so popular across the complete range of programming experience levels and applications. About 18 months ago I think it was, I began playing with Node-RED myself. The programming style was a bit different from what I was used to, but eventually I became somewhat proficient in it and built a dashboard to control my homebrewery.

In comparison to CraftBeerPi, which is probably the most popular software on the Raspberry Pi for brewery control right now, a Node-RED dashboard is certainly more “assembly required”. It does have the benefits of wider use even if that use is not homebrewing specific though. The Node-RED discourse forum has thousands of questions and posts from other hobbyists and makers on how to do specific things with Node-RED, which can be easily related back to homebrewing. In comparison to the CraftBeerPi project, development is much more active, the project is much more stable, and it is also truly opensource (Apache 2.0 license).

For a user wanting custom functionality, endless control, and not afraid to get their hands dirty, Node-RED a good match.

Continue reading Brewing With Node-RED pt 2 here.