Version compatibility issues on restart

When I restart my BrewPi/Raspberry Pi, I see the following on the BrewPi error log:

Sep 26 2016 04:29:02 Opening serial port
Sep 26 2016 04:29:02 Notification: Script started for beer 'Ramp Test Start 09/24’
Sep 26 2016 04:29:12 Checking software version on controller…
JSON decode error: Expecting ‘:’ delimiter: line 1 column 46 (char 45)
Could not parse version number: {“v”:“0.4.3”,“n”:“0.4.3-0-g4d00879”,“s”:4,"y"
JSON decode error: Unterminated string starting at: line 1 column 18 (char 17)
Could not parse version number: {“v”:“0.4.3”,“n”:"0.4
JSON decode error: Expecting ‘,’ delimiter or ‘}’: line 1 column 64 (char 63)
Could not parse version number: {“v”:“0.4.3”,“n”:“0.4.3-0-g4d00879”,“s”:4,“y”:0,“b”:“y”,“l”:"3"
JSON decode error: Unterminated string starting at: line 1 column 18 (char 17)
Could not parse version number: {“v”:“0.4.3”,“n”:"0.4.3-0-g4d0087
JSON decode error: Unterminated string starting at: line 1 column 18 (char 17)
Could not parse version number: {“v”:“0.4.3”,“n”:"0.4.3-0
Sep 26 2016 05:17:06 Found BrewPi v0.0.0 on port /dev/ttyACM0

Sep 26 2016 05:17:06 Warning: minimum BrewPi version compatible with this script is 0.4.0 but version number received is 0.0.0
Sep 26 2016 05:17:06 Warning: version number of local copy of logMessages.h does not match log version number received from controller.controller version = 0, local copy version = 3

The system seems to be functioning without any issues except it randomly quits logging data. Once this happens the BrewPi has to be rebooted. This has happened as quickly as 4 hours and one time went slightly over a week before it quit logging data.

Did I miss a step in the software load-up?

Ric

It looks like unreliable USB communication. Check your power supply and your USB cable to see if swapping it helps.

OK thanks. I’ve got the RPi voltage set at 5.3 VDC. I’m on my second USB cable but it has still stopped communicating once since I installed it.

Is your software up-to-date?
Did you try running our update script?
sudo ~/brewpi-tools/updater.py

I will do it! Thanks . Thought it was up to date, but perhaps not. I will follow up after the update. Brewing a Dunkelweizen on Saturday.

Can the software be updated while the script is running?

No, you should stop the script, then run the updater.

OK Finally got around to doing this. First, I changed out the Raspberry Pi 3 to one that says “Made in the UK”!

Got everything back up and running. Ran the brewpi updater with the Script not running, and received this:

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

Welcome to the BrewPi Updater!

######################################################
Checking whether the update script is up to date
/home/pi/brewpi-tools is up-to-date.

*** Updating BrewPi script repository ***

Stopping running instances of BrewPi
You are on branch master
The latest commit in /home/brewpi is 67efcb0e40f0be4b40ad1e7cd207eedcf0dd032c o n Wed, 27 Apr 2016 18:25:10
The latest commit on origin/master is 67efcb0e40f0be4b40ad1e7cd207eedcf0dd032c o n Wed, 27 Apr 2016 18:25:10
Your local version of /home/brewpi is up to date!

*** Updating BrewPi web interface repository ***
The path ‘/var/www’ does not seem to be a valid git repository
What path did you install the BrewPi web interface scripts to? /var/www/html
You are on branch master
The latest commit in /var/www/html is 1e0778703edbbd3ef33072ba0b260c491fba90cc o n Mon, 11 Jan 2016 13:04:54
The latest commit on origin/master is 1e0778703edbbd3ef33072ba0b260c491fba90cc o n Mon, 11 Jan 2016 13:04:54
Your local version of /var/www/html is up to date!

No changes were made, skipping runAfterUpdate.sh.
If you encounter problems, you can start it manually with:
sudo /home/brewpi/utils/runAfterUpdate.sh

The update script can automatically check your controller firmware version and program it with the latest release on GitHub, would you like to do this now? [Y/n ]:y
Stopping any running instances of BrewPi to check/update controller…

Checking current firmware version…
Oct 28 2016 11:31:02 Opening serial port
JSON decode error: Unterminated string starting at: line 1 column 18 (char 17)
Could not parse version number: {“v”:“0.4.3”,“n”:"0.4.3-0-g4d
JSON decode error: Expecting ‘,’ delimiter or ‘}’: line 1 column 42 (char 41)
Could not parse version number: {“v”:“0.4.3”,“n”:“0.4.3-0-g4d00879”,“s”:4
JSON decode error: Unterminated string starting at: line 1 column 37 (char 36)
Could not parse version number: {“v”:“0.4.3”,“n”:“0.4.3-0-g4d00879”,"s
JSON decode error: Unterminated string starting at: line 1 column 49 (char 48)
Could not parse version number: {“v”:“0.4.3”,“n”:“0.4.3-0-g4d00879”,“s”:4,“y”:0, "b
JSON decode error: Expecting value: line 1 column 53 (char 52)
Could not parse version number: {“v”:“0.4.3”,“n”:“0.4.3-0-g4d00879”,“s”:4,“y”:0, “b”:
JSON decode error: Unterminated string starting at: line 1 column 18 (char 17)
Could not parse version number: {“v”:“0.4.3”,“n”:"0.4.3-0-g4
JSON decode error: Unterminated string starting at: line 1 column 18 (char 17)
Could not parse version number: {“v”:“0.4.3”,“n”:"0.4.3-0
JSON decode error: Unterminated string starting at: line 1 column 18 (char 17)
Could not parse version number: {“v”:“0.4.3”,“n”:"0.4.3-0-g4d00879
JSON decode error: Unterminated string starting at: line 1 column 18 (char 17)
Could not parse version number: {“v”:“0.4.3”,“n”:"0.4.3-0-g4d0
JSON decode error: Expecting ‘,’ delimiter or ‘}’: line 1 column 13 (char 12)
Could not parse version number: {“v”:"0.4.3"
Found BrewPi v0.0.0 on port /dev/ttyACM0

Current firmware version on controller: 0.0.0

Checking GitHub for available release…
No compatible releases found for None None

WTF??? Obviously I am doing something wrong???

The lines received over USB serial are truncated. I don’t know why.

Can you try updating the raspberry pi and the raspberry pi firmware?
sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install rpi-update sudo rpi-update

Maybe also try yet another USB cable?

This is a new RPi 3B. Completed all of the updating without any errors. Changed out the USB cable. This is the third one I’ve tried.

The BrewPi updater (sudo ~/brewpi-tools/updater.py) still yielded “Warning: minimum BrewPi version compatible with this script is 0.4.0 but version number received is 0.0.0”

I only see one discrepancy: “The path ‘/var/www’ does not seem to be a valid git repository
What path did you install the BrewPi web interface scripts to? /var/www/html”

Is the response ’ /var//www/html ’ the correct git repository?? See the previous post.

Thanks for your help.

Ric

Yes, that is not related to this issue.
The updater gives you that error because the version string is not received correctly.

The code reading the version string is here:

The mechanism might be flawed? It reads a \n terminated line, with a 1 second serial timeout.
Could you try adding

print line

after

line = asciiToUnicode(line)

and see what it prints?