Analyzing Fitbit Data with Telegraf & Grafana

Having previously moved my Telegraf instance to a Synology-hosted Docker environment, I’ve spent some time adding additional measures for tracking and visualization using Grafana. With that task, I recently discovered the Telegraf Exec plugin, which allows you to execute custom scripts for the purposes of collecting external data for ingress into InfluxDB (or any of the other Telegraf output options). To prove out this concept, I’m using a Bash script to connect to Fitbit and pull data from my Fitbit Blaze into InfluxDB.

Configuring Telegraf on a Synology Virtual Machine

As part of my Home Automation series, we configured a Grafana dashboard to display status and statistics about SmartThings devices, the local weather and more. A few months ago, I retired an 8+ year old Windows Server storage solution and replaced it with a new Synology DS1817+. I knew that I wanted to leverage Grafana to display health statistics about the Synology (disk temperatures, throughput, disk conditions, etc.)—something that I never took the time to setup for my Windows server. Thankfully, Synology’s DSM platform natively supports SNMP, and we can easily run Telegraf to monitor the SNMP data and log it in our previously created InfluxDB instance.

Adding Live Weather to Your Grafana Home Dashboard

Back in Part 4 of Trending & Analyzing SmartThings Devices we created a Grafana dashboard to display details of devices via SmartThings. We'll build on this dashboard over time, and an important theme here is the unification of data from multiple services. SmartThings natively integrates with AccuWeather to report current temperature and the like, but what if you really want to see a snapshot of the week's forecast on your home dashboard?

DarkSky offers one of the best developer APIs around. I'm not paid to say that, they're not sponsoring this post (they don't even know about it), but having worked with their API on several other projects I've always been super impressed with their data models and the specificity of the data they return. Instead of basing their data on a large area (like a zip code), DarkSky uses your specific latitude and longitude, giving you a very precise forecast. We won't be directly using the API in this particular post, but if you're curious you should definitely go check it out.

In this particular case, we'll simply be adding DarkSky's embed widget to the Grafana dashboard we made previously.

Trending & Analyzing SmartThings Devices (Part 4 of 4)

Grafana is an analytics platform that allows you to create rich dashboards, define alerting logic when values exceed specified ranges, and visualize your data across a number of different formats. You can get a good idea of the capabilities of Grafana by just clicking through the official and community submitted dashboards on the Grafana website. The beauty of Grafana is its ability to visualize incredibly complex data sets in a way that still looks really sexy.

Trending & Analyzing SmartThings Devices (Part 1 of 4)

Back in the Home Automation Kickoff post, I talked about the power of the mFi Controller to record, trend, and analyze device and energy usage. One of the huge disappointments with Ubiquiti ending development of the mFi Controller was the end of development related to these capabilities. SmartThings has proven itself to be a fantastic platform for the integration and management of physical devices, but offers essentially no analytics around those devices. In this post, and the following series, we’ll look at integrating data analysis with SmartThings, and building a more data-driven home automation solution.