• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

BrewPi Remix – What’s Old is New Again

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
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:
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:
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. :)
 
I fixed #190 in the master branch. That means anyone performing an update will receive it (or new installations) but I've not incremented the version (yet.)
 
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!
 
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
 
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.
 
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. :)
 
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.
 
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:
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. :)
 
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".
 
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:
1640648848603-png.753654
 
Last edited:
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

  • BrewPI-Remix v3.01.pdf
    832.2 KB
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.
 
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.
.....
 
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.
 
head: cannot open '/etc/ssl/certs/java/cacerts' for reading: No such file or directory
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.
 
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):
 
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."
 
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.
 
Back
Top