Blog2015 ≫ Crime dramas embiggen your brain

Ooh and also raspberry pi powered home brewing!

Hmm, the second telegraph article Clare has sent me in the space of a week, but this is explains a lot1, we love the crime dramas.

Got my pay day deliveries already which is nice these cutting disks2 were delivered already, and I've used them to make another couple of ikea hack lampshades... also got a Nespresso delivery too. They're not cheap, but they do next day delivery.

Last day off dryanuary. Clare is out at The Ship, as Terry is visiting from Ireland so a few of them have gone out. Including Dean and his new MBE! Only seen a picture of it so far, don't suppose he is actually taking it to the pub though.

Started febrewery early, got twenty-five litres of porter on the go. Hope the temperature is right for this brew, I've put it in the study instead of the utility as it's not as cold in there, there is a radiator, though it's always on low. Giving a raspberry pi temperature sensor3 another go, though it's going about as smoothly as it did last time... nfw.

Aha, it's working, it's just that the gpio on the raspberry pi is confusing, once you get the pin numbering right4 then it works... Hmm if I can connect this at the same time as the slice of relay board then I can use just the pi on its own to monitor my home brew; turn up the heat if it drops below 21 degrees, turn it off if it goes over 22. Yeah you can connect multiple sensors at once5, on the same gpio pin too. Got two connected at the same time now, handy for monitoring ambient temperature and actual beer temperature.

UPDATE: It's logging the temperature too, quick script, got two sensors connected. Will look tomorrow see what the temperature does over night. Can already see that beer needs to be warmer over night, temperature is at about 18 degrees:

#!/usr/bin/ruby
deviceRoot = '/sys/bus/w1/devices/'
logFile = '/home/pi/temperature.log'
graphData = [ [ 'time' ] ]
logEntry = [ Time.now.to_i ]
Dir[ deviceRoot + '*-*' ].each do | path |
  graphData[0].push( path.sub deviceRoot, '' )
  data = File.read( path + '/w1_slave' ).split( 't=' ).last
  logEntry.push( data.to_f / 1000 )
end
open( logFile, 'a' ) do | f |
  f.puts logEntry.join( "\t" )
end
open( logFile, 'r' ) do | f |
  f.each_line do | line |
    graphData.push line.strip.split( "\t" )
  end
end
# now plot graphData...

Changed that to give me how ever many probes I have in one log file, will plot them on a graph tomorrow...

Time for bed!

UPDATE: include the graph here?

At some point my home brew beer graph would have appeared here. I haven't done home brew for ages, it doesn't quite seem worthwhile, but maybe in times of austerity it will return.

dryanuary: Not drinking for all of January.

raspberry pi: Credit card sized super cheap computer, awesome.

⬅️ :: ➡️

Paul Clarke's blog - I live in Hythe in the deep South. Wed + dad to two, I am a full stack web engineer, + I do javascript / Node, some ruby, python, php ect ect. I like pubs, parkrun, eating, home automation + other diy stuff, history, genealogy, TV, squirrels, pirates, lego, + TIME TRAVEL.