Off-topic alert!
Over the past few months, I've been enjoying brewing beer at home with a Pico Pro. No doubt purists scoff a bit at the automation involved during the mash and boil, but it's a relatively small part of the beer making process...and doing a true, temperature-controlled step mash without investing in an expensive setup (not to mention the space it would take up) is a huge win.
It's been a lot of fun.
The biggest challenges, and the place where a lot of brewers fall down, are in sanitizing and controlling fermentation: keeping things at the right temperature, consistently, so the yeast can work its magic efficiently without producing off flavors.
I can't help with sanitizing (you just have to do a better job!) but I can help with fermentation!
To that end, there's a great device called a TILT Hydrometer. The TILT drops into your fermentation vessel (which, in the case of a Pico Pro, is a small, 1.75L corny keg), and transmits both temperature and specific gravity via Bluetooth 4/BTLE. It's pretty cool, and by using TiltPi, along with a Raspberry Pi Zero-W to receive the bluetooth data and log it to a Google Sheet, it does all this automatically. You just peek at the sheet every so often to see how things are doing.
That all works great, but reviewing the data I realized I was having trouble controlling the temperature precisely using an external thermometer. Given the open source nature of TiltPi, and that fact that it was built with Node-RED, I thought, hey—I could use the temperature being transmitted by the TILT as a current measurement, and then use IFTTT and a few WeMo switches to exactly control both heating and cooling!
So, over a few hours in between doing SuperDuper! stuff, I learned Node-RED, figured out how TiltPi worked, added automatic temperature control, and found/fixed some TiltPi bugs at the same time. It works great!
I've provided the TILT people with my modifications to TiltPi, and hope they'll be integrating it into the official TiltPi release. Until then, here's how you can use it:
- Set up TiltPi according to TILT's normal instructions.
- Download and unzip this text file and open it in your favorite editor.
- Open the TiltPi Node-RED editor. This should be here: http://tiltpi.local:1880.
- Copy the contents of the text file to the clipboard.
- Using the "hamburger" menu, select Import > Clipboard. Paste the copied contents into the box, and choose to import into a "New Flow". It'll be called "Main".
- Switch to the old flow tab and delete it.
- Click Deploy.
That's all the hard stuff. Next
- Set up your IFTTT Webhooks service so you get a key.
- Copy that key to the clipboard.
- Open TiltPi's normal interface at the URL it sent you when it started up (usually http://tiltpi.local:1880/ui/#/0).
- Using TiltPi's hamburger menu (so many hamburgers!), select "Logging".
- Paste your key into the IFTTT key* field.
Then, set up your various color TILTs normally. You'll see a Target Temperature slider - that's configurable on a per-TILT basis and defaults to 70F: reasonably appropriate for ale fermentation.
The next step is to set up the heat and cool steps in IFTTT. (I assume you've already got your WeMo switches configured and WeMo is connected to your IFTTT account.)
- Create a New Applet in IFTTT.
- For the "This" clause, add a Webhooks service.
- For the event name, use TILT-COLOR-temp-low, TILT-COLOR-temp-high, or TILT-COLOR-temp-just-right. depending on what you want to do.
- For "That", add the appropriate WeMo switch action.
For example, let's say that I want to control a heater for a BLUE tilt. I'd add three Webhook applets:
If BLUE-temp-low then Blue WeMo Heater Switch on
If BLUE-temp-high then Blue WeMo Heater Switch off
If BLUE-temp-just-right then Blue WeMo Heater Switch off
If you want to both heat and cool, you'd add three more events (since you unfortunately can't add extra actions to an existing event):
If BLUE-temp-low then Blue WeMo Cooler Switch off
If BLUE-temp-high then Blue WeMo Cooler Switch on
If BLUE-temp-just-right then Blue WeMo Cooler Switch off
More events can be added for more TILTs, each with its own target temperature and WeMo switch(es).
If you don't have a cooling device, and it's warm where you put your keg, do what I do: put the keg in an insulated cooler bag (I have an old version of this bag) along with an ice pack. That way, when the heater goes off, the ice pack will act as a cooler.
I hope that helps some of you make better beer. Enjoy!
Note: this post was updated on 10/22 with a new version of the flow that works better with multiple TILTs, now that I have more than one.