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:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
I will have to go through the script and C code to give you an idea. I can say that the JS I provide works - you can copy that code as a starting point.
 
I will have to go through the script and C code to give you an idea. I can say that the JS I provide works - you can copy that code as a starting point.
Ok, thanks!
Can you please point where the "Checking handleTapPost" handler implemented?
I will have to go through the script and C code to give you an idea. I can say that the JS I provide works - you can copy that code as a starting point.
 
Hi,
It happened again
I collected uptime.csv
2023-05-11T08:57:45Z, ESP_RST_SW, START_WARMBOOT, 45714
2023-05-11T11:27:35Z, ESP_RST_SW, START_WARMBOOT, 8968
2023-05-11T13:57:14Z, ESP_RST_SW, START_WARMBOOT, 8968
2023-05-11T15:30:03Z, ESP_RST_PANIC, START_WARMBOOT, 5587
2023-05-11T15:36:29Z, ESP_RST_POWERON, START_COLDBOOT, 330

it happened at 15:30 (all taps reseted to default)
 
Thank you. I am working on a debug version to collect additional information and I should have that available in a few hours.
Thanks
Aditional information that can help (hopefully)
I didnt succed to reproduce the issue when connected to laptop in debug mode. (Tried few hours)
Looks like issue happened on time of pouring beer
 
But the console log on Alpha 6 makes it look like it's not making the connection:
Dan I found something that leads me to believe the fix I intended to be in .6 did not make it. This specifically prevents connecting to MQTT by name. If I am right, your fix for that will be in .7 when I can wrap a couple more things up. If it's working for you now, the new debug probably will not work for you.
 
Help wanted!!!
Alpha/Debug Release 1.2.1-Alpha.7

This release adds important debugging to the issue plaguing some of you where the flowmeter (taps) information gets zapped. Please try this and see if you can catch it happening - it will greatly help. When it happens, navigate to /flowdebuglog.txt and share the information it returns.

https://web.brewflasher.com/fw/135
I left .6 available so you can go back to it if you have to.
 
Just flashed to Alpha 7. Nice to see there's a link to /fs/ on the About page. Not so nice to see this when trying to upload the config files:
1683975644188.png

Guess it's time to reenter manually. Fortunately, JSON isn't hard to read, and it isn't all that much to reenter.
 
Last edited:
Just flashed to Alpha 7. Nice to see there's a link to /fs/ on the About page.
I am torn on that - while we are using it a lot here, I wonder if we leave it as a hidden "ninja switch" when we get things working well.

Not so nice to see this when trying to upload the config files:
Yeah ... well I needed to get that debug version out there to get some data collected. I did just finish the re-work on the upload, and I am considering another release with just that change.

Fortunately, JSON isn't hard to read, and it isn't all that much to reenter.
... said nobody nowhere. :)
 
... said nobody nowhere. :)
I mean, sure, I'd rather not have to do it, but I'd downloaded them anyway (did you intend that people be able to just browse to /appconfig.json? Because you can--which makes it convenient to download that and flowconfig), and it's easy enough to get the necessary information out of it for this purpose.
navigate to /flowdebuglog.txt and share the information it returns.
Is this something that's created only in the event of a crash? Because it's 404 for me.
 
I mean, sure, I'd rather not have to do it, but I'd downloaded them anyway
Just for you (and me, if I am honest), here is Alpha 8 which restores the file upload. Actually, it's a new file upload but the same thing for you:

https://web.brewflasher.com/fw/135
Nothing else was touched; it still has the Tap info debug I desperately need.

(did you intend that people be able to just browse to /appconfig.json? Because you can--which makes it convenient to download that and flowconfig), and it's easy enough to get the necessary information out of it for this purpose.
I could secure it by "secret," but I don't want to make things harder on anyone while chasing this darned bug. It is a bit of a security issue, as we've addressed, however, it's not a state secret and it's unlikely to create any more havoc than someone changing your tap info.

Now when it's stabilized and there exists some potential for a commercial venue to use it, sure.

