Closed MichaelMedford closed 2 years ago
@jertel After addressing your comments, I have added in some additional code to (1) pause between day calls to the API to avoid errors from Emporia and (2) correctly catch keyboard interrupts within the loop.
This PR adds support for ingesting historical one-minute data into InfluxDB the first time that Vuegraf is run. A new parameter is added to the configuration,
historyDays
, to support this feature. Emporia currently retains one-minute data for 7 days, and thereforehistoryDays
must be less than or equal to7
. IfhistoryDays
is set to0
, no historical data will be ingested into InfluxDB.If this PR is accepted, I would be happy to create another PR for ingestion of historical one-hour data. Emporia currently retains one-hour data for the lifetime of the device.