Keg Cop: Keg Monitoring and Control

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

danb35

Well-Known Member
Joined
May 26, 2012
Messages
148
Reaction score
28
Location
Hartsville
fwiw, there is a spreadsheet created by an HBT member that accurately calculates volume given empty keg weight, current keg weight, keg temperature, beer carbonation level, beer gravity and current altitude. I've been using it for years and given the SF800s I can reliably predict a keg kick within one glass either way. Look for Keg Volume Kalculator.
...and all of those factors, to the extent relevant, could, at least in principle, be coded into Keg Cop--though that would likely clutter the UI a bit (I assume altitude could be a site setting that wouldn't need to be re-entered every time though).
 

danb35

Well-Known Member
Joined
May 26, 2012
Messages
148
Reaction score
28
Location
Hartsville
@LBussy, I was going to make a few tweaks to the main PCB layout and submit them as a PR, but I see there's a Main Boards/devel/ directory as well, and the schematic and board in there look very different compared to what's in Main Boards/main/--but the latter has more recent commits. I don't see any new commits to either of these in the devel branch. Is the one in main the current design?

Edit: Also, is there a particular reason you're committed to EAGLE? If not, can I suggest you consider using KiCad instead? As far as I can tell, it's at feature parity with EAGLE with the exception of the oft-denigrated autorouter, and it's free. Really free--no limit on commercial use, board size, number of layers, etc.
 
OP
OP
LBussy

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,873
Reaction score
1,661
Location
Rural Kansas
all of those factors, to the extent relevant, could, at least in principle, be coded into Keg Cop--though that would likely clutter the UI a bit (I assume altitude could be a site setting that wouldn't need to be re-entered every time though).
Within reason, the altitude could be obtained from a location API. I have not looked at that spreadsheet yet because the "ooh shiney" nature will cause me to lose my spot. :) Once I get in there, I think I can cobble something together. If a person cares that much about making sure they have the fill level to the fraction of an ounce, they will just have to live through a more cluttered UI. Maybe an "expert mode" along with a "just give me the beer" mode.

@LBussy, I was going to make a few tweaks to the main PCB layout and submit them as a PR, but I see there's a Main Boards/devel/ directory as well, and the schematic and board in there look very different compared to what's in Main Boards/main/--but the latter has more recent commits. I don't see any new commits to either of these in the devel branch. Is the one in main the current design?
The recent addtions are still in devel branch. The board in Main Boards/devel is my code development board, and different because I made it before I made some changes to the pin layout. So it allows me to "press buttons" to emulate a physical setup while coding.
 
OP
OP
LBussy

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,873
Reaction score
1,661
Location
Rural Kansas
Okay: 1.1.1-Beta.3 is released, and I have updated Keg Cop Beta to 1.1.1-Beta.3

I believe this is the last Beta release prior to 1.1.1. Any and all help testing will be appreciated.

Most significantly this closes the last bug which was Flowmeter calibration
 
OP
OP
LBussy

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,873
Reaction score
1,661
Location
Rural Kansas
The only thing I might have noticed is a random reboot of the ESP. It was unresponsive for a while. I saw the blue LED flash and then stop.
Without the serial monitor hooked up, all you can do is validate if it did and when. You can look at the "About" page, and/or view the /uptime.csv file.
 

rkhanso

Well-Known Member
Joined
Jan 24, 2017
Messages
686
Reaction score
163
Location
Plymouth, MN - terrible tap water for brewing
After a little more testing, I'm wondering if the temperature offsets are working.
My temp sensors drifted apart after the initial power-up. I have the 3 sensors in a single glass of water which is at 72.5F. KegCop is displaying them at 73.4, 72.5, 70.5. I set the offset of sensor 1 to -.9 and the last to +2.
There are no immediate changes to the temp readings in KegCop. I waited 10 minutes and still no change in reported temp in the GUI. I refreshed my browser. No change on the Temperatures page.

Then I reset the controller after calibrating and the offsets kicked in. Is the requirement to reset the controller after adjusting the offsets still there?

I'm still expecting the offsets to take place immediately, and without a controller reset. That the controller reads what it does from the temp probe, separate from any averaging or other mathematical calculation and simply adds or subtracts the offset at the end - to what it already calculated. This is what I expect because I'm pretty sure that's the way CraftbeerPi3 worked. I know, this is not CraftbeerPi3.

I re-flashed the controller and things started to work better.
 
Last edited:
OP
OP
LBussy

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,873
Reaction score
1,661
Location
Rural Kansas
Is the requirement to reset the controller after adjusting the offsets still there?
No, it should not behave as you are reporting. There is a circular buffer of six values it uses to average a reading. When you change the offset it will clear that buffer and start over, as it will only store the corrected value.

My temp sensors drifted apart after the initial power-up. I have the 3 sensors in a single glass of water which is at 72.5F. KegCop is displaying them at 73.4, 72.5, 70.5.
It seems unlikely that the values reported could be anything other than what's being reported factored by the offset. If the temps are "right" at first, being digital, that communication continues. That range is +-1.45 so it's within the margin of error (+-1.8F) for those probes, but we should be able to allow you to correct them. I can't say if they will stay corrected, because those sensors may be drifting too.

I am going to have to dig into some boxes and see if I can find my setup. My kegerator is gathering dust in the corner of the barn, it's a sad state of affairs I can tell you.

Then after messing with offsets again, the controller reset on its own after saving.
I changed the offsets and did a controller reset in the GUI and again lost my tap config.

I wonder if I have a bad ESP32. I seem to be getting inconsistent results.
If you browse to {name or ip}/uptime.csv (in my case that would be http://kegcop.local/uptime.csv) there's a log of reboots. That will help see if it's an uber-bad issue so post it here. Mine looks like:

Code:
Date/Time, Start Reason, Restart Description, Uptime (Secs)
2022-08-04T13:33:28Z, ESP_RST_POWERON, START_WARMBOOT, 146

It's one behind, so it will only log a crash after the crash happened if that makes sense. This is a debug feature and will not always be enabled, but it's enabled in the devel release.
 

rkhanso

Well-Known Member
Joined
Jan 24, 2017
Messages
686
Reaction score
163
Location
Plymouth, MN - terrible tap water for brewing
Date/Time, Start Reason, Restart Description, Uptime (Secs)
2022-08-05T13:19:00Z, ESP_RST_SW, START_WARMBOOT, 170
2022-08-05T13:19:42Z, ESP_RST_SW, START_WARMBOOT, 26
2022-08-05T13:20:21Z, ESP_RST_SW, START_WARMBOOT, 25
2022-08-05T13:23:31Z, ESP_RST_SW, START_WARMBOOT, 184
2022-08-05T13:24:37Z, ESP_RST_SW, START_WARMBOOT, 46

After re-flashing about 15 minutes ago, temps are steady and in sync. I'll watch for drift as time passes. And will test with different water temps to see if it's consistent over a range
 
OP
OP
LBussy

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,873
Reaction score
1,661
Location
Rural Kansas
START_WARMBOOT
That's a "controlled" boot, meaning the software requested a reboot for some reason. There's few reasons for that, but one would be if you changed your hostname. It's not a crash.

That + you losing settings makes me wonder if you didn't have two tabs open to a settings page? I certainly have blown myself up when that happens.
 
OP
OP
LBussy

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,873
Reaction score
1,661
Location
Rural Kansas
Okay - thanks to the folks here for testing, I am now ready to release ...

1.1.1 Bug Fix Release!

You can check out the release notes if you'd like to see what's changed. Suffice it to say I put a lot of work into fixing a couple of problems - mostly because I just needed a better way to test them.

If you are on version 1.0.0, you cannot upgrade via the UI. The ability to even try it has been removed. You can use BrewFlasher or BrewFlasher Web, which has has been updated Keg Cop to 1.1.1.

Since this is re-flashing, and a bit of a PIA to re-set things, I've been giving this a little thought. I think you can open your settings page on one tab, hit BrewFlasher Web in another, then when you are done and it is connected to your network with the same name, go back to your original tab. You will have to go to EVERY SETTINGS TAB except for the Controller tab and "Update" settings. This will push your old settings back in. If you do the Controller tab, do it last because it may reload your data. I will see if I can figure out a "save" and "reload" next time.

The reason upgrading is not possible is because the partition size is different because the controller libraries were updated. It happens - hopefully this will last us a while.

If you are a "nuts and bolts" person, there are two things to know:
  1. This was compiled and released with debug symbols. The size is bigger, who cares, but most importantly this will enable a VEY verbose debug via serial (or Telnet.) I thought I would leave this enabled just in case till the next version.
  2. The /edit page is broken. I'm pretty sure I know why and I don't have the energy to fix it. The issue is SPIFFS needs a leading "/" for the filename and the upstream lib was re-written for LittleFS which doesn't have that.
Finally, I am committing a cardinal sin: I am releasing this and going on vacation tomorrow! Everyone knows not to do that! If you have a problem, just go back to the previous version, it's still in BrewFlasher. Pretty sure this one is solid though.
 

rkhanso

Well-Known Member
Joined
Jan 24, 2017
Messages
686
Reaction score
163
Location
Plymouth, MN - terrible tap water for brewing
I just tonight got my Kegerator running on Keg Cop. The flow meter is connected, but not calibrated yet because the temps are too high and I'm getting a lot of foam. Going to wait until the temps are at normal ranges before calibrating.

So far, things seem to be running good.

Before I shut the Kegerator down on and setting up Keg Cop, there was a lot of ice on the back wall of the Kegerator. It's all melted and drained off. Hoping it doesn't do that again.
 

danb35

Well-Known Member
Joined
May 26, 2012
Messages
148
Reaction score
28
Location
Hartsville
Got the PCBs from OSHPark and the parts from Mouser the same day, so I've assembled one of my 6-way flowmeter breakout boards:
1660403547208.png

OSHPark does make pretty PCBs, but I'm not super happy with how they (de)panelize them--sharp, pointy bits on all the edges. That hasn't been my experience with JLCPCB. Easy enough to sand off, of course.

I realize, though, that I neglected to put a mounting hole in this design--probably should update it.
 

rkhanso

Well-Known Member
Joined
Jan 24, 2017
Messages
686
Reaction score
163
Location
Plymouth, MN - terrible tap water for brewing
That's a "controlled" boot, meaning the software requested a reboot for some reason. There's few reasons for that, but one would be if you changed your hostname. It's not a crash.

That + you losing settings makes me wonder if you didn't have two tabs open to a settings page? I certainly have blown myself up when that happens.
This has happened a couple more times. Didn't realize I had another tab open to KegCop. At least that's what it appears to have happened. Is there a way to get around this? I've not had this happen with CraftbeerPi before.

Are there plans for taking backups and being able to restore them?

Date/Time, Start Reason, Restart Description, Uptime (Secs)
2022-08-12T22:39:07Z, ESP_RST_WDT, START_COLDBOOT, 25449
2022-08-12T23:02:32Z, ESP_RST_WDT, START_WARMBOOT, 1389
2022-08-13T00:45:18Z, ESP_RST_SW, START_COLDBOOT, 2652
2022-08-13T01:00:04Z, ESP_RST_TASK_WDT, START_WARMBOOT, 886
2022-08-13T01:02:15Z, ESP_RST_TASK_WDT, START_WARMBOOT, 106
2022-08-13T01:02:37Z, ESP_RST_TASK_WDT, START_WARMBOOT, 5
2022-08-13T01:03:11Z, ESP_RST_TASK_WDT, START_WARMBOOT, 27
2022-08-13T01:03:31Z, ESP_RST_TASK_WDT, START_WARMBOOT, 5
2022-08-13T01:04:25Z, ESP_RST_TASK_WDT, START_WARMBOOT, 45
2022-08-13T01:04:47Z, ESP_RST_TASK_WDT, START_WARMBOOT, 6
2022-08-13T01:05:10Z, ESP_RST_TASK_WDT, START_WARMBOOT, 5
2022-08-13T03:01:53Z, ESP_RST_SW, START_COLDBOOT, 1546
2022-08-13T03:29:13Z, ESP_RST_WDT, START_COLDBOOT, 91
Date/Time, Start Reason, Restart Description, Uptime (Secs)
 

rkhanso

Well-Known Member
Joined
Jan 24, 2017
Messages
686
Reaction score
163
Location
Plymouth, MN - terrible tap water for brewing
I'm getting more reboots - it seems to happen when I refresh the browser window. It also happens when I only have one tab open to the KegCop GUI. When I save settings, it frequently reboots and I lose my settings again.

Then all my settings are lost and I have to re-configure everything. Frustrating.

I have only one browser window open. Using Brave browser (offshoot of Chrome).

  • Uptime:Days: 0, Hours: 0, Minutes: 0, Seconds: 40
  • Reset Reason:Reason: ESP_RST_PANIC, Description: Software reset due to exception/panic
  • Heap Information:Free Heap: 178532, Max: 45044, Frags: 75

After sitting for a while and simply refreshing the browser window, the ESP32 reboots. This has happened multiple times. Might it be a bad ESP32? I always thought apps running on ESP8266 and 32s would be more stable than a Raspberry Pi, since there's much less software involved.

The CraftbeerPi setup was very stable. Hopefully this is just a bug that needs to get figured out and fixed.

I'm trying different setting configurations to see if I can narrow it down to a feature. So far, it "seems" like it might be the Tower Fan Sensor and Temp Control. It hasn't reset since I didn't configure them. But it hasn't been very long yet, either. Not enabling them also had some crashes pretty quick.

Now trying just the Keg Temp Sensor only. No other sensors, no flow meter. Just the one Control for the Kegerator cooling (nothing for the tower set). Also leaving the Brewery name at the default. I'll give it a workout and see if it crashes again. One thing I do notice, the web GUI is much faster responding to mouse clicks when I only have KegCop configured this way. It seems when I enable the other features I need, the GUI is sluggish before the ESP crashes and reboots.

Edit -
I'm now also using the IP address instead of //kegcop/ in the web browser to see if that makes a difference. Made some more changes and it still seems OK now. I changed the Brewery Name and activated the Lower Chamber temp sensor. I'll give it some time and watch for a crash/reboot.

Edit - Nope. Crashed again and all the settings went back to default again.

Does anyone else have this trouble? Or is it just me? I'm running the latest Beta version of KegCop for the Tower Temp Control feature - v1.2.0-Alpha.1 [feature_86] (97fed93)
 
Last edited:
OP
OP
LBussy

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,873
Reaction score
1,661
Location
Rural Kansas
One thing I do notice, the web GUI is much faster responding to mouse clicks when I only have KegCop configured this way. It seems when I enable the other features I need, the GUI is sluggish before the ESP crashes and reboots.
The same amount of data is moving back and forth no matter that you have configured. That's pretty strange. By far, the largest data transfer is JQuery and Cjhart.js, but those only comes down the first time (from the Internet) and will (should) cache after that as long as you have the browser open.

Edit - Nope. Crashed again and all the settings went back to default again.
What page are you on when you say you refresh? None of them should require a refresh (not that it should not be safe.) All of the dynamic data will refresh itself.

Are there plans for taking backups and being able to restore them?
There are - but your challenges are somewhat unique for sure.

I'm running the latest Beta version of KegCop for the Tower Temp Control feature - v1.2.0-Alpha.1 [feature_86] (97fed93)
That would be an "Alpha" code, sir. :) Not tested NEARLY enough to trust your beer to it. I just wanted to get that tower fan change out there to see if it was close.

I've gotta say I can't reproduce the challenges you are having - I left a chest freezer being controlled when I left yesterday and it's been up since then.

Using Brave browser (offshoot of Chrome).
Would you try using Firefox and/or Chrome? Also maybe try it in incognito mode. I can't think of why that would matter, but I did all my testing on Edge, FF and Chrome. It's an outside possibility (way outside) that something about all the "Security" around the Brave browser is contributing to it. I would consider that a bug but it might explain it.

Is there any possibility you have some security software running inside your home network? Thorrak had the same issue with the ESP8262 firmware for BrewPi. All of the boots except for that one you showed are "normal" resets. That leads me to suspect that something outside the UI is "controlling" things.

We'll figure it out. This is why it's always fun. There was a major core change in ESP32 for this release, as well as several upstream changes.
 

rkhanso

Well-Known Member
Joined
Jan 24, 2017
Messages
686
Reaction score
163
Location
Plymouth, MN - terrible tap water for brewing
Page refresh - at some point, the temperatures stop automatically updating in the browser. I notice this when going to other tabs and later coming back to the KegCop tab. This is when I manually refresh the page, and that's seems to be when the ESP32 reboots. But it seems like it's hung up before that due to not automatically updating the temperatures. It doesn't seem to matter what page I'm on. It can be the home page, the temperature page or even the setup page and navigating somewhere else.
When on the temperature offsets or the temperature control settings page, sometimes changes don't seem to take and it'll reboot after I try to save. I could set up a screen-share and let you navigate to see what I mean if you'd like. Same thing happens in Firefox and Edge.

I have an Untangle firewall at home, but that doesn't come into play since the brewing equipment is on the same LAN/network as my desktop PC that I'm using with the various browsers connected to KegCop. But I also checked the firewall logs and verified it's not blocking anything to the Internet either. There are frequent outbound connections to 198.54.126.154, which is hosted by Namecheap. It appears to be the ESP32/KegCop checking for firmware updates. Nothing blocked internally or externally.

1660575027459.png
 
Last edited:
OP
OP
LBussy

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,873
Reaction score
1,661
Location
Rural Kansas
I have an Untangle firewall at home, but that doesn't come into play since the brewing equipment is on the same LAN/network as my desktop PC that I'm using with the various browsers connected to KegCop.
Whether or not you have to go through a firewall doesn't matter. There are some firewalls and some PC-based security suites that will very helpfully hit any open port inside the firewall and what happens is it can issue a rando-command and reset the controller. Worst-case it will crap itself entirely which sounds suspiciously like what we have going on here. I may need to put in a "secret" to disallow rando connections from doing that.

Page refresh - at some point, the temperatures stop automatically updating in the browser. I notice this when going to other tabs and later coming back to the KegCop tab.
Does that ever happen when the page is in for foreground and stays there for a while? And it's "Keg Cop". When you use teh camel-case version, it crashes. There's your problem. "{

I could set up a screen-share and let you navigate to see what I mean if you'd like.
Maybe when I get home. I just got up to S. Dakota. Beautiful area but the Internet where I am is ... uh .. not so great. :)
 

