davidusb-geek / emhass

emhass: Energy Management for Home Assistant, is a Python module designed to optimize your home energy interfacing with Home Assistant.
MIT License
316 stars 64 forks source link

Feature Request: Get sensor data from victoria metrics, influxdb etc. #148

Closed cods4 closed 10 months ago

cods4 commented 10 months ago

Not sure if this is practical, but is it possible to pull the sensor data from a time series database like influxdb, victoria metrics, prometheus etc?

I want to be able to give it more than 2 weeks of data, but my home assistant backups are already at 6GB each and I can't afford to extend it any further.

On the other hand, Victoria Metrics has 2+ years of data and is easily manageable.

davidusb-geek commented 10 months ago

I don't think it's practical to do this on EMHASS. We pull data using the official (and efficient) Home assistant API, by passing data as list of values or by reading csv files. This final option may be your solution. Build an automation that build your desired csv, the point that csv to EMHASS for optimization