BrewPi Remix – What’s Old is New Again

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk:

OP
LBussy
Joined
Jan 19, 2013
Messages
3,565
Reaction score
1,484
Location
Kansas City
Because this is an IP connection, the iSpindel will POST the data to brewpi-api.php. That page will send the data through BEERSOCKET to the script and hopefully, all will be fine. I use the same method for Brew Bubbles so despite not using an iSpindel, I work that path out pretty well. If you have issues you can turn on debug and tail the log to see if the data is coming in.

Most often, issues are related to permissions, or not restarting the script. Applying the standard first aid step is always warranted:

Bash:
sudo /home/brewpi/scripts/doPerms.sh
The chain of logging would be:
  1. Apache error log at /var/log/apache2/error.log
  2. BrewPi API log (if debug is true) at /var/www/html/apilog.txt
  3. BrewPi logs at:
    1. /home/brewpi/logs/stdout.txt
    2. /home/brewpi/logs/stderr.txt
Be sure to check back in and let us know it works!
 

IanJ

Well-Known Member
Joined
Feb 8, 2011
Messages
261
Reaction score
34
Location
Brooklyn
Pardon my ignorance, but I haven't been able to find an answer in the documentation (I may have missed it) but is it possible to perform an upgrade from BrewPi Legacy branch to Remix without a brand new install?

Or as an alternative, a way to export and import settings/device/probe configuration?
 
OP
LBussy
Joined
Jan 19, 2013
Messages
3,565
Reaction score
1,484
Location
Kansas City
Pardon my ignorance, but I haven't been able to find an answer in the documentation (I may have missed it) but is it possible to perform an upgrade from BrewPi Legacy branch to Remix without a brand new install?
There is not an effective way, no. There are many reasons but the biggest reason is the supporting libraries and software (part of RPi) have to be upgraded to such an extent that I cannot recommend trying to cobble it together.