Is this something that's created only in the event of a crash? Because it's 404 for me.
Yes. It will only be created in the event the controller tries to load the flowmeter (taps) file, and the file is not there or the data is gone. The choice there is the core of my issue, to address it I'd like to know why it's happening. Either one will result in a default file being created which is what wipes out your details.

I appreciate you guys sticking with me through this. The folks on 1.0 or 1.1 will appreciate it as well when this is all fixed!
 
Alpha .9 is ready for testing

https://web.brewflasher.com/fw/135
This is nearly the same as .8 except for some documentation I needed to complete. If you are using .8 there is no reason to update.

Right now I am at a stopping point until I get some feedback on the information in /flowdebuglog.txt in the event of a tap information loss. That information will guide my next steps.
 
Alpha .9 is ready for testing

https://web.brewflasher.com/fw/135
This is nearly the same as .8 except for some documentation I needed to complete. If you are using .8 there is no reason to update.

Right now I am at a stopping point until I get some feedback on the information in /flowdebuglog.txt in the event of a tap information loss. That information will guide my next steps.

Firstly, hello from Sydney Australia. Lee I certainly appreciate all of your work on this project.

This is from the .7 firmware but the flowdebuglog.txt file only has this -

[DEBUGFLOW] Failed to deserialize file.

I'll update to .9 and report back in a few days if/when it happens again.
 
This is from the .7 firmware but the flowdebuglog.txt file only has this -

[DEBUGFLOW] Failed to deserialize file.
That is perfect, thank you. If I can get a couple more reports, and hopefully they are the same, I can put in a fix.
 
Does anyone have a part number for the connector that goes on the breakout for attaching to the swissflo connector? There is some talk a while back that mentions various connectors but none seem to be correct.

In @Thorrak post, Keg Cop: Keg Monitoring and Control, there is a picture showing what appears to be the correct connector. Or is this just a modified incorrect connector?
 
Does anyone have a part number for the connector that goes on the breakout for attaching to the swissflo connector? There is some talk a while back that mentions various connectors but none seem to be correct.

In @Thorrak post, Keg Cop: Keg Monitoring and Control, there is a picture showing what appears to be the correct connector. Or is this just a modified incorrect connector?
John Guest PM450813E Female Connector, 8 mm x 3/8" BSPP (Pack of 10) John Guest PM450813E Female Connector, 8 mm x 3/8" BSPP (Pack of 10): Amazon.com: Industrial & Scientific
 
Sorry I wasn't clear, meant the white "molex" connector that gets soldered to the breakout board.
Ohh, got it. Yeah, it’s the correct connector.

Molex part number 51090-0300 is the plug end — the receptacle end I bought is EOL, however. Here is the EOL notification I received from DigiKey:


Part Affected
ManufacturerMOLEX, LLC
DescriptionCONN HEADER VERT 3POS 2MM
Manufacturer Part Number0533240360
Digi-Key Part NumberWM8313-ND
StatusObsolete
SubstitutesPlease click here

Please please double check the substitutes they recommend for both footprint and pitch. I bought the actual Molex part — the substitutes are other manufacturers.
 
Ohh, got it. Yeah, it’s the correct connector.

Molex part number 51090-0300 is the plug end — the receptacle end I bought is EOL, however. Here is the EOL notification I received from DigiKey:


Part Affected
ManufacturerMOLEX, LLC
DescriptionCONN HEADER VERT 3POS 2MM
Manufacturer Part Number0533240360
Digi-Key Part NumberWM8313-ND
StatusObsolete
SubstitutesPlease click here

Please please double check the substitutes they recommend for both footprint and pitch. I bought the actual Molex part — the substitutes are other manufacturers.

I bought the 440054-3 connector and it doesn't fit. Got it from AliExpress and bag it came in was marked correctly but who knows if it's really the correct one.

If the actual one is EOL then I guess all that can be done is to modify the one I got. It's too small but the sides can be cut out so the connection can be made.
 
Found the original Molex 0533240360 on Arrow. Says it's discontinued but they claim to have stock and let me order. Will update with outcome.
 
Update for you all: I'm still plugging away. I did a conversion to LittleFS (the filesystem that holds the config and web pages.) Maybe it will help things, maybe it will have no impact. Still looking for a couple more debug reports before I move in that direction.
 
