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.
I've just ordered all missing components to be able to hook up fermentrack for my new fermenter chambers.

Just one question - what do you guys use for the door sensor? This is the only part that I haven't ordered yet.
 
Thorrak your foray into brewpi tilt is very exciting. Can't wait until the option of changing temp based on gravity is available. [emoji106][emoji106][emoji106]

Tracking will be first, obviously, but that is the ultimate goal. It's going to be awhile though, as once tracking is in I'll have to ferment a few batches on my own to try to figure out the best way to implement SG-based ramping. Regardless, the GitHub issue tracking SG sensor support is here.

What I'm thinking is maybe a batch or script file on a Windows PC that can be clicked to shut the BrewPi down, by automating the log-in and issue of the sudo shutdown -h now command.

That you could absolutely do - and likely without much trouble.
 
I've just ordered all missing components to be able to hook up fermentrack for my new fermenter chambers.

Just one question - what do you guys use for the door sensor? This is the only part that I haven't ordered yet.

At the moment I don't use anything, but I ordered a set of these which I'm thinking I might set up here later.
 
I've just ordered all missing components to be able to hook up fermentrack for my new fermenter chambers.

Just one question - what do you guys use for the door sensor? This is the only part that I haven't ordered yet.

I used a magnetic reed switch. Mine came from a battery-operated cupboard light which cost a dollar.
 
Thorrak, do I wire the DS18B20 to 3.3v or 5v? BrewPiLess suggests 3.3v??

Also, does your firmware auto detect OLED screens too?

Thanks

Apologies - I saw @Bigdaddyale answered the question with regards to the DS18B20, but to answer your question about OLED screens, the answer is "probably not out of the box". I had it running /w an OLED screen a few months back, but can't remember if I had to recompile the firmware to use it or if the OLED screen worked out-of-the-box via I2C.

Out of curiousity, what screen are you looking to use?
 
Apologies - I saw @Bigdaddyale answered the question with regards to the DS18B20, but to answer your question about OLED screens, the answer is "probably not out of the box". I had it running /w an OLED screen a few months back, but can't remember if I had to recompile the firmware to use it or if the OLED screen worked out-of-the-box via I2C.

Out of curiousity, what screen are you looking to use?
This is the screen I'm interested in using.
0.96" I2C IIC SPI Serial 128X64 White OLED LCD LED Display Module for Arduino
http://www.ebay.com/itm/0-96-034-I2...-LED-Display-Module-for-Arduino-/172241275240
 
Yep, got one right here in the palm of my hand.

Well, I mean... size doesn't matter I suppose?

I'll take a look here later and see if I can dig up the code I was using to get it to work. I can't guarantee support, but I don't see any reason not to take advantage of the additional flash space the ESP8266-based platform we're mostly using provides, and attempt to implement something!
 
Probably the same screen I got:

http://www.ebay.co.uk/itm/141676867755

Haven't had it back yet though.

Thorrak, out if interest, as I'm now using serial on the ESP, what does the ESP do with its WiFi. Does it connect to a network at all, enter AP mode or just do nothing?

For the serial image, the WiFi radio does nothing. The libraries aren't even included as part of the image, so the microcontroller doesn't know it has a radio. ;)
 
For the serial image, the WiFi radio does nothing. The libraries aren't even included as part of the image, so the microcontroller doesn't know it has a radio. ;)

I'm now testing the serial firmware instead and it seems to work OK.

But I am still able to ping the wemos mini D1 on their IPs from when I was running the WiFi firmware.
So it's firing up the WiFi when running the serial firmware.

