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 that mean nobody clicked on it 'til now? :D

Pretty much. Honestly, I'm kind of tempted to just remove the three buttons beneath the graph until I can figure out some kind of useful info to stick down there. All the functions are duplicates of functions up above -- the only one that isn't obvious is "control logging" - and that's accessible from clicking on the beer name under the controller name.

My hope still is that someone with better design skills than myself takes an interest in revising the user interface though. What we have now is good enough, but it's nowhere near perfect!
 
Whenever I'm presented with a new piece of software I like to go through all the links/screens just to see where everything is. I think your suggestion of removing the buttons is the best option at present, as you say they're just duplication. I really like the interface though, very intuitive. I just need my 2A power supply now so I can box it all up!
 
As the 'Control Constants' page has no values (apart from min and max temp) do I have to enter all the values before using Fermentrack? If I have to enter them, can someone kindly supply a recommended set of defaults?

Thanks
 
As the 'Control Constants' page has no values (apart from min and max temp) do I have to enter all the values before using Fermentrack? If I have to enter them, can someone kindly supply a recommended set of defaults?

Thanks

Interesting - is this a newly flashed controller? It should load the defaults from memory on the controller. Try hitting the "Reset to Defaults" button ("Reset EEPROM?" Not sure off the top of my head). To find it, go to the device dashboard, and from the device menu choose "Manage Device/View Logs"
 
@Thorrak - The chambers connected through serials are put on same /dev/USBxx device when upgrading. Did the upgrade for fix button now - and both chambers are moved to the same /dev/USBx (in my case they where on /dev/USB0 and /dev/USB1) - now both are on /dev/USB1
 
@Thorrak - The chambers connected through serials are put on same /dev/USBxx device when upgrading. Did the upgrade for fix button now - and both chambers are moved to the same /dev/USBx (in my case they where on /dev/USB0 and /dev/USB1) - now both are on /dev/USB1

Can you do me a favor - Go to the "debug device connection" screen for each of your controllers, and post back with what the USB serial number is:

  • Go to Device Dashboard > Device Menu (at the top) > Manage Device/View Logs
  • Then click "Debug Device Connection".
  • Post back with the USB serial number you see for each device

I tested this pretty extensively on my end, so I'm surprised on this one. The USB serial number should get set when you initially set up the device based on the serial port you choose. The "upgrade" override should only happen if the field is blank when you try to use the device.
 
Interesting - is this a newly flashed controller? It should load the defaults from memory on the controller. Try hitting the "Reset to Defaults" button ("Reset EEPROM?" Not sure off the top of my head). To find it, go to the device dashboard, and from the device menu choose "Manage Device/View Logs"

That was it, all sorted. I must admit, I didn't re-flash the ESP when I installed Fermentrack so it was a carry over from the BrewPi install.
 
@Thorrak, I´m not able to find the menu item you pointet me to.
Probaly looking on the wrong page...
 
Got it!!

Device-1

Debugging Connection to Ferment1
Connection Settings
Connection Type serial
USB Serial Number 1a86_USB2.0-Serial
Locate port via USB Serial? True
Last Located Serial Port /dev/ttyUSB0
Serial Alt Port (optional) None
 
Device-2

Connection Settings
Connection Type serial
USB Serial Number 1a86_USB2.0-Serial
Locate port via USB Serial? True
Last Located Serial Port /dev/ttyUSB0
Serial Alt Port (optional) None
 
@Thorrak They are both the same. I must admit I have never cheked this after removing and adding devices, so I do not know if they always have been the same.
 
@Thorrak They are both the same. I must admit I have never cheked this after removing and adding devices, so I do not know if they always have been the same.

Well that would do it...

I'm wondering if both of them actually have the same serial number (which would be bad) or if it's just being overwritten.

If both have the same serial number, then that's an edge case I need to build some kind of solution for. Not sure what yet, but something.

If it's being overwritten, then that's on me.
 
@Thorrak I´l remove the devices, add them, and then post the information all over.
Could this also be the root of the wifi behaviour which I have spoken of? Connecting to wifi etc?

Might be a board design issue - perhaps?
 
Pretty much. Honestly, I'm kind of tempted to just remove the three buttons beneath the graph until I can figure out some kind of useful info to stick down there. All the functions are duplicates of functions up above -- the only one that isn't obvious is "control logging" - and that's accessible from clicking on the beer name under the controller name.



