But my sitemap just shows up an empty graph! I checked the Heating_LivingRoom_Setpoint.rrd file and it has some strange characters in it(base64?) so its seems to be logged data. I even deleted the file and rebooted OH, but still no graph, what am I missing? Yes I know i should switch over to the complicated grafana, infuldb but this will probably take me a day to set up, which I rather would spend on other OH stuff!(Yes I am a windows man…)
I do also have influxdb.persist with this content:
// persistence strategies have a name and a definition and are referred to in the "Items" section
Strategies {
default = everyChange
}
Items {
Group_Chart* : strategy = everyUpdate
}
IMHO the ending should have been rrd! But since this file is written by the system this was probably just a typo in the post.
How do your rrd4j.cfg and .persist files look like? Are their names correct? (Some troubles have Ben reported recently because of the False file-name "rr4dj.*)
# please note that currently the first archive in each RRD defines the consolidation
# function (e.g. AVERAGE) used by OpenHAB, thus only one consolidation function is
# fully supported
#
# default_numeric and default_other are internally defined defnames and are used as
# defaults when no other defname applies
#<defname>.def=[ABSOLUTE|COUNTER|DERIVE|GAUGE],<heartbeat>,[<min>|U],[<max>|U],<step>
#<defname>.archives=[AVERAGE|MIN|MAX|LAST|FIRST|TOTAL],<xff>,<steps>,<rows>
#<defname>.items=<list of items for this defname>
Your need to install REST Documentations via PaperUI Add-ons Misc.
On REST API select persistence and on that page the third get.
For serviceID put in “rrd4j” and for itemname the name of one of your persisted items ( not a group) and hit “Try it out”.
If your database contains any data you will see a reponse body like:
"{
“name”: “E10_1”,
“datapoints”: “1416”,…"
Of course with the name of your item, if the number of data points is zero, the database have no entries.
Note that the .rrd file is created before any value is persisted and it size won’t change. So the existence of that file doesn’t tell that something is saved!
Error handling update of file '/etc/openhab2/persistence/rrd4j.persist': null.
java.lang.NullPointerException
at org.eclipse.smarthome.core.scheduler.ExpressionThreadPoolManager$ExpressionThreadPoolExecutor.removeFutures(ExpressionThreadPoolManager.java:321)[98:org.eclipse.smarthome.core:0.9.0.b4]
at org.eclipse.smarthome.core.scheduler.ExpressionThreadPoolManager$ExpressionThreadPoolExecutor.remove(ExpressionThreadPoolManager.java:291)[98:org.eclipse.smarthome.core:0.9.0.b4]
at org.eclipse.smarthome.core.scheduler.ExpressionThreadPoolManager$ExpressionThreadPoolExecutor.remove(ExpressionThreadPoolManager.java:308)[98:org.eclipse.smarthome.core:0.9.0.b4]
at org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl.removeTimers(PersistenceManagerImpl.java:321)[103:org.eclipse.smarthome.core.persistence:0.9.0.b4]
at org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl.stopEventHandling(PersistenceManagerImpl.java:377)[103:org.eclipse.smarthome.core.persistence:0.9.0.b4]
at org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl.removeConfig(PersistenceManagerImpl.java:348)[103:org.eclipse.smarthome.core.persistence:0.9.0.b4]
at org.eclipse.smarthome.model.persistence.internal.PersistenceModelManager.modelChanged(PersistenceModelManager.java:85)[125:org.eclipse.smarthome.model.persistence:0.9.0.b4]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:207)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:120)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:272)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.access$1(FolderObserver.java:265)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver$WatchQueueReader.processWatchEvent(FolderObserver.java:146)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
at org.eclipse.smarthome.core.service.AbstractWatchQueueReader.run(AbstractWatchQueueReader.java:122)[98:org.eclipse.smarthome.core:0.9.0.b4]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
I tried updating the persitance rule, as well as persisting other items without success! I expect it might be some issue with the persistence file in the xml database or something…Or the persistence.cfg file…
I have the number item: Number Miflora_Sensor5_Temperature "Sensor5 Air Temperature [%.1f °C]" <text> (gMiflora, Group_Temperature,Group_Temperature_LivingRoom)
Which is a member of : Group Group_Temperature(Group_Chart)
and the persitance file is now:
Strategies {
// for rrd charts, we need a cron strategy
everyMinute : "0 * * * * ?"
default = everyChange
}
Items {
// additionally persist weather info every minute
Group_History* : strategy = everyUpdate, everyMinute
Group_Chart* : strategy = everyUpdate, everyMinute
}
and the miflora clearly get updated: 2017-11-26 13:01:04.480 [ItemStateChangedEvent ] - Miflora_Sensor5_Temperature changed from NULL to 21.8
So how come no files are here?
[13:02:30] pi@openHABianPi2:/var/lib/openhab2/persistence/rrd4j$ ls
Heating_LivingRoom_Setpoint.rrd
Earlier you stated that you are curious about the “entries” in that file. Do you have the file or not?
If you have it, try to stop OH, delete the file and then restart.
A further step would be to start logging DEBUG entries for rrd4j.
To do that log into the Karaf console and enter the command:
It seems like a mapping to the graph group item were the problem:
But it leads me to an other issue, I can not plot the average temperature of my 8 temperature sensor
Group:Number:AVG Group_Temperature_LivingRoom(Group_Chart) "Avg. Indoor Temperature [%.1f °C]" <temperature>
Since this is not allowed and it then freezes the persistence(does not add data to any rrd4j persistence) I am stuck with plotting 1 of the temperature against the set temperature for now
I do not have any experience with groups.
However for such an average I would use a rule to calculate the average and save that to a dedicated item, which in turn can be persisted.