Skip to content

Latest commit

 

History

History
28 lines (23 loc) · 1.52 KB

README.md

File metadata and controls

28 lines (23 loc) · 1.52 KB

nodejs-mqtt-data-logger

THIS IS A WORK IN PROGRESS

It's far from complete and this far not usable at all.

What is this?

I was looking for a decent way to long-term log my energy usage for some outlets. Charting wasn't the most important part, but seeing exact values of kWh used per month several years back was important. Since I didn't find a complete solution for that I started writing this.

This should run as a daemon and will then read data from a MQTT Broker to which energy usage is sent. The read data will then be stored into a database (SQLite). Only changes will be written and on an hourly basis it will aggregate energy usage into daily values. Detailed (raw) data entries will be deleted after a defined number of days.

TODO list

  • Log data to SQLite.
  • Handle counters from hardware that resets the value from time to time (Shelly for example).
  • Add HTTP support to view the data.
  • Aggregate hourly data into another database table.
  • Aggregate daily data into another database table.
  • Remove detailed (raw) data after X number of days.
  • Remove data from hourly/daily as well.
  • Get all last values on startup instead.
  • Add daily data chart
  • Add real-time chart using table raw_data.

Dependencies