Native ESP8266 BrewPi Firmware - WiFi BrewPi, no Arduino needed!

HomeBrewTalk.com - Beer, Wine, Mead, & Cider Brewing Discussion Community.

Help Support Homebrew Talk:

100amps

100 Amp (Home) Brewing
Joined
Jun 20, 2014
Messages
155
Reaction score
27
Location
Vancouver
Attached is a controller wiring layout (PDF vector illustration) that uses one of Thorrak's PCBs. I hope someone finds it useful.

thumb.png

thumbnail

It's in the public domain, no copyright. It's a native Adobe Illustrator PDF and should also open without much trouble in InkScape in case you want to modify it, create a derivative work or grab pieces for your own diagram. If you spot any errors, let me know.
 

Attachments

Last edited:
OP
T

Thorrak

Supporting Member
HBT Supporter
Joined
Feb 7, 2016
Messages
2,902
Reaction score
1,808
Location
New York, NY
Attached is a controller wiring layout (PDF vector illustration) that uses one of Thorrak's PCBs. I hope someone finds it useful.

View attachment 712464
thumbnail

It's in the public domain, no copyright. It's a native Adobe Illustrator PDF and should also open without much trouble in InkScape in case you want to modify it, create a derivative work or grab pieces for your own diagram. If you spot any errors, let me know.
That's awesome! Thank you! What did you use to create that?
 

100amps

100 Amp (Home) Brewing
Joined
Jun 20, 2014
Messages
155
Reaction score
27
Location
Vancouver
Thanks! Adobe Illustrator.

I dunno, Lee... the Fermentrack GUI looks pretty good. Someone had to pick the right CSS template.
 

ninthlife

New Member
Joined
Feb 5, 2021
Messages
2
Reaction score
0
I've had a go myself, but I can't work it out.

I'm trying to get this to run this on a Sonoff Dual R2 v1.4?

I've tried changing the pins in config.h in platform.io/Visual Studio Code, but I can't get it to build.

That aside, is it even possible?

I want it to connect to fermentrack as a controller, with fermentrack running on a separate server (done). stand-alone webpage would be handy but not required, LCD handy but not required. iSpindel integration is also a requirement.

Can someone please point me in the right direction?

Cheers!
 

ninthlife

New Member
Joined
Feb 5, 2021
Messages
2
Reaction score
0
Just found this after weeks of looking. sorry,

Not yet.

