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

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.
@Thorrak Since I did a clean install of scratch I am no longer able to detect any new Vmos from the add new. I can flash the device connected to USB, but my pi never ever detects the flashed vmos. I have to use the IP address to add the boards.

Have anybody else run into this problem? I`m currently adding 3 more chambers, and none came up by the search for new. All had to be manually added.
 
@Thorrak Since I did a clean install of scratch I am no longer able to detect any new Vmos from the add new. I can flash the device connected to USB, but my pi never ever detects the flashed vmos. I have to use the IP address to add the boards.

Have anybody else run into this problem? I`m currently adding 3 more chambers, and none came up by the search for new. All had to be manually added.

Have you happened to change routers recently? I had an issue with a new router I set up for testing, but generally this has been working for me. Regardless, I'll add an issue to track it & will see if there might be something that needs looking into.

Does anyone have a parts list for the RJ-45 sensor breakout board?

Apologies - I misread your post from earlier as looking for the breakout for the RJ-45 SMD board, which is available here. The sensor breakout board really only consists of (at most) four parts:
Links are just examples on AliExpress - you can also get the jack/screw terminal from Mouser/Digikey and the DS18b20 sensors from Amazon if you want a domestic source. I personally don't use door sensors on any of my builds, but the breakout is there for those who like them.
 
Have you happened to change routers recently? I had an issue with a new router I set up for testing, but generally this has been working for me. Regardless, I'll add an issue to track it & will see if there might be something that needs looking into.

Indeed I have. I have switched to a Fortigate 60c. Same IP range and so on as the old one dough.
 
@Thorrak Took delivery of a 3.5" Nextion TFT display yesterday. Just having a play around with the GUI software and initial results look promising :rock:

I got a lot on at the moment but when I get round to it I will start looking at the LCD code on the ESP8266 for BrewPi.
 

Attachments

  • IMG_20180515_093918.jpg
    IMG_20180515_093918.jpg
    2 MB · Views: 276
@Thorrak Took delivery of a 3.5" Nextion TFT display yesterday. Just having a play around with the GUI software and initial results look promising :rock:

I got a lot on at the moment but when I get round to it I will start looking at the LCD code on the ESP8266 for BrewPi.

Well that looks fantastic. Yell if I can help with anything — I’m working on LCD integration as part of a different project, might make sense to take some of the lessons learned from that and seeing if they can be transferred to BrewPi...
 
Should disabling pi wifi and going lan to router keep the pi from talking to esp's?
 
Should disabling pi wifi and going lan to router keep the pi from talking to esp's?

Just to make sure I understand you correctly - is your Pi hooked up to your network using an Ethernet cable while your ESPs connect to the same network via WiFi?

If so, then for most routers you should be fine. Some routers wall off the Ethernet or WiFi and treat them as separate networks - but in my experience this is rare.

You may have an issue with mDNS autodetection - but again, this depends on the router. In this case, you would just need to set the ESP up manually.
 
Thinking about migration to Fermentrack, have a couple of questions:
- which code base version of the Arduino-based BrewPi is this based on? 0.2.4 or 0.2.10?
- does Fermentrack support BrewPi's probe adjustment ("calibration") procedure?

Cheers!
 
Thinking about migration to Fermentrack, have a couple of questions:
- which code base version of the Arduino-based BrewPi is this based on? 0.2.4 or 0.2.10?
- does Fermentrack support BrewPi's probe adjustment ("calibration") procedure?

Cheers!

Fermentrack doesn’t distinguish between firmware versions within the 0.2.x minor version branch - 0.2.4-0.2.11 all work fine. (Technically, even “modern” (OEM) controllers work - but without full functionality)

The ESP firmware on the other hand is currently based on 0.2.4, with a handful of bugfixes and the like manually added. It will eventually be updated (but admittedly I’m not sure what the difference is aside from a massive refactor of where in the repo the code lives - let me track down a change log)

Fermentrack doesn’t currently support temperature sensor calibration. Is the calibration firmware side (calibrated temps show on the LCD) or script side?

Either way, should be an easy add.
 
As you know the BrewPi Arduino code supports a very terse set of commands across the link to the host, and one of those is the ability to adjust how the Arduino code interprets a ds18b20 reading (I do not believe it actually rewrites the calibration setting in the sensor).

I discovered this with some digging when I was down to the last dregs of a couple dozen probes and those last three probes had significant offsets from the Thermapen I use to calibrate pretty much everything. I had been avoiding using them but they were all I had.

