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.
Finally getting around to putting everything together.

To everyone who used the John Guest PM450813E 3/8" BSPP to 8mm for the connection to the swissflo sensors. Do you need to wrap the threads in Teflon tape? Or will the small rubber washer at bottom of connector be sufficient?

Also, is there any issue placing the swissflo further away from the ball lock? Noticed earlier in the thread that the recommendation was closer to the ball lock. But because of how I clean the lines I need them at least 1-2 feet away from the ball locks.
 
If I recall, the seal is against the washer - not the threads - so you probably wouldn’t want to use Teflon tape. I could be mistaken though - I am not an expert

In my case though, the washer was enough.
 
Correct, these fittings blessedly rely on an integrated rubber gasket. I've been running R'Pints since 2014, have always used JG fittings on my SF800s, have never used tape, and have never had a leak...

Cheers!
 
Got 3 of 4 taps working but having problems with the 4th. Believe I've narrowed it down to one of the Swissflo sensors. Have paired it with known working breakout boards and ethernet cables but can't get a reading during calibration. The port on the mainboard works as I've isolated one of the working sensors to it.

Any troubleshooting ideas before I contact Swissflo?
 
Is the rotor turning?

The rotor can be seen from the Out end of the meter, and if you give a modest blow through the meter then quickly look at the rotor you should see it spin down. If it's moving but you're not getting any ticks out of it that would be a failure indication for sure...

Cheers!
 
Figured out the issue.

I have a somewhat different setup with 2 kegerators that have 2 taps each. Instead of running an ethernet cable from the 2nd tap to the 3rd tap in the other kegerator, I just used the next plug on the mainboard to limit the wires going into the 2nd kegerator.

Didn't realize that kegcop sees this as taps 4 and 5 in the 2nd kegerator instead of 3 and 4. So the problem 3rd tap never read anything since nothing was attached. Once I tried to calibrate taps 4 and 5 everything worked.
 
Last edited:
Figured out the issue.

I have a somewhat different setup with 2 kegerators that have 2 taps each. Instead of running an ethernet cable from the 2nd tap to the 3rd tap in the other kegerator, I just used the next plug on the mainboard to limit the wires going into the 2nd kegerator.

Didn't realize that kegcop sees this as taps 4 and 5 in the 2nd kegerator instead of 3 and 4. So the problem 3rd tap never read anything since nothing was attached. Once I tried to calibrate taps 4 and 5 everything worked.

Is there any way to label this as taps 3 and 4 on the main screen or will it only show as taps 1,2,4,5?

Not going to say I told you so to Lee, but...
 
I'm trying Keg Cop again -> this time with PCBs I bought at PCBWay instead of homemade.
It was running fine for a day but then I can't get any web pages to load. Instead I get ERR_CONNECTION_REFUSED.
I tried the http://192.168.2.247/uptime.csv and still get the Connection Refused.
It's currently powered by 5V DC connected to the PCB, not via USB port.

I think I need to connect this to the computer via USB to get the serial monitor working to see what is wrong, correct? I'd like to fix the issue instead of just rebooting and masking the problem. That won't do well when it's actually running my Kegerator.
 
It's currently powered by 5V DC connected to the PCB, not via USB port.
That's not a scenario I tested, so I can't offer any encouragement or even a recommendation to do that. The pins marked "power" on the PCB I provided are power for the relay from the board, not power into the board. While there is a technical capability to power the board external to the USB port, it bypasses some not insignificant circuitry and protection, such as power regulation.

I think I need to connect this to the computer via USB to get the serial monitor working to see what is wrong, correct?
You can try Telnet if you have enabled it. If not, you have few alternatives.
 
Thanks for that info. Moved power to the USB port instead and have Telnet working.
Have to get the flow meter connected and then give it a good test.
Need to get a 3-D printer to print cases for all my controllers and electronic stuff.

FYI @LBussy A few months ago I had trouble with Keg Cop crashing and/or not responding in the GUI. You were helping. I removed the static IPs in my Untangle Firewall and redid them and it's been working great now.
 
Last edited:
Keg Cop was running pretty well until I noticed my Ping Plotter losing contact to it. I did have the logging going with Tera Term.

The logs around the trouble are here. Might it give a clue to what went wrong and how I can fix it? I'm not a programmer and have no clue what the error means. There might be some errors (I think WiFi disconnected up higher in the logs). [Link removed for privacy reasons --Mod] The log is very long. It looks like the first trouble started at this timestamp - [2023-09-07 11:59:08.067] with a Temperature change to -196.6 for all 4 sensors. Then other errors.

