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,624
Reaction score
1,505
Location
Kansas City
{logfile}
So, while I understand the error you received, I am unable to reproduce it. Here's what I'd like you to try:

When you open the Imager, "Choose OS" and select either Lite or Full (if you need the desktop.) Then try again.

If it works, great. The culprit is likely a cached version of the Raspbian OS with outdated security certs. If it doesn't work, try this:

Bash:
sudo apt install arduino-core
I think this is where you are having the issue. Assuming the error pops up again doing that, try this:

Bash:
sudo dpkg --purge --force-depends ca-certificates-java
sudo apt install ca-certificates-java
Then, try this again:

Bash:
sudo apt install arduino-core
If it works, then remove the install directory and try again:

Bash:
rm -fr /home/pi/brewpi-tools-rmx
curl -L install.brewpiremix.com | sudo bash
If you are unable to reproduce the error when trying to install arduino-core the first time, let me know.
 

scubahiker

Member
Joined
Oct 21, 2015
Messages
20
Reaction score
1
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.
reboot has same affect. Still getting error of script not starting, nor listing devices. My wiring setup has not changed since it was using the old brewpi
 
Last edited:

IanJ

Well-Known Member
Joined
Feb 8, 2011
Messages
286
Reaction score
44
Not that I'm actually knowledgable about the cause of this specific error:

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

But when I ran into it a page ago, my ultimate solution was a fresh Raspbian install. Whatever the actual cause, I had been trying to tracing it down and found a bunch of missing pip packages/dependencies because of a default install of Python3 vs 2, or something along those lines. Having run the full upgrade after installing Raspbian, it upgraded to the latest version BEFORE installing BrewPi Remix, which then triggered all sorts of weird behavior trying to run the install scripts.

The final time where the error didn't happen anymore, I chose not to do a full-upgrade/dist-upgrade and just stuck with updates.

At least that's what I can recall happening, my brain is kinda mush from dealing with a 2 year old throwing tantrums every 15 minutes from 6am - 8pm without any breaks.
 

scubahiker

Member
Joined
Oct 21, 2015
Messages
20
Reaction score
1
I was able to reboot using 'sudo reboot now'. Thanks.

Unfortunately, I'm getting the same error that IanJ is, as well as the script not starting. The one thing I did add was a Tilt. Previous installation did not have that.
 
Last edited:

balrog

Supporting Member
HBT Supporter
Joined
Nov 26, 2013
Messages
4,480
Reaction score
4,828
I am rethinking using the laptop, which I finally set up with real brewpi-remix running real double solenoid wiring. I moved from STC+. Anyway, apparently at 530 this morning, about 18hrs into ferment, system "hung" while cooling. System responded from network, showed graph up to 530am, it was 8am at the time, would not show device list or logs, but did show pages of Setting, Adv Settings, Control Alg, and allowed download of CSV of current brew. SO it's a mess. Did a systemctl reboot. That's when I saw fridge had been on for two hours. Dunno if it's a Brewpi script thing or laptop thing, but it's not a good thing.

1641648988099.png
 
OP
LBussy
Joined
Jan 19, 2013
Messages
3,624
Reaction score
1,505
Location
Kansas City
That's when I saw fridge had been on for two hours.
I don't think that's a correct interpretation. What you have is a data gap, and the state didn't change for that time. So, when it stopped talking, it was on. When it finally connected again the state was allowed to change. The controller should still have been keeping the temperature. We need to see the graph after the data gap to see if there were any real impact.
 
OP
LBussy
Joined
Jan 19, 2013
Messages
3,624
Reaction score
1,505
Location
Kansas City
Well in this many years, you appear to be the only one who has managed to kill the controller with a script crash. :)

Did it log anything during that time? stdout.txt?

Do you know for sure that your relays are working? It's possible that your refrigerator is cycling on its own and the heat is coming on to temper that and is able to keep up.
 

balrog

Supporting Member
HBT Supporter
Joined
Nov 26, 2013
Messages
4,480
Reaction score
4,828
Great. I can see my epitaph now: Give it to Joseph, he can break anything.

