Raspberry Pi Weather Station

Well it’s been a little over two week and the Raspberry Pi 3 Model B weather station has held up; figured now would be a good time to go a little deeper into the setup.

Telegraf has been solid in ingesting my JSON documents periodically, lets have a look at it’s SensorTag configuration:

# cat /etc/telegraf/telegraf.d/sensor_tag.conf
[[inputs.exec]]
 command = "cat /sensor_tag.json"
 data_format = "json"
 name_suffix = "_sensor_tag"
 interval = "60s"

This telegraf configuration inserts the output of /sensor_tag.json every 60 seconds into InfluxDB.

In order to keep the JSON document up to date I have cron executing a python script every 60 seconds:

# crontab -l | grep sensor
* * * * * /root/sensor_tag.py A0:??:??:??:??:??

sensor_tag.py is a slightly modified version of my SensorTag code on Github.

Grafana 5.x Running on Raspberry Pi

Got around to upgrading my Raspberry Pi 3 Model B weather station with a newer version of Grafana, the Debian packages for ARM are hosted on Grafana’s download page under ARMv7.

Moving from a 2.x word to a 5.x has been impressive, most notably the drag, drop, and resize functionality.

I’m still using InfluxDB and Telegraf to store and populate my time data points.

Latest Raspbian’s (stretch) comes with Influx 1.0.2 and works nicely:

# dpkg -l | grep influxdb
ii  influxdb     1.0.2+dfsg1-1 armhf

While I needed to grab the Telegraf as a Linux Binary (ARM) from Influx’s download page.

Enjoy!