Posts Tagged ‘raspberry pi’

The Trouble Getting A 69

As someone who uses the bus a lot I’ve been using the Real Time Information system since it came out. I now use it pretty much every day to plan my trip.

Usually I find the data to be pretty accurate, with one constant exception – the 69 passing my house in the mornings which is constantly late.

A few weeks ago I decided to gather some data and find out just how late it was. There is still no API for accessing the real time information, so I wrote a python script to get the data from the website, and set up a cron job on my raspberry pi to run the script between 8:00 and 8:45.

That was three weeks ago, so I figured there was enough data gathered that it was worth putting it in a spreadsheet for further analysis. Here’s what I’ve learned:

  • At 8am the bus is due between 8:14 and 8:17
  • On most days it actually arrived between 8:30 and 8:35
  • The first three days seem to have had extra delays, arriving between 8:40 and 8:45
  • On one of the 15 days the bus didn’t run

The full data is available here

RPi Munin Temperatures

Just two weeks ago I upgraded my raspberry pi from the original squeeze image to the newer wheezy based raspbian. Something I tried to do was to get temperature information in munin, but it didn’t seem possible

Today’s update from Eben indicated this was now simples. So, I updated and after reboot the temperature was available from /sys/class/thermal/thermal_zone0/temp.

I’ve put together a quick munin plugin to record this. The temperatures end up getting rounded to the nearest degree, but I think that’s ok.


if [ "$1" == "autoconf" ]; then
     if [ -e /sys/class/thermal/thermal_zone0/temp ]; then
         echo "yes"
         echo "no"
         exit 1
elif [ "$1" == "config" ]; then
     echo "graph_title Raspberry Pi Temperature"
     echo "graph_args --base 1000 -l 0"
     echo "graph_vlabel Temperature in Celsius"
     echo "graph_category Sensors"
     echo "temp.label temp"
     temp=$(cat /sys/class/thermal/thermal_zone0/temp)
     echo "temp.value $((temp/1000))"