Hey folks,

Recently, I was trying to level-up my observability for my home automation system, and I was inspired by what has been done by Carmelo and Patrick who had similar experiences for their own needs.

TL;DR

$   git clone https://gitlab.com/z0ph/tower-control.git
$   docker-compose up -d
$   open http://localhost:3000 (`admin`/`admin`)

Going Further :mag_right:

Previously, the only graph that I had was the built-in graph from my Home Automation system: Jeedom, and it was pretty bad (see below)

Jeedom Graphs

  1. Poor UI/UX
  2. No Dashboarding capabilities
  3. Single graph type
  4. No stacked view

About Jeedom

Jeedom is a French open-source home automation system, based on PHP, multi-protocol, autonomous and highly customizable. It’s the direct European alternative to the well known: Home Assistant. They have a great community here in France.

I’m running Jeedom for 2 years on a Raspberry Pi with an external SSD, has my previous installation on SD Card suddenly crashed due to the death of the SDCard.

The goal

My objective is to offer a better graph experience for my local usage in an isolated and portable environment, hosted locally on my Raspberry Pi, and could be useful for the community with easier deployment.

Components

  • Jeedom has centralized Home Automation System with a myriad of IoT sensors/captors
  • DD-WRT has Home Router: WLAN and LAN connectivity
  • Bonus: Twitter metrics for my accounts. (Following/Followers)

I was asking myself, if it makes sense to use AWS or other Cloud Service Providers (CSP) to deploy my new graph stack. But the need to keep cost at the lowest possible, and to keep it at a local level get ride of this hypothesis.

Maybe later I will need to access from a remote location, then I will ship it to AWS, and thanks to Docker, it will be neat ;-)

You will tell me, another option is to NAT the corresponding port on my ISP Box. True. :dizzy_face:

To attain my objective, I will automate a full deployment of home observability stack using:

  1. Grafana
  2. Telegraf
  3. InfluxDB

Using multiple Dockers containers (with docker-compose) on my Raspberry Pi (Raspbian)

The Stack

Jeedom Bridge

I’m using this tool to create a bridge between Jeedom metrics and InfluxDB, It’s a small python server who is listening on a specific TCP port on your Raspberry Pi, and then forwards events to InfluxDB.

InfluxDB

InfluxDB handles the persistence layer of all metrics in a time series DB.

From Wikipedia: InfluxDB is an open-source time series database developed by InfluxData. It is written in Go and optimized for fast, high-availability storage and retrieval of time series data in fields such as operations monitoring, application metrics, Internet of Things sensor data, and real-time analytics.

I’m using Docker Volumes to persist data. We will see later how to backup Docker volumes.

Telegraf

Telegraf is a very popular server agent for collecting and sending metrics and events. Written in Go with very limited memory footprint.

I’m using Telegraf with SNMP plugins to crawl my DD-WRT Router.

Grafana

Grafana is also a well-known analytics and data visualization platform, one of the most used solution for “DevOps” folks.

One cool thing is that your final dashboard is nothing else than a JSON that could be easily backuped or shared with others.

The Result

You will find below the result of my Home Automation Dashboard.

Grafana_1

Grafana_2

Grafana_3

My stack is available on Gitlab: here

Please don’t hesitate to contribute, submit MR, or Issues.

References (used documentations)

That’s all folks!

zoph.