• 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.
Thankyou for the replies. Im not sure whats going on. I ran the clear eprom empty code program from the IDE. Then uploaded brewpi again, no change. I also read post suggesting a reset immediately prior to upload, which also didnt work. I tried the combination of the two, no change. About to give up I powered off the board yet again and re-downloaded. This time it worked and I can now update the devices. I didnt do anything different I aware of.

I wish I knew what fixed it, all I can say is it wasnt as simple as clearing eprom and re-downloading. I do dislike fixes that I dont understand, but the beer produced thereafter will help me forget.

Thanks again for the help, indirectly it did fix the problem. Whatever it was lol


OK, I have it working now, such fun! Ive spent an or or two reading up on everything PID, but sadly I don't yet feel comfortable deciding which param to adjust here.

Looking at my graph I note the cooling and heating appear to be applied right up to where the beer temp hits the target temperature. So of course, the beer temp both overshoots and undershoots, and the beer temperature fluctuates by +1 and -2c.

Im thinking this is related to Ki because its controlling the response to the size of the error. But I dont see how changing that would stop the overshoot. Somehow the algorythm needs to shut off both heating and cooling earlier, anticipating the overshoots.

It did occur to me it may need more time to adjust. I couldnt find any info on that. But then I notice that the overshoots no longer appear to be chaning in magnitude.

Its at this point I recall reading one of the common causes for bad PID tuning - modifying params without fully understanding them all!

Id be grateful if anyone can assist and educate me as to what to try and change and why. I might be able to do it by myself then. Or somewhere I havent found that would educate me to the same end.

The fermenter has 20L of water, thermowell down the middle. Enclosure is a bar fridge probably about 50% more volume than the beer bucket. The heater is a reptile enclosure globe 75W. And the fridge probe sits in open space in the bottom 1/3 of the fridge. BrewPi Remix is using default params.

The first hour or so of the following graph can be ignored (well, it doesnt represent the steady state, I was opening and closing the door)

brewpi 1v0.png
 
It did occur to me it may need more time to adjust. I couldnt find any info on that. But then I notice that the overshoots no longer appear to be chaning in magnitude.

Its at this point I recall reading one of the common causes for bad PID tuning - modifying params without fully understanding them all!
Clear any adjustments and let it run a day or so with the same thermal mass and see what happens. Yes, PID stands for "tempted end user to make bad mistakes." In the original Russian of course.
 
The uninstaller will get you to where the installer will run again. Your choice really.
We no longer have to sacrifice a virgin DIMM to the Bit Gods, while facing Silicon Valley, while reciting from Peter Norton’s Inside the IBM PC??!!
 
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
numpy~=1.26.2 from https://www.piwheels.org/simple/num...9f58865068410ff7a9e6bc37555c7600f1f608d7872fc (from -r /home/brewpi/requirements.txt (line 8)):
Expected sha256 81a37a6d46f316f63b79f58865068410ff7a9e6bc37555c7600f1f608d7872fc
Got 8d2fae391c40a02ce02433a4971b7defb368498251afe25ebd737e29909acc9a

So now I'm getting a different error consistently for the last three install attempts. From what I could glean from Google searches piwheels numpy is received but not authenticated by the automated install. Maybe there is a new version of numpy but I'm just guessing and reading about it though educational for the last 30 minutes doesn't help me to actually install BrewPi. Thanks for any insights you guys can provide.

I decided to try a fourth time and completed the automated installation but now have an issue with the web portal not launching the script.
 
Last edited:
Clear any adjustments and let it run a day or so with the same thermal mass and see what happens. Yes, PID stands for "tempted end user to make bad mistakes." In the original Russian of course.

In control constants the annotation says

"Integrator: maximum temp error °C - The integral is only active when the temperature is close to the target temperature. This is the maximum error for which the integral is active."

The default value, which it currently is, is 0.5c.

My interpretation is: Pi is not active if my overshoot or undershoot is greater than 0.5c about the set point. Is this a correct interpretation?

If it is, it explains why my temperature fluctuations are still exactly the same as 6 hours ago, namely +25.4c +21.99. Although Im waiting for a longer period to see some change, Im seeing absoutely nothing at the moment.
 
So now I'm getting a different error consistently for the last three install attempts. From what I could glean from Google searches piwheels numpy is received but not authenticated by the automated install. Maybe there is a new version of numpy but I'm just guessing and reading about it though educational for the last 30 minutes doesn't help me to actually install BrewPi. Thanks for any insights you guys can provide.

I decided to try a fourth time and completed the automated installation but now have an issue with the web portal not launching the script.
Freaking numpy.