Code:
[2023-09-07 11:58:14.945] 2023-09-07T16:58:08Z V: Sending /api/v1/info/theme/.
[2023-09-07 11:59:08.057] 2023-09-07T16:59:01Z T: KegScreen reporting not enabled, skipping (Temp Report).
[2023-09-07 11:59:08.067] 2023-09-07T16:59:01Z T: [HASS]: Payload: kegcop/kegcop_room/temperature/state:-196.6.
[2023-09-07 11:59:08.072] 2023-09-07T16:59:01Z N: [PUSH]: Sending MQTT payload to 192.168.10.100.
[2023-09-07 11:59:11.941] 2023-09-07T16:59:05Z E: [PUSH]: Timeout connecting to 192.168.10.100.
[2023-09-07 11:59:11.949] 2023-09-07T16:59:05Z V: [HASS]: Push state to sensor Room error (-1).
[2023-09-07 11:59:11.955] 2023-09-07T16:59:05Z T: [HASS]: Payload: kegcop/kegcop_room/temperature/state:-196.6.
[2023-09-07 11:59:11.965] 2023-09-07T16:59:05Z N: [PUSH]: Sending MQTT payload to 192.168.10.100.
[2023-09-07 11:59:14.966] 2023-09-07T16:59:08Z E: [PUSH]: Timeout connecting to 192.168.10.100.
[2023-09-07 11:59:14.974] 2023-09-07T16:59:08Z V: [HASS]: Push state to sensor Room error (-1).
[2023-09-07 11:59:14.979] 2023-09-07T16:59:08Z T: [HASS]: Payload: kegcop/kegcop_room/temperature/state:-196.6.
[2023-09-07 11:59:14.993] 2023-09-07T16:59:08Z N: [PUSH]: Sending MQTT payload to 192.168.10.100.
[2023-09-07 11:59:17.991] 2023-09-07T16:59:11Z E: [PUSH]: Timeout connecting to 192.168.10.100.
[2023-09-07 11:59:17.997] 2023-09-07T16:59:11Z V: [HASS]: Push state to sensor Room error (-1).
[2023-09-07 11:59:18.011] 2023-09-07T16:59:11Z T: [HASS]: Payload: kegcop/kegcop_room/temperature/state:-196.6.
[2023-09-07 11:59:18.016] 2023-09-07T16:59:11Z N: [PUSH]: Sending MQTT payload to 192.168.10.100.
[2023-09-07 11:59:21.022] 2023-09-07T16:59:14Z E: [PUSH]: Timeout connecting to 192.168.10.100.
[2023-09-07 11:59:21.022] 2023-09-07T16:59:14Z V: [HASS]: Push state to sensor Room error (-1).
[2023-09-07 11:59:21.033] 2023-09-07T16:59:14Z T: [HASS]: Payload: kegcop/kegcop_room/temperature/state:-196.6.
[2023-09-07 11:59:21.038] 2023-09-07T16:59:14Z N: [PUSH]: Sending MQTT payload to 192.168.10.100.
[2023-09-07 11:59:24.041] 2023-09-07T16:59:17Z E: [PUSH]: Timeout connecting to 192.168.10.100.
[2023-09-07 11:59:24.049] 2023-09-07T16:59:17Z V: [HASS]: Push state to sensor Room error (-1).
[2023-09-07 11:59:24.052] 2023-09-07T16:59:17Z T: [HASS]: Payload: kegcop/kegcop_room/temperature/state:-196.6.
[2023-09-07 11:59:24.070] 2023-09-07T16:59:17Z N: [PUSH]: Sending MQTT payload to 192.168.10.100.
[2023-09-07 11:59:26.490] 2023-09-07T16:59:20Z E: [PUSH]: Timeout connecting t2023-09-07T16:59:20Z N: [WiFi Event] (5): ARDUINO_EVENT_WIFI_STA_DISCONNECTED
[2023-09-07 11:59:26.503] o 192.168.10.100.
[2023-09-07 11:59:26.503] 2023-09-07T16:59:20Z V: [HASS]: Push state to sensor Room error (-1).
[2023-09-07 11:59:26.572] 2023-09-07T16:59:20Z V: [Stop Network] 2023-09-07T16:59:20Z N: [WiFi Event] (4): ARDUINO_EVENT_WIFI_STA_CONNECTED
[2023-09-07 11:59:26.580] Setting autoconnect to false.
[2023-09-07 11:59:26.588] 2023-09-07T16:59:20Z V: [Stop Network] Stopping Serial and Telnet.
[2023-09-07 11:59:26.597] 2023-09-07T16:59:20Z N: Serial logging stopping.
[2023-09-07 11:59:27.609] 2023-09-07T16:59:21Z N: Local serial logging started at 115200.
[2023-09-07 11:59:27.613] 2023-09-07T16:59:21Z W: [Stop Network] WiFi lost connection, reconnecting.
[2023-09-07 11:59:27.621] 2023-09-07T16:59:21Z N: Web server stopped.
[2023-09-07 11:59:27.625] 2023-09-07T16:59:21Z N: Stopping mDNS.
[2023-09-07 11:59:27.643] 2023-09-07T16:59:21Z N: Flowmeter Config Save: Saving configuration.
[2023-09-07 11:59:28.572] 2023-09-07T16:59:22Z N: File /flowconfig.json sucessfully copied to /flowconfig.backup
[2023-09-07 11:59:28.572] 2023-09-07T16:59:22Z N: Keg Cop Save: Saving configuration.
[2023-09-07 11:59:28.786] 2023-09-07T16:59:22Z N: File /appconfig.json sucessfully copied to /appconfig.backup
[2023-09-07 11:59:28.792] 2023-09-07T16:59:22Z N: Stopping all main loop timers and filesystem.
[2023-09-07 11:59:28.805] 2023-09-07T16:59:22Z N: [WiFi Event] (5): ARDUINO_EVENT_WIFI_STA_DISCONNECTED
[2023-09-07 11:59:28.810] 2023-09-07T16:59:22Z N: [WiFi Event] (3): ARDUINO_EVENT_WIFI_STA_STOP
[2023-09-07 11:59:28.935] 2023-09-07T16:59:22Z N: [WiFi Reconnect] Beginning WiFi.
[2023-09-07 11:59:28.957] 2023-09-07T16:59:22Z N: [WiFi Event] (0): ARDUINO_EVENT_WIFI_READY
[2023-09-07 11:59:28.963] 2023-09-07T16:59:22Z N: [WiFi Event] (2): ARDUINO_EVENT_WIFI_STA_START
[2023-09-07 11:59:28.977] 2023-09-07T16:59:22Z N: [WiFi Reconnect Status] WiFi is disconnected.
[2023-09-07 11:59:28.990] 2023-09-07T16:59:22Z N: [WiFi Reconnect] Disconnecting/reconnecting WiFi.
[2023-09-07 11:59:28.990] 2023-09-07T16:59:22Z N: [WiFi Event] (3): ARDUINO_EVENT_WIFI_STA_STOP
[2023-09-07 11:59:29.006] 2023-09-07T16:59:22Z N: [WiFi Event] (0): ARDUINO_EVENT_WIFI_READY
[2023-09-07 11:59:29.021] 2023-09-07T16:59:22Z N: [WiFi Event] (2): ARDUINO_EVENT_WIFI_STA_START
[2023-09-07 11:59:29.057] 2023-09-07T16:59:22Z N: [WiFi Event] (4): ARDUINO_EVENT_WIFI_STA_CONNECTED
[2023-09-07 11:59:29.246] 2023-09-07T16:59:22Z N: [WiFi Event] (7): ARDUINO_EVENT_WIFI_STA_GOT_IP
[2023-09-07 11:59:29.512] 2023-09-07T16:59:23Z N: [WiFi Reconnect Status] Connected. IP address: 192.168.2.247, RSSI: -80.
[2023-09-07 11:59:34.535]
[2023-09-07 11:59:34.535] 2023-09-07T16:59:28Z N: Serial logging started at 115200.
[2023-09-07 11:59:34.539] 2023-09-07T16:59:28Z V: [Start Network] Starting Main Timers and Filesystem.
[2023-09-07 11:59:34.554] 2023-09-07T16:59:28Z V: Starting all main loop timers and filesystem
[2023-09-07 11:59:34.560] 2023-09-07T16:59:28Z V: [Start Network] Starting mDNS.
[2023-09-07 11:59:34.560] 2023-09-07T16:59:28Z N: mDNS responder started for kegcop.local.
[2023-09-07 11:59:34.577] 2023-09-07T16:59:28Z V: [Start Network] Starting Web Server.
[2023-09-07 11:59:34.587] 2023-09-07T16:59:28Z N: Async HTTP server started on port 80.
[2023-09-07 11:59:34.597] 2023-09-07T16:59:28Z N: Open: http://kegcop.local to view application.
[2023-09-07 11:59:34.600] 2023-09-07T16:59:28Z T: [HASS]: Payload: kegcop/kegcop_room/temperature/state:-196.6.
[2023-09-07 11:59:34.613] 2023-09-07T16:59:28Z N: [PUSH]: Sending MQTT payload to 192.168.10.100.
[2023-09-07 11:59:34.660] 2023-09-07T16:59:28Z V: [PUSH]: Connected to 192.168.10.100.
[2023-09-07 11:59:34.663] 2023-09-07T16:59:28Z T: [PUSH]: URL: 192.168.10.100.
[2023-09-07 11:59:34.675] 2023-09-07T16:59:28Z T: [PUSH]: Data: kegcop/kegcop_room/temperature/state:-196.6.
[2023-09-07 11:59:34.681] 2023-09-07T16:59:28Z V: [PUSH]: Topic 'kegcop/kegcop_room/temperature/state', value '-196.6'.
[2023-09-07 11:59:34.693] 2023-09-07T16:59:28Z V: [PUSH]: MQTT publish to 192.168.10.100 successful on topic kegcop/kegcop_room/temperature/state.
[2023-09-07 11:59:34.719] 2023-09-07T16:59:28Z V: [HASS]: Push state to sensor Room ok.
[2023-09-07 11:59:34.824] 2023-09-07T16:59:28Z T: [HASS]: Payload: kegcop/kegcop_tower/temperature/state:  70.7.
[2023-09-07 11:59:34.832] 2023-09-07T16:59:28Z N: [PUSH]: Sending MQTT payload to 192.168.10.100.
[2023-09-07 11:59:34.853] 2023-09-07T16:59:28Z V: [PUSH]: Connected to 192.168.10.100.
[2023-09-07 11:59:34.860] 2023-09-07T16:59:28Z T: [PUSH]: URL: 192.168.10.100.
[2023-09-07 11:59:34.864] 2023-09-07T16:59:28Z T: [PUSH]: Data: kegcop/kegcop_tower/temperature/state:  70.7.
[2023-09-07 11:59:34.883] 2023-09-07T16:59:28Z V: [PUSH]: Topic 'kegcop/kegcop_tower/temperature/state', value '  70.7'.
[2023-09-07 11:59:34.883] 2023-09-07T16:59:28Z V: [PUSH]: MQTT publish to 192.168.10.100 successful on topic kegcop/kegcop_tower/temperature/state.
[2023-09-07 11:59:34.900] 2023-09-07T16:59:28Z V: [HASS]: Push state to sensor Tower ok.
[2023-09-07 11:59:35.022] 2023-09-07T16:59:28Z T: [HASS]: Payload: kegcop/kegcop_upper_chamber/temperature/state:  70.7.
[2023-09-07 11:59:35.031] 2023-09-07T16:59:28Z N: [PUSH]: Sending MQTT payload to 192.168.10.100.
[2023-09-07 11:59:35.054] 2023-09-07T16:59:28Z V: [PUSH]: Connected to 192.168.10.100.
[2023-09-07 11:59:35.063] 2023-09-07T16:59:28Z T: [PUSH]: URL: 192.168.10.100.
[2023-09-07 11:59:35.067] 2023-09-07T16:59:28Z T: [PUSH]: Data: kegcop/kegcop_upper_chamber/temperature/state:  70.7.
[2023-09-07 11:59:35.081] 2023-09-07T16:59:28Z V: [PUSH]: Topic 'kegcop/kegcop_upper_chamber/temperature/state', value '  70.7'.
[2023-09-07 11:59:35.084] 2023-09-07T16:59:28Z V: [PUSH]: MQTT publish to 192.168.10.100 successful on topic kegcop/kegcop_upper_chamber/temperature/state.
[2023-09-07 11:59:35.100] 2023-09-07T16:59:28Z V: [HASS]: Push state to sensor Upper Chamber ok.
[2023-09-07 11:59:35.222] 2023-09-07T16:59:28Z T: [HASS]: Payload: kegcop/kegcop_lower_chamber/temperature/state:  69.8.
[2023-09-07 11:59:35.231] 2023-09-07T16:59:28Z N: [PUSH]: Sending MQTT payload to 192.168.10.100.
[2023-09-07 11:59:35.248] 2023-09-07T16:59:28Z V: [PUSH]: Connected to 192.168.10.100.
[2023-09-07 11:59:35.255] 2023-09-07T16:59:28Z T: [PUSH]: URL: 192.168.10.100.
[2023-09-07 11:59:35.263] 2023-09-07T16:59:28Z T: [PUSH]: Data: kegcop/kegcop_lower_chamber/temperature/state:  69.8.
[2023-09-07 11:59:35.267] 2023-09-07T16:59:28Z V: [PUSH]: Topic 'kegcop/kegcop_lower_chamber/temperature/state', value '  69.8'.
[2023-09-07 11:59:35.282] 2023-09-07T16:59:28Z V: [PUSH]: MQTT publish to 192.168.10.100 successful on topic kegcop/kegcop_lower_chamber/temperature/state.
[2023-09-07 11:59:35.298] 2023-09-07T16:59:28Z V: [HASS]: Push state to sensor Lower Chamber ok.
[2023-09-07 11:59:35.805] 2023-09-07T16:59:29Z T: [HASS]: Payload: kegcop/kegcop_keg/temperature/state:  70.7.
[2023-09-07 11:59:35.812] 2023-09-07T16:59:29Z N: [PUSH]: Sending MQTT payload to 192.168.10.100.
[2023-09-07 11:59:35.833] 2023-09-07T16:59:29Z V: [PUSH]: Connected to 192.168.10.100.
[2023-09-07 11:59:35.836] 2023-09-07T16:59:29Z T: [PUSH]: URL: 192.168.10.100.
[2023-09-07 11:59:35.848] 2023-09-07T16:59:29Z T: [PUSH]: Data: kegcop/kegcop_keg/temperature/state:  70.7.
[2023-09-07 11:59:35.855] 2023-09-07T16:59:29Z V: [PUSH]: Topic 'kegcop/kegcop_keg/temperature/state', value '  70.7'.
[2023-09-07 11:59:35.864] 2023-09-07T16:59:29Z V: [PUSH]: MQTT publish to 192.168.10.100 successful on topic kegcop/kegcop_keg/temperature/state.
[2023-09-07 11:59:35.879] 2023-09-07T16:59:29Z V: [HASS]: Push state to sensor Keg ok.
[2023-09-07 11:59:36.473] 2023-09-07T16:59:30Z W: Processing 404 for /.
[2023-09-07 11:59:36.476] Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
[2023-09-07 11:59:36.488]
[2023-09-07 11:59:36.488] Core  1 register dump:
[2023-09-07 11:59:36.488] PC      : 0x400e4752  PS      : 0x00060830  A0      : 0x800f5900  A1      : 0x3ffdc7b0 
[2023-09-07 11:59:36.500] A2      : 0x3fffcb14  A3      : 0x00000000  A4      : 0x00000081  A5      : 0x3ffc5ff0 
[2023-09-07 11:59:36.504] A6      : 0x3f405c0e  A7      : 0x3ffc6120  A8      : 0x800e4752  A9      : 0x3ffdc790 
[2023-09-07 11:59:36.522] A10     : 0x3ffdc7bc  A11     : 0xc0f07f67  A12     : 0xc0f07f67  A13     : 0x3ffc6750 
[2023-09-07 11:59:36.522] A14     : 0x00000000  A15     : 0x3ffdc7dc  SAR     : 0x00000018  EXCCAUSE: 0x0000001c 
[2023-09-07 11:59:36.529] EXCVADDR: 0x00000000  LBEG    : 0x40089d39  LEND    : 0x40089d5b  LCOUNT  : 0xffffffff 
[2023-09-07 11:59:36.536]
[2023-09-07 11:59:36.536]
[2023-09-07 11:59:36.536] Backtrace: 0x400e474f:0x3ffdc7b0 0x400f58fd:0x3ffdc810 0x400f341d:0x3ffdc860 0x400f352d:0x3ffdc8b0 0x400f3715:0x3ffdc900 0x400efa69:0x3ffdc920 0x400efabd:0x3ffdc950 0x400f0102:0x3ffdc970
[2023-09-07 11:59:36.553]
[2023-09-07 11:59:36.553]
[2023-09-07 11:59:36.553]
[2023-09-07 11:59:36.557]
[2023-09-07 11:59:36.557] ELF file SHA256: fef23153244c1363
[2023-09-07 11:59:36.557]
[2023-09-07 11:59:36.800] Rebooting...
[2023-09-07 11:59:36.800] ets Jun  8 2016 00:22:57
[2023-09-07 11:59:36.804]
[2023-09-07 11:59:36.804] rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
[2023-09-07 11:59:36.812] configsip: 0, SPIWP:0xee
[2023-09-07 11:59:36.812] clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[2023-09-07 11:59:36.821] mode:DIO, clock div:2
[2023-09-07 11:59:36.821] load:0x3fff0018,len:4
[2023-09-07 11:59:36.821] load:0x3fff001c,len:1044
[2023-09-07 11:59:36.830] load:0x40078000,len:10044
[2023-09-07 11:59:36.830] load:0x40080400,len:5872
[2023-09-07 11:59:36.838] entry 0x400806ac
[2023-09-07 11:59:42.526]
[2023-09-07 11:59:42.526] 2023-09-07T16:57:22Z N: Serial logging started at 115200.
[2023-09-07 11:59:42.529] 2023-09-07T16:57:22Z N: [FLOWLOAD] Loading flowmeter configuration from /flowconfig.json.
[2023-09-07 11:59:42.603] 2023-09-07T16:57:22Z T: Flowmeter Config Flowmeter config load complete.
[2023-09-07 11:59:42.631] 2023-09-07T16:57:22Z N: Starting WiFi.
[2023-09-07 11:59:43.770] 2023-09-07T16:57:23Z N: Connected. IP address: 192.168.2.247, RSSI: -85.
[2023-09-07 11:59:43.775] 2023-09-07T16:57:23Z V: Setting autoconnect & sleep to false.
[2023-09-07 11:59:43.787] 2023-09-07T16:57:23Z N: Entering blocking loop to get NTP time.
[2023-09-07 11:59:43.792] 2023-09-07T16:57:23Z N: NTP time set.
[2023-09-07 11:59:43.792] 2023-09-07T16:57:23Z T: No OTA pending.
[2023-09-07 11:59:43.801] 2023-09-07T16:57:23Z N: mDNS responder started for kegcop.local.
[2023-09-07 11:59:43.823] 2023-09-07T16:57:23Z N: Async HTTP server started on port 80.
[2023-09-07 11:59:43.826] 2023-09-07T16:57:23Z N: Open: http://kegcop.local to view application.
[2023-09-07 11:59:43.842] 2023-09-07T16:57:23Z N: Sensors: Initializing sensors.
[2023-09-07 11:59:44.801] 2023-09-07T16:57:24Z T: KegScreen TV: JSON file written.
[2023-09-07 11:59:44.906] 2023-09-07T16:57:24Z N: Started Keg Cop version 1.3.0/1.3.0 (main) [f16f94d].
[2023-09-07 11:59:44.911] 2023-09-07T16:57:24Z V: Taplist.io: secret or venue not set, skipping send. ('' / '')
[2023-09-07 11:59:44.927] 2023-09-07T16:57:24Z N: Keg Cop Save: Saving configuration.
[2023-09-07 11:59:44.968] 2023-09-07T16:57:24Z T: Keg Cop Save: Configuration saved.
[2023-09-07 11:59:45.290] 2023-09-07T16:57:25Z N: File /appconfig.json sucessfully copied to /appconfig.backup
[2023-09-07 11:59:45.296] 2023-09-07T16:57:25Z N: Flowmeter Config Save: Saving configuration.
[2023-09-07 11:59:45.353] 2023-09-07T16:57:25Z T: Flowmeter Config Save: Configuration saved.
[2023-09-07 11:59:46.197] 2023-09-07T16:57:26Z N: Deserialized version information.
[2023-09-07 11:59:46.226] 2023-09-07T16:57:26Z N: File /flowconfig.json sucessfully copied to /flowconfig.backup
[2023-09-07 11:59:49.911] 2023-09-07T16:57:29Z V: Queuing HASS discovery for all entities.
[2023-09-07 11:59:49.916] 2023-09-07T16:57:29Z T: [HASS]: Payload: homeassistant/sensor/kegcop_tap1/volume/config:{"icon":"mdi:beer","name": "1. Belgian Tripel","device_class": "volume","unit_of_measurement": "Gallons","state_topic": "kegcop/kegcop_tap1/volume/state","json_attributes_topic": "kegcop/kegcop_tap1/volume/attr","availability_topic": "kegcop/kegcop_tap1/tap/availability","payload_available": "Available","payload_not_available": "Unavailable","unique_id": "kegcop_tap1","device": {"configuration_url":"http://kegcop.local/settings/","identifiers": "952DE6B40000A1A6","model": "Keg Cop","name": "Kegerator","manufacturer": "Lee Bussy","sw_version": "1.3.0"}}|.
[2023-09-07 11:59:49.975] 2023-09-07T16:57:29Z N: [PUSH]: Sending MQTT payload to 192.168.10.100.
[2023-09-07 11:59:49.997] 2023-09-07T16:57:29Z V: [PUSH]: Connected to 192.168.10.100.
[2023-09-07 11:59:50.000] 2023-09-07T16:57:29Z T: [PUSH]: URL: 192.168.10.100.
 
