Quote:
Originally Posted by PbdBlue
Nicely done. Care to share details?
|
It uses the MQTT data feed from the Victron Venus OS, which is on their Color Control GX, the Venus GX, and the Octo GX. You can see how the data flows through it in the attachment to this post.
The MQTT feed is live only -- there's no historical data provided, so to see that you have to record it somehow. I have a small computer that I use as a dedicated server for my work. It’s set up in a way that I can host multiple "virtual computers" on it, so for this need, I just added another running Ubuntu 18.04 LTS. It’s definitely overkill for this use, but it’s something I already have rather than a new purchase, so it won out. Had I not had it, I probably would have purchased a Raspberry Pi for this and wired it into the DC system -- it’s not a high-demand use.
I’d heard about a special-purpose database called InfluxDB. It is a time series database: every entry into it is constructed around a timestamp and measurement, and it’s optimized for storing and accessing that kind of data. For my needs, it’s perfect, and conveniently enough, the dashboard software has excellent built-in support for it. To actually glue the two pieces together (i.e., save the values I want from the MQTT stream to the database), I wrote some custom code that handles connecting to the MQTT broker, sending keep-alives, and inserting into the database.
The software powering the dashboard is snother I’d heard of and wanted to try: Grafana. It’s a self-hosted web-based graphing/dashboard system. Using it requires a server to host it on, so I did the obvious and just loaded onto the same system where the MQTT client and database live. That's what you saw running in the screenshot in the first post.