Level-up your Home Observability
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.
$ git clone https://gitlab.com/z0ph/tower-control.git $ docker-compose up -d $ open http://localhost:3000 (`admin`/`admin`)
Going Further 🔎
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)
- Poor UI/UX
- No Dashboarding capabilities
- Single graph type
- No stacked view
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.
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.
- 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. 😵
To attain my objective, I will automate a full deployment of home observability stack using:
Using multiple Dockers containers (with
docker-compose) on my Raspberry Pi (Raspbian)
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 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.
- Docker Volumes - How to backup volumes ?
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 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.
You will find below the result of my Home Automation Dashboard.
My stack is available on Gitlab: here
Please don’t hesitate to contribute, submit MR, or Issues.
References (used documentations)
That’s all folks!