I wrote this up some time ago - I think I posted it on the BrewPi thread (probably edited a bit - this is clipped from my stream-of-consciousness system log for that machine).
You can see it's a rather involved process but to this point it's the only game in town ;)

Code:
BrewPi: How to calibrate probes

- Open terminal session
- Stop BrewPi script
- start "screen" program aimed at correct port/device:

$ screen /dev/rfcomm1 57600        <- for BrewPi 3

h{v:1}        dumps sensor data (I guess)

U{i:0,j:-0.125}        i= index of probe (0, 1 or 2) j=correction factor (in °F)
U{i:2,j:-1.4}            would subtract 1.4 degrees F from probe at index 2 (Room Temperature)

Ok, for the record, here's how to calibrate probes in BrewPi.
Assumes an RPi host with network connectivity, with the entire procedure performed remotely via Putty or equivalent terminal emulator.

- tie all probes to a trusted thermometer and allow to normalize
- use the BrewPi web gui to record the probe temperatures and note any variances from the trusted reading

- use the BrewPi gui to Stop the running Script

- open a Putty session and log into the RPi host
- if the program Screen is not installed on the RPi, install it as follows:

$ sudo apt-get update
$ sudo apt-get install screen

- use Screen to connect to the serial port used by the Arduino.
Note if you have a multi-instance configuration to be sure to use the correct port reference.
In this example I'm using a Bluetooth-connected Uno using rfcomm1.
For a single-instance, USB-connected Uno, the most likely ports used are either /dev/ttyACM0 or /dev/ttyUSB0.

$ screen /dev/rfcomm1 57600

There will be no indication that Screen is connected.

- dump the data associated with all probes:

h{v:1}

- probes are referenced using an index i with values of 0 through 2.
Examine the data stream dumped above, looking for each value of "i", and the corresponding temperature reading. The One-wire address of each probe is also provided to help correlate datasets with probes.

- apply the desired adjustment factor for each probe:

U{i:n,j:v.v}

where n=probe index (0 through 2) and v.v is the adjustment value (if negative, then -v.v).

For example, I applied a negative 1.4°F adjustment to a room temperature probe, using:

U{i:2,j:-1.4}

After applying the adjustment factor you can use the dump command to verify the setting.

- Disconnect Screen from the serial port using

ctrl-a, k then answering "y".

- Use the BrewPi web gui to start the script and verify the probe data has been adjusted as desired.

It would be a nice addition if this could be accomplished through the Fermentrack gui...

Cheers!
 
As you know the BrewPi Arduino code supports a very terse set of commands across the link to the host, and one of those is the ability to adjust how the Arduino code interprets a ds18b20 reading (I do not believe it actually rewrites the calibration setting in the sensor).

I discovered this with some digging when I was down to the last dregs of a couple dozen probes and those last three probes had significant offsets from the Thermapen I use to calibrate pretty much everything. I had been avoiding using them but they were all I had.

I wrote this up some time ago - I think I posted it on the BrewPi thread (probably edited a bit - this is clipped from my stream-of-consciousness system log for that machine).
You can see it's a rather involved process but to this point it's the only game in town ;)

Code:
BrewPi: How to calibrate probes

- Open terminal session
- Stop BrewPi script
- start "screen" program aimed at correct port/device:

$ screen /dev/rfcomm1 57600        <- for BrewPi 3

h{v:1}        dumps sensor data (I guess)

U{i:0,j:-0.125}        i= index of probe (0, 1 or 2) j=correction factor (in °F)
U{i:2,j:-1.4}            would subtract 1.4 degrees F from probe at index 2 (Room Temperature)

Ok, for the record, here's how to calibrate probes in BrewPi.
Assumes an RPi host with network connectivity, with the entire procedure performed remotely via Putty or equivalent terminal emulator.

- tie all probes to a trusted thermometer and allow to normalize
- use the BrewPi web gui to record the probe temperatures and note any variances from the trusted reading

- use the BrewPi gui to Stop the running Script

- open a Putty session and log into the RPi host
- if the program Screen is not installed on the RPi, install it as follows:

$ sudo apt-get update
$ sudo apt-get install screen

- use Screen to connect to the serial port used by the Arduino.
Note if you have a multi-instance configuration to be sure to use the correct port reference.
In this example I'm using a Bluetooth-connected Uno using rfcomm1.
For a single-instance, USB-connected Uno, the most likely ports used are either /dev/ttyACM0 or /dev/ttyUSB0.

