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

[HELP] Calculate total time based on binary value #8308

Closed
almottier opened this issue Apr 20, 2017 · 5 comments
Closed

[HELP] Calculate total time based on binary value #8308

almottier opened this issue Apr 20, 2017 · 5 comments

Comments

@almottier
Copy link

Hello,

I am using influxdb to monitor my reservoir water level and record the pumps power (ON/OFF).
I receive the data from a LORA node, around every 10-15 seconds, it is not regular.
I would like to query the influx database to know how long the pumps were ON on the last 24 hours.
As I only insert a binary value (0 or 1), not on regular basis, I didn't find a way to do this.
Please check the screenshot from grafana, I want to know the total time of the green areas : http://i.imgur.com/G2POW9X.png
Do you have any idea how to do this ??
Thanks

@Scott-St
Copy link

Scott-St commented Oct 8, 2017

Did you ever figure out a way to do this? I have a very simular scenario.

@almottier
Copy link
Author

almottier commented Oct 11, 2017

Not really...
As I don't receive the data on a regular basis, I simply execute a script every minute which records in a database the binary value. Then I simply use a count on a defined period to know how long (in minutes) the pump was ON. Tell me if you find a better solution.

@sgalla1
Copy link

sgalla1 commented Sep 20, 2018

Hey @psellers89, I've been looking for a display like this in Grafana for boolean data, how did you do it?

@dgnorton dgnorton added the 1.x label Jan 7, 2019
@stale
Copy link

stale bot commented Jul 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 24, 2019
@stale
Copy link

stale bot commented Jul 31, 2019

This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions.

@stale stale bot closed this as completed Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants