Hello @ThomDietrich
I’m sorry to get you back this old but am really clueless with grafana, I tried to install it through openhabian-config and with your method but am always stuck while:
I don’t know what to do, I’m still new to OpenHAB and couldn’t find solution.
Added to that, I installed the persistence in PaperUI but it’s always showing blank black screen.
@ThomDietrich Thanks for great tutorial. Not only did it helpme setup Influx and Grafana, but your Sinewave example taught me how to fill influxDB fromPython as well.
@rlkoshak thanks for some of your examples that taught me there is much more possible than I intitially thought,such as two different scales on the left and right Y axis
You can trust the Quartz Cron generator. That is the library used in OH and it different from “standard” Cron in that it goes down to the seconds. Most other crons only go down to the minute.
Sorry but I followed this fantastic thread to a tee, and as far as I can tell Influxdb is installed, as is Grafana, all the .cfg files are configured.
But none of my logs show anything useful at all… Even adding extra logging info to org.ops4j.pax.logging.cfg does nothing (the log file doesn’t even get created!). It’s as if openhab can’t see influx or can’t use it.
Not sure where to go from here. I’ve double checked everything I can think of from this thread and others. I don’t see anything out of place.
Any assistance would be appreciated!
influxdb.cfg:
# 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://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={REDACTED}
# The name of the database, e.g. openhab.
# Defaults to: openhab
db=openhab_db
# The retention policy to be used, needs to configured in InfluxDB
# Till v0.13: 'default', since v1.0: 'autogen'
retentionPolicy=autogen
running SHOW MEASUREMENTS or SERIES doesn’t return anything in the influx cmd line either, so it seems like nothing is actually being written to the DB
Do you actually have Items and Groups with the names you list in influxdb.persist? I think those were meant as examples. You need to customize for your specific items.
Hi,
I have been researching how to setup InfluxDB and Grafana on my Openhab2 Raspberry Pi3b Stretch setup
and I came across this good read:
It wasn’t clear to me from this thread that I could install both InfluxDB and Grafana simply using the Openhab config menu
sudo openhabian-config
and select optional components.
Is there a reason this is not mentioned at the top of thread? Or to put it another way, what is best method to get InfluxDB and Grafana up and running on my Rpi3b Stretch?
I checked the link in this thread to RPi setup and it talks about Jessie. I assume for Stretch I just replace the words ‘Jessie’ with ‘Stretch’ for the correct install. Correct?
openHABian is not the only way to install and manage an openHAB installation.
When this article was written, I don’t think openHABian supported installing InfluxDB and Grafana. I may be mistaken, but I’m not even sure there was an openHABian at that time.
The instructions are also generic enough such that should users want to host InfluxDB and Grafana on a VM or server separate from openHAB they can do it.
If you are using openHABian, use openhabian-config. If not, use the instructions above to install.
I’m pretty sure there is nothing else different between the two so that should work.
A small help is needed please, a message in frontail logs keeps popping up from time to time:
2018-08-10 12:16:41.838 [ERROR] [org.influxdb.impl.BatchProcessor ] - Batch could not be sent. Data will be lost
java.lang.RuntimeException: {“error”:“timeout”}
at org.influxdb.impl.InfluxDBErrorHandler.handleError(InfluxDBErrorHandler.java:19) [205:org.openhab.persistence.influxdb:1.12.0]
at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:242) [205:org.openhab.persistence.influxdb:1.12.0]
at org.influxdb.impl.$Proxy127.writePoints(Unknown Source) [205:org.openhab.persistence.influxdb:1.12.0]
at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:151) [205:org.openhab.persistence.influxdb:1.12.0]
at org.influxdb.impl.BatchProcessor.write(BatchProcessor.java:171) [205:org.openhab.persistence.influxdb:1.12.0]
at org.influxdb.impl.BatchProcessor$1.run(BatchProcessor.java:144) [205:org.openhab.persistence.influxdb:1.12.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
I’ve read the in this topic how to solve it and i added the "retentionPolicy=autogen"in the influxdb.cfg file the restarted the RPi but the problem still remain noting that all the functionality of Influx and Grafana are working properly.
Which seems to be the best way of updating Grafana to the latest release (v5.2.2)?
I am using iframes to embed graphs and the Grafana version (v5.1.4) that is installed with Openhabian has a bug with iframes and a vertical scroll bar.
This is fixed in latest release.
Any suggestions are welcome.
P.S. I tried:
sudo apt-get update
sudo apt-get install grafana
and it reports that the latest version is already installed…
is there a possibility to build graphs out of openHAB for forecast data. I want to build a forecast graph for a power calculatioin for the next 5 days. In openHAB I have more than one Item. My problem is that I only can persist one Item which persist the past. But I want to show the forecast. And how can I put more than one Item in a line for graphing the forecast data?
Thanks for this great tutorial. Its really amazing what you can do with grafana and openhab
May I suggest to add the possibility of using grafana’s kiosk mode to add your graphs as webview / frame to a dashboard to the tutorial?
I think its by far the easiest way to display your graph in HABpanel.
just add &kiosk=1 to the url of your dashboard. this will hide all of grafana’s menu items.