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.
The error you get about circus not running why you get a 500 error from nginx, so the problem is that process manager circus is not running and have not started fermentrack, so login to you pi and run:

Code:
sudo -u fermentrack -i
source ~/venv/bin/activate
crontab -r
/home/fermentrack/fermentrack/utils/updateCronCircus.sh add2cron
/home/fermentrack/fermentrack/utils/updateCronCircus.sh start
[/quote]

502 is gone, but site is "unavailible" after this :)  Thanks for the effort you are putting into helping me :)
 
Is there a way to remove Fermentrack, and reinstall it (to avoid clean install from scratch on my pi)?
 
Is there a way to remove Fermentrack, and reinstall it (to avoid clean install from scratch on my pi)?

Sure, I think you may even be able to save all the configuration. I have not tried this but I think it should work.

This is what needs to be done:

  1. Collect database (for restore)
  2. Kill all fermentrack processes (so we can remove the user)
  3. Remove the fermentrack user
  4. Run the install again

Code:
sudo cp /home/fermentrack/fermentrack/db.sqlite3 /tmp/
sudo pkill -u fermentrack --signal 9
userdel -r fermentrack
curl -L install.fermentrack.com | sudo bash

# This part is untested (for restore)
sudo -u fermentrack -i
source venv/bin/activate
circusctl quit
cp /tmp/db.sqlite3 /home/fermentrack/fermentrack/db.sqlite3
/home/fermentrack/fermentrack/utils/updateCronCircus.sh startifstopped
 
Non-Fermentrack Update: I've updated the version of brewpi-script I have on the repo for brewpi-www based ESP8266 installations to use the same codebase as was built for Fermentrack. This fixes a handful of bugs that were present in brewpi-script as well as improves support for WiFi-based installations (like those for ESP8266-based installations).

The updated brewpi-script is here:
https://github.com/thorrak/brewpi-script

This repo is not used for Fermentrack installations - you will not need to do anything if you are using Fermentrack.

To install this repo for brewpi-www installations, you will need to install the "pid" package prior to upgrading. To do this, just run
Code:
sudo pip install pid --upgrade
as the "pi" user.




This update should resolve the issues you were facing - let me know if you run into any problems.



Thanks for the update. I got a bit stuck with this...

I ran:
Code:
sudo pip install pid --upgrade
as the "pi" user.

Then I wasn't sure what to do so I cloned the repo:
https://github.com/thorrak/brewpi-script

Then ran the updater.py

I changed the file: config.cfg to:
Code:
wwwPath = /var/www/html
port = /dev/ttyUSB0

and flashed the ESP using:
Code:
sudo esptool.py --port /dev/ttyUSB0 write_flash -fm=dio -fs=32m 0x00000 
/home/brewpi/esp8266/bin/brewpi-esp8266.v0.8.serial.bin

But BrewPi still reports the following:
Code:
Apr 03 2017 18:23:23 Warning: Cannot receive version number from controller. 
Your controller is either not programmed or running a very old version of BrewPi. 
Please upload a new version of BrewPi to your controller.

Have I gone wrong somewhere?

Thanks
Alex
 
Sure, I think you may even be able to save all the configuration. I have not tried this but I think it should work.

This is what needs to be done:

  1. Collect database (for restore)
  2. Kill all fermentrack processes (so we can remove the user)
  3. Remove the fermentrack user
  4. Run the install again

Code:
sudo cp /home/fermentrack/fermentrack/db.sqlite3 /tmp/
sudo pkill -u fermentrack --signal 9
userdel -r fermentrack
curl -L install.fermentrack.com | sudo bash

# This part is untested (for restore)
sudo -u fermentrack -i
source venv/bin/activate
circusctl quit
cp /tmp/db.sqlite3 /home/fermentrack/fermentrack/db.sqlite3
/home/fermentrack/fermentrack/utils/updateCronCircus.sh startifstopped

I did a clean install. I have the ESPxxx number from the previous install, is there any way I can configure this unit whitout flashing the esp8266 again?
 
New SMD boards just arrived in record time from Dirty PC -2 weeks. 3 weeks from order date to the mailbox.I added some text to the board when I was playing around with the Eagle files. Not happy with the color, it's more baby puke green than yellow.
https://www.homebrewtalk.com/attachment.php?attachmentid=395126&stc=1&d=1491243845

IMG_20170403_111046.jpg
 
