Close

Event Driven Set Points? Yes Please!

A project log for Beaglebone Black Fermentation Controller

A fermentation controller for doing multi-step fermentation with web reporting and control

dericderic 08/03/2015 at 15:240 Comments

While I haven't been updating the Project page a lot, I have spent a bit of time in the last few weeks getting the last 10% of the project running. Originally I'd planned on having the GUI control the fermentation temperatures, but I realized that would be pretty limiting, what if I was away from the house and wanted to start a cold crash? Obviously having the WebUI be able to set the fermentation temperature would be awesome for this, the only problem is I hate polling systems and I couldn't think of a way to pull down the set point from the WebUI without polling.

Cut to a few weeks ago and a post about Socket.IO for Node popped up on Reddit, I read the article and had one of those a ha moments! I could have the WebUI send an event when the set point was changed, and have a client listen for that even on the BBB. I whipped something up using the examples on Socket.IO and within a few hours I had it notifying the client of the new set point!

Of course, now that the WebUI can change the ferm temp it was time to lockdown the UI, the easiest way is to use a .htaccess file, which I've done for now. I don't want some pranker setting my ferm temp to 50 C after all!

All the code is posted on the Github temp_driver repo, the very basic node server and client are there as well. The temp_driver application uses inotify to listen for changes to the file written out by the node client whenever the temp changes. Of course I'd love to be able to hook directly into the event system from C, but I haven't yet figured out how to do that. This will work for now while I work on some more interesting bits. On my todo list is fermentation profiles, so you can set the system to follow a specific fermentation timeline ( start at temp x for y days, then ramp to temp z for w days followed by a cold crash )

Discussions