$ screen /dev/rfcomm1 57600

There will be no indication that Screen is connected.

- dump the data associated with all probes:

h{v:1}

- probes are referenced using an index i with values of 0 through 2.
Examine the data stream dumped above, looking for each value of "i", and the corresponding temperature reading. The One-wire address of each probe is also provided to help correlate datasets with probes.

- apply the desired adjustment factor for each probe:

U{i:n,j:v.v}

where n=probe index (0 through 2) and v.v is the adjustment value (if negative, then -v.v).

For example, I applied a negative 1.4°F adjustment to a room temperature probe, using:

U{i:2,j:-1.4}

After applying the adjustment factor you can use the dump command to verify the setting.

- Disconnect Screen from the serial port using

ctrl-a, k then answering "y".

- Use the BrewPi web gui to start the script and verify the probe data has been adjusted as desired.

It would be a nice addition if this could be accomplished through the Fermentrack gui...

Cheers!

Should be an easy add. GitHub issue is here to track progress.
 
As to Glycol, I need to do some more research, but it's definitely something that I agree should be on the list of features to come. The biggest issues that I have at the moment are figureing out what changes would actually be required to enable support for glycol & the fact that I don't have a glycol system to test it with. Still - those seem like easy problems to solve, all said.

In this post @pocketmon mentions how he got a glycol option working in Brewpiless. I've been using it with my glycol system for the past 10 months without a problem.
 
As long as we're spitballing "feature creep", I've had this thought for a few years now wrt BrewPi: add a second Beer probe and tracking channel, then provide a way to switch from one Beer probe to the other mid-brew if desired, as well as support an averaging mechanism and feed that to the temperature control logic.

Raison d'etre: As I do 10 gallon batches I always run a pair of carboys together, but frequently I use different yeast strains which don't necessary exhibit the same growth rates and/or vigor, so one half-batch might run hotter or cooler than the other. A second beer channel - even if it could only be used observationally - would help me pick those performance differences up and have a chance to do something about it (manually swap the probes), being able to switch the control from one probe to the other via the gui would be another plus, and the averaging feature would be the cherry on top...

Cheers!
 
Last edited:
As long as we're spitballing "feature creep", I've had this thought for a few years now wrt BrewPi: add a second Beer probe and tracking channel, then provide a way to switch from one Beer probe to the other mid-brew if desired, as well as support an averaging mechanism and feed that to the temperature control logic.

You can use a third sensor as “room” temp sensor. when you want to change sensors, just uninstall the beer sensor, set the room sensor as beer sensor, and set the original beer sensor as room sensor. No average reading by this way, though.
 
Yeah, that's not an actual ask.
And I already use the room temp sensor for sensing the room temperature :)

Cheers!

I red and responded it on my phone, and I didn't notice that it's you.
Well, it's not too difficult to implement, but just lousy.
 
Having issues with a second Tilt. Fermentrack sees it just fine but when I bind it to a fermentation chamber/device, it does not show up under that device in the graph or current temperatures pane.

I've tried unassigning and re-assigning to no avail. The first Tilt assigned fine to my other fermentation chamber/device and graphs just fine.

Oh, I also rebooted via SSH as that's nearly the extent of my trouble shooting abilities. Any ideas?
 
Having issues with a second Tilt. Fermentrack sees it just fine but when I bind it to a fermentation chamber/device, it does not show up under that device in the graph or current temperatures pane.

I've tried unassigning and re-assigning to no avail. The first Tilt assigned fine to my other fermentation chamber/device and graphs just fine.

Oh, I also rebooted via SSH as that's nearly the extent of my trouble shooting abilities. Any ideas?
None.

That said - I have two tilts at home. Let me test this weekend.
 
After another time or two of un-assigning/re-assigning, the Tilt gravity and temperature finally started showing up in the graph on the appropriate fermentation device.

I'm not 100% certain but I believe the previous attempts not working might have been related to fermentation profiles. If I understand correctly, when you assign a tilt to a fermentation device the beer/logging profile for each is removed from each device.

In previous attempts I was trying to reassign those existing beer profiles once the devices were paired. Creating a new profile for logging appeared to be the only different thing I did when it started to work.
 
@Thorrak I've got the ESP talking to the Nextion via D4 and TX using a Hello World example. Im about to test outputting some brewpi LCD strings. 2 questions;