Think I`m jinxed @ the moment. Flashed 3 different esp8266 boards tonight (one has been flashed before and worked with the v0.8 firmware) None of them shows up on my mack wifi so I can do the setup. Have tried to flash from Pi, from mack and from my Windows laptop.

brewpiless works just fine on all the boards. Stranges thing ever...

Cluless @ the moment..
 
Think I`m jinxed @ the moment. Flashed 3 different esp8266 boards tonight (one has been flashed before and worked with the v0.8 firmware) None of them shows up on my mack wifi so I can do the setup. Have tried to flash from Pi, from mack and from my Windows laptop.

brewpiless works just fine on all the boards. Stranges thing ever...

Cluless @ the moment..

When you flash the wifi settings don't get touched. I can't check the repo at the moment, but there should be a "reset settings" image or "test image" firmware available alongside the wifi and serial ones. Flash that firmware to your board, reset the board by unplugging and re plugging, wait a minute, and then re flash the ESP BrewPi firmware.

The reset firmware wipes out everything - including the wifi settings.
 
Will try again, have already tried, but it might be that I missed the plug out/in wait for a minute.
 
Will try again, have already tried, but it might be that I missed the plug out/in wait for a minute.


Yes it's something like wifi-reset.bin I don't use window but SSH into the pi and flash via the RPI and terminal. When I do that i can see when it's done as it states complete in 32seconds etc.
 
