Brew Bubbles: Web-Enabled Airlock

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 have now changed my power supply to exclude problems here. The data I had pulled via Homeassistant. To eliminate this source of error, I have additionally created an Item in my Zabbix Monitoring Server, to extract the bubble data there either. Both views are identical. I would like to provide you with the raw data from the database but I think I lack the authority to start a private conversation.
If it is a help I could connect a serial cable to my next fermentation. But this will take a few more days.
A small sample of the data is attached here (CSV).
 

Attachments

  • 2020-11-18-14-03 Chronograf Data.txt
    192.7 KB · Views: 10
Zabbix is a bad word in my house right now - it's why I'm up at this ungodly hour. :)

My best guess is that the controller is restarting and clearing its circular buffer. That would explain the 0 and subsequent rise. If you can put a serial monitor in it, that would allow you to see if that's what's happening. That's also part of the diagnostics I want to put on the web interface. I'll try to set some time aside to get that done.
 
Just a quick update - changes to the core libs have rendered my time management code (important when you say so many times per minute) rather fubared. I'm working on that this morning. When I finish that I'll share a dev version with the diag page so we can dig further.
 
Since then it looks good. But in the meantime I have the problem that my values shoot down/up towards 0 or 60k. Is this known or has someone else already measured something like this?
Okay, I have a debug version which you may want to try. I've added the following which may help:
  • Change the way WiFi connects to make it a little more reliable
  • Reboot cleanly when certain issues are detected
  • Added Telnet to emulate a serial connection (connect on port 23), you can watch this if you desire rather than connect via a serial cable
  • Made NTP time attainment more reliable/faster
  • Added uptime calculations for display
  • Save BPM at each tick (this part may actually help mitigate your issues. I suspect that your controller is resetting for an unknown reason, this will save it in case that happens)
  • Updated page headings
  • Add debug information on the "About" page (this is where you can see if the controller is resetting unexpectedly and why)
This is NOT available via an online update, you will have to use BrewFlasher and select the devel version. Be aware that this will overwrite any configuration (except for WiFi unless you select the "Erase Flash" option):
1606006918142.png

Here's how the new debug information will look:
1606006944129.png

If the issues continue, that information will help us determine why.
 
Last edited:
Lee again a great Job! I've installed it on a test version and it works fine.
I realy like the Telnet part!
FYI I had a new record of 1098 bpm so it can count fast but 60k looks a bit too must :)
 
Yeah, 60k is definitely pushing it. :)

I have ThingSpeak support almost done. If there's anyone that wants to upgrade but does not want to mess with BrewFlasher again, I should be releasing within a day or two. I think. ;)
 
Headed to the In-Laws today so releasing these changes with ThingSpeak will be this weekend at the earliest. If you want to try the Beta, it’s available in BrewFlasher.
 
@LBussy Got 5 available BrewBubbles if you want a guinea Pig
Okay, you're up!

2.2.0RC1 - Feature Release Candidate

See the link for what's changed (I will tell you upfront this includes ThingSpeak support!). If I can get one or two of you to give this a go, I'll release this via the OTA upgrade path for everyone.

Here's a look at the ThingSpeak channel (no brew bubbling at the moment, unfortunately.)

1606678825671.png


At a minimum, your ThingSpeak channel must include the following three channels (in order, the descriptions do not have to be identical):

1606678953339.png


I know visualizations are available. However, I've not taught myself those (yet.) If any of you have one you like for this, please share.
 
@LBussy I can confirm that I can update via BrewFlasher and that I can update ThingSpeak with random finger detection. Don't have anything bubbling at the moment so only finger movement counted.

Good stuff! Again!!!


Chris
 
Got my Breakfast stout bubbling .. I'll see if I can hook up the laptop for a BrewFlasher upgrade and test. Otherwise, I'll have to brew another beer :)
 
Alright, folks: RC2 is ready to have a look at:

2.2.0 Feature Release RC2

It's available via BrewFlasher only right now, which means you will want to backup your configuration before you apply it.

HOT TIP: Did you know you can save off your configuration? Access: http://brewbubbles.local/config/ and you can copy out your current configuration (including those keys you never can seem to remember to save)