Is it ok to use those pins in the ESP-brewpi firmware or are they reserved for something else?

Is it possible to run the ESP with brewpi without a serial connection to a Pi and without any sensors?
 
After another time or two of un-assigning/re-assigning, the Tilt gravity and temperature finally started showing up in the graph on the appropriate fermentation device.

I'm not 100% certain but I believe the previous attempts not working might have been related to fermentation profiles. If I understand correctly, when you assign a tilt to a fermentation device the beer/logging profile for each is removed from each device.

In previous attempts I was trying to reassign those existing beer profiles once the devices were paired. Creating a new profile for logging appeared to be the only different thing I did when it started to work.

That makes sense. If you're already logging a beer, then the assignment of the gravity sensor won't have an effect. I need to make that more explicit - you're not the first person to have this issue. Sorry about the confusion!


@Thorrak I've got the ESP talking to the Nextion via D4 and TX using a Hello World example. Im about to test outputting some brewpi LCD strings. 2 questions;

Is it ok to use those pins in the ESP-brewpi firmware or are they reserved for something else?

Is it possible to run the ESP with brewpi without a serial connection to a Pi and without any sensors?

I wouldn't use TX if you can avoid it, as I think that pin is used for serial connections and therefore may have unexpected noise (unless you're actually communicating with the Nextion via serial, in which case go for it). D4 doesn't currently have anything on it so it's fine to use. Depending on the approach you're taking to adding the Nexion, you could also drop I2C LCD support (I doubt you'd want/need two displays at the same time!) and just use D1/D2 if you need two pins. Options!

ESP will work fine without serial as that's how WiFi support operates. It won't do much without a Pi connected, but if all you're looking to do is debug then you should be able to go that route without issue. Same with sensors - sensors are necessary if you want temperature readings, but aren't necessary otherwise.
 
That makes sense. If you're already logging a beer, then the assignment of the gravity sensor won't have an effect. I need to make that more explicit - you're not the first person to have this issue. Sorry about the confusion!

Eh, chalk it up to user error.

The notifications when assigning the Tilt make it clear that any logging for both the fermentation device and Tilt will stop. I just incorrectly assumed I could re-assign that same logging/fermentation profile rather than creating a new one. Perhaps just expand on the existing notifications, "....and a new beer/fermentation profile must be created rather than re-assigning an existing one.".
 
As you know the BrewPi Arduino code supports a very terse set of commands across the link to the host, and one of those is the ability to adjust how the Arduino code interprets a ds18b20 reading (I do not believe it actually rewrites the calibration setting in the sensor).

I discovered this with some digging when I was down to the last dregs of a couple dozen probes and those last three probes had significant offsets from the Thermapen I use to calibrate pretty much everything. I had been avoiding using them but they were all I had.

I wrote this up some time ago - I think I posted it on the BrewPi thread (probably edited a bit - this is clipped from my stream-of-consciousness system log for that machine).
You can see it's a rather involved process but to this point it's the only game in town ;)

...

It would be a nice addition if this could be accomplished through the Fermentrack gui...

Cheers!

Added in a recent commit to a branch I’m working on. I’m hoping to merge this into the dev branch this coming weekend.
 
Made great progress with the Nextion screen. I've now got a good workflow I'm following which is allowing me to make changes quickly, switching between Photoshop, the Nextion GUI Editor and Visual Studio Code.

I've still got a few BrewPi strings to pass to the screen, and also a smart 'Fermentrack' splash screen to do. Anyway... progress so far (apologies for the shaky camera work!)

https://streamable.com/kkpg7
 
Made great progress with the Nextion screen. I've now got a good workflow I'm following which is allowing me to make changes quickly, switching between Photoshop, the Nextion GUI Editor and Visual Studio Code.

I've still got a few BrewPi strings to pass to the screen, and also a smart 'Fermentrack' splash screen to do. Anyway... progress so far (apologies for the shaky camera work!)

https://streamable.com/kkpg7

Cool (y)
 
@Thorrack Wanted to drop you a note of thanks for starting this thread and all the work that you and many others (thank you to everyone that has contributed) have put in to make this happen. Makes me happy to be a part of the homebrew community. I've been able to follow it and after some trial and error I am up and running. Everything is working flawlessly so far for about a month now. I admit that my build quality is not as good as many, but it's a major upgrade from where I have been (Inkbird + Tiltpi). Photo below.

