From: Jürgen Baginski Date: Thu, 8 Oct 2020 20:16:38 +0000 (+0200) Subject: Corrected the default configurations (#8698) X-Git-Url: https://git.basschouten.com/?a=commitdiff_plain;h=082a3c2555e22dd49b90ee6daad49c6351c614ac;p=openhab-addons.git Corrected the default configurations (#8698) According the comments DEFAULT_NUMERIC, DEFAULT_QUANTIFIABLE config should have 5 archives, the 4th was missing. Additionally the ConsolFunction changed in the DEFAULT_QUANTIFIABLE. The DEFAULT_OTHER config had false computed archives. Signed-off-by: Jürgen Baginski --- diff --git a/bundles/org.openhab.persistence.rrd4j/src/main/java/org/openhab/persistence/rrd4j/internal/RRD4jPersistenceService.java b/bundles/org.openhab.persistence.rrd4j/src/main/java/org/openhab/persistence/rrd4j/internal/RRD4jPersistenceService.java index 783d6aaa72..c67d3f9961 100644 --- a/bundles/org.openhab.persistence.rrd4j/src/main/java/org/openhab/persistence/rrd4j/internal/RRD4jPersistenceService.java +++ b/bundles/org.openhab.persistence.rrd4j/src/main/java/org/openhab/persistence/rrd4j/internal/RRD4jPersistenceService.java @@ -367,7 +367,7 @@ public class RRD4jPersistenceService implements QueryablePersistenceService { // 3. granularity of 15m for the last year // 4. granularity of 1h for the last 5 years // 5. granularity of 1d for the last 10 years - defaultNumeric.addArchives("LAST,0.5,1,360:LAST,0.5,6,10080:LAST,0.5,90,36500:LAST,0.5,8640,3650"); + defaultNumeric.addArchives("LAST,0.5,1,360:LAST,0.5,6,10080:LAST,0.5,90,36500:LAST,0.5,360,43800:LAST,0.5,8640,3650"); rrdDefs.put(DEFAULT_NUMERIC, defaultNumeric); RrdDefConfig defaultQuantifiable = new RrdDefConfig(DEFAULT_QUANTIFIABLE); @@ -379,8 +379,7 @@ public class RRD4jPersistenceService implements QueryablePersistenceService { // 3. granularity of 15m for the last year // 4. granularity of 1h for the last 5 years // 5. granularity of 1d for the last 10 years - defaultQuantifiable - .addArchives("AVERAGE,0.5,1,360:AVERAGE,0.5,6,10080:LAST,0.5,90,36500:AVERAGE,0.5,8640,3650"); + defaultQuantifiable.addArchives("AVERAGE,0.5,1,360:AVERAGE,0.5,6,10080:AVERAGE,0.5,90,36500:AVERAGE,0.5,360,43800:AVERAGE,0.5,8640,3650"); rrdDefs.put(DEFAULT_QUANTIFIABLE, defaultQuantifiable); RrdDefConfig defaultOther = new RrdDefConfig(DEFAULT_OTHER); @@ -391,7 +390,7 @@ public class RRD4jPersistenceService implements QueryablePersistenceService { // 2. granularity of 1m for the last week // 3. granularity of 15m for the last year // 4. granularity of 4h for the last 10 years - defaultOther.addArchives("LAST,0.5,1,1440:LAST,0.5,12,10080:LAST,0.5,180,35040:LAST,0.5,240,21900"); + defaultOther.addArchives("LAST,0.5,1,720:LAST,0.5,12,10080:LAST,0.5,180,35040:LAST,0.5,2880,21900"); rrdDefs.put(DEFAULT_OTHER, defaultOther); if (config.isEmpty()) {