If someone has a link to the pinout, porting it should be a 5 minute job -- depending on the size of the flash chip they include.
8285 Pinout/GPIO#
Pin 10/GPIO 12 Heating (Built in Relay# 1)
Pin 24/GPIO 5 Cooling (Built in Relay# 2)
Pin 18/GPIO 9 Onewire (Button1 header on PCB)

Other connections
Pin 12/GPIO 13 Blue LED
Pin 19/GPIO 10 Case button (Assign to door?/log event trigger).

For LCD
Pin 14/GPIO 2 I2C SDA TestPoint 2 on back of PCB (IO2)
Pin 9/GPIO 14 I2C SCL Top of R26

Appreciate any and all assistance.
 

troyp42

Well-Known Member
Joined
May 12, 2012
Messages
446
Reaction score
44
Location
Melbourne
Hi gents, is there a way to decrease the compressor delay in fermentrack? It seems way too long.
 

MacDee

Supporting Member
HBT Supporter
Joined
Dec 8, 2008
Messages
119
Reaction score
12
Location
MA & VT
I'm trying to troubleshoot connectivity remotely. It seems after a power outage a esp8266 lost communication with my Fermentrack and network. I can get into my network and RPi using Remot3.it.

Are there any files or logs that I can pull from Fermentrack or the RPi that could give me a hint as to what went wrong?

I've tried resetting the router but no luck, Unfortunately due to Covid restrictions I'm not traveling so I can't physically reset the esp8266. I think Thorrak had put something into the firmware that accounted for slow APs last year. Maybe the ESP8266 needs a way to resign in if it loses communication.
 

troyp42

Well-Known Member
Joined
May 12, 2012
Messages
446
Reaction score
44
Location
Melbourne
Counting all of the BrewPi users, there are thousands of people who have not found that to be an issue. I'm wondering why you think it's too long? There might be something else going on.
Its 9 minutes. I just didnt think a compressor needs to be delayed that long. I know with the STC controllers compressor delay is only a few minutes
 

JeremyJed

Member
Joined
Jan 20, 2021
Messages
8
Reaction score
2
Attached is a controller wiring layout (PDF vector illustration) that uses one of Thorrak's PCBs. I hope someone finds it useful.

View attachment 712464
thumbnail

It's in the public domain, no copyright. It's a native Adobe Illustrator PDF and should also open without much trouble in InkScape in case you want to modify it, create a derivative work or grab pieces for your own diagram. If you spot any errors, let me know.
Sorry to jump into this thread with my noob questions, but I just ordered all the components needed to wire this up...this will be my first forte into PCB soldering.

I purchased the RJ-45 style board, but this applies to all of them...on the board when I want to select the voltage for the temp sensor, is that just a jumper to either the 3v3 or 5v?

The relay module came with a jumper on the JD-VCC & VCC pins. Do I remove that?
 
OP
T

Thorrak

Supporting Member
HBT Supporter
Joined
Feb 7, 2016
Messages
2,902
Reaction score
1,808
Location
New York, NY
Sorry to jump into this thread with my noob questions, but I just ordered all the components needed to wire this up...this will be my first forte into PCB soldering.

I purchased the RJ-45 style board, but this applies to all of them...on the board when I want to select the voltage for the temp sensor, is that just a jumper to either the 3v3 or 5v?

The relay module came with a jumper on the JD-VCC & VCC pins. Do I remove that?
That's awesome! This is a great project to start out with - not a ton of soldering, and you end up with something that helps make beer!

Yes - you are correct. You want to jump either the 3v3 to the center pin or the 5v to the center pin. You can remove the jumper that came on the relay module as you noted and use that to jump the pins.

Enjoy the build!
 

ZeSlammy

Well-Known Member
Joined
Mar 27, 2020
Messages
49
Reaction score
18
Quick question about the RJ45 Socket. I ordered "the same" as the one on the BOM for @LBussy PCB but they won't fit.

I mesure 9.35 mm between "feet" for the socket, the one I received is more around 12 something

I think I need something more around these lines
1613154924215.png
 

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,227
Reaction score
1,235
Location
Kansas City
No not really. I suppose it’s not that big a deal. I can live with it.
The thing is, the longer you spend around these things, the more you see people changing things without knowing why. That's absolutely not a slam on you or anyone else. We are here in this area of the forum because we like to tinker. That's 100% expected and encouraged. :)

A PID controller is black magic in some ways. In some ways, it's the simplest thing in the world because we use one just about every day - our right foot on the gas. But, it's a system and if you change one thing (maybe you now are driving a Ram with a Hemi instead of a Nissan with a 4-banger) and a lot of other things need to be adjusted.

Technically the compressor delay is not part of the PID loop, but it is part of the system. The question is not only short-cycling the compressor, although that is one concern. An additional concern is the amount of time it takes to change the temperature of 5 gallons of liquid. There's no reason to try to chase a tenth of a degree on the micro scale, when on the macro scale the temperature control is very well thought out. Out of the box, most people find Beer Constant will control their brews ±0.1F and that's pretty damned good. This firmware is a port of the original BrewPi firmware which has not had a bug that needed fixing (other than those we've made ourselves) since Apr 23, 2015. It is rock solid.

That's not to say that some people don't have legit needs to change things, there clearly are enough edge cases out there to support some change. Most people however never find a need to make changes and it just works. That's pretty amazing if you think about it.

So, that's why I asked my question that in retrospect I agree sounded snarky. It was not intended that way. I'm just looking to make sure you don't get frustrated with something that works, by making changes before you ever get a chance to see how effective it is.

To answer your original question though: You would have to make a change to the source code and recompile. In TempControl.h live these constants that I'm talking about having worked so well for so long:
C++:
// Set minimum off time to prevent short cycling the compressor in seconds
const uint16_t MIN_COOL_OFF_TIME = 300;
// Use a minimum off time for the heater as well, so it heats in cycles, not lots of short bursts
const uint16_t MIN_HEAT_OFF_TIME = 300;
// Minimum on time for the cooler.
const uint16_t MIN_COOL_ON_TIME = 180;
// Minimum on time for the heater.
const uint16_t MIN_HEAT_ON_TIME = 180;
// Use a large minimum off time in fridge constant mode. No need for very fast cycling.
const uint16_t MIN_COOL_OFF_TIME_FRIDGE_CONSTANT = 600;
// Set a minimum off time between switching between heating and cooling
const uint16_t MIN_SWITCH_TIME = 600;
// Time allowed for peak detection
const uint16_t COOL_PEAK_DETECT_TIME = 1800;
const uint16_t HEAT_PEAK_DETECT_TIME = 900;
 
Joined
Jan 23, 2016
Messages
21
Reaction score
2
Hi everyone,

I'm finally able to give some more attention to my BrewPi, but still having issues.

I've replaced the D1 Mini, wired a new proto-shield for it, tried 4 different temperature probes with and without connectors (alligator clips right to the pins), verified connectivity and resistance, and I'm still getting reading drops every ~20s or so on my temps.

I am currently running with a 2k2 resistor bridging 3v3 and D6 going to the data line, and 5v/Gnd going to the respective connectors on the OneWire interface.

Any ideas???
 
OP
T

Thorrak

Supporting Member
HBT Supporter
Joined
Feb 7, 2016
Messages
2,902
Reaction score
1,808
Location
New York, NY
Hi everyone,

I'm finally able to give some more attention to my BrewPi, but still having issues.

I've replaced the D1 Mini, wired a new proto-shield for it, tried 4 different temperature probes with and without connectors (alligator clips right to the pins), verified connectivity and resistance, and I'm still getting reading drops every ~20s or so on my temps.

I am currently running with a 2k2 resistor bridging 3v3 and D6 going to the data line, and 5v/Gnd going to the respective connectors on the OneWire interface.

Any ideas???
Try swapping 5v for 3v3 going to the OneWire interface. It sounds crazy, but I've had some temperature probes that work with 3v3 but not 5v (hence why my latest PCB design has iti switcahble). How are you powering the D1 mini? Power problems are the typical culprit for things like sensor dropouts.
 
Joined
Jan 23, 2016
Messages
21
Reaction score
2
Try swapping 5v for 3v3 going to the OneWire interface. It sounds crazy, but I've had some temperature probes that work with 3v3 but not 5v (hence why my latest PCB design has iti switcahble). How are you powering the D1 mini? Power problems are the typical culprit for things like sensor dropouts.
I'll give it a try tomorrow. I'm powering the D1 Mini with a 1A USB Charger.
 

Lalo_uy

Well-Known Member
Joined
Jul 31, 2017
Messages
154
Reaction score
44
Location
Montevideo, Uruguay
Try swapping 5v for 3v3 going to the OneWire interface. It sounds crazy, but I've had some temperature probes that work with 3v3 but not 5v (hence why my latest PCB design has iti switcahble). How are you powering the D1 mini? Power problems are the typical culprit for things like sensor dropouts.
I got a 20 probes lot from china, 10 where ok and 10 show that behavior. They worked with 4.2V and lower and not at 5V.
None of them passed the test of original Maxim chips, of course.
 
OP
T

Thorrak

Supporting Member
HBT Supporter
Joined
Feb 7, 2016
Messages
2,902
Reaction score
1,808
Location
New York, NY
I got a 20 probes lot from china, 10 where ok and 10 show that behavior. They worked with 4.2V and lower and not at 5V.
None of them passed the test of original Maxim chips, of course.
I'M NOT CRAZY! 💃

Seriously - I'm just glad I wasn't the only person experiencing that. It took me a few hours of swapping back and forth before I believed what I was seeing.
 
Joined
Jan 23, 2016
Messages
21
Reaction score
2
Well, changing to 5V works consistently with all of my probes. No drop outs. is my 2k2 resistor still okay with 5V, or should I change it to a 4k7?
 

VVbrewery

Well-Known Member
Joined
Aug 20, 2011
Messages
138
Reaction score
47
Location
San Tan Valley AZ
I'm in the process of building a BrewPiLess using a D1 Mini Pro and was thinking of installing Fermentrack but all the install instruction I can find have you flashing it from a Rpi which I don't have. Is there a way to flash it directly?
 
OP
T

Thorrak

Supporting Member
HBT Supporter
Joined
Feb 7, 2016
Messages
2,902
Reaction score
1,808
Location
New York, NY
I'm in the process of building a BrewPiLess using a D1 Mini Pro and was thinking of installing Fermentrack but all the install instruction I can find have you flashing it from a Rpi which I don't have. Is there a way to flash it directly?
The BrewPi-ESP8266 firmware can be installed on a D1 Mini using BrewFlasher if you don't have Fermentrack installed.

One thing of note - even if you go down the BrewFlasher route to actually flash the D1, the BrewPi-ESP8266 firmware expects to communicate with a Raspberry Pi (or other computer) running either Fermentrack, BrewPi Classic, or BrewPi Remix.
 

MacDee

Supporting Member
HBT Supporter
Joined
Dec 8, 2008
Messages
119
Reaction score
12
Location
MA & VT
Remotely accessing Fermentrack sluggish. What should the normal load averages be on a Rpi 3B+ be? When doing the "top" command I'm getting consistently over 1.0 often sometime over 2.
 
OP
T

Thorrak

Supporting Member
HBT Supporter
Joined
Feb 7, 2016
Messages
2,902
Reaction score
1,808
Location
New York, NY
Remotely accessing Fermentrack sluggish. What should the normal load averages be on a Rpi 3B+ be? When doing the "top" command I'm getting consistently over 1.0 often sometime over 2.
Probably not. What specific process are you seeing eat up so many cycles?
 

MacDee

Supporting Member
HBT Supporter
Joined
Dec 8, 2008
Messages
119
Reaction score
12
Location
MA & VT
Probably not. What specific process are you seeing eat up so many cycles?
I might have to clean up some old stuff on the list once I figure out if they are still used but the main ones are Fermentrack related I think. This is what I got:

[email protected]:~ $ top
top - 09:40:33 up 10:33, 2 users, load average: 1.95, 2.01, 1.99
Tasks: 179 total, 3 running, 123 sleeping, 0 stopped, 1 zombie
%Cpu(s): 34.7 us, 1.2 sy, 0.0 ni, 64.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 948304 total, 41276 free, 518792 used, 388236 buff/cache
KiB Swap: 102396 total, 92668 free, 9728 used. 351840 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1218 ferment+ 20 0 45676 17296 6876 R 100.0 1.8 607:10.92 circusd
28018 ferment+ 20 0 55900 36764 10008 S 35.3 3.9 0:03.60 python
1237 ferment+ 20 0 47052 21976 9592 S 5.3 2.3 36:28.76 python3
27990 pi 20 0 8224 3388 2836 R 1.0 0.4 0:00.30 top
10 root 20 0 0 0 0 R 0.3 0.0 2:00.34 rcu_sched
463 root 20 0 2896 1748 1580 S 0.3 0.2 0:10.13 connectd.a+
550 root 20 0 2896 1728 1516 S 0.3 0.2 0:13.49 connectd.a+
659 redis 20 0 29692 2948 2172 S 0.3 0.3 1:38.44 redis-serv+
719 root 20 0 2664 1712 1544 S 0.3 0.2 0:17.23 weavedconn+
729 root 20 0 17536 13176 5564 S 0.3 1.4 0:05.23 ddclient -+
912 pi 20 0 143328 25772 18220 S 0.3 2.7 1:50.93 lxpanel
1 root 20 0 28108 5428 4516 S 0.0 0.6 0:06.46 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.07 kthreadd
3 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_gp
4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_par_gp
8 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 mm_percpu_+
9 root 20 0 0 0 0 S 0.0 0.0 0:03.58 ksoftirqd/0
 
OP
T

Thorrak

Supporting Member
HBT Supporter
Joined
Feb 7, 2016
Messages
2,902
Reaction score
1,808
Location
New York, NY
I might have to clean up some old stuff on the list once I figure out if they are still used but the main ones are Fermentrack related I think. This is what I got:

[email protected]:~ $ top
top - 09:40:33 up 10:33, 2 users, load average: 1.95, 2.01, 1.99
Tasks: 179 total, 3 running, 123 sleeping, 0 stopped, 1 zombie
%Cpu(s): 34.7 us, 1.2 sy, 0.0 ni, 64.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 948304 total, 41276 free, 518792 used, 388236 buff/cache
KiB Swap: 102396 total, 92668 free, 9728 used. 351840 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1218 ferment+ 20 0 45676 17296 6876 R 100.0 1.8 607:10.92 circusd
28018 ferment+ 20 0 55900 36764 10008 S 35.3 3.9 0:03.60 python
1237 ferment+ 20 0 47052 21976 9592 S 5.3 2.3 36:28.76 python3
27990 pi 20 0 8224 3388 2836 R 1.0 0.4 0:00.30 top
10 root 20 0 0 0 0 R 0.3 0.0 2:00.34 rcu_sched
463 root 20 0 2896 1748 1580 S 0.3 0.2 0:10.13 connectd.a+
550 root 20 0 2896 1728 1516 S 0.3 0.2 0:13.49 connectd.a+
659 redis 20 0 29692 2948 2172 S 0.3 0.3 1:38.44 redis-serv+
719 root 20 0 2664 1712 1544 S 0.3 0.2 0:17.23 weavedconn+
729 root 20 0 17536 13176 5564 S 0.3 1.4 0:05.23 ddclient -+
912 pi 20 0 143328 25772 18220 S 0.3 2.7 1:50.93 lxpanel
1 root 20 0 28108 5428 4516 S 0.0 0.6 0:06.46 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.07 kthreadd
3 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_gp
4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_par_gp
8 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 mm_percpu_+
9 root 20 0 0 0 0 S 0.0 0.0 0:03.58 ksoftirqd/0
#1 is circus which has its own logs. I just pushed a change to dev that adds a link to the circus log to the help screen - If you can, update, then take a look at that log and we can try to see what it is trying to do in the background.

#2 and #3 are python processes - I'm guessing #2 at least relates to the circus thing, but without more info its hard to say
 
Joined
Nov 25, 2020
Messages
6
Reaction score
1
Not sure whether this is off topic, bit I think I have had a bit of a failed update (initialised from the Django interface) due to network issues. So now i get a 504 gateway timeout error when trying to access via my browser. At least I think it's that.

So I can ssh into the pi still and can see fermentrack python, circus processes running in top.

I looked at the fermentrack-stderr.log file and have got an error of (tail):

Debugged import:

- 'fermentrack_django' found in '/home/fermentrack/fermentrack/fermentrack_django/__init__.py'.
- 'fermentrack_django.wsgi' not found.

I also checked the upgrade.log (tail)

ile "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/fermentrack/fermentrack/fermentrack_django/settings.py", line 11, in <module>
import environ
ModuleNotFoundError: No module named 'environ'
ok
ok

So I think something has gone wrong somewhere but can't poke my finger at exactly what. Ideally I don't want to do a clean reinstall. So wondering whether there was a command line fix/upgrade option?

More details can be provided.

Cheers,

Martin
 
Top