Fermentrack: Fermentation monitoring & BrewPi-www Replacement for Raspberry Pi

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.
So I just ran the update from the ui and now the web front end is all screwed up. Is there a way to force it to update again (from GitHub)?

I can get to the dashboard, but it looks like this:

View attachment 705851

Huh. That's... very strange. Nothing changed with the static file handling, so there shouldn't be any reason that would have happened so long as you have open disk space available.

You can try to force another upgrade (which should re-run collectstatic) by going to /upgrade/ on your Fermentrack install (e.g. http://raspberrypi.local/upgrade/ ) and clicking "Click Here to force an upgrade from GitHub"
 
Just to close the loop on this for the curious as @kxavier_23 and I were chatting on the side --

What appears happened is that something interrupted the upgrade process and the timestamps for the static files got updated but the static files themselves were empty. This is easy to fix - but as it's not something I've seen happen before it took a bit of experimentation to figure out.
 
I see what ya did there ... you edited after I replied. :)

I think the ones I posted have the tab down, contacts up, which are the same as the 90 degree ones @Thorrak used. If so then they would be right. That's how the ones are that I used. I think Thorrak is right, that the pins would not fit if they were the reveresed ones. Without intentionally buying the wrong ones, I can't say for sure.
I got some new RJ-45 jacks today. They look to be the same as Thorrak's picture.
Going to risk it again tonight.
 
The ESP controller got hot again, on what I think might be a transistor/regulator just to the right of the USB connection (looking at the USB connector head-on).
I took out my meter and measured the resistance of the Vcc, Data, GND pins on the breakout board with the ethernet cable disconnected. Just the 1-wire sensor connected to the board.
Between Vcc and GND, measured 13.4M Ohm (only with red lead on Vcc and black lead on GND). The resistance went down as I had the temp probe in my hand to warm it up.
Between GND and Data, I get similar readings, but the resistance seems to jump around a lot.

When I try a different temp probe, I get about the same resistance, but only with the meter leads switched around (red probe on the GND (black temp probe wire). Maybe resistance isn't the best way to measure these things.

I verified the wiring. With no power to the boards, I connected the controller and breakout board with an ethernet cable. I measured a short between GND pin on the breakout board and GND pin on the ESP. I measured a short between the Vcc on the breakout board and 3v3 on the ESP. I measured a short on the Data pin of the breakout board to the D6 on the ESP controller.

I'm stumped again.
 
Last edited:
I set up an ESP D1 on a breadboard and connected a temp sensor to it. It works. The only difference, I'm using the 5V Vcc when connecting the temp sensor to the breadboard. I believe the Thorrak breakout board uses 3v3 for powering the 1-wire sensors, right? So, I also connected the temp sensor to 3v3 on the D1 and it worked there also.
I'll have to go back to see what is different with the breakout board now.

1605277541188.png


IMG_20201113_082618457.jpg
 
Last edited:
I set up an ESP D1 on a breadboard and connected a temp sensor to it. It works. The only difference, I'm using the 5V Vcc when connecting the temp sensor to the breadboard. I believe the Thorrak breakout board uses 3v3 for powering the 1-wire sensors, right? So, I also connected the temp sensor to 3v3 on the D1 and it worked there also.
I'll have to go back to see what is different with the breakout board now.

View attachment 706413

View attachment 706414
Yes, thorraks PCB uses 3v and goes through the r1 resistor. the resistor is 10k maybe that is the problem. remove the resistor and solder in a 4.7k and see if it works. I haven't had any problems with my boards running 10k so I'm curious to see if that works.
 
Thorrak's latest board uses 5V or 3V3 to power the sensor and a 2K2 pull-up from 3V3. 10k will work with short leads, but there's no reason to want to use the weaker pull-up.

5V is preferable to power the sensor and in all the cases I have seen is more reliable, especially with longer leads. That said, I think Thorrak had some Chinese sensors which did not like 5V for some reason. It's within the operating range, and with the cable losses, I'm amazed that it did not work.

The reason 5V power is okay on a 3V3 controller, is the sensor itself does not share that with the data channel. The data channel uses 3V3 so all is well in controller-land.
 
When I had the sensors connected to the breakout board, they were soldered directly to it. These are the temp sensors that have 1m leads and are common on Amazon and eBay.

I connected a second sensor to the breadboard. It worked OK, even with the 10k resistor on Thorrak's D1 SMD board. It appears the resistor is adequate


1605282833868.png
 

Attachments

  • 1605282792850.png
    1605282792850.png
    44.3 KB · Views: 2
Last edited:
I connected a second sensor to the breadboard. It worked OK, even with the 10k resistor on Thorrak's D1 SMD board. It appears the resistor is adequate (though I hoped to see closer temps between the probes since they're only 2 inches apart on the same desk).
A 10k will work, but I believe you may get more frequent drop-outs. The resistor will have nothing to do with the calibration/readings.
 