I wish that my motives where purely just written today only to say thank you (again thank you!!!) but I also have had a few questions on my mind that i haven't yet stumbled on the path to answering. I'm totally sure that these questions have been answered, but somewhere around page 20 or so I veered off of reading every post and tried doing a thread keyword search to no avail. Here it goes:

  1. Is there a way to monitor activity when i'm not on my home network? (ex. google docs/tiltpi)
  2. Is there a way to safely change temp control settings when I am not on my homenetwork in fermentrack? I am a dunce when it comes to networking so I fear opening my network up to outside connections.
  3. Is it possible to change my gravity graph to read out to four digits vs three (ie 1.009 vs 1.01)
  4. Does the ferm profiles tool in fermtrack offer the ability to change temp based on gravity readings? Ex: Pilsner diacetyl rest. Can I set a fermentrack temp profile that says at X gravity raise/lower my beer temp from Y temp to Z temp for A # of days? (Current gravity=X=1015, y=50F, Z=60F, A=3 days)
  5. Similar to above, but can/does fermentrack ferm profiles offer the ability to capture SG (initial log from gravity senor) or input a SG, projected FG, and a starting temp to deduce when temps should change? This would allow for more general profiles that have changing SG, FG and starting temps, but follow a similar path for things like initial yeast growth, diacetal rest, biotransformation, etc. For example: For an Ale, keep fridge temp at X starting temp until Y gravity points have subtracted from SG (x=65, SG=1070, y=5, current gravity=1065) and then raise/lower temp Z degrees (x=65, z=+2, target temp=67). Or in the pilsner example above, when the beer gets to X points from projected FG (FG=1010, Current gravity =1015, x=5), raise/lower temp Y degrees (current temp=50, y=+10, target temp=60) for Z number of days (z=3).

Cheers!
Josh



IMG_1457.JPG
 
Last edited:
  1. Is there a way to monitor activity remotely? (not connected to my local network) Fermentrack? (a la google docs/tiltpi)
  2. Is there a way to safely change temp control settings remotely in fermentrack? (not connected to my local network). I am a dunce when it comes to networking so I fear opening my network up to outside connections.
  3. Is it possible to change my gravity graph to read out to four digits vs three (ie 1.009 vs 1.01)

Thanks - glad that you’re finding the project useful! Also - nice build! I like the use of the telephone jack. ;)

To questions 1 & 2: Not yet. This is something I’m working on, but it’s a few projects back in the queue. That said, I’m adding support soon for pushing data out to remote endpoints which could be used for something like google docs - you just wouldn’t be able to control your fermenter from the web.

To question 3, I thought it already did that. If not, I’ll have to change it. I’ll look when I get home.
 
To questions 1 & 2: Not yet. This is something I’m working on, but it’s a few projects back in the queue. That said, I’m adding support soon for pushing data out to remote endpoints which could be used for something like google docs - you just wouldn’t be able to control your fermenter from the web.

To question 3, I thought it already did that. If not, I’ll have to change it. I’ll look when I get home.

On 1&2: Awesome. Thank you for all you do.

On 3: Mine is showing something like the image below. I just upgraded to the latest release. I am running a Lolin d1 mini v3.1.0, raspberry pi 3 b+ and Stretch.

I also edited my post to include 2 more questions that probably happened after you posted. See below...thank you.

  1. Does the ferm profiles tool in fermtrack offer the ability to change temp based on gravity readings? Ex: Pilsner diacetyl rest. Can I set a fermentrack temp profile that says at X gravity raise/lower my beer temp from Y temp to Z temp for A # of days? (Current gravity=X=1015, y=50F, Z=60F, A=3 days)
  2. Similar to above, but can/does fermentrack ferm profiles offer the ability to capture SG (initial log from gravity senor) or input a SG, projected FG, and a starting temp to deduce when temps should change? This would allow for more general profiles that have changing SG, FG and starting temps, but follow a similar path for things like initial yeast growth, diacetal rest, biotransformation, etc. For example: For an Ale, keep fridge temp at X starting temp until Y gravity points have subtracted from SG (x=65, SG=1070, y=5, current gravity=1065) and then raise/lower temp Z degrees (x=65, z=+2, target temp=67). Or in the pilsner example above, when the beer gets to X points from projected FG (FG=1010, Current gravity =1015, x=5), raise/lower temp Y degrees (current temp=50, y=+10, target temp=60) for Z number of days (z=3).
Screen Shot 2018-06-13 at 12.26.08 PM.png


Cheers
Josh
 
Last edited:
Back
Top