rkhanso

Well-Known Member
Joined
Jan 24, 2017
Messages
686
Reaction score
163
Location
Plymouth, MN - terrible tap water for brewing
Whether or not you have to go through a firewall doesn't matter. There are some firewalls and some PC-based security suites that will very helpfully hit any open port inside the firewall and what happens is it can issue a rando-command and reset the controller. Worst-case it will crap itself entirely which sounds suspiciously like what we have going on here. I may need to put in a "secret" to disallow rando connections from doing that.


Does that ever happen when the page is in for foreground and stays there for a while? And it's "Keg Cop". When you use teh camel-case version, it crashes. There's your problem. "{
I get crashes/reboots when I'm using my Android phone and either the Chrome or Brave browser.
I've used both IP address and MDNS for URLS for Keg Cop and get the same results. My DNS is local (Pi-Hole). There is no reason any of the traffic from my PC or phone should go near the Firewall since everything is on the same local network. I'm not sure what you mean by "hit any open port inside the firewall" - maybe some scanning or network monitoring happening? I suppose I should start up Wireshark and see if there are any hints of trouble there. It seems to me like it's more of a problem with the web server on the ESP32 that is causing the reboots, based on how it's reacting. I will start up Wireshark and see if that provides any insight.
Maybe when I get home. I just got up to S. Dakota. Beautiful area but the Internet where I am is ... uh .. not so great. :)
 

