Temperature Monitoring with TEMPer

I got a USB thermometer from eBay called TEMPer. I found some code which creates a driver and reporting app for which, with some patching, I used in a little cronjob. The code can be found at SlackBuilds.org, and seems to work OK on Slackware 13.1. It does, however, output temperatures which are generally 9.3 Celsius higher than the actual temperature, so the figure below has erroneously high temperatures.

Below is a plot of last month’s temperature data from the TEMPer.

Raw (blue) and filtered (green) temperature (Celcius)

I wrote a little Octave/MATLAB script which takes the raw data from the cronjob output and does a frequency analysis with the FFT tools in Octave/MATLAB. I use the frequency domain to lowpass filter the raw data (the blue line) with a cutoff at 1/7 per day to smooth the data (the green line). Comparison of this filtered line with some regional data from a meteorological station shows pretty good agreement:

Meteorological data from http://www.southamptonweather.co.uk/wxgraphs.php for the same time period as the graph above.
Meteorological data from http://www.southamptonweather.co.uk/wxgraphs.php for the same time period as the graph above.

The line of interest is the green line in the lowest panel. The duration of the two plots is the same, but the y-axes differ in scaling.

There are a number of interesting trends in the two data sets. Both graphs decrease for the first 5 or 6 days followed by a relatively slow increase in temperature which peaks at ~12 days before present (the 15th). From the 15th onwards, temperatures decrease until the 17-18th, where the temperature begins to rise again, until the 22nd, where the graphs diverge. The meteorological data continue on their upward trend, however the TEMPer data suddenly drop 2-3 Celcius.

The reason for this divergence is we turned our heating off around the 21st. Following this static shift of a few degrees, the two graphs track the same trend, but the TEMPer data is now lower.

Finally, the huge temperature spike in the TEMPer data for the last two days or so is from friends visiting and the heating being put back on for two late nights.

I’ve got a longer time series from the internal sensors on the PC, but hopefully this USB thermometer will give me less CPU-load-dependent temperatures.

PPTPd installation and configuration

Setting up a PPTP server (aka VPN in Microsoft Windows operating systems) on Slackware 13.1 with the aid of SlackBuilds.org (SBo) and sbopkg. Most of this is lifted from here, which was the most recent set of instructions I could find. Everything else dated from a few years ago, and that makes those documents about as useful as a chocolate teapot.

Install pptpd from SBo. Use sbopkg if you like, otherwise follow the instructions here.

Once that’s complete, edit /etc/ppp/chap-secrets with your favourite editor. I like vim, so:

vim /etc/ppp/chap-secrets

Add a new username and password to log in:

someusername pptpd somestrongpassword *

Replace someusername and somestrongpassword with the username and password you wish to use to connect to your VPN.

Now we need to tell pptpd how to handle the new connections’ IP addresses on the local network. Edit /etc/pptpd.conf with your favourite editor:

vim /etc/pptpd.conf

In /etc/pptpd.conf, add the following lines to give the remote machine an IP on the local network in the subnet:


Moving on, edit /etc/ppp/options.pptpd

vim /etc/ppp/options.pptpd

In that file, replace ms-dns and ms-dns
with Google’s DNS servers:


The final step is opening up port 1723 on your router and setting up dynamic dns to provide a more easily remembered address to connect to from your remote host.

When all that’s done, launch pptpd as root and try connecting to your new PPTP/VPN server.

I tested this from a different machine on a different network and was able to browse just fine through my PPTP server. Browsing to www.whatismyip.com gave me my PPTP server IP address, so it worked just fine. What I need now is more bandwidth at home!