• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

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

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Any lead on howto use it?

It's not formally documented, but it's modern simple. You go to a URL to get the data you want, and it returns JSON.

The API is here:
https://github.com/thorrak/fermentrack/blob/master/app/api/lcd.py

The URL patterns you want are:
Code:
    url(r'^api/lcd/(?P<device_id>\d{1,20})/$', app.api.lcd.getLCD, name="getLCD"),  # For a single device
    url(r'^api/lcd/$', app.api.lcd.getLCDs, name="getLCDs"),  # For all devices/LCDs
    url(r'^api/panel/(?P<device_id>\d{1,20})/$', app.api.lcd.getPanel, name="getPanel"),  # For a single device

Try starting with /api/lcd/ and go from there.

Side note - I don't remember what getPanel does offhand. I should take a look sometime when I'm home.
 
Any tips where I can buy a DS18b20 with cable that works with my d1 mini?
I have tried two different suppliers of temp sensors (ebay.com, kjell.com) and note of them work. BrewPiLess or BrewPi-ESP8266 can NOT find the sensors. The sensors work fine in CraftbeerPi connected to my Pi.

I have tested a TO-92 DS18b20 supplied with my iSpindel kit. That works fine with my d1 mini running BrewPiLess and BrewPi-ESP8266.

All sensors are connected as instructed to D6 with a pullup resistor of 4,7k to 3,3V.
(3,3V and GND are also connected). The sensors are recognized by CraftbeerPi as 28-8000000xxxxx so they are not running in parasite power mode.
 
Brewpi is programmed to ignore parasitically powered sensors, I'm not sure CraftbeerPi excludes them. At least I have not seen any reference to suggest that they do. I would double check by wiring them up as non-parasite and run the arduino sketch to check them. Because it sure sounds like that may be your problem.

There are parasite only versions of the sensor that will operate in parasite mode regardless of how they are wired up.

Edited to add: Link to Parasite Test Sketch
 
In the documentation for Fermentrack, it indicates that you need to start with a clean install of Rasbian and that if you have brewpi-www installed already, the Apache server causes problems. Would the same be true for a Raspberry Pi with RaspberryPints installed? Can Fermentrack and 'Pints coexist?
 
Thanks for the code!
I get the same result no matter how I connect the three wires to my d1 mini.

"Parasite power is: ON
Device 0 is a DS18B20
Sensor 0 23.37"

I will buy new sensors.
Anybody has a link to sensors that are proven to work?


Brewpi is programmed to ignore parasitically powered sensors, I'm not sure CraftbeerPi excludes them. At least I have not seen any reference to suggest that they do. I would double check by wiring them up as non-parasite and run the arduino sketch to check them. Because it sure sounds like that may be your problem.

There are parasite only versions of the sensor that will operate in parasite mode regardless of how they are wired up.

Edited to add: Link to Parasite Test Sketch
 
In the documentation for Fermentrack, it indicates that you need to start with a clean install of Rasbian and that if you have brewpi-www installed already, the Apache server causes problems. Would the same be true for a Raspberry Pi with RaspberryPints installed? Can Fermentrack and 'Pints coexist?

You hit the nail on the head -- the issue is that nginx expects to have complete control over port 80. That said, no - it won't coexist peacefully out of the box.

Of course, that's out of the box. There is nothing at all that would prevent it from coexisting so long as RaspberryPints was installed in such a way as to run on nginx. So long as php-fpm is installed you could technically run BrewPi-www alongside Fermentrack (as well as raspberry pints) - you would just need to have them running on different ports. Similarly, there's nothing that prevents Apache and nginx from coexisting - nginx is perfectly happy to proxy requests for Apache, or just let Apache handle them on its own (again, so long as they're on different ports).

You aren't the first person to ask for this, so I'm hoping to get full support set up before v2. Initial support will be in the form of example nginx config files, though after I have a chance to look at how RaspberryPints works it may make sense to have installation/support be an install option as well.

The overall goal for Fermentrack is to make most typical use cases easy to set up/manage, after all. :)
 
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!
 
Back
Top