Last edited by a moderator:
Trouble again. I didn't have the serial monitor running this time, but the web GUI isn't loading again.
Getting the browser error: ERR_CONNECTION_REFUSED

I started up the serial monitor without rebooting the ESP first to see what it looked like. It's really odd. The screenshot looks mostly like jibberish, but when I copy and paste it into the code below, the code looks OK.

Maybe that's just a sync problem (though I did have the TeraTerm serial settings the same as before when it worked OK).

I rebooted the ESP32 and restarted the serial monitor and it's looking normal again.

I'd like to get this Keg Cop reliable so I can trust it running my Kegerator.

1694121950993.png



Code:
2023-09-07T21:23:27Z T: [PUSH]: Data: homeassistant/sensor/kegcop_lower_chamber/temperature/config:{"icon":"mdi:snowflake-thermometer","name": "Lower Chamber Temp","device_class": "temperature","unit_of_measurement": "°F","state_topic": "kegcop/kegcop_lower_chamber/temperature/state","json_attributes_topic": "kegcop/kegcop_lower_chamber/temperature/attr","availability_topic": "kegcop/kegcop_lower_chamber/temperature/availability","payload_available": "Available","payload_not_available": "Unavailable","unique_id": "kegcop_lower_chamber","device": {"configuration_url":"http://kegcop.local/settings/","identifiers": "952DE6B40000A1A6","model": "Keg Cop","name": "Kegerator","manufacturer": "Lee Bussy","sw_version": "1.3.0"}}|.
2023-09-07T21:23:27Z V: [PUSH]: Topic 'homeassistant/sensor/kegcop_lower_chamber/temperature/config', value '{"icon":"mdi:snowflake-thermometer","name": "Lower Chamber Temp","device_class": "temperature","unit_of_measurement": "°F","state_topic": "kegcop/kegcop_lower_chamber/temperature/state","json_attributes_topic": "kegcop/kegcop_lower_chamber/temperature/attr","availability_topic": "kegcop/kegcop_lower_chamber/temperature/availability","payload_available": "Available","payload_not_available": "Unavailable","unique_id": "kegcop_lower_chamber","device": {"configuration_url":"http://kegcop.local/settings/","identifiers": "952DE6B40000A1A6","model": "Keg Cop","name": "Kegerator","manufacturer": "Lee Bussy","sw_version": "1.3.0"}}'.
2023-09-07T21:23:27Z V: [PUSH]: MQTT publish to 192.168.10.100 successful on topic homeassistant/sensor/kegcop_lower_chamber/temperature/config.
2023-09-07T21:23:27Z V: [HASS]: Push discovery to sensor Lower Chamber ok.
2023-09-07T21:23:27Z T: [HASS]: Payload: homeassistant/sensor/kegcop_keg/temperature/config:{"icon":"mdi:snowflake-thermometer","name": "Keg Temp","device_class": "temperature","unit_of_measurement": "°F","state_topic": "kegcop/kegcop_keg/temperature/state","json_attributes_topic": "kegcop/kegcop_keg/temperature/attr","availability_topic": "kegcop/kegcop_keg/temperature/availability","payload_available": "Available","payload_not_available": "Unavailable","unique_id": "kegcop_keg","device": {"configuration_url":"http://kegcop.local/settings/","identifiers": "952DE6B40000A1A6","model": "Keg Cop","name": "Kegerator","manufacturer": "Lee Bussy","sw_version": "1.3.0"}}|.
2023-09-07T21:23:27Z N: [PUSH]: Sending MQTT payload to 192.168.10.100.
2023-09-07T21:23:27Z V: [PUSH]: Connected to 192.168.10.100.
2023-09-07T21:23:27Z T: [PUSH]: URL: 192.168.10.100.
2023-09-07T21:23:27Z T: [PUSH]: Data: homeassistant/sensor/kegcop_keg/temperature/config:{"icon":"mdi:snowflake-thermometer","name": "Keg Temp","device_class": "temperature","unit_of_measurement": "°F","state_topic": "kegcop/kegcop_keg/temperature/state","json_attributes_topic": "kegcop/kegcop_keg/temperature/attr","availability_topic": "kegcop/kegcop_keg/temperature/availability","payload_available": "Available","payload_not_available": "Unavailable","unique_id": "kegcop_keg","device": {"configuration_url":"http://kegcop.local/settings/","identifiers": "952DE6B40000A1A6","model": "Keg Cop","name": "Kegerator","manufacturer": "Lee Bussy","sw_version": "1.3.0"}}|.
2023-09-07T21:23:27Z V: [PUSH]: Topic 'homeassistant/sensor/kegcop_keg/temperature/config', value '{"icon":"mdi:snowflake-thermometer","name": "Keg Temp","device_class": "temperature","unit_of_measurement": "°F","state_topic": "kegcop/kegcop_keg/temperature/state","json_attributes_topic": "kegcop/kegcop_keg/temperature/attr","availability_topic": "kegcop/kegcop_keg/temperature/availability","payload_available": "Available","payload_not_available": "Unavailable","unique_id": "kegcop_keg","device": {"configuration_url":"http://kegcop.local/settings/","identifiers": "952DE6B40000A1A6","model": "Keg Cop","name": "Kegerator","manufacturer": "Lee Bussy","sw_version": "1.3.0"}}'.
2023-09-07T21:23:27Z V: [PUSH]: MQTT publish to 192.168.10.100 successful on topic homeassistant/sensor/kegcop_keg/temperature/config.
2023-09-07T21:23:27Z V: [HASS]: Push discovery to sensor Keg ok.
 

