Intro: Brewing Beer with Erlang, Bootstrap, and a Raspberry Pi

I've started working on a homebrewing controller and interface for the purposes of:

I started off with an Arduino, Erlang, and some custom Javascript, but have now moved to Raspberry Pi and Bootstrap. The Erlang side has stayed the same other than the Raspberry Pi related libraries :D

What’s Involved

Hardware

It looks like
this It looks like
this

Doesn’t it look a mess right now! :)

Software

I define my kit, process, and recipe with a Javascript object dialect defined with Protocol Buffers for easily understandable configuration and simple interaction between Javascript and Erlang. The kit repo looks a bit like this where I define what each point does and its neighbours:

(function() {
   Gyle.kit({
       points: [{
           id: -1,
           neighbours: [-7],
           hasHose: true,
           hose: {}
       }, {
           id: -2,
           name: "Mash Tun",
           neighbours: [3],
           hasKettle: true,
           kettle: {
               temperatureSensor: 0,
               powerController: 1
           }
...

This allows me to:

The backend is written in Erlang and I can do things like this:

11> gyle_hardware_io:power(on, 1).
20:34:33.044 [info] PowerState 1 on
ok
12> gyle_hardware_io:power(on, 2).
20:34:50.191 [info] PowerState 2 on
ok
13> onewire_therm_manager:subscribe("w1", "28-000004753e42").
{ok,17.437,{1366,233345,32572}}
14> flush().
Shell got {therm,{"w1","28-000004753e42"},17.5,{1366,233378,22579}}
Shell got {therm,{"w1","28-000004753e42"},18.062,{1366,233381,682590}}
Shell got {therm,{"w1","28-000004753e42"},19.312,{1366,233385,342572}}
ok

Show me! show meeee!

It looks like this! My old interface ended up being horrible, and this new Bootstrap based one is awesomely lovely.

It looks like this!

Migrating from the Arduino

The Hardware side of things

Arduino
This is the Arduino I was previously using (^above).

Raspberry Pi
And this is the new Raspberry Pi along with a lot more neat wiring than before, since now I have the experience to know exactly what I’m doing.

The Software side of things

The code I had on the Arduino simply routed data directly down the serial port to the Erlang code, so was super easy to migrate to Raspberry Pi, well… sortof. I had to write:

Well that’s the intro. Hopefully I’ll show it all working and release some more code soon. I haven’t even brewed with it yet! Been too busy and enthused getting it all connected and designing the whole thing. It’s great fun! I feel like a beer now but need to get to bed ready to brew more beer at work tomorrow morning :) Bottoms up!