I am having some surgery this week (no, @Thorrak, not to remove my head from my ass) and I am not going to be able to get to this quickly. Sorry about that.
 
My interpretation is: Pi is not active if my overshoot or undershoot is greater than 0.5c about the set point. Is this a correct interpretation?
I think that's the I value. Honestly, PID is one of those things that needs some time OR an excellent calculator/loop tuning if you want to dive in. It's rare that a standard-ish heat/cool setup on 1-10 gallons ever needs tweaking. When I thought I wanted to use my degree to be an Engineer, I went from dirt engineering to controls, which you had to do every day for a while before it started making sense.

That particular PID loop is well-worn and probably has not been changed since Elco and company put it in the Uno. The programming is squeezed in so freaking tight (I had to shorten 16 characters worth of text fields to add the serial LCD screen reset) there was never an opportunity to go in there and do much, so I never peeled that particular onion.

When folks have severe overshoots (as in using Glycol or a very overpowered heat/cool setup), the general recommendation is to zero the values.
 
So now I'm getting a different error consistently for the last three install attempts. From what I could glean from Google searches piwheels numpy is received but not authenticated by the automated install. Maybe there is a new version of numpy but I'm just guessing and reading about it though educational for the last 30 minutes doesn't help me to actually install BrewPi. Thanks for any insights you guys can provide.

I decided to try a fourth time and completed the automated installation but now have an issue with the web portal not launching the script.
That section loops through a list using apt. You might try sudo apt install x where x is one at a time of these:
  • libatlas-base-dev
  • python3-numpy
  • python3-scipy
If they install correctly, try a BrewPi uninstall, then reinstall again. The apt packages should persist.
 