Flashed, power on, waited for 2 minutes, got connected to the esp8266, connected to the wifi - but, I cant configure the device from the fermentrack. It can`t find any of mye boards through the mDNS
 
I have the IP address for the esp8266 on my local network, so I know it is there.
But - there is not possible to get the fermentrack to find it. Not from Mac, not from Windows 10 laptop or stationary Windows 7 computers.

Anyone else who has tried this with the latest fermentrack?

This worked very nice on a older version.
Strange...
 
I have the IP address for the esp8266 on my local network, so I know it is there.
But - there is not possible to get the fermentrack to find it. Not from Mac, not from Windows 10 laptop or stationary Windows 7 computers.

Anyone else who has tried this with the latest fermentrack?

This worked very nice on a older version.
Strange...

I used it a few days ago, but haven't tested on the latest release. That said, the auto detection routines haven't been touched in weeks for WiFi.

The setup flow should work like this:

  1. You connect the ESP8266 to a computer and flash it
  2. You restart it (power cycle) and it appears as a new wireless network
  3. You connect and configure it - then the wireless network disappears
  4. You log into Fermentrack and go through the guided setup process (Meanwhile, your ESP8266 has connected to your WiFi)
  5. The guided setup process shows the ESP8266 using mDNS detection
  6. You select it and finish installation - the device shows up on the Fermentrack dashboard
  7. Brewpi-script launches after a minute or so and the "LCD" contents appear

Of the above steps, everything except the first is completed on the device/computer/VM running Fermentrack (and the ESP8266, obviously) so the computer you are connecting from shouldn't matter.

Which step is failing? Is it #5 (mDNS detection)?
 
I used it a few days ago, but haven't tested on the latest release. That said, the auto detection routines haven't been touched in weeks for WiFi.

The setup flow should work like this:

  1. You connect the ESP8266 to a computer and flash it
  2. You restart it (power cycle) and it appears as a new wireless network
  3. You connect and configure it - then the wireless network disappears
  4. You log into Fermentrack and go through the guided setup process (Meanwhile, your ESP8266 has connected to your WiFi)
  5. The guided setup process shows the ESP8266 using mDNS detection
  6. You select it and finish installation - the device shows up on the Fermentrack dashboard
  7. Brewpi-script launches after a minute or so and the "LCD" contents appear

Of the above steps, everything except the first is completed on the device/computer/VM running Fermentrack (and the ESP8266, obviously) so the computer you are connecting from shouldn't matter.

Which step is failing? Is it #5 (mDNS detection)?

Yes, it`s step 5 who fails. I do know the IP adress to the esp8266 - so at least it`s up and running with an IP adress.
 
I'm stuck at step one. I used nodemuc firmware programmer to flash the wemos d1 mini from my windows 7 pc. I use the default program in NFP, and it looks like there are spots to load different files.I flash it and the program gives me an AP, STA mac address but I can't detect the esp8266 on my network using Advance IP scanner program.The 8266 looks dead -no blue lights blinking.
 
I'm stuck at step one. I used nodemuc firmware programmer to flash the wemos d1 mini from my windows 7 pc. I use the default program in NFP, and it looks like there are spots to load different files.I flash it and the program gives me an AP, STA mac address but I can't detect the esp8266 on my network using Advance IP scanner program.The 8266 looks dead -no blue lights blinking.

You need a wireless unit (computer, pad, phone) and connect to a new WIFI network who should be vissible in your home. When connected to this network, you should be redirected to the setup page - where you connect the ESP8266 to your existing network.

If it does not popup automatic when connecting to the new "espxxx" wifi - you can try 192.168.4.1 as the inet address.
 
Thorrak, did I undertake the correct update process?

Sorry for such a basic question, I'm still learning.

No worries at all! I think you may have not updated brewpi-script itself -- To update that, run the following after logging in to your Raspberry Pi as the `pi` user:

Code:
sudo su brewpi
cd ~
ls -la | grep brewpi.py

Now - If you are in the right directory, you should see one line returned - with "brewpi.py" listed over to the right. If you do, then run:

Code:
git fetch
git pull

...and you should get messages about various files being updated.


Yes, it`s step 5 who fails. I do know the IP adress to the esp8266 - so at least it`s up and running with an IP adress.

Got it - that makes sense.

I've got no idea why mDNS is failing, unfortunately, -- but admittedly it's a bit of a hack. mDNS only works if both your Raspberry Pi and your ESP8266 are on the same network and your router doesn't filter out any of the traffic associated with it. It doesn't work for me on Windows at all (but again - the only things that should matter are the RasPi and ESP) and only works sporadically on my Mac.

THAT SAID I just did some research, and it appears that one of the libraries we use -
Zeroconf - may have actually introduced a backwards-incompatible change in a recent version. Let me test this a bit when I'm near a Raspberry Pi and if we need to adjust the version I'll see if I can make a change.

If this turns out to be the case, I may go ahead and introduce version locking across a number of packages just to be on the safe side.
 
And Voila - you have solved the problem :) Did the update since I saw it where out.
Thanks a bunch :) :)

And it worked from Windows 10 - if that is something I should report back, will do some more boards later, and test from mac...
 
Confirmative: mDNS detection works on Mac also in latest software update.
 
Thanks Thorrak, followed your instructions to the letter. Update applied but the log still reports:

Code:
Apr 04 2017 19:47:22 Warning: Cannot receive version number from controller. 
Your controller is either not programmed or running a very old version of BrewPi. 
Please upload a new version of BrewPi to your controller.

I also tried on my RPi3 install. I suppose the only thing left for me to try is to install everything from fresh.
 
Thanks Thorrak, followed your instructions to the letter. Update applied but the log still reports:

Code:
Apr 04 2017 19:47:22 Warning: Cannot receive version number from controller. 
Your controller is either not programmed or running a very old version of BrewPi. 
Please upload a new version of BrewPi to your controller.

I also tried on my RPi3 install. I suppose the only thing left for me to try is to install everything from fresh.


That's an error I got when using an Arduino that hadn't been flashed before.

Does everything seem like it's been flashed?
 
Everything flashed OK. When I flash the WiFi version to the ESP and input the USB settings in the settings folder it works no problems. I just wanted to use the serial as my WiFi is a bit flaky in the garage.
 
Everything flashed OK. When I flash the WiFi version to the ESP and input the USB settings in the settings folder it works no problems. I just wanted to use the serial as my WiFi is a bit flaky in the garage.


Are you flashing with the wifi of the serial file from the bin directory?
 
Are you flashing with the wifi of the serial file from the bin directory?

I just re-read what I said, this is what I try:

Wifi.bin with wifi settings in the settings file - ok
Serial.bin with the USB port settings in the settings file - Not ok

I know I've got the correct USB port settings as its the same port used for a successful flash of the ESP.

Is anyone else using the Serial version without errors?

Cheers:tank:
 
I just re-read what I said, this is what I try:

Wifi.bin with wifi settings in the settings file - ok
Serial.bin with the USB port settings in the settings file - Not ok

I know I've got the correct USB port settings as its the same port used for a successful flash of the ESP.

Is anyone else using the Serial version without errors?

Cheers:tank:

Well that sounds less than fun. Sorry about that. I don't have a serial controller at home at the moment, but I can flash one this evening and see if I encounter any issues.

In the mean time, if you want, you can test the serial connection to the controller directly from the Raspberry Pi and see what you get back.

SSH into your raspberry pi, and then run:

screen /dev/ttyUSB0 57600

Once that connects, you're typing directly to the BrewPi controller. Type a single "l" (just the letter, no quotes) and it should return the LCD contents. Type "v" for the version info.

If those don't work, it's either a firmware issue or a connectivity issue. If those do work then I screwed something up in BrewPi script.

For more info on how to use screen, check this link.
 
My Raspberry Pi 3, seems to loose contact with the Esp8266 frequently, only way to get it up, is to power off, then power on the esp.
ESP runs normal, nothing "bad" happens, it just looses contact with my pi. (Cannot receiveLCD text fromController/Script)

I`m using this one as power source for the esp8266 - bad choice?

