Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InfluxDB - change or add numeric field for "direction" #184

Closed
michalterbert opened this issue Sep 23, 2017 · 11 comments
Closed

InfluxDB - change or add numeric field for "direction" #184

michalterbert opened this issue Sep 23, 2017 · 11 comments

Comments

@michalterbert
Copy link

Hi,
First - thanks for Xdrip+ and InfluxDB support.
I'm using InfluxDB as a Cloud Upload - everything looks good, but maybe we can add new filed to transform string value "direction" to something numeric?

Now in DB we have:

time                delta   direction     filtered noise rssi unfiltered value_mgdl value_mmol
----                -----   ---------     -------- ----- ---- ---------- ---------- ----------
1506024103759000000 -4.414  Flat          164588   1     100  164588     136        7.5739263617482
1506024401373000000 -7.827  FortyFiveDown 156823   1     100  156823     128        7.14297321437499

Field "Direction" is now string, but Grafana can not visuale this filed (only on single stat as a text, without alerts, without mapping/colors), On Grafana's github is now open issue to add avability for mapping and colorize strings in singlestat plugin, but if you could add new filed with numerc value I would like to use them in grafana to visualize arrows, for ex Flat as a 0, next I can map 0 in Grafana to → :)

My mapping suggestion:

 3  = DoubleUp
 2  = SingleUp
 1  = FortyFiveUp
 0  = Flat
-1 = FortyFiveDown
-2 = SingleDown
-3 = DoubleDown

Guys, What do you think?

@jamorham
Copy link
Collaborator

Direction is just calculated from the delta so I would have thought something could be done with that already. Tagging @pimeys who produced the influx integration.

@pimeys
Copy link
Contributor

pimeys commented Sep 25, 2017

@michalterbert How I visualize the direction, I just get the derivative from value_mmol:

SELECT derivative(mean("value_mmol"), 5m) FROM "glucose" WHERE $timeFilter GROUP BY time($interval) fill(null)

And then display it in its own graph:

delta

Now it's nice to hear somebody else is using the InfluxDB integration. I still don't really know how to adjust the graphs for calibration, and do I even have all the data available to do that. Also I'm very interested about dashboards other people have been doing with Grafana.

Any suggestions how to make this better, I'm open for them. I kind of don't like the big jumps you get when the calibration's quite off from the shown value.

@michalterbert
Copy link
Author

michalterbert commented Oct 6, 2017

I'm working on it (dashboards) - also are avaliable on my fork of this git repo :)

image

@pimeys are you sure that direction can be visualize by derivatice form value_mmol?
my example:
image

But Direction from influx db is FortyFiveUp :/ For my the best form of visualize this will be SingleStat and transform from integer to string/char (↑ → ↓ ↘) so if you add to code this small part - will be great 👍

I'm also using grafana notification (alerts) and Slack integration - I have realtime alerts on my phone whe my son has low or high level of glucose :)

What is a problem with adjust the graphs for calibration, could you put more lights on this?

BTW. I'm still waiting for Grafana improvement:
grafana/grafana#7631

@michalterbert
Copy link
Author

Ok, I have update :)
more or less:
image
Correct me if I am wrong.
Query - Last Delta (float)
And effect:
image
Thanks!

@pimeys
Copy link
Contributor

pimeys commented Oct 6, 2017

I like that. I made an arrow too, but what kind of color settings you use?

trend

@pimeys
Copy link
Contributor

pimeys commented Oct 6, 2017

This Grafana plugin I found also very useful to see the big picture:

https://grafana.com/plugins/petrslavotinek-carpetplot-panel

Set it to override the relative time from the settings to something like 1 month to see a pattern where you're hyper and where hypo.

I use the average per hour over a month, with the query:

SELECT mean("value_mmol") FROM "glucose" WHERE $timeFilter GROUP BY time($__interval) fill(null)

And spectral color scheme, so hardcore hyperglycemias are red, down from yellow -> green -> blue.

@ghost
Copy link

ghost commented Nov 27, 2018

Hi,
I also would love to set up my own local server with influxdb as you guys did –
My problem is, that I dont have the skills nor the know how to do it the propper way. The rare Info I found on the net is not foolproof enought for me :(
I dont know what kind of hardware I need (rasperyp?), nor what exactly I have to install on it to run with my working xdrip/libre/Smartphone settings.
It would be wonderfull if someone could give me and other people a starting point or a kind of description of your personal setup.
Thanks, Wolfgang

@michalterbert
Copy link
Author

Hi,
I also would love to set up my own local server with influxdb as you guys did –
My problem is, that I dont have the skills nor the know how to do it the propper way. The rare Info I found on the net is not foolproof enought for me :(
I dont know what kind of hardware I need (rasperyp?), nor what exactly I have to install on it to run with my working xdrip/libre/Smartphone settings.
It would be wonderfull if someone could give me and other people a starting point or a kind of description of your personal setup.
Thanks, Wolfgang

Hi,
Please send me an email - [email protected], I have nice platform InfluxDB + Grafana for xDrip purpose - please check jakicukier.pl :)

@razerrazer
Copy link
Contributor

I'm working on it (dashboards) - also are avaliable on my fork of this git repo :)

What i can see so is there any of this code on your github repository ?
I would like to have your dashboard on my grafana server.

@Navid200
Copy link
Collaborator

What is the status of this issue?
Can we close it?

@michalterbert
Copy link
Author

My dashboard (json file).
dashboard.txt

Please close issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants