Barometry on a plate…

… served to you via JasperServer. Just log in as guest with password guest and pick metchartsonly or mettabular&charts from the Reports folder.  Then you should see something like:jasperserver
If you succeed it’s because dixie‘s bigger desk-side partner, which runs Arch Linux, is also running a Jaspersoft report server, via Apache Tomcat.  In turn, that is serving a report by querying the MariaDb database at dariada.org.uk which is updated every 15 minutes by pixie, and its BMP180 barometric pressure sensor.

If you don’t succeed it’s probably because the JasperServer is down, it doesn’t keep the same long hours as pixie and dixie !

Exporting barometry

barometerEncouraged by my success with barometric data logging I decided to improve it a bit by logging to a remote database rather than simply writing tab separated text to a local file.That involved adding a wee USB wi-fi dongle (TP-Link TL-WN725N) to pixie, which has not had permanent Internet connectivity since dixie took over.  I struggled with that, and Raspbian (which pixie now runs because it was recommended for piface) – but eventually I succeeeded.

Then things went more smoothly.  I created a new MySQL database called metdb at dalriada.org.uk, my main ‘home’ site hosted by eukhost.  It has just one table, named metrecord but, crucially, it is accessible remotely from dalriada8eepa.plus.com – where pixie runs.  Then it’s a simple matter of:

cursor.execute("INSERT INTO metrecord SELECT '%s', %s, %s" % (tnow,pressure,temp)

instead of the previous print to file.  Then I can leave pixie to get on with it, headless, and inserting a row into metdb.metrecord at dalriada.org.uk every 15 minutes.

After that I can query the database any time I like, from wherever I like, by whatever means I prefer.  I am most likely to generate a report via Jaspersoft’s iReport Designer from my regular desktop PC, running Arch Linux:

jasper1

and:

jasper2

Old Pi – New Tricks

My new RPi, Dixie, left the old one, Pixie, with nothing to do.  So I decided to branch out into GPIO prototyping and try some DIY data logging, beginning with barometric pressure and room temperature.

Actually I started out with a PiFace interface from Farnell but that doesn’t seem to break out all the GPIO pins, and I needed SCA and SCL for the pressure sensor device I had chosen, BMP180, from ModMyPi.

1603_MEDSo I switched to a Humble Pi breakout board and with a little careful soldering I was soon in business.  I re-used the new PiFace case, which is deep enough to accommodate the breakout board and its components:pimet2 pimet1
I followed How to set up a Barometric pressure sensor BMP085 on Raspberry Pi with Raspbian which explains how to enable i2c in Raspbian for communication with the pressure sensor.  Then I acquired the python support software from Adafruit via git clone https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code.git. It was easy to tweak Adafruit_BMP085_example.py script into my own code for logging pressure and temperature to a tab separated text file.  I can export that whenever I like and use LibreOffice  to produce:

metlog1

and:

metlog2