Attachments

  • 1694121931735.png
    1694121931735.png
    88.5 KB · Views: 0
Keg Cop was running pretty well until I noticed my Ping Plotter losing contact to it.
I'm not saying it's this, but you might turn off all your monitoring and see if it runs unmolested for a while. The IP stack on the ESP32 line is notoriously sensitive.

There might be some errors (I think WiFi disconnected up higher in the logs).
It did disconnect. The RSSI is semi-high at -65. Do you have a simple wireless router you can move next to it to rule out interference? These have crappy antennas and cannot be counted on to act like your home computers.

It looks like the first trouble started at this timestamp - [2023-09-07 11:59:08.067] with a Temperature change to -196.6 for all 4 sensors.
It also came after the 11th time you hit /api/v1/action/clearcalmode/. What do you have hitting this aside from the web pages?

I started up the serial monitor without rebooting the ESP first to see what it looked like. It's really odd. The screenshot looks mostly like jibberish, but when I copy and paste it into the code below, the code looks OK.
That's got to be a terminal bug, I've never seen it before. It's possible it did not detect the codeset properly.
 
I've turned off Ping Plotter from hitting the ESP32.

I don't have another WiFi AP, but can move this right next to one of my Unifi APs.

I don't know what /api/v1/action/clearcalmode is or what it means to "hit it" - I did delete the Home Assistant MQTT settings in the config, in case that's what you mean.