rkhanso

Well-Known Member
Joined
Jan 24, 2017
Messages
686
Reaction score
163
Location
Plymouth, MN - terrible tap water for brewing
Just before, during and after a reboot, this is what Wireshark sees - Starting at about line 1474 until about line 1491 is when it's crashed/rebooted. The MDNS lines or around there.



I also telnetted to the ESP32 and got the following output. But during a reboot, it didn't give any further or additional data because when it rebooted, the telnet connection was obviously lost.


It seems to frequently reboot/crash when I click on the About page link, but not only that link/page.
 

Thorrak

Supporting Member
HBT Supporter
Joined
Feb 7, 2016
Messages
3,311
Reaction score
2,150
Location
New York, NY
Just before, during and after a reboot, this is what Wireshark sees - Starting at about line 1474 until about line 1491 is when it's crashed/rebooted. The MDNS lines or around there.



I also telnetted to the ESP32 and got the following output. But during a reboot, it didn't give any further or additional data because when it rebooted, the telnet connection was obviously lost.


It seems to frequently reboot/crash when I click on the About page link, but not only that link/page.


Since Lee is out of town and can't yell if I break his project, can you try Keg Cop Alpha (Thorrak) in BrewFlasher and see if that helps at all?

It might not help one bit, might make things crash more frequently, or may just not work at all. (Or it might be rock solid, in which case, fantastic. ;) )
 