My hope still is that someone with better design skills than myself takes an interest in revising the user interface though. What we have now is good enough, but it's nowhere near perfect!


A what stage is coming up next prompt would be good, also a diacetly rest and cold crash button linking to a predetermined temp would be good. I do like the idea of using a previous log to brew the same beer though. Frustratingly I'm lagering at the moment so have had the same beer since I migrated to using fermentrack
 
@Thorrak - removed, added the chambers, serial is the same for both cards.
(same as previous post)
 
@Thorrak - removed, added the chambers, serial is the same for both cards.
(same as previous post)

Got it. One last thing to check -- If you can, log into your Raspberry Pi and run the following command while both devices are connected:

Code:
udevadm info -a -n /dev/ttyUSB1 | grep serial

You'll probably get ~4 lines, can you post those back here?

Right now, my thought is that I need to just add a check for this edge case and disable the USB serial lookup for both devices if it gets triggered. My D1 Minis all have different serial numbers, but clearly that's not something that can be relied upon. :(

For now, if you want to disable the USB serial number lookup, log into Fermentrack, load the device dashboard, go to the "Manage Device/View Logs" screen, and uncheck "Prefer connecting via udev"
 
@Thorrak

This is the output of the above command.

SUBSYSTEMS=="usb-serial"
ATTRS{serial}=="3f980000.usb"

Same for both /dev/ttyUSB1 and 0
 
My build is coming along nicely. Cheers Thorrak!

2mgw7tc.jpg


2w2g39k.jpg


ifzpsm.jpg
 
Funny you mention the power supply. I bought 1 the same and it was buzzing when I tested it. I wasn't happy so had a refund and bought the 1 in my photo. It was only £1 too! The output on this 1 is also much consistent.
 
@Thorrak

This is the output of the above command.

SUBSYSTEMS=="usb-serial"
ATTRS{serial}=="3f980000.usb"

Same for both /dev/ttyUSB1 and 0

@Thorrak Turned off udev
Then I had to remove all devices again, added them (removed udev)

Tought I could take a new reading, but still the same output for both cards

pi@raspberrypi:~ $ udevadm info -a -n /dev/ttyUSB0 | grep serial
SUBSYSTEMS=="usb-serial"
ATTRS{serial}=="3f980000.usb"
pi@raspberrypi:~ $ udevadm info -a -n /dev/ttyUSB1 | grep serial
SUBSYSTEMS=="usb-serial"
ATTRS{serial}=="3f980000.usb"
pi@raspberrypi:~ $
 
Well, I've gotten my ESP8266 working and am really excited about that. I've run into an issue on the BrewPi end though.

I started with a clean (and patched) build of Raspian then installed BrewPi using Thorrak's modified installer from http://github.com/thorrak/brewpi-utils, then updated the settings/config.cfg with wifiHost and wifiPort.

When I went to my pi's web page from the browser, I see the "LCD screen" display what the actual ESP is displaying. GREAT! But then it switches to a "Cannot receive LCD text from Python script" and the "Script Running" message switches to "Script Not Running!"

Long story short, every minute BrewPi toggles from being able to talk to the ESP and the script running, to not being able to talk to it and the script not running. The stderr.log displays this message every minute:

May 07 2017 21:47:02 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit​

I started looking at the BrewPi.py script to see if I could figure it out. Looks like cron is running the script every minute (which looks right). Here is my /etc/cron.d/brewpi file:

stderrpath="/home/brewpi/logs/stderr.txt"
stdoutpath="/home/brewpi/logs/stdout.txt"
scriptpath="/home/brewpi"
entries="brewpi wifichecker"
# entry:brewpi
* * * * * brewpi python $scriptpath/brewpi.py --checkstartuponly --dontrunfile $scriptpath/brewpi.py 1>/dev/null 2>>$stderrpath; [ $? != 0 ] && python -u $scriptpath/brewpi.py 1>$stdoutpath 2>>$stderrpath &
# entry:wifichecker
*/10 * * * * root sudo -u brewpi touch $stdoutpath $stderrpath; $scriptpath/utils/wifiChecker.sh 1>>$stdoutpath 2>>$stderrpath &​

Does anyone have an idea what's 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.
 
When I went to my pi's web page from the browser, I see the "LCD screen" display what the actual ESP is displaying. GREAT! But then it switches to a "Cannot receive LCD text from Python script" and the "Script Running" message switches to "Script Not Running!"