I'll let it run a while.
 
don't have another WiFi AP, but can move this right next to one of my Unifi APs.
Keep an eye on the RSSI when it connects. I tried to make it more resilient and reconnect but it seems that may not be as stable as simply rebooting the device.

I don't know what /api/v1/action/clearcalmode is or what it means to "hit it" - I did delete the Home Assistant MQTT settings in the config, in case that's what you mean.
Well, it looks a lot like you were hammering those config pages really good. It's odd to me, but maybe you were just trying to figure things out. There are cases that will wipe the circular buffer (an averaging toiol) for the sensors, and a race condition might cause that to report the disconnected values. That should not last.
 
Next to one of my APs, the signal strength is -25 dBm (99%) - according to my UniFi AP.
When looking at the ESP logs at bootup, it's 1970-01-01T00:00:06Z N: Connected. IP address: 192.168.2.247, RSSI: -50.

I start logging over Tera Term/telnet, so if there's another crash I hope I can capture at least a little info about why.

Since I've had weird trouble with this in the past, I ordered a couple new Lolin ESPs and they should be here in 2-3 weeks.
 
Next to one of my APs, the signal strength is -25 dBm (99%) - according to my UniFi AP.
When looking at the ESP logs at bootup, it's 1970-01-01T00:00:06Z N: Connected. IP address: 192.168.2.247, RSSI: -50.
There are articles on the Internet on how people have added external antennas. For now, just keep in mind you're getting crappy performance and use these steps to rule out the signal strength as an issue.

