Granafa & Influxdb Dashboard/Panels Help/Suggestion needed

(Ioannis Zarlas) #1

Hello openhab community,
I am currently working with Granafa and Influxdb. I have created some panels, to use them and display some graphs in my sitemap/gui.
At this point I have my motion sensors activity, my temperature sensor and my luminance reports working fine.
What I am trying to accomplish as a final panel/graph is to receive the usage of my bulb. I am interested in “reading” my bulbs activity like when they operate or not and if it’s possible in what color they were operating, in which temperature level and finally the brightness level.
Here is what I have done so far:

  • This is the influxdb.persist file

  • These are my working graphs

I know that in my persist file I only have defined the “Bulbs color”, once I am done with this reporting whenever they are open and closed I will move on with temperature, brightness, color.
The problem I am currently running in is that I am using the created items (in two separate panels) Johns_Bedroom_Led_Bulb and Akis_Bedroom_Led_Bulb and I am getting nothing back!

  • Grafana panel Metrics for Johns_Bedroom_Led_Bulb

I am using the same configuration in the Grafana panel for the light bulbs as I did with the rest of the graphs created.
Any help or advice highly appreciated.
Thanks for your time reading my post.
Respectfully John.

(Vincent Regaud) #2

You are persisting the value of color item which is an HSB value.
You need to convert it to H and S and B in three number items and persist those
Influx DB doesn’t know how to display HSB values

(Ioannis Zarlas) #3

Any quick tip/way to do that?

(Vincent Regaud) #4


rule "split HSB"
    colorItem changed
    hueItem.sendCommand(colorItem.Hue() as Number)

(Ioannis Zarlas) #5

I am going to try it right now and report back. Thanks

(Ioannis Zarlas) #6

I am not actually sure how to do this, I will have to research on it.
I have one more question @vzorglub if you could help me…
I have used this tutorial
to setup Grafana and Influxdb in my Raspberry Pi 3 b. Everything works fine so far except from visualizing the data in the sitemap.
The picture/url does not display and appears broken. Any advice?

(Vincent Regaud) #7

In grafana, share the graph, you should see:

Then use the part. Remove the `&from=… to the end" in your sitemap webview

(Ioannis Zarlas) #8

Tryed it, not working… What am I doing wrong?

(Vincent Regaud) #9

Not Image use Webview

(Ioannis Zarlas) #10

Hey @vzorglub sorry for the slow reply, was busy. I got it working! Thanks for the help and guidance. I will now how to solve the Light Bulbs issue. I will check the docs you gave me and I will do personal research aswell!

(Udo Hartmann) #11

Please take look at InfluxDB+Grafana persistence and graphing (Showing diagrams in your openHAB sitemap …as ‘Image’ Element). You have to enter from and to this way:

Image refresh=60000 url=http://monitoring-host:3000/render/dashboard-solo/db/mydashboard?panelId=5&width=700&height=350&from=now-48h&to=now

As an alternative, you can use Webview