I set up an ESP D1 on a breadboard and connected a temp sensor to it. It works. The only difference, I'm using the 5V Vcc when connecting the temp sensor to the breadboard. I believe the Thorrak breakout board uses 3v3 for powering the 1-wire sensors, right? So, I also connected the temp sensor to 3v3 on the D1 and it worked there also.
I'll have to go back to see what is different with the breakout board now.

View attachment 706413

View attachment 706414

FYI you have the pull-up between 5V and Data - you want the pull-up between 3v3 and data.

@LBussy notes why:

The reason 5V power is okay on a 3V3 controller, is the sensor itself does not share that with the data channel. The data channel uses 3V3 so all is well in controller-land.

Pulling the data line up to 5v could toast the controller (but shouldn't cause the temp sensor to heat up)
 
FYI you have the pull-up between 5V and Data - you want the pull-up between 3v3 and data.

@LBussy notes why:



Pulling the data line up to 5v could toast the controller (but shouldn't cause the temp sensor to heat up)
I see what you're saying there, but don't think that it's really coming into play in the real world. Though, it could be a factor if I mixed it up on the breadboard test....

There's nothing wrong with your breakout board. Nothing wrong with your controller board. I'm trying to figure out what I'm doing wrong.

I say that because, when I used your breakout board, everything is wired how you designed it - with the 3v3 as both the source for the temp sensors and how the R1 comes into play between Data and 3v3. I still had the voltage regulator on the D1 controller get fried and let the smoke out. I need to get this figured out before I ruin another of my dwindling supply of D1 controller boards. This is making me question whether I might have had a bad temp sensor, incorrect RJ jack (which I have corrected from the first ones I used), an incorrect ethernet cable, or by wiring up something wrong myself.

The Ethernet cable I'm using:
IMG_20201113_122014398_HDR.jpg


The RJ jacks I'm using:
IMG_20201113_122404311.jpg
 
Last edited:
I put the D1 controller on the Thorrak controller SMD board and connected the Thorrak breakout board via the cable in the picture above. I have nothing else connected to the breakout board. No temp sensors, nothing. No power connected to anything.
Taking Resistance readings from the breakout board to the Controller itself I find the following:
Red VOM probe on the Breakout Board side
Breakout BoardD1 ControllerOhms
Vcc3v30
VccD69.8k
VccGND75k
Vcc5v98k (fluctuating a bit_
Data3v39.8k
DataD60
DataGND90k
Data5v116k
GND3v351k
GNDD664k
GNDGND0
GND5v76k
Black VOM probe on the Breakout Board side
Breakout BoardD1 ControllerOhms
Vcc3v30
VccD69.8k
VccGND51k
Vcc5v157k
Data3v39.8k
DataD60
DataGND64k
Data5v170k
GND3v374k
GNDD690k
GNDGND0
GND5v82k

Might have a problem here? Could some of the readings be because the VOM is putting some voltage into the circuit?

Or, maybe I'm way off base? My electronics skills are pretty old and rusty.
 
I may have found the problem. Hopefully.
I connected the temp sensors to the breadboard test one at a time. One of them got SUPER hot and started heating up the voltage regulator on the D1 controller. I'll throw that one in the bin and take a risk on soldering up a couple on the breakoutboard. Hopefully I won't fry anything this time.
 
Last edited:
That must have been it - a bad temp sensor.

I have 2 controllers configured in Fermentrack now. Just messing with the webpage/software for now to get acquainted with the software and operation.
One controller will be for the fermenter - a single temp probe in the beer, a heat relay to turn on the fermwrap heat tape and a cooling relay to turn on the pump in the glycol (water) cooler/tank.

The other controller will be for controlling the A/C unit that cools the glycol (water) cooler/tank with a single temp probe in the tank.
Next will be setting up the iSpindel, putting everything in a project box, a heat sink on a 40A SSR and doing a test.

Thanks for the help everyone.


1605380571903.png
 
Last edited:
Hello -
A couple questions about the logic that runs the relay outputs that Fermentrack uses. I've read through the documentation and searched this thread but am still unsure about this question.

1. Do any of the relay output pins use PID logic? Something that might need an SSR instead of a mechanical relay? I don't want to use the wrong part for switching. If PID is used and there'll be fast switching for an output, that needs an SSR vs. mechanical relay would be a good thing to know, right?​
2. As far as what I need to control, only one of the devices will be a high load - the 5k window A/C unit for chilling will require an SSR just to handle the load (but should NOT be PID logic). Does Fermentrack have a delay logic built in (like CraftbeerPi, others) that will not let the A/C unit cycle on/off too frequently? I've read where this can shorten the life of the compressor of a fridge or A/C unit.​

Are there settings I need to be sure to use? Or is it just "built-in" and I don't have anything to worry about?

Thanks.
 
it just "built-in" and I don't have anything to worry about?
I always say: Don't over-think and for sure don't over-adjust before you install and use it (pretty much anything.)
Do any of the relay output pins use PID logic?
Yes.
Something that might need an SSR instead of a mechanical relay?
Nope.

You are confusing PID with PWM. PID can control PWM, but it's not always the case. In this case, using relays is fine (and how it was written.)
Does Fermentrack have a delay logic built in (like CraftbeerPi, others) that will not let the A/C unit cycle on/off too frequently?
Nope. BrewPi does, and Fermentrack interfaces with BrewPi which is the logic in the controller.

You'll be fine, sip the Kool Aid! :)
 
None of the cooling pins use PWM (unless you want to get super pedantic and claim that a pulse measured in minutes counts as PWM). The BrewPi firmware is designed for compressor based systems, complete with power on delays, compressor protection lock out, etc.
 
Soo... I decided to try loading Fermentrack on an old (2007) laptop that is now running RPD Raspberry Pi Desktop (buster). That installed without any issues. Yay.
Then I ran the one-line Fermentrack install script. That seemed to install without any issues. The log is full of happy messages. Yay.
Unfortunately the interface doesn't load in the laptop's web browser. nginx returns a Gateway Timeout error (http error 504). I'm not sure how to troubleshoot this. Any help is appreciated. My Linux chops are 20 years out of date and my cognitive decline has advanced accordingly since then.

My arduino controller is not connected to the laptop currently. Its out chilling a Vienna lager. I didn't expect that to be a problem, is it?
 
Last edited:
Soo... I decided to try loading Fermentrack on an old (2007) laptop that is now running RPD Raspberry Pi Desktop (buster). That installed without any issues. Yay.
Then I ran the one-line Fermentrack install script. That seemed to install without any issues. The log is full of happy messages. Yay.
Unfortunately the interface doesn't load in the laptop's web browser. nginx returns a Gateway Timeout error (http error 504). I'm not sure how to troubleshoot this. Any help is appreciated. My Linux chops are 20 years out of date and my cognitive decline has advanced accordingly since then.

My arduino controller is not connected to the laptop currently. Its out chilling a Vienna lager. I didn't expect that to be a problem, is it?

Step 1, as always, is “try rebooting”. ;)

Step 2: What do you see when you run “ps -xauf | grep circus” (without the quotes)?

The chain for things to work is
Internet -> Nginx -> Chaussette, where Chaussette is launched/maintained by Circus. If there’s an issue, 90% of the time it’s caused by circus not running for some reason.

The fact that your controller is in the other room doesn’t matter. Fermentrack doesn’t require a controller to run.
 
Thanks Thorrak. Reboot... Way head of you there. :)

pi@raspberry:~ $ ps -xauf | grep circus
pi 17148 0.0 0.0 7848 616 pts/0 S+ 10:27 0:00 | | \_ grep --color=auto circus

ferment+ 988 0.2 0.4 48136 16720 ? Sl Nov30 3:14 /home/fermentrack/venv/bin/python3 /home/fermentrack/venv/bin/circusd --daemon /home/fermentrack/fermentrack/circus.ini

ferment+ 1000 1.9 0.8 58456 30980 ? Ssl Nov30 21:18 \_ /home/fermentrack/venv/bin/python3 -c from circus import stats; stats.main() --endpoint tcp://127.0.0.1:5555 --pubsub tcp://127.0.0.1:5556 --statspoint tcp://127.0.0.1:5557 --log-level ERROR --log-output /home/fermentrack/fermentrack/log/circusd.log

That help?
 
Last edited:
I am having dropouts to my temperature sensor readings that happen at seemingly random times. Once it drops out it stays dropped out, and the only way to get them back is to power cycle. Restarting the arduino through fermentrack doesn't work.
 
Upgrade.log does contain a series of errors... Here's a sample:

i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/fermentrack/venv/include -I/usr/include/python3.7m -c build/temp.linux-x86_64-3.7/_openssl.c -o build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7/_openssl.o -Wconversion -Wno-error=sign-conversion
build/temp.linux-x86_64-3.7/_openssl.c:575:10: fatal error: openssl/opensslv.h: No such file or directory
#include <openssl/opensslv.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'i686-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
Traceback (most recent call last):
File "manage.py", line 4, in <module>
from django.db import IntegrityError
ModuleNotFoundError: No module named 'django'
Timed out.
 
Upgrade.log does contain a series of errors... Here's a sample:

i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/fermentrack/venv/include -I/usr/include/python3.7m -c build/temp.linux-x86_64-3.7/_openssl.c -o build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7/_openssl.o -Wconversion -Wno-error=sign-conversion
build/temp.linux-x86_64-3.7/_openssl.c:575:10: fatal error: openssl/opensslv.h: No such file or directory
#include <openssl/opensslv.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'i686-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
Traceback (most recent call last):
File "manage.py", line 4, in <module>
from django.db import IntegrityError
ModuleNotFoundError: No module named 'django'
Timed out.

BOO. That's one of the recent changes I had to make in order to get the latest esptool to work.

I have two options for you in terms of how we can fix this:
1. Install the new (unreleased, lightly tested, probably buggy BUT DEFINITELY MIGHT WORK) Docker version
2. Install the missing packages manually & reinstall Fermentrack

If you go with option #1, you're more future-proofed than with option 2, but it will take a few more steps to get up and running.

If you want to go with option 2, log into your system and run:
sudo apt-get install libssl-dev

...then reinstall Fermentrack via the install script.
 
I am having dropouts to my temperature sensor readings that happen at seemingly random times. Once it drops out it stays dropped out, and the only way to get them back is to power cycle. Restarting the arduino through fermentrack doesn't work.

When you say power cycle, are you power cycling the Pi or the Uno or both?

If both, have you tried unplugging/replugging the Uno alone? If so, does that work?
 
BOO. That's one of the recent changes I had to make in order to get the latest esptool to work.

I have two options for you in terms of how we can fix this:
1. Install the new (unreleased, lightly tested, probably buggy BUT DEFINITELY MIGHT WORK) Docker version
2. Install the missing packages manually & reinstall Fermentrack

If you go with option #1, you're more future-proofed than with option 2, but it will take a few more steps to get up and running.

If you want to go with option 2, log into your system and run:
sudo apt-get install libssl-dev

...then reinstall Fermentrack via the install script.

Thanks again, Thorrak. I'm going to go with Door #2 only because I know how.
 
Next problem:
The ‘update the list of available firmware’ button isn’t succeeding. I have selected the board family and board (Uno). The app can see the board. It seems like it can’t connect to fermentrack.com. I can bring up that website in a browser though.
I initially struggled to get the laptop connected to my WIFI internet connection, but thats all working now. I may have screwed something up there. But web browsing works fine.
 
Next problem:
The ‘update the list of available firmware’ button isn’t succeeding. I have selected the board family and board (Uno). The app can see the board. It seems like it can’t connect to fermentrack.com. I can bring up that website in a browser though.
I initially struggled to get the laptop connected to my WIFI internet connection, but thats all working now. I may have screwed something up there. But web browsing works fine.

What error message exactly are you getting? I'm not seeing anything come through sentry, so it doesn't look like anything is triggering an actual failure. Does the GitHub update workflow work?
 
What error message exactly are you getting? I'm not seeing anything come through sentry, so it doesn't look like anything is triggering an actual failure. Does the GitHub update workflow work?

Sure. I wasn't near the laptop at the time I wrote my last post.

There are 2 red error boxes at the top of the Flash Firmware screen. The first one says: The firmware information available at fermentrack.com isn't something this version of Fermentrack can interpret. Please update Fermentrack and try again. The second one says: Firmware list was not able to be refreshed from Fermentrack.com.

However, clicking the button does lead me through the device identification workflow and successfully finds the board. The workflow ends on a screen that says the following, but has no interactive elements on it. Nothing to click or select or ...

Select Firmware to Flash
Device Information
Serial Port/dev/ttyACM0
Device FamilyArduino-Family
BoardArduino-board


I haven't tried the github workflow. I figured it best to get the app working as it should, assuming this should work. But I'll do whatever you tell me is best.
 
Last edited:
I am curious about a couple things...
Is there firmware for an Arduino UNO that is specific to Fermentrack? I think I've read everything everywhere about Fermentrack now and I couldn't really tell. If not, then Fermentrack is probably fine running my Arduino with the legacy firmware it already has. Is that correct?

Alternatively, I could buy a D1 Mini I suppose and update my controller. Or, I have a Sparkfun ESP32 Thing sitting on a shelf not doing a thing.

Which is the most sensible option for future Fermentrack compatibility? I'm guessing D1 Mini.
 
There's a post/article coming. Bottom line is that "BrewPi" firmware is ubiquitous. You can use the ESP8266 or Uno with either BrewPi or Fermentrack.
 
There's a post/article coming. Bottom line is that "BrewPi" firmware is ubiquitous. You can use the ESP8266 or Uno with either BrewPi or Fermentrack.
Thanks. I’m not grasping the architecture very well, which makes me feel guilty asking for help troubleshooting my atypical use case. It’s a dang impressive project though, so I’m determined.
 
Sure. I wasn't near the laptop at the time I wrote my last post.

There are 2 red error boxes at the top of the Flash Firmware screen. The first one says: The firmware information available at fermentrack.com isn't something this version of Fermentrack can interpret. Please update Fermentrack and try again. The second one says: Firmware list was not able to be refreshed from Fermentrack.com.

However, clicking the button does lead me through the device identification workflow and successfully finds the board. The workflow ends on a screen that says the following, but has no interactive elements on it. Nothing to click or select or ...

Select Firmware to Flash
Device Information
Serial Port/dev/ttyACM0
Device FamilyArduino-Family
BoardArduino-board


I haven't tried the github workflow. I figured it best to get the app working as it should, assuming this should work. But I'll do whatever you tell me is best.

I had broken something on Fermentrack.com. It should work now!
 
To your earlier questions @100amps the article @Lee is referring to should answer the question in a much more thoughtful/thorough way than I can writing off the cuff, but just to provide some quick answers to the questions you asked:

Is there firmware for an Arduino UNO that is specific to Fermentrack?

No. Fermentrack will function with any BrewPi firmware that runs on an Arduino Uno - including the firmware you're currently running.

Alternatively, I could buy a D1 Mini I suppose and update my controller...Which is the most sensible option for future Fermentrack compatibility? I'm guessing D1 Mini.

If you want to, I'd say do it - but there's not really a need if you already have a working Uno. There are some features that only exist on the ESP8266 port (like WiFi connectivity!) but fundamentally it will control temperature just as well as your Uno does. If you want/need the new features, then go for it - otherwise, it's your call if you want the additional project.

Or, I have a Sparkfun ESP32 Thing sitting on a shelf not doing a thing.

The firmware won't run on an ESP32 yet, unfortunately. I'm working on an ESP32 port, but I'm trying to add a bunch of new features at the same time, so it's not quite ready for release. @speshak has contributed quite a bit of code to this effort as well. When it's ready, it's going to be great. ;)
 

Latest posts

Back
Top