I used to have some of the issues bookmarked for the defects where the board will deauth and lose connections. Let's just say Espressif is moving slow to fix those.

Since I've had weird trouble with this in the past, I ordered a couple new Lolin ESPs and they should be here in 2-3 weeks.
Always good to rule out hardware.
 
Recent reboot / crash?
I only had logging via telnet, which didn't catch anything.
I'll get a laptop down there to power it up and get a serial log going. Probably should have done that first.

I didn't reboot it yet. The web GUI is very slow to respond. Actually, pages sometimes even time-out and don't load. UniFi signal strength still says -26dBm. The About page often gets an error- Error loading version.

I've often wondered if situations like this are just a web server and web page problem and the actual temperature control is safe and still operating normally. I don't want the beer to freeze or get warm.

  • About Keg Cop: v1.3.0 [main] (f16f94d)​

Uptime:Days: 0, Hours: 0, Minutes: 6, Seconds: 49
Reset Reason:Reason: ESP_RST_TASK_WDT, Description: Reset due to task watchdog
Heap Information:Free Heap: 156176, Max: 32756, Frags: 80
User Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.69


While waiting for a web page to load, the Developer console of the browser shows:
Queued at 7.73 s
Started at 7.73 s
Resource SchedulingDURATION
Queueing1.48 ms
Connection StartDURATION
Stalled0.38 ms
DNS Lookup7 μs
Initial connection2.51 s
Request/ResponseDURATION
Request sent67 μs
Waiting for server response2.2 min
Content Download0.48 ms
Explanation2.3 min
 