Which breakout board? The six-way one which I designed is intended to use JST-XH connectors. I can't speak for the three-way board.

The three way board. Reading through everything saw this post:

Post in thread 'Keg Cop: Keg Monitoring and Control' Keg Cop: Keg Monitoring and Control

Wasn't clear to me whether the JST-XH connector would work or not. Originally I ordered one of the recommended Molex substitutes from China but it was too small.

I was able to order the original EOL Molex connector from Arrow and it's supposedly shipping so we'll see if it works.
 
An update for anyone interested.

The Molex 0533240360 I received from Arrow is the proper connector for attaching the Swissflo to the "dasilychain-molex" breakout board.

https://www.arrow.com/en/products/0533240360/molex
It is considered discontinued EOL and not available on Mouser or Digikey. Only 1700 left on Arrow so grab them quick🤣

I previously ordered the 440054-3, which is a recommended replacement from Digikey. This connector is too small and will not work without cutting the sides off.
 
Last edited:
I have a new version on LittleFS but I have not had any feedback on lost data. One more corroborating point would tell me if I am in the right area.
 
Sorry Lee, since updating to Alpha .9 around a week ago I've not lost any data and getting a 404 on the flowdebuglog.txt. No news is good news I guess?
 
Sorry Lee, since updating to Alpha .9 around a week ago I've not lost any data and getting a 404 on the flowdebuglog.txt. No news is good news I guess?
Interesting. Yes, 404 is good news.

So aside from the debug file, I moved saving that file to the main loop rather than in the interrupt processing. I was never clear if a function called by an ISR was in turn operating in an ISR interrupt.

So maybe it is the thing that was killing us? Wouldn't that be funny?

Anyway, I am still going to make a backup of the two files and reload them if they get garbaged. I am 50% there.
 
Beta Release - Keg Cop 1.3.0-Beta.1

Update with BrewFlasher.

I recommend this for any users with issues related to versions > 1.1.0.

This contains all bug fixes and feature updates:

New Features​

  • New filesystem handler (also linked from "About" page)
  • Added more complete support for KegScreen TV
  • Convert docs to MyST format
  • Convert from SPIFFS to LittleFS
  • Added Telnet and Log Level as configurable items

Potentially Breaking Changes (this is a stretch)​

  • Within the documentation, converted "URL Target" to "Generic REST" to reflect its use

Bugs Fixed​

  • Moved some non-reentrant code back to the timer loop to help avoid crashes (this is the biggie)
  • Created online backups of the config files to use as a failsafe (this is also significant to users who had crashes)
  • Updated to most current Arduino and ESP Libs
  • Fixed a bug upstream where an RPints target would only connect by name to "mule.local"
  • Volume precision bug where precision greater than 0.0001 gallons caused a failed save
  • Fixed a few bugs in the context documentation links
  • Fixed calibration error
A more complete listing can be found on the Release Page.

Other items like Home Assistant Support will be coming in an upcoming release.
 
Flashed 1.3.0B2 this morning, I'll see how it goes. I never did have the problem of loss of data on 1.1.1A7 (I think that's the last version I was using), but I also set up a daily cron job to download the config files in case the data did get lost.

Is this expected to have MQTT working?
 
Is this expected to have MQTT working?
Not yet. RPints version of MQTT was working but I seem to have broken it in that version. I know that because I just fixed it.

A reasonable approximation of MQTT is forthcoming, along the lines of Home Assistant auto-discovery.
 
Hi, loving this and starting a build. Any chance you could upload the step files for the 3d printed ones? I want to make a housing for the meter breakout one and is easier from the step.
 
I’m sure I have the original files, but I don’t know what a step file is. I model in AutoCAD only.

Send me DM and we can get you sorted out, I’m sure.
A step file is a common format that allows for 3d models to be exchanged between different CAD apps. So this allows for export and sharing of the model itself rather than the generated stl file uses as a base for 3d printing.

I'm sure autocad has a possibility to save the model as an STEP file.
 
Back
Top