Csv / json file location in Brewblox

Hey guys, this should be an easy one. Back in the brewpi days I knew where to locate the logging csv files if I needed to make a change to them. But now with Brewblox, I’m not sure where to find them. Anybody know where to find them?


Logs can be accessed through docker-compose logs [SERVICE]. Currently they’re kept in memory only.

If you mean where the data from sensors etc is kept, thats now in a database

Yeah, I’m talking more logs from a brew. I need to fix something in one of the sensors on the graph and wanted to try and modify the csv file to the graph looks right.

You can edit graph settings in the UI. In the graph widget, click on the third button from the right to open settings.

If you need to edit the data itself, you can do so by using the InfluxDB CLI, but that’s somewhat more complicated.
Is there anything specific you had in mind?

Yes, I would like to actually modify the data the graph is representing. Basically, half way through a brew I changed the name of one of my temp sensors which cut the graph for that sensor in half as well. I want to try and go in and stitch the two sensor names together to make one full line in my graph.

I just checked how to do this for our InfluxDB database, and it requires some post-processing, so a bash command won’t cut it.
If you’re comfortable using InfluxDB I can give you the specifics of how our data is stored. Otherwise I’ll write a quick script tomorrow.

Wow, I guess that is the cost of progress and evolution. BrewPi has come a long way since it’s simpler days. A script to help work issues in the database would be great but I’ll have to do some research into InfluxDB as well.

Commands must be run in your brewblox directory

To download the script:

curl -O https://raw.githubusercontent.com/brewblox/brewblox-ctl-lib/develop/influx_rename.py

The syntax for running the script (with placeholders):

python3 ./influx_rename.py [MEASUREMENT] [PATTERN] [REPLACE]

MEASUREMENT is your service name. Typically that’s ‘spark-one’.

PATTERN is a regex string for the fields you want to rename.
If you want to rename everything generated by a block, then it’s just the block name.

REPLACE is the new name for PATTERN.

If you renamed the block ‘Sensor old’ to ‘Sensor new’, run

python3 ./influx_rename.py 'spark-one' 'Sensor old' 'Sensor new'

The script is safe to run multiple times: it will never remove data.
Due to how InfluxDB works, you can’t remove the old data.