Or as an alternative, a way to export and import settings/device/probe configuration?
Settings and configuration are in different places:
  • Controller
    • Setpoint
    • Mode
    • Units
    • Probe definition
    • Pin definition
    • PID data
  • Raspberry Pi
    • Paths (in /home/brewpi/config.cfg)
    • Logging config (in /home/brewpi/config.cfg)
    • Brew Logs (in /home/brewpi/data/*/*)
    • Temp Profiles (in /var/www/html/data/profiles/*.csv)
Anything in the controller stays with the controller, and so long as you have the same probes that will all stay intact. I do have newer versions of the firmware, but depending on what version you have now (at least 0.2.4) you should be fine.

Anything on the Pi can be copied to another PC depending on how you'd like to do it and your skill level. I'd suggest that you probably don't need any of that with the possible exception of the Temp Profiles. I can guarantee that the biggest issue people have trying to make the leap is trying to keep old data. Maybe back it up so you have it if you feel the need, but get it running first before you try getting fancy.

Once you are backed up, shut down your Pi, and re-flash the latest Raspbian OS - or even just get a new SD card for that and you can always go back. The new Raspberry Pi OS downloader makes it REALLY easy, and then if you don't have a monitor/mouse/keyboard hooked up, before you flash your OS hit Ctrl-Shift-K to bring up advanced options like enabling SSH, changing the host name, and so on.
 

IanJ

Well-Known Member
Joined
Feb 8, 2011
Messages
261
Reaction score
34
Location
Brooklyn
Thanks for such a detailed response! Pretty comfortable with the technical side for the most part, so it's really more or less just determining the fastest path to get going without wasting time. Starting with a fresh install seems to be the way.
 
OP
LBussy
Joined
Jan 19, 2013
Messages
3,565
Reaction score
1,484
Location
Kansas City
Yeah I mean I considered making a migration script, but if you have something like Filezilla it's easier just to drag and drop.

If you do copy the config.cfg, be aware that there are new config options. A merge might be a better idea.
 

IanJ

Well-Known Member
Joined
Feb 8, 2011
Messages
261
Reaction score
34
Location
Brooklyn
Maybe, but at the same time it's such an easy process to go from flashing a new card to being up and running, minus tweaking settings I suppose. But between the improvements in Raspbian over time and the work you and others have put into these packages, it's almost too user friendly :p Anyhow, thanks again!
 

JustcallmeMrT

Member
Joined
Feb 16, 2012
Messages
20
Reaction score
0
@LBussy Pardon the total noob questions, but I'm having trouble installing Brewpi Remix. After the install begins, I get two errors during the apt update and the setup stops.

E: Repository 'Index of /debian buster InRelease' changed its 'Suite' value from 'testing' to 'oldstable'
E: Repository 'Index of /raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'

I am a new user of raspberry pi devices and don't have much of an understanding of linux, so any help you could provide would be great. Thanks.
 
OP
LBussy
Joined
Jan 19, 2013
Messages
3,565
Reaction score
1,484
Location
Kansas City
I’m guessing if you issue the following commands you will see the same?

Code:
sudo apt update
sudo apt upgrade -y
If so, the issue is because “bullseye” is replacing “buster” as the current version. You can try the following:

Code:
sudo apt-get update --allow-releaseinfo-change
This is not always successful, and it may be that flashing a new SD image is needed. The newest version is October 30th, 2021.
 

IanJ

Well-Known Member
Joined
Feb 8, 2011
Messages
261
Reaction score
34
Location
Brooklyn
Howdy, so I've run into a strange problem when trying to update the Arduino firmware following a new install. Tried to trace what might be triggering it, but it's beyond my expertise.

Maybe this makes more sense to others. Following a clean install (it also happened immediately before the post-install splash page/ascii graphic popped up) anyway, after running updateFirmware.py it's unable to complete and assume that as a result the controller is not connected and the BrewPi script won't start.

Here's a dump of the console output:
Code:
Downloading from:
https://github.com/brewpi-remix/brewpi-firmware-rmx/releases/download/0.2.13/brewpi-arduino-uno-revc-0.2.13%2Bda7e14a9.hex

Latest firmware downloaded to:
/home/brewpi/downloads/0.2.13/brewpi-arduino-uno-revc-0.2.13%2Bda7e14a9.hex

Updating firmware.

Arduino program script started.
Traceback (most recent call last):
  File "./updateFirmware.py", line 431, in <module>
    result = main()
  File "./updateFirmware.py", line 426, in main
    result = updateFromGitHub(beta, doShield, userInput)
  File "./updateFirmware.py", line 389, in updateFromGitHub
    result = programmer.programController(config, board, localFileName, {'settings': restoreSettings, 'devices': restoreDevices})
  File "/home/brewpi/programController.py", line 199, in programController
    return programmer.program(hexFile, restoreWhat)
  File "/home/brewpi/programController.py", line 236, in program
    self.parse_restore_settings(restoreWhat)
  File "/home/brewpi/programController.py", line 296, in parse_restore_settings
    if version.parse(self.versionNew) >= version.parse(self.versionOld): # Only restore settings on same or newer
  File "/usr/local/lib/python3.7/dist-packages/packaging/version.py", line 49, in parse
    return Version(version)
  File "/usr/local/lib/python3.7/dist-packages/packaging/version.py", line 264, in __init__
    match = self._regex.search(version)
TypeError: expected string or bytes-like object
Any clue as to what might be preventing the firmware from flashing and/or the brewpi script not launching? Many thanks!
 
Last edited:
OP
LBussy
Joined
Jan 19, 2013
Messages
3,565
Reaction score
1,484
Location
Kansas City
Howdy, so I've run into a strange problem when trying to update the Arduino firmware following a new install. Tried to trace what might be triggering it, but it's beyond my expertise.
If I had to guess, it would be some new fun from Python 3.7. Let me have a look here in a little bit.

ETA: For now, you can flash without saving settings/devices. That may be undesirable, if so, give me a bit.

Issue #190 opened for doFlash.sh Crash on Restore Devices.
 
Last edited:

IanJ

Well-Known Member
Joined
Feb 8, 2011
Messages
261
Reaction score
34
Location
Brooklyn
Thanks for looking into it! So I decided to experiment, downgraded Python to 3.6 which didn't work. Then uninstalled and perged Python 3 completely, also didn't work, so I went back to 3.7 and then just flashed it without any settings and that worked as you presumed it would.

However, something still seems to be stuck as the script won't start - maybe it's a Python related 3.7 issue? Device Configuration is generating the following in the log:

Error while receiving device configuration: SyntaxError: Unexpected token C in JSON at position 0

edit: And unfortunately GitHub is all messed up today :smh:
 
Last edited:
OP
LBussy
Joined
Jan 19, 2013
Messages
3,565
Reaction score
1,484
Location
Kansas City
Error while receiving device configuration: SyntaxError: Unexpected token C in JSON at position 0
Generally, that means you've managed to get two things connected to the same controller. I'd give things a reboot just to get a clean start and then see where you are.

Hopefully, you've not left yourself in a weird place. If that doesn't clear you up I'm not quite sure what it might be but I know it will be fastest to re-flash the card. :)
 

JustcallmeMrT

Member
Joined
Feb 16, 2012
Messages
20
Reaction score
0
Hi! So, I flashed a new SD image, which fixed my first issue. Now, when I proceed with the install I get another error

error: Command "arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-armv7l-3.9/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/home/brewpi/venv/include -I/usr/include/python3.9 -Ibuild/src.linux-armv7l-3.9/numpy/core/src/common -Ibuild/src.linux-armv7l-3.9/numpy/core/src/npymath -Ibuild/src.linux-armv7l-3.9/numpy/core/src/common -Ibuild/src.linux-armv7l-3.9/numpy/core/src/npymath -c numpy/random/mtrand/mtrand.c -o build/temp.linux-armv7l-3.9/numpy/random/mtrand/mtrand.o -MMD -MF build/temp.linux-armv7l-3.9/numpy/random/mtrand/mtrand.o.d" failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/brewpi/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6whtho3j/numpy_1bad9df84a754d5f899fb3df46d9357e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6whtho3j/numpy_1bad9df84a754d5f899fb3df46d9357e/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-t_py3z_w/install-record.txt --single-version-externally-managed --compile --install-headers /home/brewpi/venv/include/site/python3.9/numpy Check the logs for full command output.


Any ideas? I'm sorry if these are extremely simplistic questions!
 
OP
LBussy
Joined
Jan 19, 2013
Messages
3,565
Reaction score
1,484
Location
Kansas City
Hi! So, I flashed a new SD image, which fixed my first issue. Now, when I proceed with the install I get another error
That looks like one of the Python libs failed during install. It happens occasionally, especially if your Internet is sketchy. You can run the following which should clean things up:
Bash:
/home/brewpi/utils/doDepends.sh
Then to finish up, reset permissions (this is a first aid script you should remember if you play around with things):
Bash:
/home/brewpi/utils/doPerms.sh
 

balrog

Supporting Member
HBT Supporter
Joined
Nov 26, 2013
Messages
4,353
Reaction score
4,614
Is VENV only a Buster thing and not Stretch? I am updating remix and just realized it is Debian 9 Stretch and not 10 Buster. The venv command was failing in the install script so I am currently updating to 10 and try again.
 
OP
LBussy
Joined
Jan 19, 2013
Messages
3,565
Reaction score
1,484
Location
Kansas City
Maybe? It's not a Debian thing but rather Python. I thought it was common to Python3 though ... but either way, it will work under Buster. Stretch is very old in computer years and you should be upgrading anyway. :)
 
Top