Edit:
Did some more testing now and erased flash before flashing the serial firmware. I now lost my WiFi config and they do not reply on ping, but now the initial ESP AP is broadcasting on both Wemos...forever. Thats it NOT good at all :(

Edit 2:
Seems like the SSIDs don't give access to Wifi configuration. I also see that they are named with an _underscore in the SSID name. Flashing with the Wifi Firmware shows SSIDs without _underscore.
 
I have also found that the vmos keeps data -when flashing new firmware.
I think this could be the cause of some strange behavior.

Found a site yesterday who mentioned GND and GPIO 0 should be connected to properly erase.

Anyone else who know a safe and sound complete ERASE method?
I`m guessing a lot of my problems might be related to the fact old and new firmware exists - side by side.
 
Another question:
Is it possible to reset the device counter? After adding and removing devices I now got /devices/6/dashboard/ and /devices/7/dashboard/

How to reset this so I get /devices/1/dashboard/ and /devices/2/dashboard/ ?
 
So this is an interesting one. You're breaking on what is presumably a built in function for Python. Are you running this on a Raspberry Pi running a recent copy of Raspbian or another operating system?

Regardless - Try updating to the latest release of Fermentrack. There appears to be an issue with variable expansion in Circus which has been corrected and may be contributing to the issue you see.



There's two bugs - One in Fermentrack, one (arguably) in Suit. I think a recent update to Suit caused the bug to finally pop up. I've corrected the bug in Fermentrack (and removed Suit entirely).

I did find one potential issue if there was an active beer being logged that is now fixed... Try updating and see if that fixes the issue.


Hey Thorrak, sorry to bug you again with this, but my new install is again having problems connecting to the controller/script. Don't believe I did anything to make it stop working apart from upgrading fermentrack and viewing the graph.

This time I have uploaded all logs here: http://filebin.net/fermentrack/amadio-fermentrack_logs.tgz

I am running the latest fermentrack (maybe I should stop clicking that upgrade button when fermenting something) and Raspbian Jesse.

I can ping the controller but when i try to telnet to it I get the following message (may or may not be related as I never tried it before)
Code:
Trying 192.168.1.102...
Connected to esp1702741.local.
Escape character is '^]'.
Connection closed by foreign host.

The graph indicates that it was connected up till 8:32. Since then I have tried rebooting the pi, but not much else.
 
I'm now testing the serial firmware instead and it seems to work OK.

But I am still able to ping the wemos mini D1 on their IPs from when I was running the WiFi firmware.
So it's firing up the WiFi when running the serial firmware.

Edit:
Did some more testing now and erased flash before flashing the serial firmware. I now lost my WiFi config and they do not reply on ping, but now the initial ESP AP is broadcasting on both Wemos...forever. Thats it NOT good at all :(

Edit 2:
Seems like the SSIDs don't give access to Wifi configuration. I also see that they are named with an _underscore in the SSID name. Flashing with the Wifi Firmware shows SSIDs without _underscore.

Out of curiosity, are you flashing the v0.8 version of the serial firmware or v0.81? Also, how are you flashing it? Using the esptool script with a Raspberry Pi or via another means?

I'll be honest - that's absolutely insane. I can understand that being the case with the v0.8 serial firmware (I managed to accidentally leave some of the WiFi libraries enabled in that version) but not with v0.81 - at least following a power cycle of the controller.
 
Another question:
Is it possible to reset the device counter? After adding and removing devices I now got /devices/6/dashboard/ and /devices/7/dashboard/

How to reset this so I get /devices/1/dashboard/ and /devices/2/dashboard/ ?

No - that number is an internal ID that is used by Fermentrack to track devices and is automatically incremented. If you really wanted to reset it you could delete your SQLite database file and then run the upgrade script manually via SSH, but that would be the "nuclear" option as it would delete all of your configuration options/logs.

Hey Thorrak, sorry to bug you again with this, but my new install is again having problems connecting to the controller/script. Don't believe I did anything to make it stop working apart from upgrading fermentrack and viewing the graph.

This time I have uploaded all logs here: http://filebin.net/fermentrack/amadio-fermentrack_logs.tgz

I am running the latest fermentrack (maybe I should stop clicking that upgrade button when fermenting something) and Raspbian Jesse.

I can ping the controller but when i try to telnet to it I get the following message (may or may not be related as I never tried it before)
Code:
Trying 192.168.1.102...
Connected to esp1702741.local.
Escape character is '^]'.
Connection closed by foreign host.

The graph indicates that it was connected up till 8:32. Since then I have tried rebooting the pi, but not much else.

Downloading the logs now - thanks for uploading them, that makes debugging a much simpler proposition. :)

What you're seeing with the telnet session sounds like that controller already has something connected to it. Whatever the first thing to connect is - hopefully Fermentrack - has control of the device and has its input/output processed. If I was a smart man I'd make it interpret input from all connected sessions and send data to the same, but that could lead to weirdness if by some strange twist someone had both Fermentrack and BrewPi-www set up, or multiple installs of Fermentrack.
 
Out of curiosity, are you flashing the v0.8 version of the serial firmware or v0.81? Also, how are you flashing it? Using the esptool script with a Raspberry Pi or via another means?

I'll be honest - that's absolutely insane. I can understand that being the case with the v0.8 serial firmware (I managed to accidentally leave some of the WiFi libraries enabled in that version) but not with v0.81 - at least following a power cycle of the controller.

Running 0.81 serial.

Did a flash_erase before flashing 0.81 using esptool/PI.

It seems to run a kind of Wifi SSID which I'm able to connect to. My mac gets an IP (192.168.4.2) but it does not make me able to run the Wifi setup (the popup) to configure it to my own wifi.

If I flash the Wifi 0.8 firmware the SSID is ESPxxxxxxxx (It works normal and I get the config popup if I connect to it. Making med able to configure the Wifi)

If I flash the serial 0.81 firmware the SSID is ESP_xxxxxxx (with an underscore)

So the Wifi is active but it do not work as normal. I'm just afraid that someone (neighbor) can connect to it and reconfigure it :p Because these strange SSIDs still shows up after 7 hours.
 
Is there any way to reset / reboot one of the esp8266 remotly - lost connection with my Fermentrack when I did a apt-get upgrade.
All i need is to take power, reboot, and everything is online again (at least it has used to be)
 
Took power, esp8266 (vmos D1) came up, I can ping it, but there is no way the Fermetrack is able to start the script/receive the script.

All is working - on the board, I can see it controls the fridge without any problems @ all.

Anybody have any clue what is going on here? Have tried to ask severeal times, but it seems my questions is either stupid, or ignored.
 
Tried to change to IP address instead of the esp1659303.local adress, but still not connecting to Fermentrack. Firmware still works as it should, that I`m sure of.
 
Hey stbernts,
Tried to change to IP address instead of the esp1659303.local adress, but still not connecting to Fermentrack. Firmware still works as it should, that I`m sure of.

Sounds like the same issue I am facing. I had it a week or so ago, needed to get it working before putting a beer in the fridge so I reinstalled everything on the pi from scratch.
Unfortunately its come up again (see a few posts up), I uploaded my logs and Thorrak is taking a look.
 
Yep, I do not understand what is going on, but either it is some data left on esp boards, or something is going on in Fermentrack. Now I`m not able to get the fridge going. I`m able to assign sensors and everything, but after that - I`m left in the dark..

Unable to reach brewpi-script. Try restarting brewpi-script. - this is what happens after assigning devices.
 
Sounds like the same issue I am facing. ... Unfortunately its come up again (see a few posts up), I uploaded my logs and Thorrak is taking a look.

Try updating to the latest release of Fermentrack. Interestingly enough, there's a bug in the official implementation of BrewPi script which - due to the way they have things implemented - doesn't seem to matter for serial connections but matters quite a bit for WiFi ones when a controller stops responding for any reason. As a result, when a controller:

1. Successfully connects to Fermentrack
2. ...reports back a version number to the script
3. ...and then stops responding

...BrewPi-script will refuse to admit defeat, and will remain convinced it is still connected to the controller.

Additionally, I noticed a handful of other small logic issues which I've attempted to correct. No idea if that will help or hurt, but it should generate some helpful log entries if it ever gets tripped.



Took power, esp8266 (vmos D1) came up, I can ping it, but there is no way the Fermetrack is able to start the script/receive the script.

All is working - on the board, I can see it controls the fridge without any problems @ all.

Anybody have any clue what is going on here? Have tried to ask severeal times, but it seems my questions is either stupid, or ignored.

Apologies - your questions are neither stupid nor ignored - I was/am just unable to reproduce the specific symptoms you describe which makes it difficult to debug on my end. That said, I'm hoping that the fix I just pushed through to address some of what @Amadio was seeing will fix your issues as well.

If it doesn't, I also took a look through some of the WiFi-related code in the firmware earlier tonight, and thing I may be able to tweak a few things to make that end work better as well. Unfortunately, it's late here, so that will have to be a project for another evening.
 
Yep, I do not understand what is going on, but either it is some data left on esp boards, or something is going on in Fermentrack. Now I`m not able to get the fridge going. I`m able to assign sensors and everything, but after that - I`m left in the dark..

Unable to reach brewpi-script. Try restarting brewpi-script. - this is what happens after assigning devices.

I think there's a bug in the firmware that causes the firmware to crash. Because of the bug I referenced, brewpi-script then doesn't reconnect.

Try with the latest update to Fermentrack, and if that doesn't fix it let me know.
 
I think there's a bug in the firmware that causes the firmware to crash. Because of the bug I referenced, brewpi-script then doesn't reconnect.

Try with the latest update to Fermentrack, and if that doesn't fix it let me know.

Will do, and thanks a bunch, not adressed to you @ all, it`s more my own lack of knowledge (trying to read a lot these days to understand more)

I`m super happy that people like you put all this effort into something like this and in fact share it :)

I wonder if pocketmon is using the original brewpi-script firmware anymore. Somtimes his script also fails - but it seems like he has some kind of "retry" / "reconnect" embedded.

I`l try the latest this evening. I`l even start from scratch with the Fermenatrack to be sure.

I`l also try to wipe the esp8266 to be 100% sure there is nothing left from older firmware etc.
 
A simple upgrade to fermentrack has fixed it for me. Thanks a lot Thorrak

What is your running version now? Nevermind, I found Thorrak had released a new one after I went to bed yesterday.

But - since I`m rather stupid, I finally made a realy bad mistake. I deleted the fridge who did not respond, and added a new one - no problem, excpet I managed to write the name for the unit with Norwegian special characters. That made Django stop me from doing further settings.

Is there anyway I could correct mye mistake, and rename it, except in Django?

Named it "Gråtass" - which where ment to be "Gratass" - did not see the miss-spelling before I hit the point of no return button..
 
Will do, and thanks a bunch, not adressed to you @ all, it`s more my own lack of knowledge (trying to read a lot these days to understand more)

Thank you for finding bugs! I know the frustration that comes when you're banging your head against a wall, trying to get a software package that supposedly works up and running and running into errors. I think part of the issue with this latest one is that I've had extraordinary good luck with the controller I have running my fermentation chamber. It's been up and running without a power cycle for over a month at this point, and hasn't disconnected from WiFi once. As a result, this bug never popped up. To test the hypothesis that this was caused by disconnects, I ended up pulling the plug from the box a bunch last night.

It's one way to test things. ;)

I wonder if pocketmon is using the original brewpi-script firmware anymore. Somtimes his script also fails - but it seems like he has some kind of "retry" / "reconnect" embedded.

BrewPiLess doesn't use BrewPi-script at all, as the functionality of the BrewPi web interface is embedded on the ESP8266. I don't know if his WiFi code differs significantly from what I'm using at the moment, but I'm pretty sure the actual BrewPi controller functionality is the same.

But - since I`m rather stupid, I finally made a realy bad mistake. I deleted the fridge who did not respond, and added a new one - no problem, excpet I managed to write the name for the unit with Norwegian special characters. That made Django stop me from doing further settings.

Is there anyway I could correct mye mistake, and rename it, except in Django?

Named it "Gråtass" - which where ment to be "Gratass" - did not see the miss-spelling before I hit the point of no return button..

Hmm. So what component is failing? Django should be Unicode aware, and happy to process whatever you throw at it. If you want to name your controller with emoji, go for it. To that end, if you want to remove Unicode from a controller name you should be able to go into the Django admin (from the gear icon) and directly rename it.

The BrewPi-script launcher may not be Unicode aware - admittedly, that's not something I thought to test. If that's what is failing, renaming the controller should fix everything up (at least, until everything could be patched).

If Fermentrack itself isn't responding (the website is down) please post the last 50 or so rows in Fermentrack.log - that would be interesting to see what in Django doesn't like Unicode.
 
What is your running version now? Nevermind, I found Thorrak had released a new one after I went to bed yesterday.

But - since I`m rather stupid, I finally made a realy bad mistake. I deleted the fridge who did not respond, and added a new one - no problem, excpet I managed to write the name for the unit with Norwegian special characters. That made Django stop me from doing further settings.

Is there anyway I could correct mye mistake, and rename it, except in Django?

Named it "Gråtass" - which where ment to be "Gratass" - did not see the miss-spelling before I hit the point of no return button..

I did the same mistake this weekend - Norwegian characters in the name.
"Back" in the browser saved my ass this time.. :p
 
This is some of the code who appears when I try to edit "Gråtass"

UnicodeEncodeError at /admin/app/brewpidevice/15/change/
'ascii' codec can't encode character u'\xe5' in position 2: ordinal not in range(128)
Request Method: GET
Request URL: http://192.168.8.179/admin/app/brewpidevice/15/change/
Django Version: 1.10.7
Exception Type: UnicodeEncodeError
Exception Value:
'ascii' codec can't encode character u'\xe5' in position 2: ordinal not in range(128)
Exception Location: /home/fermentrack/venv/lib/python2.7/site-packages/django/utils/encoding.py in force_text, line 80
Python Executable: /home/fermentrack/venv/bin/python2
Python Version: 2.7.9
Python Path:
['/home/fermentrack/venv/lib/python2.7/site-packages/git/ext/gitdb',
'/home/fermentrack/venv/bin',
'/home/fermentrack/venv/src/django-suit',
'/home/fermentrack/fermentrack',
'/home/fermentrack/venv/lib/python2.7/site-packages',
'/home/fermentrack/venv/lib/python2.7',
'/home/fermentrack/venv/lib/python2.7/plat-arm-linux-gnueabihf',
'/home/fermentrack/venv/lib/python2.7/lib-tk',
'/home/fermentrack/venv/lib/python2.7/lib-old',
'/home/fermentrack/venv/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-arm-linux-gnueabihf',
'/usr/lib/python2.7/lib-tk',
'.',
'/home/fermentrack/fermentrack',
'/home/fermentrack/venv/lib/python2.7/site-packages/gitdb/ext/smmap']
Server time: Tue, 18 Apr 2017 13:01:53 +0000
Unicode error hint

The string that could not be encoded/decoded was: Gråtass
 
And this appears when I try to delete that fridge.

UnicodeEncodeError at /admin/app/brewpidevice/
'ascii' codec can't encode character u'\xe5' in position 2: ordinal not in range(128)
Request Method: POST
Request URL: http://192.168.8.179/admin/app/brewpidevice/
Django Version: 1.10.7
Exception Type: UnicodeEncodeError
Exception Value:
'ascii' codec can't encode character u'\xe5' in position 2: ordinal not in range(128)
Exception Location: /home/fermentrack/venv/lib/python2.7/site-packages/django/utils/encoding.py in force_text, line 80
Python Executable: /home/fermentrack/venv/bin/python2
Python Version: 2.7.9
Python Path:
['/home/fermentrack/venv/lib/python2.7/site-packages/git/ext/gitdb',
'/home/fermentrack/venv/bin',
'/home/fermentrack/venv/src/django-suit',
'/home/fermentrack/fermentrack',
'/home/fermentrack/venv/lib/python2.7/site-packages',
'/home/fermentrack/venv/lib/python2.7',
'/home/fermentrack/venv/lib/python2.7/plat-arm-linux-gnueabihf',
'/home/fermentrack/venv/lib/python2.7/lib-tk',
'/home/fermentrack/venv/lib/python2.7/lib-old',
'/home/fermentrack/venv/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-arm-linux-gnueabihf',
'/usr/lib/python2.7/lib-tk',
'.',
'/home/fermentrack/fermentrack',
'/home/fermentrack/venv/lib/python2.7/site-packages/gitdb/ext/smmap']
Server time: Tue, 18 Apr 2017 13:03:18 +0000

Django stops working when I try to delete - or rename it.
 

Latest posts

Back
Top