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,626
Reaction score
1,505
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
286
Reaction score
44
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,626
Reaction score
1,505
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
286
Reaction score
44
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,626
Reaction score
1,505
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
286
Reaction score
44
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,626
Reaction score
1,505
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
286
Reaction score
44
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,626
Reaction score
1,505
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
286
Reaction score
44
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,626
Reaction score
1,505
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,626
Reaction score
1,505
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,489
Reaction score
4,855
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,626
Reaction score
1,505
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. :)
 
OP
LBussy
Joined
Jan 19, 2013
Messages
3,626
Reaction score
1,505
Location
Kansas City
yea, yea, yea; and I should throw away perfectly good old laptops and buy new ones to log beer temps. I know.
That's not what I said (although I've already shown where it's cheaper because of the power use.) I am talking about keeping up with the release of new, patched software.

There's no place in this world for old, unmaintained operating systems. Too many people think "I've got a firewall, I'm fine." I'm here to tell you that it's not, and the odds are anyone I am talking to about it is not anywhere near as good as the botnets which will attack systems indiscriminately. What I do for a living is in part help defend a computing system from nation-state attacks. I also get to see what our own people can do when they evaluate my system. Trust me when I say you must at least patch all of your computers.

Sorry if this sounds like a lecture, but it's serious. Consider a case where you browse a website that ends up leveraging a zero-day exploit to search your home network for vulnerable platforms to attack. This happens all the time. You may end up patching your browser and never know there was a problem. It's too late. That other system is now infected and part of an automated effort to exploit systems and collect information. You do not need to be "an interesting target," they simply exploit everything they can (with automation) because it could be useful someday.

I feel very secure making the assertion that someone reading this thread is compromised and they don't know it. Statistics make that a very safe bet.
 

balrog

Supporting Member
HBT Supporter
Joined
Nov 26, 2013
Messages
4,489
Reaction score
4,855
A good point, @LBussy . It is always wise to keep up to date.
Moving on to Bullseye.
My 'production' system will be updated today. The one with Stretch was a fallow unit I was testing new BPRemix with.
Sorry, "with which I was testing new BPRemix".

[EDIT: Follow up question--in your professional opinion, what is t he best way to determine whether your system is clean? The simple days of reviewing all TCP connections are over I think]
 
Last edited:
OP
LBussy
Joined
Jan 19, 2013
Messages
3,626
Reaction score
1,505
Location
Kansas City
what is t he best way to determine whether your system is clean? The simple days of reviewing all TCP connections are over I think
Well, the best way is to never get compromised. :)

As you point out, you cannot count on the system to tell on itself. You should be able to filter the connections view on your router by internal IP address and see if any connections are being made. Your RPi system should not be making any connections (not with BrewPi anyway) so any connections made would be suspicious.

I have not yet tested with Bullseye - you will be trampling new ground. :)
 

gromitdj

Well-Known Member
Joined
Feb 7, 2008
Messages
1,595
Reaction score
579
Location
Orange County
As Lee explained to me a while back...

"You're probably costing yourself more money in electricity every year running an old laptop than it would cost to buy a current model Raspberry Pi which has a relatively low power draw".
 
OP
LBussy
Joined
Jan 19, 2013
Messages
3,626
Reaction score
1,505
Location
Kansas City
I thought I would share the new feature of the Raspberry Pi Imager here. If you hit SHIFT-CTRL-X you will get an "advanced" menu where you can set up things like enabling SSH, changing the pi password, connecting to WiFi, and other nice tweaks. No idea why this is not more prominently featured in their UI:
 
Last edited:
OP
LBussy
Joined
Jan 19, 2013
Messages
3,626
Reaction score
1,505
Location
Kansas City
I thought I should drop this here before I forget about it again.

"BrewPi-Remix v3.0.1.pdf" is a wiring diagram for the I2C version of the firmware, including the all-important jumper between Pin 7 and ground if you choose not to use a rotary encoder.

Thanks to @100amps for the drawing!
 

Attachments

scubahiker

Member
Joined
Oct 21, 2015
Messages
20
Reaction score
1
Hello all, I'm back at this. Trying to upgrade my old setup to the remix. I have a new SD card, and followed Headless Raspberry Pi to get my raspberry squared away. Then I moved over to BrewPi Remix Install. All looked good from my point of view as it appeared everything installed successfully. The site comes up at brewpi.local, but the script never runs. Going into maint panel > device config, refresh list, I get this error returned:

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

I found in a early tread that reflashing usually fixes this... sadly no. So with that error and the script not starting something feels a miss. Looking for ideas, please.
 

Zak1999

Member
Joined
Apr 16, 2013
Messages
9
Reaction score
1
Thanks for your hard work!

I am attempting to install BrewPi Remix on an older Pi 3 B+ goes well until the following error. My pi is model is an "ARMv6-compatible processor rev 7 (v6l)."

Thanks
--------------
head: cannot open '/etc/ssl/certs/java/cacerts' for reading: No such file or directory
Error occurred during initialization of VM
Server VM is only supported on ARMv7+ VFP
dpkg: error processing package ca-certificates-java (--configure):
installed ca-certificates-java package post-installation script subprocess returned error exit status 1
Setting up default-jre-headless (2:1.11-72+b4) ...
dpkg: dependency problems prevent configuration of openjdk-11-jre-headless:armhf:
openjdk-11-jre-headless:armhf depends on ca-certificates-java (>= 20190405~); however:
Package ca-certificates-java is not configured yet.

dpkg: error processing package openjdk-11-jre-headless:armhf (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openjdk-11-jre:armhf:
openjdk-11-jre:armhf depends on openjdk-11-jre-headless (= 11.0.13+8-1~deb11u1); however:
Package openjdk-11-jre-headless:armhf is not configured yet.
.....
 
OP
LBussy
Joined
Jan 19, 2013
Messages
3,626
Reaction score
1,505
Location
Kansas City
Error while receiving device configuration: SyntaxError: Unexpected token C in JSON at position 0
Generally this means two things are trying to access the Arduino port at the same time. If you received no other errors, and had no other issues on the install, try a simple reboot to see if that clears things up. If not, we will have to dig in a little further to see what is up.
 

Zak1999

Member
Joined
Apr 16, 2013
Messages
9
Reaction score
1
Congratulations! I have never seen that error before.

When you say an older Pi, have you flashed a new image onto the SD card? If not, please try that before re-trying.
Yes, I've reflashed using the Raspberry Pi imager a couple of times. A few more lines ahead of the error are below. Lots of errors after this line.
-----------------
Setting up libbatik-java (1.12-4) ...
Setting up liblog4j2-java (2.17.0-1~deb11u1) ...
Setting up ca-certificates-java (20190909) ...
head: cannot open '/etc/ssl/certs/java/cacerts' for reading: No such file or directory
Error occurred during initialization of VM
Server VM is only supported on ARMv7+ VFP
dpkg: error processing package ca-certificates-java (--configure):
 
OP
LBussy
Joined
Jan 19, 2013
Messages
3,626
Reaction score
1,505
Location
Kansas City
You can attach it here to this thread, or send via a Private Message.

If you mean how do you get it from the Pi to your normal computer, you can use Filezilla and login with your Pi credentials. Be sure to select "SFTP - SSH File Transfer Protocol."
 
OP
LBussy
Joined
Jan 19, 2013
Messages
3,626
Reaction score
1,505
Location
Kansas City
Yes, I've reflashed using the Raspberry Pi imager a couple of times. A few more lines ahead of the error are below. Lots of errors after this line.
I think I know where this is now, but the log will help me figure out what to do about it. I am in the middle of a move and don't have all my stuff available.
 
Top