http://www.ebay.com/itm/4-7Ports-USB...item1a28455970

PS. when I got the mDNS step to work last night, it detected the "running" freezer, who already had been connected to the previous Fermentrack.
Nice to see and expirience the fact it helt on to the last setting, even after severeal power loss, and adding it to a totally different installation of fermentrack.

That is good to know (y)
 
The error you get about circus not running why you get a 500 error from nginx, so the problem is that process manager circus is not running and have not started fermentrack, so login to you pi and run:

Code:
sudo -u fermentrack -i
source ~/venv/bin/activate
crontab -r
/home/fermentrack/fermentrack/utils/updateCronCircus.sh add2cron
/home/fermentrack/fermentrack/utils/updateCronCircus.sh start

(become the fermentrack user, remove crontab, add crontab entries back, and finally start cirucs)

That should fix the startup problems of circus and hopefully you can access the web interface.

hurray, thanks for this. I knew I was missing a step! I now have it running on a Centos 7 VM. (I already have it running & didn't want to create a new debian vm.)

-k

:mug:
 
Thanks Thorrak, I'll try and report back.

WELP. I screwed this one up. As you noted, I tried flashing with the serial firmware, and nothing worked. I went back, cleared everything out and recompiled the serial firmware -- and ended up with a file 2/3 the size of the one I had on GitHub. That said, I'm pretty sure I screwed something up somewhere (but have no idea what, where, or when). I've now flashed & tested the new firmware, and everything works as expected - both in brewpi-www and Fermentrack.

Anyways, in ESP8266 Legacy Firmware news, I've now updated the Serial firmware to v0.81 on GitHub. To update the repo, change to the brewpi-esp8266 directory and execute
Code:
git pull
.

Thanks again for catching this, and sorry that it took so long to resolve!
 
Hi All,

I have placed an order with PCBs.io for a D1 Breakout - LCD TH Screws board. Therefore, I should be grateful if anyone could kindly post some top & bottom photos of a completed board please so that I fully understand the layout / configuration.

Thanks in advance for your help.

Kloo
 
WELP. I screwed this one up. As you noted, I tried flashing with the serial firmware, and nothing worked. I went back, cleared everything out and recompiled the serial firmware -- and ended up with a file 2/3 the size of the one I had on GitHub. That said, I'm pretty sure I screwed something up somewhere (but have no idea what, where, or when). I've now flashed & tested the new firmware, and everything works as expected - both in brewpi-www and Fermentrack.

Anyways, in ESP8266 Legacy Firmware news, I've now updated the Serial firmware to v0.81 on GitHub. To update the repo, change to the brewpi-esp8266 directory and execute
Code:
git pull
.

Thanks again for catching this, and sorry that it took so long to resolve!

Glad it wasn't just me being dim! ha ha.

Thanks for getting to the bottom of it. I'll try it out over the weekend :mug:
 
Not too shabby. The trick is to have the right amount of solder past and the right temp. on the iron.

Nice work! I swear though - I need a version of the board with copper pours on both sides, just so the yellow soldermask doesn't look puke green. I realized last night I have a board in that color - it's the pour that saves it.

Thorrak, all good! Serial firmware v0.81 confirmed working. Cheers :rockin:

Awesome! Glad to hear it. I don't expect too many people to use the serial firmware, but there are some people (like yourself) for whom it's the right solution. More options are better in this case.
 
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.

That would be awesome.

It only has 1 MB of SPI flash memory but it can be increased by replacing the memory chip.

Pinout for TH10/16 which has temperature sensor connector:

GPIO 04 - cooling (soldering needed to access the pin)
GPIO 12 - heating (built in relay)
GPIO 14 - temperature sensor (2.5 mm TRRS jack connector)

http://tinkerman.cat/sonoff-th10-th16-sensors-displays-actuators/
 
Back
Top