Bricked my BrewPi :-(

Hi - I have (amazingly) had my Brewpi running for a few months and am impressed with the instructions and ease of setting up. I am not familiar with Linux or any sort of programming which makes this all the more amazing.

I am in the middle of a brew and there were a few glitches in the log graph. I read online how you can edit the /var/www/html/dataBrewname.csv file to remove the glitches which I did. I used the command python BrewPi.py --kill to stop the process and edited the file.

Now I cannot get it running again, despite doing a power cycle, re-boot etc. I am communicating with the RPi using Remote Desktop and the Pi itself is working but I get the ‘Cannot receive LCD text from Python script’ and the script will not run.

I read the basic troubleshooting instructions here and tried running the updater using:
$ sudo python updater.py --ask
but I get errors as shown below.

What are my next steps to get my baby running again?

Thanks,

Paul


pi@pi:~/brewpi-tools $ sudo python updater.py --ask

Using interactive (advanced) update with user input

######################################################

Welcome to the BrewPi Updater!

######################################################

Checking whether the update script is up to date
fatal: unable to access ‘https://github.com/BrewPi/brewpi-tools.git/’: Could not resolve host: github.com
/home/pi/brewpi-tools is up-to-date.

*** Updating BrewPi script repository ***

Stopping running instances of BrewPi
You are on branch legacy
Traceback (most recent call last):
File “updater.py”, line 380, in
changed = check_repo(scriptRepo) or changed
File “updater.py”, line 214, in check_repo
repo.git.fetch(remote.name, “–prune”)
File “/usr/local/lib/python2.7/dist-packages/git/cmd.py”, line 424, in
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/git/cmd.py”, line 873, in _call_process
return self.execute(call, **_kwargs)
File “/usr/local/lib/python2.7/dist-packages/git/cmd.py”, line 687, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd(‘git’) failed due to: exit code(128)
cmdline: git fetch origin --prune
stderr: ‘fatal: unable to access ‘https://github.com/BrewPi/brewpi-script/’: Could not resolve host: github.com

UPDATE: OK Perseverance pays off. I decided to delete the BrewName.csv file that I had edited I moved it to another directory). The application then created a clean one and the script started. This is obviously more complex than I thought. The file I am editing is in the /var/www/html/data directory Presumably the master data is being held in another file somewhere since the file that the application recreated has all my temp data for the batch I am brewing.

In addition, I now have 75 or so copies of the Brewname.json file in the /var/www/html/data/BrewName folder. All sequentially numbered with the today’s date-1,-2 . . . . -75 I presume that a new json file was created every time the script was started with the corrupted csv file.

Is it safe to delete all but the latest file?
What is the relationship between the json file and the CSV.
Are there any guidelines to editing the data file that ‘drives’ the graph?

Thanks.

Paul

If you edit the data files in the www directory, this should not affect the script.
You should also edit the JSON files, not the CSV file. The JSON files are used for the chart.
A new file is created each day or each time you start/stop the script.

You can delete any of the JSON files that you do not need any more. I would probably just delete the CSV file.