Notable changes:
  • Documentation has been updated for the new features
  • The temperature now saves locally with the last bubble count. This means no crazy spikes on that either if the controller resets.
  • Build and branch information have been added to the "About" page
  • The "About" page now reloads so you can keep an eye on things if you suspect something is wonky
  • Added some tool-tips to the "About" page to show what it is you are looking at
If one or two of you could give that a look, I'd appreciate it. I have cleared my TODO list, so this should be ready for release barring any unforeseen bugs.
 
@LBussy A quick late night bench test... Functionality appears OK, it counts my fingers and temperature changes appropriately. The version number is reported as 2.1.1. Serial debugging doesn't seem to work anymore?

It's late, I need to sleep, I'll test again tomorrow evening (UK time).

Good night all
 
I did some tests and it looks really good.
Like allways you did a great job!
Thanks! :rock:
 
Sorry for the late feedback. The changes sound great. I will test them with my next mash. By the way, the 60k messages only showed up at the high bpm's. (over 300). In general the BPM seems a bit too high for me. Per bubble 3-4 bubbles are counted. Here I might have to tune my shrinking tube. After the bpm decreased there were no more spikes. I will test the latest release with my next fermentation. The telnet access sounds great. One question that comes to mind: How often is the BPM saved on flash or is there an Wear-leveling on the memory? To my knowledge the memory of the 8266 modules can only handle 10,000 cycles per cell.
 
Good questions!
In general the BPM seems a bit too high for me. Per bubble 3-4 bubbles are counted.
The counter is a pretty simple thing. If "something" passes the sensor, it counts it. At high bubble rates, the bubbles get strange in an S-lock. You could always build a better airlock, but I think the basic premise works - it's REALLY fermenting or it's fermenting a little. This is a physical challenge more than a firmware one. There's no reason someone could not use a different sensor in this. My goal was not perfection, but something approachable for the "common brewer." If you guys can dream something up, I'm more than happy to help make it a reality.
One question that comes to mind: How often is the BPM saved on flash or is there an Wear-leveling on the memory? To my knowledge the memory of the 8266 modules can only handle 10,000 cycles per cell.
Every minute now. It's saved in LittleFS which leverages the core wear-leveling code. I started to figure out how long it would work before being an issue but gave up. I know BrewPiLess saves much more data and I don't recall people having to replace their controller for that reason. If it happened though, it's another $5 and a couple of minutes to solder the pins on.
 
@LBussy Updates looking good! Don't know why serial port wasn't working last night but this evening all working fine (on the bench). Hopefully get something fermenting next week to evaluate properly :inbottle:
 
Oh the serial port not working was all me. If there are geeks reading: I use tags to get the current version number into the firmware. Then I have to copy the firmware to a directory (/firmware) so that it is available/linkable to BrewFlasher. That means when I use the tag as a target, it picks up the OLD firmware that's not been copied in yet ... a very circular problem.
 
I added a ambient sensor and it works great but even tough I don't have a vessel probe connected it shows a value:
I FINALLY fixed this one! It's in the devel branch right now, I am sincerely hoping to release RC3 tonight or tomorrow and then we can get it into the master branch for online upgrade.
 
Here's RC3, I think this one is going to be the release: 2.2.0 Feature Release RC3

Bug fixes:
As before, BrewFlasher only and that means settings (other than WiFi) will not be retained. A couple good tests and I'll release to master and online upgrades.
 
@LBussy All looking good. DS18B20 not connected is being reported as such, checked on both channels. Version number is reported correctly in Help and Update. What I am missing though is the little bubble icon when a bubble is detected :mischievous: .

Hopefully will get something fermenting this week to do a real life test.


Chris
 
What I am missing though is the little bubble icon when a bubble is detected
I thought I was the only one! :p It got to where it could lock up the serial port when there was a high rate so that seemed like A Bad Idea™.

Thank you for checking. I have one other test before I release it.
 
I've already have 3 brewbubbles that are working perfectly with my solution and I've added a pictures with the dimensions of the shrink tape and the hole.
To fix it I used a small bit of strong glue.
May I use your picture in the documentation?

So here's my kit of parts from yesterday;
And yours as well?