Last edited:
CharlesW@BrewPi:~ $ sudo apt install libatlas-base-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libatlas-base-dev is already the newest version (3.10.3-13+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
CharlesW@BrewPi:~ $ sudo apt install python3-numpy
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-numpy is already the newest version (1:1.24.2-1).
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
CharlesW@BrewPi:~ $ sudo apt install python3-scipy
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-scipy is already the newest version (1.10.1-2+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.

So I went through the commands and it appears to me that everything is properly installed. I went ahead and executed an option 1 uninstall of BrewPi then used the automated install tool. I can access the BrewPi.local web portal but I get "cannot connect to script" and "script not running" even giving it some time. When I go to configure devices and refresh nothing ever comes up.
 
So I went through the commands and it appears to me that everything is properly installed. I went ahead and executed an option 1 uninstall of BrewPi then used the automated install tool. I can access the BrewPi.local web portal but I get "cannot connect to script" and "script not running" even giving it some time. When I go to configure devices and refresh nothing ever comes up.
The logs should give a clue now. Check /home/brewpi/logs/ and there’s an error and run log.

However, if you have not rebooted after all the machinations, that might work.
 
So I went ahead and rebooted earlier today and gave it a few hours and still the "script not running" issue. I tried using chrome, Microsoft Edge, and firefox with the same results. I opened the /home/brewpi/logs/ folder and all three files there were empty (ReadMe.md, stderr.txt, stdout.txt).
 
So I went ahead and rebooted earlier today and gave it a few hours and still the "script not running" issue. I tried using chrome, Microsoft Edge, and firefox with the same results. I opened the /home/brewpi/logs/ folder and all three files there were empty (ReadMe.md, stderr.txt, stdout.txt).
Check the daemon log with:

sudo systemctl status brewpi
 
CharlesW@BrewPi:~ $ sudo systemctl status brewpi
● brewpi.service - BrewPi Remix daemon for: brewpi
Loaded: loaded (/etc/systemd/system/brewpi.service; enabled; preset: enabl>
Active: active (running) since Fri 2024-05-17 15:35:10 CDT; 20h ago
Docs: https://docs.brewpiremix.com/
Main PID: 1055 (bash)
Tasks: 2 (limit: 1556)
CPU: 15h 47min 56.161s
CGroup: /system.slice/brewpi.service
├─ 1055 /bin/bash /home/brewpi/utils/doBrewPi.sh -d
└─10530 /home/brewpi/venv/bin/python3 -u /home/brewpi/brewpi.py -->

May 18 12:07:15 BrewPi brewpi[10526]: import brewpiJson
May 18 12:07:15 BrewPi brewpi[10526]: File "/home/brewpi/brewpiJson.py", line>
May 18 12:07:15 BrewPi brewpi[10526]: import Tilt
May 18 12:07:15 BrewPi brewpi[10526]: File "/home/brewpi/Tilt.py", line 38, i>
May 18 12:07:15 BrewPi brewpi[10526]: import numpy
May 18 12:07:15 BrewPi brewpi[10526]: File "/home/brewpi/venv/lib/python3.11/>
May 18 12:07:15 BrewPi brewpi[10526]: raise ImportError(msg) from e
May 18 12:07:15 BrewPi brewpi[10526]: ImportError: Error importing numpy: you s>
May 18 12:07:15 BrewPi brewpi[10526]: its source directory; please exit>
May 18 12:07:15 BrewPi brewpi[10526]: your python interpreter from ther>
lines 1-21/21 (END)...skipping...
● brewpi.service - BrewPi Remix daemon for: brewpi
Loaded: loaded (/etc/systemd/system/brewpi.service; enabled; preset: enabled)
Active: active (running) since Fri 2024-05-17 15:35:10 CDT; 20h ago
Docs: https://docs.brewpiremix.com/
Main PID: 1055 (bash)
Tasks: 2 (limit: 1556)
CPU: 15h 47min 56.161s
CGroup: /system.slice/brewpi.service
├─ 1055 /bin/bash /home/brewpi/utils/doBrewPi.sh -d
└─10530 /home/brewpi/venv/bin/python3 -u /home/brewpi/brewpi.py --check --don>

May 18 12:07:15 BrewPi brewpi[10526]: import brewpiJson
May 18 12:07:15 BrewPi brewpi[10526]: File "/home/brewpi/brewpiJson.py", line 37, in <mo>
May 18 12:07:15 BrewPi brewpi[10526]: import Tilt
May 18 12:07:15 BrewPi brewpi[10526]: File "/home/brewpi/Tilt.py", line 38, in <module>
May 18 12:07:15 BrewPi brewpi[10526]: import numpy
May 18 12:07:15 BrewPi brewpi[10526]: File "/home/brewpi/venv/lib/python3.11/site-packag>
May 18 12:07:15 BrewPi brewpi[10526]: raise ImportError(msg) from e
May 18 12:07:15 BrewPi brewpi[10526]: ImportError: Error importing numpy: you should not t>
May 18 12:07:15 BrewPi brewpi[10526]: its source directory; please exit the numpy >
May 18 12:07:15 BrewPi brewpi[10526]: your python interpreter from there.
~
~
~
~
~
lines 1-21/21 (END)
● brewpi.service - BrewPi Remix daemon for: brewpi
Loaded: loaded (/etc/systemd/system/brewpi.service; enabled; preset: enabled)
Active: active (running) since Fri 2024-05-17 15:35:10 CDT; 20h ago
Docs: https://docs.brewpiremix.com/
Main PID: 1055 (bash)
Tasks: 2 (limit: 1556)
CPU: 15h 47min 56.161s
CGroup: /system.slice/brewpi.service
├─ 1055 /bin/bash /home/brewpi/utils/doBrewPi.sh -d
└─10530 /home/brewpi/venv/bin/python3 -u /home/brewpi/brewpi.py --check --don>

May 18 12:07:15 BrewPi brewpi[10526]: import brewpiJson
May 18 12:07:15 BrewPi brewpi[10526]: File "/home/brewpi/brewpiJson.py", line 37, in <mo>
May 18 12:07:15 BrewPi brewpi[10526]: import Tilt
May 18 12:07:15 BrewPi brewpi[10526]: File "/home/brewpi/Tilt.py", line 38, in <module>
May 18 12:07:15 BrewPi brewpi[10526]: import numpy
May 18 12:07:15 BrewPi brewpi[10526]: File "/home/brewpi/venv/lib/python3.11/site-packag>
May 18 12:07:15 BrewPi brewpi[10526]: raise ImportError(msg) from e
May 18 12:07:15 BrewPi brewpi[10526]: ImportError: Error importing numpy: you should not t>
May 18 12:07:15 BrewPi brewpi[10526]: its source directory; please exit the numpy >
May 18 12:07:15 BrewPi brewpi[10526]: your python interpreter from there.
~
~
~
~
~
lines 1-21/21 (END)
● brewpi.service - BrewPi Remix daemon for: brewpi
Loaded: loaded (/etc/systemd/system/brewpi.service; enabled; preset: enabled)
Active: active (running) since Fri 2024-05-17 15:35:10 CDT; 20h ago
Docs: https://docs.brewpiremix.com/
Main PID: 1055 (bash)
Tasks: 2 (limit: 1556)
CPU: 15h 47min 56.161s
CGroup: /system.slice/brewpi.service
├─ 1055 /bin/bash /home/brewpi/utils/doBrewPi.sh -d
└─10530 /home/brewpi/venv/bin/python3 -u /home/brewpi/brewpi.py --check ->

May 18 12:07:15 BrewPi brewpi[10526]: import brewpiJson
May 18 12:07:15 BrewPi brewpi[10526]: File "/home/brewpi/brewpiJson.py", line 37, in>
May 18 12:07:15 BrewPi brewpi[10526]: import Tilt
May 18 12:07:15 BrewPi brewpi[10526]: File "/home/brewpi/Tilt.py", line 38, in <modu>
May 18 12:07:15 BrewPi brewpi[10526]: import numpy
May 18 12:07:15 BrewPi brewpi[10526]: File "/home/brewpi/venv/lib/python3.11/site-pa>
May 18 12:07:15 BrewPi brewpi[10526]: raise ImportError(msg) from e
May 18 12:07:15 BrewPi brewpi[10526]: ImportError: Error importing numpy: you should n>
May 18 12:07:15 BrewPi brewpi[10526]: its source directory; please exit the nu>
May 18 12:07:15 BrewPi brewpi[10526]: your python interpreter from there.
~
~
~
~
~
lines 1-21/21 (END)...skipping...
● brewpi.service - BrewPi Remix daemon for: brewpi
Loaded: loaded (/etc/systemd/system/brewpi.service; enabled; preset: enabled)
Active: active (running) since Fri 2024-05-17 15:35:10 CDT; 20h ago
Docs: https://docs.brewpiremix.com/
Main PID: 1055 (bash)
Tasks: 2 (limit: 1556)
CPU: 15h 47min 56.161s
CGroup: /system.slice/brewpi.service
├─ 1055 /bin/bash /home/brewpi/utils/doBrewPi.sh -d
└─10530 /home/brewpi/venv/bin/python3 -u /home/brewpi/brewpi.py --check --donotrun

May 18 12:07:15 BrewPi brewpi[10526]: import brewpiJson
May 18 12:07:15 BrewPi brewpi[10526]: File "/home/brewpi/brewpiJson.py", line 37, in <module>
May 18 12:07:15 BrewPi brewpi[10526]: import Tilt
May 18 12:07:15 BrewPi brewpi[10526]: File "/home/brewpi/Tilt.py", line 38, in <module>
May 18 12:07:15 BrewPi brewpi[10526]: import numpy
May 18 12:07:15 BrewPi brewpi[10526]: File "/home/brewpi/venv/lib/python3.11/site-packages/numpy/__init__.py", line 135, in <module>
May 18 12:07:15 BrewPi brewpi[10526]: raise ImportError(msg) from e
May 18 12:07:15 BrewPi brewpi[10526]: ImportError: Error importing numpy: you should not try to import numpy from
May 18 12:07:15 BrewPi brewpi[10526]: its source directory; please exit the numpy source tree, and relaunch
May 18 12:07:15 BrewPi brewpi[10526]: your python interpreter from there.

Sorry for the long paste but I wasn't sure what all would be pertinent from the daemon log. Looks as though the numpy thing is still an issue but I don't really know what to do beyond the install commands I already used from the piwheels website. Thanks again for all the support.
 
Any chance you have Numpy installed by pip and the package manager?

Try this code, if it's installed with pip this will get rid of it. It may need sudo I don't know for sure.

Code:
pip3 uninstall numpy
 
Any thoughts on what I should do concerning the "script not running" and numpy issues I'm experiencing?
Sorry, I was stuck in bed for a week.

There is/was a library issue because Python people did Python things. I pushed a change to main this morning that should address it, but it will need a clean install. I am not sure it will work, but if you want to try something before that, you could try:

Code:
sudo apt-get install libopenblas-dev

The problem is detailed in issue #212.
 
Sorry, I was stuck in bed for a week.

There is/was a library issue because Python people did Python things. I pushed a change to main this morning that should address it, but it will need a clean install. I am not sure it will work, but if you want to try something before that, you could try:

Code:
sudo apt-get install libopenblas-dev

The problem is detailed in issue #212.
Recover fast good sir.
 
So I used the "sudo apt-get install libopenblas-dev" on my current install and fixed my issue and the web portal ran the script. However the error returned while trying to add devices through the web portal. No amount of reboots or tweaking could fix it so I uninstalled BrewPi then reinstalled. There was an issue detecting the model/version of the Arduino Uno so I chose to treat it like a new controller and flash it using the defaults from the prompts (revC). The script didn't run again after this but I went into the utilities and used doFlash.sh to flash the controller which still had the issue detecting the model/version of Arduino Uno but I picked the defaults (revC) and now it works.

TLDR it works and I'm now at a learning how the software and settings work point so I'm good until my SSRs arrive next week...

I included everything that happened in case its of use to you but I don't really know why flashing the Arduino Uno eventually worked or why it had issues detecting the model/version.

Thank you so much for being so responsive and a speedy recovery for sure.
 
Back
Top