Issue of the topic: please be detailed explaining your issue
I want to track the RPM of a fan. I have the device setup and sending the RPM every Minute via MQTT.
The item shows the correct RPM in Basic UI but the reported data points are not persisting.
Items configuration related to the issue
Number ESP_C2C4A3 "Pulse Counter 1" (OEE) {mqtt="<[broker:ESP_C2C4A3/PC01/Count:state:default]" }
rrd4j.cfg Services configuration related to the issue
Thanks for the input.
Confirmed the file is named rrd4j.persist
I tried changing the first U to 0 as recommended but that didn’t seem to help.
I un-installed and reinstalled the rrd4j service.
I removed the item from the OEE group. I removed the ESP from the the persist items.
Nothing seems to work. I’m going to try using influxdb but I’m not the best at working with databases so wish me luck.
So I’m trying to use Influx and I’ve followed the instructions but I’m getting an error.
Any idea what I might be doing wrong?
2018-05-30 13:17:56.151 [ERROR] [.internal.InfluxDBPersistenceService] - database connection failed
at retrofit.RetrofitError.networkError(RetrofitError.java:27) ~[223:org.openhab.persistence.influxdb:1.12.0]
at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:395) [223:org.openhab.persistence.influxdb:1.12.0]
at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:240) [223:org.openhab.persistence.influxdb:1.12.0]
at org.influxdb.impl.$Proxy142.ping(Unknown Source) [223:org.openhab.persistence.influxdb:1.12.0]
at org.influxdb.impl.InfluxDBImpl.ping(InfluxDBImpl.java:114) [223:org.openhab.persistence.influxdb:1.12.0]
at org.openhab.persistence.influxdb.internal.InfluxDBPersistenceService.checkConnection(InfluxDBPersistenceService.java:172) [223:org.openhab.persistence.influxdb:1.12.0]
at org.openhab.persistence.influxdb.internal.InfluxDBPersistenceService.activate(InfluxDBPersistenceService.java:145) [223:org.openhab.persistence.influxdb:1.12.0]
2018-05-30 13:17:56.247 [ERROR] [.internal.InfluxDBPersistenceService] - database connection error Unrecognized SSL message, plaintext connection?
2018-05-30 13:17:56.251 [ERROR] [.internal.InfluxDBPersistenceService] - database connection does not work for now, will retry to use the database.
2018-05-30 13:18:07.806 [ERROR] [org.influxdb.impl.BatchProcessor ] - Batch could not be sent. Data will be lost
Sorry I don’t know why I didn’t think to do that.
Here is the cfg below that is the influxdb.persist
# The database URL, e.g. http://127.0.0.1:8086 or https://127.0.0.1:8084 .
# Defaults to: http://127.0.0.1:8086
# url=http(s)://<host>:<port>
url=https://127.0.0.1:8086
# The name of the database user, e.g. openhab.
# Defaults to: openhab
user=openhab
# The password of the database user.
password=************
# The name of the database, e.g. openhab.
# Defaults to: openhab
db=myopenhabdb
Strategies {
everyMinute:"0 * * * * ?"
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
// if no strategy is specified for an item entry below, the default list will be used ,TemperatureOutside, ESP_B72224
default = everyChange
}
Items {
ESP_C2C4A3 : strategy = everyUpdate, restoreOnStartup
}
Here is the database name and user as seen from influxdb cli.
I had tried http but it didn’t seem to work but I think that might have been due to me changing the IP to match the IP of the Pi and not the loopback.
However it’s odd I see it’s showing 271 data points but I didn’t think it was working 271 minutes ago and I think it should only be recording once a minute.
Once a minute or every 60 seconds.
But since I changed it to HTTP it’s not giving me any errors so I believe that fixed it thanks so much for all your help.
One last question.
Have you used Grafana? If so do you have any advice on how to set that up? Should I install that on the same server as Openhab or just do a seperate install on the client PC?
Hi Jurgen
I’m not sure I should have used 3600 but I only wanted a reading to be plotted every hour.
It’s my understanding everyMinute must be used or no data will be stored using rrd4j.
Use the 60 for step and set the stepS in the archive to 60, for keeping 60 minute values.
Have fun with influxdb and Grafana. I had a look into those but kept rrd4j because it doesn’t take that much of resources.