Controlling my Grainfather G30 from Raspberry Pi
Since the quality of the Grainfather App started to have various quality issues from mid-2019 and onwards I have been searching high and low for a replacement for the App. It should be noted that I have not experienced any serious issues with the App the past couple of months, but there is already that little piece of anxiety when you start a brew day:
Will the App be able to connect to the cloud services and the Grainfather – or will I have to revert to manual brewing control?
Besides that, I’m also getting really tired of having my recipes from Brewfather being altered every time they are uploaded to Grainfather.
Just by coincidence, I noticed a post in the Brewfather Facebook group by Thomas Gangsøy where he mentioned the Grainfather-Bluetooth-Protocol repository on Github. This was really the missing link I had been looking for so it didn’t take me long to start working on a Node RED project to enable the control of my Grainfather Connect (G30) from Raspberry Pi.
I have now been working on this for two days and have already managed to get all the basic controls up and running. This includes controlling the essential settings like temperature, pump and heating power. There is also readout of the timer, but no control of this yet.
Without the great reverse engineering work done already by @kingpulsar I would probably never have managed to come this far at all.
Installing Node Red GFConnect
The quality of the basic Node Red flow is now fairly stable so I am ready to share this. I have not made any special efforts to make this generally compatible with various versions of Raspberry Pi or Node RED, but on the other hand I don’t believe that I have made anything that would prevent this from running on other setups than mine.
I current have GFConnect running on the following setup:
- Raspberry Pi 4 B with 4 GB RAM, Raspbian 10 (Buster)
- Node-RED v1.0.4
- Node.js v12.16.1
If you don’t have Node-RED installed already, you can find the detailed instructions on how to get started on nodered.org
In addition to the basic Node-RED installation, the GFConnect flow depends on the following components. These can be installed via the Node-RED Palette Manager:
- node-red-dashboard (v2.19.4)
- node-red-contrib-ui-level (v0.1.27)
- node-red-contrib-generic-ble (v3.1.0)
The versions are those that I have currently installed, but other version might work too.
Finally, you can install the GFConnect flow into Node-RED. Since v0.18 of Node-RED it is possible to work with projects under git control, including cloning of projects from remote repositories. Alternatively you can copy/paste the flow into Node-RED.
You can get the GFConnect flow from clausbroch/node-red-gfconnect on Github.
Once installed, you should see a flow similar to this in Node-RED:
Next Steps
My next goal is to get the recipe uploading to work with either Beer XML or Brewfather Batch JSON files. Hopefully this will allow me to eliminate most of the dependencies on internet connections, Apps and cloud services on brew day and be able to brew completely offline if needed.
Once you hit the “Deploy” button you can access the GFConnect from http://pi:1880/ui/ where pi is either hostname or the ip address of your Raspberry Pi.
I’ll keep you posted on my progress in future blog posts. In the meantime if you like this post or have any comments, please feel free to add them below.
One Reply to “Controlling my Grainfather G30 from Raspberry Pi”
With the release of GF Connect v0.9.2, the bluetooth component has been changed. See https://www.norgesvej12a.dk/husbryg/gf-connect-v0-9-2-released/ for details