I will try to grab the logs, switching over to old system first.
[EDIT: OK @LBussy stderr with my notes:
2022-01-06 07:43:01 [E] Starting BrewPi. --me setting up computer
2022-01-06 14:55:53 [E] Starting BrewPi. --I pitched, start logging 12:40pm, found lappy asleep at 3pm
Terminating due to fatal serial error
2022-01-07 16:21:48 [E] Starting BrewPi. --I have no idea about 4:21pm. No idea.
2022-01-08 08:23:14 [E] Starting BrewPi. --This morning I rebooted lappy as things were weird.
Terminating due to fatal serial error
2022-01-08 08:48:11 [E] Starting BrewPi.
2022-01-08 09:20:16 [E] Starting BrewPi. --lappy is no longer connected to arduino et al.
Error(s) while opening serial port:
Could not find compatible serial device.

stdout: --apparently stdout is wiped on restart? There are only 3 lines therein.
2022-01-08 10:01:42 [N] 0.8.0 (master) [32301d5]
2022-01-08 10:01:42 [N] Not currently logging.
2022-01-08 10:01:42 [N] Opening serial port.
]
 
Last edited:

Zak1999

Member
Joined
Apr 16, 2013
Messages
9
Reaction score
1
I installed the lite version of Raspian and still received the error regarding the certificates. The bootlog is attached.
 

Attachments

Zak1999

Member
Joined
Apr 16, 2013
Messages
9
Reaction score
1
It's alive!!!
If you have time to explain. What was the problem?
 
OP
LBussy
Joined
Jan 19, 2013
Messages
3,624
Reaction score
1,505
Location
Kansas City
It's alive!!!
If you have time to explain. What was the problem?
Thanks for validating.

Well .... since I was not able to replicate it, I think it was because log4j is a dependency for arduino-core. Log4j was recently updated (several times) related to the vulnerability I linked. I'd always known the only reason arduino-core was used was to flash the Arduino and a dev package should not have been needed. I was able to eliminate the arduino-core lib, use avrdude (just the one that does the work), binutils-avr which has a couple other tools, then use wget to just download the boards.txt file from the AVR repo.

Seems like a lot, but I actually eliminated a chunk of stuff that was not being used. I also took the opportunity to fix a python error that showed right at the beginning of the bootstrap process.

I'll get this pushed to master as soon as I get a moment, but you are good for now. If anyone else has the issue they can install via devel branch.
 
OP
LBussy
Joined
Jan 19, 2013
Messages
3,624
Reaction score
1,505
Location
Kansas City
0.8.1 Bugfix Release

This release handles a couple of bugs, the worst of which would prevent an install from completing. I've removed Arduino-core in favor of avrdude and some pre-compiled binaries. This in turn removed Log4j and several other dependencies that were too much exposure and no utility.

Tools
Commit Summary
File Changes

(1 file)
  • M bootstrap.sh (4)
Patch Links:

Scripts
Commit Summary
  • d89d58c Try using avrdude instead of core
  • eb199b1 Use avrdude in path
  • a0b6a3a Add avr utils
File Changes

(3 files)
  • M .gitignore (1)
  • M programController.py (28)
  • M utils/doDepends.sh (19)
Patch Links:
WWW

No changes.
 

balrog

Supporting Member
HBT Supporter
Joined
Nov 26, 2013
Messages
4,480
Reaction score
4,828
Just running a system on the bench for a few days. I am thinking I need to disassemble from the box and recheck my connections?

1642254574951.png


1642254600883.png
 
OP
LBussy
Joined
Jan 19, 2013
Messages
3,624
Reaction score
1,505
Location
Kansas City
It could be a bad sensor or a bad connection. What resistor are you using?

You can turn json logging the config.cfg (logJson = True) and it will log the actual json from the controller. That will show you want you are getting and may give you a clue.
 

balrog

Supporting Member
HBT Supporter
Joined
Nov 26, 2013
Messages
4,480
Reaction score
4,828
Thanks, @LBussy , I"ll dig into it later. This is also the system that broke the script, and when I first set it up on the bench to run a while, it gave me a 180°F single reading, but I didn't keep the data to see if it was the same sensor.
 

balrog

Supporting Member
HBT Supporter
Joined
Nov 26, 2013
Messages
4,480
Reaction score
4,828
Truly. The issue of course is in the typing of IP addresses since both Dell laptops are at xxx.xxx.0.193 or 194, and SSH into the wrong one, running uninstall.brewpiremix.com with Sherman's march to the sea extreme prejudice option, results in suboptimal outcome.

In unrelated news, clearly Mr. Lasko 200 watt cannot help a hatchway in MA 5°F windy weather (set point, 30F)

1642259981538.png
 

Latest posts

Top