Long story short, every minute BrewPi toggles from being able to talk to the ESP and the script running, to not being able to talk to it and the script not running. The stderr.log displays this message every minute:

May 07 2017 21:47:02 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit​

Does anyone have an idea what's going on?

I spent some time tonight playing with this, and I think the problem is that I hit tab one too many times. I've pushed an update to the repo.

Since you're using brewpi-www, you'll need to update manually. ssh into your Raspberry Pi and do the following:

Code:
sudo su brewpi
cd ~brewpi
git reset --hard
git pull

You should update to the latest (fixed) brewpi-script.


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.

Hmm. I'm guessing I missed a setting somewhere... Let me take a look.

I've added this issue on GitHub to track things until this gets resolved.
 
I spent some time tonight playing with this, and I think the problem is that I hit tab one too many times. I've pushed an update to the repo.

Since you're using brewpi-www, you'll need to update manually. ssh into your Raspberry Pi and do the following:

Code:
sudo su brewpi
cd ~brewpi
git reset --hard
git pull

You should update to the latest (fixed) brewpi-script.

THANK YOU for taking a look at this. I updated the code and the "Another instance of BrewPi..." message is gone.

I'm still seeing it alternate between "Script Running"/"Script not running" and the LCD going back & forth as well. Having never used BrewPi before, I'm not sure if this is normal (though I suspect not). I've set a continuous ping from the Pi to the ESP and everything looks fine (no drops, time usually < 10ms). A wget <ESPhost>:23 from the Pi downloads JSON data continually. I suspect this is not in the ESP.

This is the output of stdERR now:
May 08 2017 22:07:29 BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
May 08 2017 22:08:34 Lost connection to controller on write. Attempting to reconnect.
May 08 2017 22:08:34 Lost connection to controller on read. Attempting to reconnect.
May 08 2017 22:08:41 Unable to connect to BrewPi ESP_19986E.foolproof.net on port 23. Exiting.
May 08 2017 22:09:01 Connection type set to 'auto' - Attempting serial first
May 08 2017 22:09:12 No serial attached BrewPi found. Trying TCP serial (WiFi)
May 08 2017 22:09:12 Connecting to BrewPi ESP_19986E.foolproof.net (via ESP_19986E.foolproof.net) on port 23
May 08 2017 22:09:19 Successfully connected to controller.
May 08 2017 22:09:19 Notification: Script started for beer 'My First BrewPi Run'
May 08 2017 22:09:29 Checking software version on controller...
May 08 2017 22:09:29 Found BrewPi v0.2.4, running commit 00000000, running on an ESP ESP8266 on port ESP_19986E.foolproof.net:23

lather...rinse...repeat​

Seems like it's getting disconnected after it reads the ESP maybe?
 
THANK YOU for taking a look at this. I updated the code and the "Another instance of BrewPi..." message is gone.

I'm still seeing it alternate between "Script Running"/"Script not running" and the LCD going back & forth as well. Having never used BrewPi before, I'm not sure if this is normal (though I suspect not). I've set a continuous ping from the Pi to the ESP and everything looks fine (no drops, time usually < 10ms). A wget <ESPhost>:23 from the Pi downloads JSON data continually. I suspect this is not in the ESP.

Seems like it's getting disconnected after it reads the ESP maybe?

One of the more recent features added to the ESP8266 firmware is that it will disconnect any already connected clients when a new client connects. The idea is that if an existing connection ends up "frozen", rather than silently preventing any new clients from connecting the ESP will effectively reset the old connection and accept the new.

That said, I think you may have just made this incredibly easy to diagnose - I'm guessing it's your periodic wget that's causing the issue. :)

That said - that's a really interesting way to get data! I like it (even if it causes issues in this case!)
 
Thanks for adding the issue to GitHub. I swapped SD cards last night and had a play with BrewPi again, I much prefer Fermentrack. :D

Been some times since last try with brewpi, but the multifermenter setup alone is a good enough reson to stay with Fermentrack.

Besides that, my chambers has next to no variation in temp - even hvem doing lager brews. 9,47 - 9,54 is the biggest variation I have seen so far :) (when set to 9.5C)
 
Try this:

Code:
sudo sed -i -e 's/KeepAliveTimeout 5/KeepAliveTimeout 99/g' /etc/apache2/apache2.conf

sudo service apache2 restart

Is there any downside to doing this across the board for new installations? Wondering if it would make sense to just add it to the installer for BrewPi-www (since we're already using a customized version).
 
Back
Top