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.
does anyone have a few spare rj11 jacks? I know someone has to if everyone is buying them in 20 packs

I learned today that not all rj11 jacks are the same; the ones I bought have the pin layout opposite of what was designed on the board, meaning they mount on the bottom of the board perfectly fine, but that is not right of course.
 
My new installation is driving me nuts!
I got two wemos boards and two breakout boards made and connected to my new fermentation chambers.
Tried both serial and wifi firmware but find the serial much more stable. But the first problem is the card changing ports during reboot of the Pi. Argh!

But the biggest problem is the operation. I got two temp sensors and a 2 channel relay + LCD connected. Disconnected the LCDs after reading the thread (scrambled screens).

But when I sets it in beer or fridge mode this happens.
- it starts cooling (startes the fridge compressor) for 4 minutes.
- Stops and waits for 8 mins (wait to cool)
- Then it say waiting for 18 hours something

I haven't touched any of the constants in the config.

What the heck is going on?! :(
 
Got the time set correctly on my Pi but Fermentrack is 1 hour out. Anyone know how to change that?

EDIT: I thought I found it by editing Django settings.py

Code:
TIME_ZONE = 'Europe/London'

But this had no effect.

Did you sort this out? I got the same problem. My time i 2 hours off (live in Norway)
 
The time zone issue has been added as a bug on github. Thorrak said it should be fixed in the next version. He will then look into adding an auto reset for the screen scramble, I've ordered an 8A SSR board so I'll report back on how that works out.

As for your 18 hour issue, try resetting the EEPROM on the bottom of the control constants page.
 
The time zone issue has been added as a bug on github. Thorrak said it should be fixed in the next version. He will then look into adding an auto reset for the screen scramble, I've ordered an 8A SSR board so I'll report back on how that works out.

As for your 18 hour issue, try resetting the EEPROM on the bottom of the control constants page.

Thanx!

Will the reset of EEPROM clear all the sensor assignments as well or is the config kept?
 
I'm not too sure sorry. I did it on mine before I had my sensors connected. I was testing BrewPi and then when I switched to Fermentrack there were remnants of BrewPi remaining. Resetting the EEPROM solved that for me.
 
Seems like the operation is OK now.

I changed the 10k resistors to a 4.7k on both cards and its running good now. Maybe early to to say its fixed - but looking very good.

Now the cooling runs without stopping after a few minutes. And all the "dips" in the graph are gone - so there was som fishy business with the temp sensors.
 
A quick update from my end --

Earlier this weekend I managed to get my non-beer related project to a good stopping point, and spent some time focusing on finishing the firmware flashing tool for Fermentrack. As it stands the functionality is pretty much complete for ESP8266 related devices -- Fermentrack can detect the appropriate serial port, download, and flash firmware without kicking the user to the command line. That said - when I started to look into flashing Arduino-based devices I realized I made a pretty major error in the way I was managing things.

As it stands right now, I have two objects which I combine to keep track of firmware - Device Family & Firmware. Unfortunately, not all devices within a family are made the same. Nodemcu-based designs for the ESP8266, for example, require specific flashing options that non-Nodemcu-based designs might not. To resolve this, I'm now going back and creating a "Board" object which will allow further differentiation when flashing.

Oh well. As far as mistakes go, this one is a pretty easy one to recover from - but it means that the initial release of the firmware-flashing functionality is going to have to wait at least one week longer, unfortunately. Still though - progress!
 
@Thorrak
What version of BrewPi firmware is brewpi-esp8266 based upon? I want to run a beer probe only setup (brewpi recommendation for glycol) but this was only supported in V0.4.X. I see you have a 0.4 branch but it's unclear the state and if it works? Can you shed any light on this?
 
@Thorrak
What version of BrewPi firmware is brewpi-esp8266 based upon? I want to run a beer probe only setup (brewpi recommendation for glycol) but this was only supported in V0.4.X. I see you have a 0.4 branch but it's unclear the state and if it works? Can you shed any light on this?

The main version is based on the Legacy branch - 0.2.4 to be specific. As you noted, I am working on a port of the v0.4.x code, but admittedly have shifted this onto the far back burner for the past few months as I've been focused on Fermentrack.

The last time I had the 0.4.x line installed was back in December, unfortunately, but if memory serves right now, the 0.4.x code works in the sense that it boots but doesn't properly register sensors/"actuators". When I stopped it was unclear if the issue was on the firmware side, brewpi-script side, or brewpi-www side -- which was actually a big part of why I started working on Fermentrack.
 
I need a bit of help, the SSR board I purchased is 'Active Low' by default and when powered up both relays are closed. I've tried Inverted and Not Inverted but they are still closed.

If I unassign heat or cool the relay is still closed. It is only open when I pull the heat or cool cable from the ESP.

Do I have to run the SSR board 'Active High'?

EDIT: I tried running the board in 'Active High' and same result. I reset the ESP and the SSR opens. As soon as I assign it to heat (or cold) it closes and says closed. If I unassign it, it will stay closed until I restart the Pi and ESP. Conclusion; I think it's the SSR board. Just wired the mechanical relay back up and all working. Shame really as it powered my fridge no problem.
 
I need a bit of help, the SSR board I purchased is 'Active Low' by default and when powered up both relays are closed. I've tried Inverted and Not Inverted but they are still closed.

If I unassign heat or cool the relay is still closed. It is only open when I pull the heat or cool cable from the ESP.

Do I have to run the SSR board 'Active High'?

EDIT: I tried running the board in 'Active High' and same result. I reset the ESP and the SSR opens. As soon as I assign it to heat (or cold) it closes and says closed. If I unassign it, it will stay closed until I restart the Pi and ESP. Conclusion; I think it's the SSR board. Just wired the mechanical relay back up and all working. Shame really as it powered my fridge no problem.

Do you have a link to the relay board you're trying? Happy to take a look and see if I can replicate on my end.
 
So I just pushed out a pretty big update to Fermentrack which I'm hoping people will find useful over the next few months.

New feature - Firmware Management & Flashing

Fermentrack can now flash firmware to your new BrewPi (or other!) controller directly from within the web interface. There is now no need to switch to the command line (or use a separate tool) just to set up a new device. This feature works for both ESP8266 and most Arduino-based controllers.

The list of available firmware is available at http://www.fermentrack.com/ (albeit not in a human readable form yet - sorry!) and currently includes most popular firmware distributions for both ESP8266 and Arduino. I also have added support for flashing popular non-BrewPi firmware such as @pocketmon 's BrewPiLess.

If you don't have a device that needs flashing but are interested in seeing how it works, take a look here:

[ame="http://www.youtube.com/watch?v=vpm-8k8tnGk"]YouTube[/ame]

The goal of this feature is for it to feel one step shy of magic. If there is anything you think could help get closer to this goal, please let me know.

I've tried to test this with the handful of controllers I have lying around, but admittedly may have missed some bugs. Please be careful not to use this on anything irreplaceable as flashing a controller does carry some degree of inherent danger. If you find any bugs (or would like any firmware added to the list) please feel free to reach out.
 
Do you have a link to the relay board you're trying? Happy to take a look and see if I can replicate on my end.

Much appreciated, it's the 2 channel version of this board: http://www.ebay.co.uk/itm/172281665483

EDIT:
Just done some tests. I can run the board from 2.95V up to 12V and close each SSR by connecting negative to each SSR IN. I went as low as 1.5V but the board would not run that low.

Here are the technical specs of the board:

Description:
High voltage level trigger refers to a forward voltage between signal trigger end(IN) and power cathode, is a trigger way of connecting anode of power with trigger end. When there is forward voltage or the voltage reaches to a certain trigger amount at the trigger end, relay is actuated. Low voltage level trigger refers to the voltage between signal trigger end and power cathode is 0V, or voltage of trigger end is lower than that of power anode, and relay is actuated. Usually connect power cathode with trigger end.

Features:
1, Power supply of module should be direct current, and voltage should be associated to that of relay.
2, The controlled voltage range of relay is AC 24V to 380V. Max Current: 8A.
3, Convenient KF301 green input wiring terminals.
4, Safe KF1000-2P output wiring terminals.
5, High and low voltage level can be set .

Specifications:
Input Voltage Range: DC 5V to 12V
Input Control Signal Voltage:
High and low voltage level can be set (short circuit boards welding on the back plate, the default is low voltage level)
 
So I just pushed out a pretty big update to Fermentrack which I'm hoping people will find useful over the next few months.



New feature - Firmware Management & Flashing



Fermentrack can now flash firmware to your new BrewPi (or other!) controller directly from within the web interface. There is now no need to switch to the command line (or use a separate tool) just to set up a new device. This feature works for both ESP8266 and most Arduino-based controllers.



The list of available firmware is available at http://www.fermentrack.com/ (albeit not in a human readable form yet - sorry!) and currently includes most popular firmware distributions for both ESP8266 and Arduino. I also have added support for flashing popular non-BrewPi firmware such as @pocketmon 's BrewPiLess.



If you don't have a device that needs flashing but are interested in seeing how it works, take a look here:



YouTube



The goal of this feature is for it to feel one step shy of magic. If there is anything you think could help get closer to this goal, please let me know.



I've tried to test this with the handful of controllers I have lying around, but admittedly may have missed some bugs. Please be careful not to use this on anything irreplaceable as flashing a controller does carry some degree of inherent danger. If you find any bugs (or would like any firmware added to the list) please feel free to reach out.


Am i right thinking that flashing the device will wipe all the current assigned devices.
 
@Thorrak

Get a "Unable to check for installed 'avrdude' package - Arduino installations may fail!" when trying to add new device after the update

Something I should get trough git, or is it in development?
 
@Thorrak

Get a "Unable to check for installed 'avrdude' package - Arduino installations may fail!" when trying to add new device after the update

Something I should get trough git, or is it in development?

Interesting - are you running Fermentrack on a Raspberry Pi that is running Raspbian?

Basically, there is a software package (avrdude) that is required to flash Arduinos & similar devices. That program isn't python, and thus must be installed separately through the command line. Fermentrack has a check to ensure the package is installed - but that check requires another software package be installed - dpkg. Thankfully, that package is much more commonplace.

If you don't need Arduino-flashing support you're fine as is. If you do need it, you can log into your device and install avrdude manually. To do so, simply:

  1. SSH into your device (assuming it's a raspberry pi) as the "pi" user
  2. Run "sudo apt-get install avrdude"
  3. That's it!
 
Is the pinout the same for BrewPiLess as for Fermentrack? Can I use Thorrak's PCB to run pocketmon's BrewPiLess?

Unfortunately no. The pinout was the same originally, but got changed in v0.3 due to some weirdness I was experiencing with some of the pins.

I'm pretty sure BrewPiLess could be recompiled to use the same pins, however, if someone wanted to do so.
 
Just pushed out a bunch of small fixes to Fermentrack:

  • Fixed width calculation for fermentation profile exports
  • Fixed profile view for empty fermentation profiles
  • Added a confirmation dialog box when deleting temperature profiles
  • Added ability to rename fermentation profiles
  • Made the "View Room Temp" button work on the device dashboard
  • At the end of a fermentation profile, the controller will now switch to "beer constant" mode

The project for this weekend is to work on timezone logic.
 
@Thorrak can you take a look at my stderr log, I'm updating the control constants but they never seem to all go through, this is me trying 3 times:

Code:
 Jun 25 2017 13:15:54   Controller debug message: INFO MESSAGE 12: Received new setting: tempSetMin = 0.0
 Jun 25 2017 13:15:54   Controller debug message: INFO MESSAGE 12: Received new setting: tempSetMax = 30.0
 Jun 25 2017 13:15:54   Controller debug message: INFO MESSAGE 12: Received new setting: Kp = 5.0
 Jun 25 2017 13:15:55   Controller debug message: INFO MESSAGE 12: Received new setting: Ki = 0.25
 Jun 25 2017 13:15:55   Controller debug message: INFO MESSAGE 12: Received new setting: Kd = -1.5
 Jun 25 2017 13:15:55   Controller debug message: INFO MESSAGE 12: Received new setting: pidMax = 10.0
 Jun 25 2017 13:15:55   Controller debug message: INFO MESSAGE 12: Received new setting: iMaxErr = 0.5
 Jun 25 2017 13:15:55   Controller debug message: INFO MESSAGE 12: Received new setting: idleRangeH = 1.0
 Jun 25 2017 13:15:55   Controller debug message: INFO MESSAGE 12: Received new setting: idlelTimeForEst = 1200
 Jun 25 2017 13:15:55   Controller debug message: WARNING 0: Could not process setting
 Jun 25 2017 13:17:05   Controller debug message: INFO MESSAGE 12: Received new setting: tempSetMin = 0.0
 Jun 25 2017 13:17:06   Controller debug message: INFO MESSAGE 12: Received new setting: tempSetMax = 30.0
 Jun 25 2017 13:17:06   Controller debug message: INFO MESSAGE 12: Received new setting: Kp = 5.0
 Jun 25 2017 13:17:06   Controller debug message: INFO MESSAGE 12: Received new setting: Ki = 0.25
 Jun 25 2017 13:17:06   Controller debug message: INFO MESSAGE 12: Received new setting: Kd = -1.5
 Jun 25 2017 13:17:06   Controller debug message: INFO MESSAGE 12: Received new setting: pidMax = 10.0
 Jun 25 2017 13:17:06   Controller debug message: INFO MESSAGE 12: Received new setting: iMaxErr = 0.5
 Jun 25 2017 13:17:57   Controller debug message: INFO MESSAGE 12: Received new setting: tempSetMin = 0.0
 Jun 25 2017 13:17:57   Controller debug message: INFO MESSAGE 12: Received new setting: tempSetMax = 30.0
 Jun 25 2017 13:17:58   Controller debug message: INFO MESSAGE 12: Received new setting: Kp = 5.0
 Jun 25 2017 13:17:58   Controller debug message: INFO MESSAGE 12: Received new setting: Ki = 0.25
 Jun 25 2017 13:17:58   Controller debug message: INFO MESSAGE 12: Received new setting: Kd = -1.5
 Jun 25 2017 13:17:58   Controller debug message: INFO MESSAGE 12: Received new setting: pidMax = 10.0
 Jun 25 2017 13:17:58   Controller debug message: INFO MESSAGE 12: Received new setting: iMaxErr = 0.5
 Jun 25 2017 13:17:58   Controller debug message: INFO MESSAGE 12: Received new setting: idleRj{coolTargetL = -0.j{hs
 Jun 25 2017 13:17:58   Controller debug message: WARNING 0: Could not process setting
 Jun 25 2017 13:17:58   Controller debug message: INFO MESSAGE 12: Received new setting: 0 = -0.j{hs
 Jun 25 2017 13:17:58   Controller debug message: WARNING 0: Could not process setting

EDIT: Also, just noticed, the stderr and stdout links on the 'Manage Device/View Logs' page are the wrong way round ;)
 
@Thorrak can you take a look at my stderr log, I'm updating the control constants but they never seem to all go through, this is me trying 3 times:
...
EDIT: Also, just noticed, the stderr and stdout links on the 'Manage Device/View Logs' page are the wrong way round ;)

I think that both of these should be fixed now... Give the commit I just pushed to GitHub a shot and let me know if things are working any better now.

One thing of note - with this commit only control constants that have changed will be updated/shown in stderr. The idea is that by reducing the back-and-forth we can not overwhelm the buffers on the controller/script.
 
Fix all working. Now just the constants that have been changed are sent across. Thanks for the fast update.

Did you swap the links over? Still showing backwards on my install.
 
Fix all working. Now just the constants that have been changed are sent across. Thanks for the fast update.

Did you swap the links over? Still showing backwards on my install.

Yep - not sure why that's the case. Everything should be updated.

Development update - I've spent some time this weekend working on getting timezone configuration support up and running. I think everything is complete & works, but before I push it live I'm giving it a bit of time to collect data from my active controller.

One major note on the way this was implemented - existing beer logs will not be updated to match any new timezone selected. This means that existing beer logs will continue to be in UTC -- and any active beer that is being logged when the timezone is changed will have either gaps or overlapping data points for the difference in time between the old timezone & the newly selected timezone.
 
Hey All,

I am thinking I am ready to try out fermentrack. Should have most of the parts already. Is there a doc with the wiring diagram for the hardware?
 
Hey All,

I am thinking I am ready to try out fermentrack. Should have most of the parts already. Is there a doc with the wiring diagram for the hardware?

The current pinout from the controller is:

Expected Pinout (NOTE - CHANGED IN v0.3!)

D0 - Heat
D1 - I2C SCL
D2 - I2C SDA
D3 - Buzzer (currently unsupported)
D4 - N/C
D5 - Cool
D6 - OneWire Data
D7 - Door (Untested)



There are a handful of PCBs that will handle most of the wiring for you - Instructions can be found here if that's the route you want to take. If you'd rather wire things up by hand, you can replicate everything the PCB does on a breadboard with relatively little effort.


In terms of a full bill of materials, in addition to the BOM I have associated with each of the PCBs above, I have a BOM listed out alongside my 3D printed enclosure notes here. Assembly/wiring instructions can also be found in this post.


All the above aside, now that I'm starting to read through what I listed out for the documentation above, I feel like there really isn't a good, single (web) page that I can link that will help someone go from nothing to a working ESP8266 build. If you can think of anything that would help please let me know. I'd like to get to a point where there is a good, one-page solution but haven't yet figured out how to provide that.
 
I more or less followed this but using Thorraks pinouts, also I powered the ESP from the Pi Zero via USB and powered the Pi, LCD, Sensors and Relay Board from the 2A power supply to take draw away from the ESP. When you think about it there are multiple ways to power the components. I just like this diagram as a visual:

BrewPiLess-1.png
 
@Thorrak, how's the timezone testing going? I'm starting my first ferment this weekend, been running in fridge constant since finishing my build. Got a Kolsch fermentation profile ready to go :D
 
Thorrak i had an earlier version of this running but had to pack it all away for a couple of months but back in playing with it now
using the auto install via putty ssh to pi seems to get stuck just after the last line cut and paste here. how long should this take?

::: Running make_secretsettings.sh from the script repo
Generating SECRET_KEY and writing to fermentrack_django/secretsettings.py
secretsettings.py created!

::: Running upgrade.sh from the script repo to finalize the install.
::: This may take a few minutes during which everything will be silent...
 
@Thorrak, how's the timezone testing going? I'm starting my first ferment this weekend, been running in fridge constant since finishing my build. Got a Kolsch fermentation profile ready to go :D

Nice! Time zone support works, but not in the way I'd like. Everything except fermentation data is stored in UTC and converted on the fly - which works great. Fermentation data is stored in local time, so that it can be directly passed to dygraphs (and therefore so device dashboards will load quickly). I'd rather have this stored in UTC and converted on the fly as well, but not at the expense of page render time. That's what I'm working on now. Regardless of how that turns out, I plan to push out the time zone fix this weekend. Perfect is the enemy of the good, in this case.

Thorrak i had an earlier version of this running but had to pack it all away for a couple of months but back in playing with it now
using the auto install via putty ssh to pi seems to get stuck just after the last line cut and paste here. how long should this take?

::: Running make_secretsettings.sh from the script repo
Generating SECRET_KEY and writing to fermentrack_django/secretsettings.py
secretsettings.py created!

::: Running upgrade.sh from the script repo to finalize the install.
::: This may take a few minutes during which everything will be silent...

It can take up to 30 minutes, if memory serves. Django takes ages to install as I recall - it's not exactly lightweight.
 
Yep cool thanks. I was just impatient. Also didn't help that my pc time out was to short so it kept shutting down.
When I put Int the up address it comes up with the old brewpi graph script instead of the fermentrack GUI. Have to get some time to have a play. Getting closer. [emoji106][emoji106]
 
Timezone support is in. A few notes on how it works:


  • The user timezone can be set on the "configuration" page (the gear in the upper right)
  • All data is stored internally in UTC. Feel free to change timezones as you want - the data will be converted on the fly
  • Graphs of fermentation data will be converted to your webbrowser's local time - not the fermentrack time

That last bullet point bothers me, but not enough to try to do anything about just yet. The important thing is that everything is stored in UTC, so any changes we make later shouldn't cause impact existing logs.
 
Updated, all looking good my end. A minor bug, which I didn't notice before, when I try and zoom in by time (left or right) on the graph the data dissappears. Zooming in by temp (up and down) works OK. I'm 12 hours into a beer profile BTW.
 
Another day, another update - this time to fermentrack-tools.

Over the past few months, I've had a handful of people ask whether or not Fermentrack can be installed alongside Raspberry Pints. Although I don't have a RaspberryPints installation available to test with, from my research it should be a pretty simple thing to do. In an attempt to support this, I've pushed a script to fermentrack-tools which will add PHP support to Nginx and tell Nginx to serve all the files Apache did previously.

Note - Support for this is optional, and is not installed by default.

If you want to test this, simply run the following command:
Code:
url -L install-legacy-support.fermentrack.com | sudo bash

Once this is done, you should be able to access "legacy" apps that were previously on Apache at http://<your_ip_address>:81/ .
 
So something's up with my version of Fermentrack, (or possibly the RPI) a few days ago I logged on and had the cannot receive LCD, so I updated (as there was one available and it kicked it back into life same profile etc.

Logged in again this morning and again it said it couldn't receive LCD so I rebooted and it seemed like the Fermentrack must have shut down completely as the beer had dropped to my ambient cellar temp and when I rebooted it wasn't running the beer profile.

I've started it up again and will check in on it daily but could it be an ESP issue?

View attachment 406126
 

Latest posts

Back
Top