Last edited:

rkhanso

Well-Known Member
Joined
Jan 24, 2017
Messages
686
Reaction score
163
Location
Plymouth, MN - terrible tap water for brewing
Since Lee is out of town and can't yell if I break his project, can you try Keg Cop Alpha (Thorrak) in BrewFlasher and see if that helps at all?

It might not help one bit, might make things crash more frequently, or may just not work at all. (Or it might be rock solid, in which case, fantastic. ;) )
Not easily. The controller is not readily accessible now that it's in a box and running the Kegerator.
But I'll see if I can get to it some time this week. It's a busy week at work until Friday.
Thanks - I am willing to try anything at this point.
 

Thorrak

Supporting Member
HBT Supporter
Joined
Feb 7, 2016
Messages
3,311
Reaction score
2,150
Location
New York, NY
Not easily. The controller is not readily accessible now that it's in a box and running the Kegerator.
But I'll see if I can get to it some time this week. It's a busy week at work until Friday.
Thanks - I am willing to try anything at this point.
I’ve got a test board here. I’ll see if I can reproduce on my end this morning.
 
OP
OP
LBussy

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,873
Reaction score
1,661
Location
Rural Kansas
Oh lordt. How am I going to relax when @Thorrak is fiddling with my code?!

@rkhanso, if you have the ability to put a serial monitor on there it might be interesting. If these are crashes, it will show more info since I left debug labels enabled.
 

