Jump to content

MQTT DB Logger Grapher


jbroo

Recommended Posts

So, after various DIY attempts to monitor my Axpert inverter, I settled on using SolPipLog, which is great for monitoring live data via MQTT, using a Raspberry Pi. I use that in conjunction with the HomeHabit app on my Android device. It allows me to monitor various inverter stats in real time, and also to control some functions (such as charge profile, equalization on demand, etc.). However, the one thing that neither SolPipLog or HomeHabit offer is historical data via graphs/charts. Although SolPipLog does export to EMONCMS, this is no longer free and setting up a self-hosted instance is quite painful.

I really wanted to have some sort of historical data available, so I could see trends (or check why the fans are running - did we have load shedding or is it just hot? 😅).

This prompted me to write my own software, which logs the MQTT topic data to a SQLite database, and fetches it into a Highcharts graph on demand. I got it working but got a lot more involved than I expected, so the end result is MQTT DB Logger Grapher, which is reasonably customizable, and while it's developed for inverter and power monitoring, it can be configured to log and graph any MQTT data.

Feel free to download and use with SolPipLog or any other MQTT device monitoring software.

Desktop web view:

289465264-8f90f811-969d-4d23-aafc-ddfcce84e17e.png.97625843d776a413c7a3121891c9b9f6.png

 

Mobile web widget in HomeHabit:

image.thumb.png.f6f53b67418116994af9a99fffd83beb.png

 

Edited by jbroo
Link to comment
Share on other sites

  • 2 weeks later...

Nice.
Once the mqtt data is in SQLite , you should be able to graph the data with Grafana.
telegraf is also able to persist mqtt data to a database.

In my case, I also used a python app to save mqtt to a database.
I did try telegraf, but the python code was already written.

I found that using Docker really helps to run the services.
image.thumb.png.a0fe9fd8f457af091f4704fdbc0de293.png

Edited by system32
Link to comment
Share on other sites

Thanks. I had tried the Grafana route but also found it tedious and complicated to get working. I settled on Highcharts since it basically runs itself. The end user needs to do minimal configuration, which was part of my goal.

Edited by jbroo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...