I tried an assortment of gels (granted I did not have a real IR filter) and was not able to get anything to work better than the shrink-tube and pinhole. Sometimes simple is better! :)
 
2.2.0 Feature Release

This feature release contains new features, refinements, bug fixes, and some debug capabilities to make reporting issues easier.
  • New users may install this version via BrewFlasher
  • Current users may use the Settings > Advanced > Update to update without losing settings
New Features
Improvements
  • e10b4d1 Auto-reload the About page information
  • 6789b86 Switch PCB links to OSH Park
  • fa013ad Time stamp last bubble reading
  • fa013ad, 909499b Add temps to last bubble
  • 5f65290 Detect first run after flash
  • 5f65290 Normalize DRD with KC
  • 456477e, 413cf44, 86c3267 Update documentation
  • 2c5f53f Add debug information on the "About" page
  • b315430 Added tooltip to debug information
  • f197b6d Change the way WiFi connects to make it a little more reliable
  • 815fc2c & 33526e9 Add maintenance loop to handle things like rebooting when the memory becomes low
  • 73a7a55 Add a non-blocking WiFi reconnect if the connection is lost
  • 8f4291a Shorten the OTA workflow
  • 155ea76 & c54f303 Allow the program to continue if time servers are not available (uses Epoch time)
  • a5be926 Remove page reload on submit
Bug Fixes
 
@LBussy OTA works fine from 2.1.1, all setting preserved. Did I spot that on the first boot after OTA update that the unconnected temperature probe was reading -127.00 and then on the next server update the temperature changed to "not connected". This is obviously not an issue just an observation.

Chris
 
Did I spot that on the first boot after OTA update that the unconnected temperature probe was reading -127.00 and then on the next server update the temperature changed to "not connected". This is obviously not an issue just an observation.
You mean in between the firmware and littlefs flash, or immediately after booting to the new firmware and when the page redirects? Not sure why it would do that, unless it was just a ghost in the machine. It's possible the page did not fully refresh in your cache when it loaded.
 
@LBussy Like I said, not realy an issue and not really sure if that's what I saw, wasn't paying that much attention :no: On the first complete boot with the new firmware after everything was updated I think the disconnected probe reported -127 and on the second, and subsequent, refreshes reported as disconnected. Does it matter? No, just passing on a possible observation, but I've been wrong MANY times before :ghostly:

Chris
 
Hello LBussy,

a extrem cool project.
How can i spend you a beer (by Paypal, Amazon...) ?

greetings from Germany !
Chrisitan
 
Hi Chrisitan, Grüß Gott!

I appreciate the offer, but there's no need - it's a labor of love. If you want to do something, maybe just keep an eye out for folks local to you who need a part or so. I know getting things in Europe is often not as easy as it is here in the US.

Now, if I were over there, I'd take you up on it. What part of Germany? I was stationed in Heilbronn for a few years. It was West Germany then.
 
Hello Lee,
it is not difficult to get the part in germany, i waiting only for the pcb´s, has build a version on a perforated board.

I live near in the middle of Europe, in the beautiful village Ronneburg -> Gemeinde Ronneburg.

I think the brewflasher has a bug, when i select the newest firmware i will get a http 404 error when accessing the
webinterface, when i flash the older firmware it will run, the ota update will also run without problems,
 
I think the brewflasher has a bug, when i select the newest firmware i will get a http 404 error when accessing the
webinterface, when i flash the older firmware it will run, the ota update will also run without problems,
So this is specifically when you use BrewFlasher to install the newest firmware? I'm not able to reproduce that:
1608128267802.png
 
Hi Lee,
I tried many times, but gave up ordering the parts in Canada from the links provided - it was the PCB link I started with and had trouble with. However, the little octocoupler module I ordered before I discovered this excellent project finally just arrived this week (must have circled the globe a few times). I know you said you tried somethin like this and your code will count anything, so I'm wondering if I can give it a try with this module. It says H2010 on the sensor and the module has 'out', 'gnd', and 'vcc' terminals:​

I have an arduino Uno and an ESP01s module I can use. Would that be more trouble than it is worth?​
James​
 
Back
Top