rkhanso

Well-Known Member
Joined
Jan 24, 2017
Messages
686
Reaction score
163
Location
Plymouth, MN - terrible tap water for brewing
Your version is super-stable, @Thorrak - but missing the feature Lee added for tower temp control/solenoid.
The web-page loads are very quick.

I don't know what "targets" are. I tested out the config pretty thorough and found with no taps configured, the Tower fan control not enabled and just one Keg temp sensor and the temp control for the Kegerator enabled, it still crashed/rebooted.

When I was using the Alpha version Lee provided, the web pages would be noticeably slower just before it rebooted. I just had one tab open. It really seemed to me to be a web-server type issue causing the crashing, but that's only a gut feeling. Nothing to back it up. Or I guess it could be the "alpha" changes that Lee made. Or just my luck, something in my homemade PCB or setup.

Serial monitor - not sure how to do that. I did have a telnet session to the ESP32, but I don't think that's what you're talking about. Do you mean with the Arduino IDE serial monitor connected to the USB port of the ESP8266?
 
Last edited:

Thorrak

Supporting Member
HBT Supporter
Joined
Feb 7, 2016
Messages
3,311
Reaction score
2,150
Location
New York, NY
Your version is super-stable, @Thorrak - but missing the feature Lee added for tower temp control/solenoid.
The web-page loads are very quick.

