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

Save sensor readings to timeseries database #194

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

isarvalley
Copy link

If you run CraftBeerPI for a long period, displaying charts becomes very slow. This is why I added support of a timeseries database. The advantage of a timeseries database is, that you can define in a query

  • the timespan to display or
  • aggregate your sensor readings. Both helps to decrase the amount of data which will be displayed in the chart.
  • Furthermore you can tag every sensor reading with the name of your "brew" and a datastamp. That allows to seperate different brewing processes later on.

Additionally, but not yet implemented, is it possible to aggregate older sensor readings in the timeseries database (e.g. all sensor readings older than one day will be aggregated to one reading/minute) to decrease the actual disksize.

At the moment you have to install the timeseries database (I chose lightweight KairosDB) via the CraftBeerPi installer. After that you can switch in the system/parameters menu between storing your sensor readings in logfiles or in the timeseries database.

I would like to know what you think about this solution/improvement.

As a next stept I like to add the possibility to compare the charts of different brews. But as the frontend code is not checked in, I don't know where to start. For now I tried to use Grafana, but it doesn't give me the flexibility I hoped for. So all suggestions are appreciated ;-)

Bobsdorf and others added 27 commits May 1, 2018 18:29
…(kairos_db_sampling_value, kairos_db_start_relative)
By reading the HOP and MISC elements, the 'please add your hop' alerts may be imported.
removed lines 37 and 38 to make hysteresis work properly.
Keep up to date with original fork from Manuel
…IME></STEP_TIME>" which led to a float converting error. Now this will be interpreted as Step_Time = 0.0
… "active_brew" will only be generated if the value before was "none". The value is "none" either after initializing the app or after the process got stopped. That leaves one potentiall error: if a process is started and the app needs a restart. In this case a new value for "active_brew" would be unecessarily generated.
Flask:
CVE-2018-1000656 More information
moderate severity
Vulnerable versions: < 0.12.3
Patched version: 0.12.3
The Pallets Project flask version Before 0.12.3 contains a CWE-20:
Improper Input Validation vulnerability in flask that can result in
Large amount of memory usage possibly leading to denial of service.
This attack appear to be exploitable via Attacker provides JSON data in
incorrect encoding. This vulnerability appears to have been fixed in
0.12.3.

Requests:
CVE-2018-18074 More information
moderate severity
Vulnerable versions: <= 2.19.1
Patched version: 2.20.0
The Requests package through 2.19.1 before 2018-09-14 for Python sends
an HTTP Authorization header to an http URI upon receiving a
same-hostname https-to-http redirect, which makes it easier for remote
attackers to discover credentials by sniffing the network.
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

Successfully merging this pull request may close these issues.

None yet

7 participants