Last edited:
Give it a restart (like when you plug in the serial connection) and let's see what we get. That's real slow.

What browser, and are you using any extensions?
 
Even after powering off/on by pulling USB cable, it's bad. I'm thinking the ESP might be hosed. Or maybe a reflash might help. There is 75% packet loss when pinging after rebooting. Once it even went into AP mode and after powering off/on again, it went back into client mode. It's within 4' of my AP and has very good WiFi signal strength.

My Lolin ESPs won't arrive for 2.5 weeks according to the shipping tracker. I don't have any other 32-pin ESP32s. Just 30-Pin.

I've tried Firefox, Edge and Brave browsers. I can see in Ping Plotter, there's a WiFi/network problem again. Not sure if it's the ESP or something else.

I'll try a re-flash and see if that changes anything.
 
Last edited:
After a re-flash, it's pinging great again. 4ms and no loss. Web pages load fast.
I've let it run with no pinging and no use of the web server/GUI, other than to check uptime.
Uptime:Days: 0, Hours: 23, Minutes: 28, Seconds: 59
 
Last edited:
Almost 4 hours later, I tried the Keg Cop web page again and had a problem. It wouldn't load right away. After it did, saw it rebooted. I didn't have it powered by PC and didn't have serial monitor running.

Uptime:Days: 0, Hours: 0, Minutes: 0, Seconds: 36
Reset Reason:Reason: ESP_RST_PANIC, Description: Software reset due to exception/panic
Heap Information:Free Heap: 174988, Max: 45044, Frags: 75
User Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
 
Last edited:
I've had the ESP_RST_PANIC happen a few times. It happens when I wait many hours with no browser connected, not pinging the ESP - just letting it do its thing....but later open a tab on the browser and simply load the main webpage. It'll timeout once, not loading the webpage. It must then reboot and the web GUI will load.
Immediately checking the About page - panic error is seen and then uptime is only about 15 seconds.
I need to get this trustworthy before I let it control my kegerator.
 
Is it not controlling temperatures during this time?

Web server aside (which I am going to rip out to eliminate the async), it should be controlling just fine.
 
Well, Keg Cop is running with 4 temp sensors connected, I just don't have a solenoid connected and it actually controlling the Kegerator. I'm checking it's running stability only. I can easily switch the Kegerator over from BrewPiLess to Keg Cop, but thought I'd just let it simmer on its own to see how it ran.
If the web server is not an indication of how it would really control temperatures (the controller not locking up, resetting, losing configs, etc), that's good news.
Later today or this week, I'll get Keg Cop actually controlling the kegerator temps and also have CraftbeerPi3 running to measure/graph temperatures to see if when the webserver acts up and the ESP crashes/reboots, if the temp control continues to work through that.
 
Last edited:
I have both Keg Cop and BrewPiLess-32 running. Keg Cop is controlling the Kegerator and BrewPiLess is only monitoring temps, since it'll log as long as the web page is open. I also have Keg Cop sending data to Home Assistant via mqtt. I won't keep the Keg Cop web GUI loaded in a browser and see if it's more stable, monitoring with BrewPiLess-32 to ensure temp control is still working even if/when the webserver and GUI stop working.

One thing I'm seeing in Home Assistant logs is that the kegerator compressor control seems wrong. It's being reported that Keg Cop is telling cooling to happen in some very short intervals. I have the SSR running the compressor connected to the C terminal on the Keg Cop board, not the S terminal. I also shut off the Tower Fan function in the GUI, just to be sure.

I visually/physically monitored to see if the mqtt data is correct or not. Of course, it is.

Isn't this frequent on/off hard on the compressor? When using BrewPiLess and CraftbeerPi3 to control the Kegerator, the compressor would come on for about 10-15 min every 1-2 hours.