When I was using the Alpha version Lee provided, the web pages would be noticeably slower just before it rebooted. I just had one tab open. It really seemed to me to be a web-server type issue causing the crashing, but that's only a gut feeling. Nothing to back it up.

Serial monitor - not sure how to do that. I did have a telnet session to the ESP32, but I don't think that's what you're talking about. Do you mean with the Arduino IDE serial monitor connected to the USB port of the ESP8266?

Yeah -- Looks like I misinterpreted @LBussy 's branches. I just updated the Thorrak firmware -- mind trying it again and seeing if it is an improvement?
 

rkhanso

Well-Known Member
Joined
Jan 24, 2017
Messages
686
Reaction score
163
Location
Plymouth, MN - terrible tap water for brewing
Yeah -- Looks like I misinterpreted @LBussy 's branches. I just updated the Thorrak firmware -- mind trying it again and seeing if it is an improvement?

Thanks.
I just installed your new version and will give a test today.

EDIT - After 40 minutes of navigating around and making config changes it's still running. It wouldn't have done that before.
I'll keep doing the same and follow up again later today.
 
Last edited:
OP
OP
LBussy

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,873
Reaction score
1,661
Location
Rural Kansas
After 40 minutes of navigating around and making config changes it's still running. It wouldn't have done that before.
I'll keep doing the same and follow up again later today.
That's great it's working better - I'd LOVE to know why there's a difference.

