MarkBryanMilligan / LanternPowerMonitor

The Lantern Power Monitor is a Raspberry Pi service, Java Web Service, and Android application that allow you to monitor every electrical breaker in your house, regardless of how many panels or breakers you have.
GNU General Public License v3.0
80 stars 26 forks source link

Support writing readings to InfluxDB2 #52

Open Blizliam opened 1 month ago

Blizliam commented 1 month ago

InfluxDB2 is a time-series database for great for storing lots of IoT data.

Since it is something I use in my home-lab, I added the capability to specify connection details in the config so that LPM hubs will write their readings directly to the database.

The configuration would look like this.

{
  "influxdb2_enabled": true,
  "influxdb2_url": "http://192.168.1.27:8086",
  "influxdb2_apitoken": "pOlPIog841Sw8sjh548bIyBDAXg8HGa2Rn80WlxHtuvsaPQjQXx_Kykt6-l69Rr9kKt1GanXVe9P3h6jtD27Gt==",
  "influxdb2_org": "MyBigCompany",
  "influxdb2_bucket": "LanternPowerMonitor"
}