Hi there,
first, thanks @ThomDietrich for thatb great tutorial !
over the last to days i tried several options to get my data to influxdb.
I akm using openHAB2b4, and alos updated tothe latest influx bundle
238 | Active | 80 | 1.9.0.201611012307 | openHAB InfluxDB Persistence bundle
My Issue: No data pulled to InfluxDB.
After a bit o testing, i found that my influxdb.persist is the issue.
It works well when i use
: strategy = everyChange, every5Min
however, this is a bad strategy, as it might goe crazy for bindings like hue ( imagine using a colorheel on 20 Bulbs, that is a lot of changes )
while trying with item* or group*, i found none of them are working.
even group does not work.
the only syntax that worked is item1,item2,item3:strattegy = [strategies]
i have not tried other persistence bindings so far, but i will test immediately with myopenhab binding to see if the issue is there as well
the easiest way to reproduce is creating a group for Systeminfo Binding and try to get every change strategy on that group … without having *
not sure if that is because it is a influx persistence is a 1.9 Bundle rater than a 2.0
Note that the “*” is not a wild card. It means “all members of this group.” So it makes no sense to use a * with an Item. The only valid way to use it is:
FullNameOfGroup*: strategy = [strategies]
I believe there are other issues with myopenhab right that that makes this a really bad choice to test the behavior.
See the following for an example of using Groups with persistence.
I finally got a chance to test this out and the latest build does indeed fix the problem. My queries work again for those of us still on the “default” RP.
I’ve added support for rendering Grafana panels to my Grafana JavaScript libary. The exact width and height of the rendered panels can be added to the Webview url. The library can also automatically compute them based on the available display area. A refresh interval can be used to automatically refresh a rendered panel.
So a rendered panel with auto width, fixed height and 5s refresh interval would look like this:
People who already used the previous library version may need to update the urlPrefix in smarthome-grafana-user-defaults.js by removing /dashboard-solo/db/ from it. After updating, you can immediately check what rendered panels would look like by adding &render=true to your browser URL. Clicking on a rendered panel will make it interactive.
The examples were also recently improved with some help of @3DJupp!
Hey Wouter,
that’s great work you did there! I didn’t have the time to test your library myself but I’ve just added the reference to your work in the first paragraph. Please let me know of any corrections or additions you would like me to include!
After having this working just great for some months, I now see a problem, which must have come with some update of something some week ago…
The issus can be seen on this picture - the green line (LV VP phase 1) takes shortcuts where it should not. So for example, today at 10:00 the line should be at 0W, but it never goes down to zero, instead jumps to the next update at 11:00 - 500W approx.
In influx, I can see that it has recorded 0W at 09:34
Why is this happening? And why not always, e.g. LVVP Phase 2 also has this here and there.
I have something in the back of my head about an issue with “0” values, but I can’t find it, and maybe this was not related to grafana/influxdb at all. i.e. a dream.
Hey!
Tricky situation indeed
There are two interesting things in your graph. This should be mentioned in the first posting.
Why doesn’t the straight line start at 390.769 or 0? That’s because you are using the mean() function. The ~200 we can see is the mean of surrounding measurements. Play around with the aggregation function used (e.g. “last()”)
You have two values over time: 0 and 372. How would you like the graph to look in between them? Currently you tell Grafana to interpolated between them with a straight line. That’s what it does. Activate staircase mode under “Display” and all should be fine.
So with your line of questions, I realised that what is different from before, is that 0 is logged only once in influxdb, whereas if I go back a month, I had more “noise”;
So I need find out why, all of a sudden, I get dead zero from mqtt/btmon/mosquitto/gem.
But even if I find that, I guess the graph is still not perfect, it just hid my real graphing problem. In a way it is actually better not to fill the database with similar values.
I simply want the ‘the last logged value’ to be true over time until theres’ an update. So I tried, and came up with
I very much appreciete your library. I’ve got a question though. I modified (=simplified) your combo1 example so you can only choose between timeframes.
However, when clicking day, week or something else, nothing happens until a page refresh. Is this expected behaviour? Is a limitation of the webview element? Of did I something wrong during my “simplification”.
@Bert_Melis Did you already try to restart openHAB? It is sometimes necessary when you add/modify new items to a sitemap before server side events properly work. I think it is this known issue: https://github.com/eclipse/smarthome/issues/2706
I mean that the graphs and all are displaying as I think it should. But when I click on the different buttons to select the period (day, 3day, week etc…) the graph is only updated after a page refresh. I would be nicer if it was “instantly”.
But I don’t know if this is expected behaviour or not.
@Bert_Melis It should automatically update the graphs when you click the buttons. Are you using Microsoft Edge as browser? I just tested this browser for the first time and it seems to have the issue you describe. It should have the correct behavior with Chrome/Firefox. I can have a look at the Edge issue.