Do you have a mesh WiFi or an extender by chance?

Serial monitor - not sure how to do that. I did have a telnet session to the ESP32, but I don't think that's what you're talking about. Do you mean with the Arduino IDE serial monitor connected to the USB port of the ESP8266?
Yes, a serial (USB) cable and pretty much any terminal emulator. Same output as Telnet, but of course if there's a crash, Telnet goes with it and you would not see the debug info.
 

rkhanso

Well-Known Member
Joined
Jan 24, 2017
Messages
686
Reaction score
163
Location
Plymouth, MN - terrible tap water for brewing
No actual mesh WiFi system, but I do have 2 Ubiquiti APs. The Kegerator is really close to one of them and Keg Cop would never even try to connect to the other and verified by looking at the WiFi logs. Also verified that the ESP32 is not dropping the WiFi connection (other than when it reboots/crashes).

@Thorrak mentioned the difference in his version is that he uses a different version of AsyncTCP library.
 
OP
OP
LBussy

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,873
Reaction score
1,661
Location
Rural Kansas
The Ubiquiti are nice - I use their point to point setup on the farm. I'm waiting for him to point out what he thought the difference was for the lib - Obviously I have no issue with any change that helps stability, but I am very interested in what the difference is because neither he nor I were able to reproduce the instability you experienced.
 

Thorrak

Supporting Member
HBT Supporter
Joined
Feb 7, 2016
Messages
3,311
Reaction score
2,150
Location
New York, NY
The Ubiquiti are nice - I use their point to point setup on the farm. I'm waiting for him to point out what he thought the difference was for the lib - Obviously I have no issue with any change that helps stability, but I am very interested in what the difference is because neither he nor I were able to reproduce the instability you experienced.
Comparing lbussy:master...thorrak:master · lbussy/AsyncTCP is the difference -- The only thing I can think is that it's the queue size.

