Is it hot in here?

As the weather turned recently and we had a cold start one morning, I had a look at a local weather station’s website ( and I wondered what there was in the way of temperature sensors that I could attach to my Pi.  I thought I’d need a temperature sensor, some analogue to digital converters, and some bits to get it all calibrated. Probably bulky, probably needing to solder some veroboard.

I was wrong!  Actually, there are some incredibly cheap temperature sensors out there, such as the TMP102 that can be bought for about £2.  Element 14 has an excellent article about this model, and a bigger (1cm square) PCB that will make it easier to handle.  Best of all, it just needs 4 wires (volts, but two data lines using the Pi’s I2C bus).

Cool – so for just a few pounds, and just 4 bits of wire, I can prod a temperature sensor and get an accurate response with no messy wiring, A to D or calibration.

Many radio stations use a Davicom MAC to monitor numerous systems, and telephone an engineer when something goes wrong – over temperature included.  (I recall one story where an engineer had his evening ruined by a Davicom calling regularly to say a racks room was too cold.)

If only I had a device that could read the temperature, and also call a phone if there was a problem?  A Pi, I2C temperature sensor, and Asterisk to the rescue.

My front room is unlikely to get massively hot or cold, but I do live on the top floor of a block of flats directly beneath some big cold water tanks, and it would be unwise for things to get too cold if I’m away.

So back to the Pi.  I’ve been using the original raspberry asterisk image running my FreePBX system for a few weeks now.  Getting I2C enabled to allow me to use one of those sensors may have been fiddly, most likely involving recompiling the kernel.  I’m in luck, as there is a new raspbian based image of raspberry asterisk created just this week.  And it appears to be easy to enable I2C support.

Time to order some parts, and attach the first (proper) bits of wire to my Pi.

One thought on “Is it hot in here?

  1. I have tried to enable I2C on the original raspberry asterisk image and it works without changing anything, so I’ll remain using that image for a little while longer.

Leave a Reply