RackTemp is a web application that collects temperature readings from the DS18B20 sensor, displays pretty stats and notifies you if things get out of order.
This thing exists partially because I needed to make something of my Raspberry Pi and partially because I recently had got a rack cabinet which started to get pretty hot and I felt a need for tracking it.
The first iteration of RackTemp, 0.1.0 if you will, got the job done. At the point of writing this I have actually had 0.1.0 operating in production since about November 2013. The biggest flaw of it is really the use of pchart to create the chart. As it turns out server side rendering on a Raspberry Pi isn’t really ideal. This and the fact that it wasn’t really done made me now six months later to make it reach 1.0.0.
So code wise, what have changed? Well, RackTemp started out as a weekend hack, pretty much a just a bunch of files project. I have since then had time to learn about NPM, Grunt, Bower and Composer which have made it less a bunch of files and more something that is sort of maintainable. Another rater important change is performance wise, I now use the chart library C3.js which is built on top of D3. That way the rendering part of charts moves over to client side instead. This makes the whole thing some what faster, especially for large charts. I have also changed the webserver from Apache to Nginx, though I don’t really know how much of a difference that actually made, other than that the config file seems to be easier.
As you have reached the end of this blog post RackTemp has actually made it to 1.0.1 while I deployed it to my production Pi to get some real screenshots. During this deployment I also fund that there seems to something fishy going on with the SMTP connection for notifications, which keeps timing out. Though I’m unable to debug this at he moment.
Meanwhile, head over to the project page for some more screenshots and stuff. Or go straight to https://github.com/victorhaggqvist/racktemp.
Btw, in case you were curious, RackTemp are both tested and runs in production on Raspberry Pi’s Model B rev 1 aka 256MB on stock CPU speed.
I would guess that there is no one running the 0.1.0-ish version. But in case there are, just follow the steps in the readme but skip the DB part and hook it up to your existing db instead.