BrewPi Remix – What’s Old is New Again

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

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

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
{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.
 
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:
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.
 
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:
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
 
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.
 
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.
 
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:
I installed the lite version of Raspian and still received the error regarding the certificates. The bootlog is attached.
 

Attachments

  • bootstrap.txt
    57.2 KB · Views: 4
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.
I'm mostly concerned with why you are having issues communicating with the controller. That suggests a host or controller issue.
 
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.
 
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.
 
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
 
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.
 
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.
 
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
 
Hello all,

First off thanks for all the effort to get this going and the great feedback from everyone. I recently got all of my hardware together in one place and managed to get BPR installed and configured (somewhat) and running. The problem I keep running into is that it seems to run fine for some time and then the script appears to stop working. To try and remedy this I have done a complete wipe of the SD card and a fresh install. Again, it seems to work fine for a bit and then.... quits. Here is a screenshot of what I'm looking at.


1643418333671.png


When I click on the various buttons, I get no response except for the Maintenace panel. Nothing works in there either.

The other issue I've seen, the (somewhat) part, is that even though I choose a Blue Tilt on install, it will not connect to the device.


1643419087288.png


I thought maybe this was the issue, but it does the same even though I choose no Tilt in the install to.

So..... I power cycle....


1643418945605.png


Everything appears to be working again....

But if I give it an hour or so we can start at the top of this post again.

Glad I tried this on a fermenter full of water first :yes:

Any ideas?
 
Hello all,

First off thanks for all the effort to get this going and the great feedback from everyone. I recently got all of my hardware together in one place and managed to get BPR installed and configured (somewhat) and running. The problem I keep running into is that it seems to run fine for some time and then the script appears to stop working. To try and remedy this I have done a complete wipe of the SD card and a fresh install. Again, it seems to work fine for a bit and then.... quits. Here is a screenshot of what I'm looking at.


View attachment 757304

When I click on the various buttons, I get no response except for the Maintenace panel. Nothing works in there either.

The other issue I've seen, the (somewhat) part, is that even though I choose a Blue Tilt on install, it will not connect to the device.


View attachment 757310

I thought maybe this was the issue, but it does the same even though I choose no Tilt in the install to.

So..... I power cycle....


View attachment 757309

Everything appears to be working again....

But if I give it an hour or so we can start at the top of this post again.

Glad I tried this on a fermenter full of water first :yes:

Any ideas?
So Ive watched this run for a bit now. It looks like it is still running the profile even though the web page says no script running. Ive checked in on it here an there and I see the relays operating and the temps seem to be on track with the profile. Im definitely not a programmer but it seems like the web interface is not “talking“ with the controller????
 
@Quigongentoo I’m sort of in transit these days with no access to a test rig. I’m going to hazard a guess though that you have a RPi 2 or some other version without Bluetooth. Have you tried editing the config.cuff file to remove the Tilt?
 
@Quigongentoo I’m sort of in transit these days with no access to a test rig. I’m going to hazard a guess though that you have a RPi 2 or some other version without Bluetooth. Have you tried editing the config.cuff file to remove the Tilt?


I have a RP3b+ connected. Ive tried both ways, with and without the Tilt added at the initial install.
 
If you comment that out again and restart things, the stderr.txt may show us something interesting.
Can you tell me where to find the config.cuff file please? I found a reference to the Blue Tilt in the /home/brewpi/settings config.cfg. Oddly when I removed the Blue from the tilt setting the device shows as a graph device now, before it showed nothing even when turned on from install.

1643808164861.png
 
That was a phone typo - config.cfg is correct.

The web UI will display any data which may exist in the json files, so there may have been a couple points in there. So is it working without the Tilt entry?
 
That was a phone typo - config.cfg is correct.

The web UI will display any data which may exist in the json files, so there may have been a couple points in there. So is it working without the Tilt entry?
Yes at this point it is running
 
Yes at this point it is running
Okay well obviously it's supposed to work with the Tilt. What it looks like is that the Tilt is not being read consistently and the script is timing out. It is supposed to do that more gracefully than it is, but that's a different issue.

Can you get your Pi closer to the Tilt? Or have you considered Tiltbridge by @Thorrak? It is falling off a log easy to built (there's no building except for whatever case you want) and it will allow you greater freedom in where you put your Pi in relation to your Tilt.
 
Okay well obviously it's supposed to work with the Tilt. What it looks like is that the Tilt is not being read consistently and the script is timing out. It is supposed to do that more gracefully than it is, but that's a different issue.

Can you get your Pi closer to the Tilt? Or have you considered Tiltbridge by @Thorrak? It is falling off a log easy to built (there's no building except for whatever case you want) and it will allow you greater freedom in where you put your Pi in relation to your Tilt.
 
I have not because the three tilts that I own have always worked in the past with MyBrewBot (which quit working). They work with the app on the phone and with the TiltPi. Also, I thought that this might be the problem too, as I did buy a new freezer for this project. I checked with the phone app next to the Pi and got plenty of hits from the Tilt. Then just to prove myself wrong I put it where it is in the pictures. Is there a way that I can test the bluetooth? A command line or something?
0829ECB1-7A14-442C-B89E-E1CF736A1414.jpeg
961CBD95-534A-4E37-A3A2-E4B1D4D9A7ED.jpeg
 
Well, we obviously have an issue now. The Pi famously has less than optimal antennas because of the single-board configuration.

You can use the Pi to view BLE signal strength, but you may be amazed at how much chatter exists in your home. Here's an example:

https://stackoverflow.com/questions...-on-raspberry-pi-of-bt-device-without-pairing
So, I don’t really want to look for signals, rather just see if it is actually working or not. Maybe there is an actual hardware problem with the Pi. I suppose I could load a GUI and see if I can find Bluetooth devices. It still is strange that I removed the Blue comment from the config and only then did it show up in the graph. How would it even know that I was looking for a Blue Tilt if I removed it?
 
Back
Top