Code:
September 12, 2023
Keezer Chamber Cool turned off \
2:41:46 PM - 6 minutes ago      <--on for only 50 seconds?
Keezer Chamber Cool turned on /
2:40:56 PM - 6 minutes ago     <<--off for 8.5 minutes
Keezer Chamber Cool turned off  \
2:32:26 PM - 15 minutes ago      <--on for only 50 seconds?
Keezer Chamber Cool turned on  /
2:31:36 PM - 16 minutes ago  <<--off for 8.5 minutes
Keezer Chamber Cool turned off \
2:22:56 PM - 24 minutes ago     <-- on for only 40 seconds?
Keezer Chamber Cool turned on  /
2:22:16 PM - 25 minutes ago  <<-- off for 8 minutes 50 seconds
Keezer Chamber Cool turned off \
2:13:26 PM - 34 minutes ago    <-- on for 40 seconds?
Keezer Chamber Cool turned on  /
2:12:46 PM - 35 minutes ago
Keezer Chamber Cool turned off
2:03:36 PM - 44 minutes ago
Keezer Chamber Cool turned on
2:02:56 PM - 44 minutes ago
Keezer Chamber Cool turned off
1:53:46 PM - 1 hour ago
Keezer Chamber Cool turned on
1:53:06 PM - 1 hour ago
Keezer Chamber Cool turned off
1:44:16 PM - 1 hour ago
Keezer Chamber Cool turned on
1:43:36 PM - 1 hour ago
Keezer Chamber Cool turned off
1:34:16 PM - 1 hour ago
Keezer Chamber Cool turned on
1:33:36 PM - 1 hour ago
Keezer Chamber Cool turned off
1:24:06 PM - 1 hour ago
Keezer Chamber Cool turned on
1:23:26 PM - 1 hour ago
Keezer Chamber Cool turned off
1:11:56 PM - 2 hours ago
 
Last edited:
Do you have anything in the kegerator? If there's no thermal mass in there and the evaporator is cooling that quickly (or the probe is close to the evaporator or there's no fan) then I can see that happening. What did BPL tell you about the temps? What does your serial log tell you?

The min on/off/and loop times are in config.h:

https://github.com/lbussy/keg-cop/b...b9b9a290880b8741026aaf/src/config.h#L503-L541
It's a simple thermostat, albeit with some filtering provided by a circular buffer.
 
There is nothing in the kegerator right now.
When running BrewPiLess-32 controlling the Kegerator the past couple weeks (again, nothing in the Kegerator), it operated what I consider normally and how I've seen it run the past 4 years whether anything was in the kegerator or not (similar operation when using CraftbeerPi3).

For example, with the Kegerator empty, here's how it ran with BrewPiLess - compressor turning on about 3x per hour:
1694553106803.png


Should Keg Cop be running this much differently than the other controllers I've tried? If so, then I'll adjust my expectations.
I'll throw in a keg of water and strap the keg sensor to it and see if there's a difference....though I didn't have that for the BrewPiLess screenshot above.
 
Last edited:
Should Keg Cop be running this much differently than the other controllers I've tried? If so, then I'll adjust my expectations.
Yes, the purpose of Keg Cop is not precise fermentation control. It's a simple thermostat, where all the rest use a PID loop and more restrictive timers.

I can control the temperature reasonably (i.e. as good as Inkbird) and a keg in my keezer and a simple recirculating fan keep the cycling down.
 
Putting a half-filled keg of water and the keg temp probe on it with a bungee and half a foam pool noodle over it does reduce the number of cycles per hour. It comes on about 6x per hour now instead of 3x per hour when using BrewPiLess or CraftbeerPi3. Is this too frequent and for too short of a time period? I've always heard it's better for compressors to run less often, and for longer at a time.

Code:
Keezer Chamber Cool turned on
11:21:56 PM - 3 minutes ago
Keezer Chamber Cool turned off
11:14:46 PM - 10 minutes ago 
Keezer Chamber Cool turned on 
11:10:36 PM - 14 minutes ago 
Keezer Chamber Cool turned off
11:04:16 PM - 21 minutes ago 
Keezer Chamber Cool turned on 
10:59:56 PM - 25 minutes ago 
Keezer Chamber Cool turned off
10:53:36 PM - 31 minutes ago
Keezer Chamber Cool turned on
10:49:06 PM - 36 minutes ago
Keezer Chamber Cool turned off
10:43:16 PM - 42 minutes ago
Keezer Chamber Cool turned on
10:37:46 PM - 1 hour ago
Keezer Chamber Cool turned off
10:30:36 PM - 1 hour ago   
Keezer Chamber Cool turned on 
10:23:46 PM - 1 hour ago       
Keezer Chamber Cool turned off
10:21:59 PM - 1 hour ago
 
Compressor off time is a requirement to prevent trying to start the compressor when there is a pressure differential that causes it to be hard to start. A capillary tube on most refrigerators maintains the differential when running and causes the evaporator to absorb heat. Fairly shortly after the compressor turns off, this pressure normalizes because the capillary tube is allowing it to do so. I would not imagine this would take longer than 30 seconds on most refrigerators.

That said, there is a reasonable argument that turning on is still the more wear-inducing part of a refrigerator cycle. That's why I created some relief from the potential for the simple thermostat to cycle a compressor rapidly. The minimum off time on this system is five minutes, and the minimum on time is governed by the circular buffer that averages the temperatures over a minute as well as a minimum on time of two minutes. This is fairly similar to what all of the fermentation controllers have on top of a PID loop to run the cooling.

The HASS system only allows two states for those control points, on or off. Keg Cop has seven states to manage the cooling. HASS shows cooling on when the system is in TSTAT_COOL_ACTIVE, which is ONLY when the system is cooling AND when the system is not waiting for MIN_ON time. In other words, if the system decides 30 seconds in that it's cooled enough, it will switch to TSTAT_OFF_MINON, and HASS will show it as other than on, which is off, because it is waiting for the compressor to finish the two-minute minimum on time. If, while it is waiting, it decides it needs to cool again, then the state will switch back to TSTAT_COOL_ACTIVE, and HASS will again show it as being on. All this time, the compressor did not stop.

In other words, you are using a nice-to-have external display with limitations in the display states to suggest that your system is having an issue. Plug in a serial monitor or watch it via telnet and view the cooling operation there if you need to validate this.

You've also not said whether you have a circulation fan inside the chamber - this is highly recommended for fermenters and in a kegerator for the same reason. Most kegerators have no active airflow; using a fan will keep the system more stable. I use both a circulation fan and a tower fan for this reason.
 
Nope. Those clip over the PCB. Test one, and make sure it fits correctly. “Works for me” but you may have to scale up or down depending on your setup.
 

Latest posts

Back
Top