I just posted a "Trythis" version which actually reverts that change just to see if I can cause the crashes for @rkhanso. If I can... I might be in the market for a ubiquiti AP if we think that might be the cause!
 

rkhanso

Well-Known Member
Joined
Jan 24, 2017
Messages
686
Reaction score
163
Location
Plymouth, MN - terrible tap water for brewing
I just checked the GUI and found that my Keg temp sensor dropped down to the -196.6 number. It was working just fine for hours.
This has to be a poor connection problem of the 1-wire sensor, right? Or is there something else I should/can check?

But the uptime is good - Uptime:Days: 0, Hours: 6, Minutes: 32, Seconds: 59


Edit - It must be. A jiggle of the wires got it working again. I'll have to re-terminate them on the screw terminals.

@Thorrak - I'll try your "Trythis" version tonight and report back.
 
Last edited:
OP
OP
LBussy

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,873
Reaction score
1,661
Location
Rural Kansas
This has to be a poor connection problem of the 1-wire sensor, right? Or is there something else I should/can check?
As you discovered, 99 times out of 100 that's a bad connection.m I learned my lesson from BrewPi and these will try to reconnect themselves without restarting the controller. If your control point goes out like that, it will stop controlling until it gets a good reading. Now that I think of it though, I am going to leave myself a note to see what happens if it goes out during a cooling cycle.

ETA: Yep, if the sensor is enabled, and cooling is enabled, then it will accept the -196F as "valid" and therefore shut off cooling - so it fails safe.

ETA part deux: Tracking this issue here.
 
Last edited:

rkhanso

Well-Known Member
Joined
Jan 24, 2017
Messages
686
Reaction score
163
Location
Plymouth, MN - terrible tap water for brewing
I used the "trythis" Alpha firmware and it seems to be working OK. I've gone through all the settings, navigated a lot of page changes, changed settings, went to the "About" page, refreshed, refreshed and refreshed the pages some more, and back and forth etc.etc.etc.

No crashes yet after 30 minutes. This version seems good also.
 

Thorrak

Supporting Member
HBT Supporter
Joined
Feb 7, 2016
Messages
3,311
Reaction score
2,150
Location
New York, NY
I used the "trythis" Alpha firmware and it seems to be working OK. I've gone through all the settings, navigated a lot of page changes, changed settings, went to the "About" page, refreshed, refreshed and refreshed the pages some more, and back and forth etc.etc.etc.

No crashes yet after 30 minutes. This version seems good also.

:(.

I was hoping that one would crash. Oh well. Now we're back to "Lee did something weird when pressing 'compile'".
 

rkhanso

Well-Known Member
Joined
Jan 24, 2017
Messages
686
Reaction score
163
Location
Plymouth, MN - terrible tap water for brewing
I just noticed that the temps were going crazy. Could this be because of a still flakey temp sensor connection or maybe a failing temp sensor? I don't think so because more than one temp sensor was fluctuating. Or, I suppose if it was only the Keg temp sensor, maybe the scale just made it look like other temps also fluctuated. They seemed stable for a long time at first.

I went back to the @Thorrak Alpha version (not the TryThis). The temps are back in line to where they should be again and not fluctuating.

Video Here
 
Last edited:

rkhanso

Well-Known Member
Joined
Jan 24, 2017
Messages
686
Reaction score
163
Location
Plymouth, MN - terrible tap water for brewing
My temps started fluctuating crazy again. The keg temp going from 108F to 31F in one fell swoop. Then changing by 2-3 F up from 31 a few times. Then from 36 to 43 in one single change. Then back to 30F in a single change. Wasn't there a buffer range that it averaged the temps over each X number of seconds?

I tried rebooting it and now the web GUI won't show up. The built-in AP isn't working either. I guess I have to get the laptop and USB cable out.

Edit- I connected the laptop and re-flashed. The temps are stable so far.

Thoughts? Is there something I can check?
 
Last edited:
Top