Fermentrack: Fermentation monitoring & BrewPi-www Replacement for Raspberry Pi

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.
Hi Thorrak,
I am trying to blank a raspberry pi screen with a PIR, and I have written this script - it runs OK buy only displays "display_blank 1 on the serial monitor and doesn't change - i replaced the pir with no change and have successfully run a test script to show that the PIR is working - the pir is on GPIO 23 (pin16) - what's wrong with the code.

import os
import time
import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BCM)
GPIO.setup(23, GPIO.IN)

while True:
if GPIO.input(23):
os.system("vcgencmd display_power 1")
else:
os.system("vcgencmd display_power 0")
time.sleep(1)

I honestly have no idea. I never have RPis hooked up to displays, so this isn’t something that I’m familiar with. That said, take a look at the code this guy wrote. He has a very different method for turning on/off the display — it might be worth copying his monitor_turn_on and monitor_turn_off functions and calling them instead of the os.system calls in your script and seeing if they work.

What are you trying to display on the screen? Are you just generally trying to toggle a kiosk that you interact with when in your brewery, or are you using it to display a specific screen within Fermentrack (or another app)?
 
I have three RPi's, one is running Magic Mirror, one is running Raspberry Pints and the last runs Fermentrack - what I would like to achieve is that when no-one is in the room the display goes black and turns back on when movement is detected. I will give this script a run and maybe modify it to work with the PIR. Thanks you are always helpful.
 
I have three RPi's, one is running Magic Mirror, one is running Raspberry Pints and the last runs Fermentrack - what I would like to achieve is that when no-one is in the room the display goes black and turns back on when movement is detected. I will give this script a run and maybe modify it to work with the PIR. Thanks you are always helpful.
Sounds good - I was more wondering if you were looking to display a screen with just a dashboard showing fermentation status (that you wouldn’t then be interacting with) or were looking to toggle a display that you would then be clicking around in. If the former, then it’s potentially a use case for a (future) KSTV integration. If it’s the latter, then this is definitely the way to go!
 
fwiw, I have had that paradigm "mostly" working for years - by "mostly" meaning I'm using a DVI monitor and blanking it to black. Not a low power state as I was never able to figure out how to make that work (and a bunch of us were working together here to solve it) though with a native/much more modern HDMI monitor it might be easier.

I use the stock XScreensaver app to blank the monitor after 3 minutes, then have a Python script running that is triggered by a PIR that sends an OS command that "wakes" the video (and also plays a sound)...

Code:
#!/usr/bin/env python

import os
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)

cmd = 'xscreensaver-command -deactivate'
playsound = 'mpg321 /home/pi/tada.mp3'

PIR_PIN = 7
STATUS_PIN = 8
GPIO.setup(PIR_PIN, GPIO.IN)
GPIO.setup(STATUS_PIN, GPIO.OUT)

def MOTION(PIR_PIN):
    os.system(cmd)
    GPIO.output(8,True)
    os.system(playsound)
    GPIO.output(8,False)

try:
    GPIO.add_event_detect(PIR_PIN, GPIO.RISING, callback=MOTION)
    while 1:
        time.sleep(100)

except KeyboardInterrupt:
    GPIO.cleanup()

GPIO.cleanup()

Cheers!
 
Thanks for your help last week, fermentrack is up and running and is good but I seem to lose connection to the esp32 every 48hours or so and go to log into fermentrack to see 'Cannot receive LCD text from Controller/Script' I can't change the mode or temp etc from there. I have also noticed when it loses the connection it seems to change the profile to the temp of 0 degrees C which is not ideal during fermentation.

The esp32 is on the official 'thorrak' board from your GitHub, I can see it by putting its IP in and the 'debug connection' has a full list of passed. The issues fixes itself if I reboot the raspi so must be software related but not sure where to start.

The last readout on the log is here (with IP sanitised) I do keep getting errors about the Temp sensors disconnecting and reconnecting which I can't figure out but don't think is connected.

stderr.log
Code:
Aug 09 2023 01:26:07   Connection type WiFi selected.  Trying TCP serial (WiFi)
Aug 09 2023 01:26:07   Connecting to BrewPi ***.153 (via ***.153) on port 23
Aug 09 2023 01:26:12   Successfully connected to controller.
Aug 09 2023 01:26:12   Notification: Script started, with no active beer being logged
Aug 09 2023 01:26:22   Checking software version on controller...
Aug 09 2023 01:26:23   Found BrewPi v0.2.4, running commit 2efdbfb build 2efdbfb, running on a ESP32 ESP32 with a DIY shield on port ***.153:23

Aug 09 2023 01:26:23   BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
Aug 09 2023 01:26:23   Bound to TCP socket on port 2120, interface localhost
Aug 09 2023 01:26:25   Installed devices received: [{"c": 1, "b": 0, "f": 2, "h": 1, "p": 25, "x": true, "d": false, "r": "Heat", "i": 0}, {"c": 1, "b": 0, "f": 5, "h": 2, "p": 13, "x": false, "d": false, "a": "288636C20700001A", "j": "0.000", "i": 1}, {"c": 1, "b": 1, "f": 9, "h": 2, "p": 13, "x": false, "d": false, "a": "280F2A07D6013CE8", "j": "0.000", "i": 2}, {"c": 1, "b": 0, "f": 3, "h": 1, "p": 26, "x": true, "d": false, "r": "Cool", "i": 3}, {"c": 1, "b": 0, "f": 7, "h": 1, "p": 34, "x": true, "d": false, "r": "Door", "i": 4}, {"c": 1, "b": 0, "f": 6, "h": 2, "p": 13, "x": false, "d": false, "a": "28358EC007000032", "j": "0.000", "i": 5}]
 Aug 09 2023 01:26:26   Available devices received: []
 Aug 09 2023 01:33:20   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 280F2A07D6013CE8
 Aug 09 2023 01:33:20   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 280F2A07D6013CE8
 Aug 09 2023 01:40:31   Error: controller is not responding to new data requests. Exiting.

fermentrack-processmgr.log (I have not changed this there is nothing in the log between the '')
Code:
Aug 09 2023 01:40:10   Connection type set to 'auto' - Attempting serial first
Aug 09 2023 01:40:20   No serial attached BrewPi found.  Trying TCP serial (WiFi)
Aug 09 2023 01:40:20   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
Aug 09 2023 01:40:20   Exiting.
Aug 09 2023 01:40:20   Connection type set to 'auto' - Attempting serial first
Aug 09 2023 01:40:30   No serial attached BrewPi found.  Trying TCP serial (WiFi)
Aug 09 2023 01:40:30   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
Aug 09 2023 01:40:30   Exiting.

I can't see a straightforward way of reading the log on the ESP32 but this is the 'about' page
Code:
FIRMWARE VERSION    BrewPi-ESP v0.15 (2efdbfb)
UPTIME    Days: 1, Hours: 21, Minutes: 22, Seconds: 21
RESET INFORMATION    Reason: ESP_RST_SW, Description: Software reset via esp_restart
HEAP INFORMATION    Free Heap: 109572, Max: 86004, Frags: 22

You can see the pattern of the reboots here
Screenshot 2023-08-09 at 13.12.34.png
 
Last edited:
Do you see any errors in the process manager log?
There is a cut off error but that was on the 4th before we fixed the other problem, this is the full log.

Code:
    num = len(clone)
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 262, in __len__
    self._fetch_all()
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1324, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 51, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
  File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1208, in execute_sql
    return list(result)
  File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1646, in cursor_iter
    for rows in iter((lambda: cursor.fetchmany(itersize)), sentinel):
  File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1646, in <lambda>
    for rows in iter((lambda: cursor.fetchmany(itersize)), sentinel):
  File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 97, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 97, in inner
    return func(*args, **kwargs)
django.db.utils.ProgrammingError: no results to fetch
Sentry is attempting to send 2 pending events
Waiting up to 2 seconds
Press Ctrl-C to quit
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/weakref.py", line 657, in _exitfunc
    pending = cls._select_for_exit()
  File "/usr/local/lib/python3.9/weakref.py", line 638, in _select_for_exit
    L = [(f,i) for (f,i) in cls._registry.items() if i.atexit]
  File "/usr/local/lib/python3.9/weakref.py", line 638, in <listcomp>
    L = [(f,i) for (f,i) in cls._registry.items() if i.atexit]
RuntimeError: dictionary changed size during iteration
 Aug 05 2023 12:06:26   Connection type set to 'auto' - Attempting serial first
 Aug 05 2023 12:06:36   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 05 2023 12:06:36   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 05 2023 12:06:36   Exiting.
 Aug 05 2023 16:00:35   Connection type set to 'auto' - Attempting serial first
 Aug 05 2023 16:01:01   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 05 2023 16:01:01   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 05 2023 16:01:01   Exiting.
 Aug 05 2023 17:16:04   Connection type set to 'auto' - Attempting serial first
 Aug 05 2023 17:16:14   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 05 2023 17:16:14   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 05 2023 17:16:14   Exiting.
 Aug 06 2023 05:10:00   Connection type set to 'auto' - Attempting serial first
 Aug 06 2023 05:10:15   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 06 2023 05:10:18   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 06 2023 05:10:22   Exiting.
 Aug 06 2023 15:01:12   Connection type set to 'auto' - Attempting serial first
 Aug 06 2023 15:01:22   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 06 2023 15:01:22   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 06 2023 15:01:22   Exiting.
 Aug 07 2023 01:01:02   Connection type set to 'auto' - Attempting serial first
 Aug 07 2023 01:01:12   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 07 2023 01:01:12   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 07 2023 01:01:12   Exiting.
 Aug 07 2023 01:50:09   Connection type set to 'auto' - Attempting serial first
 Aug 07 2023 01:50:19   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 07 2023 01:50:19   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 07 2023 01:50:19   Exiting.
 Aug 07 2023 01:56:02   Connection type set to 'auto' - Attempting serial first
 Aug 07 2023 01:56:12   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 07 2023 01:56:12   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 07 2023 01:56:12   Exiting.
 Aug 07 2023 20:10:12   Connection type set to 'auto' - Attempting serial first
 Aug 07 2023 20:10:22   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 07 2023 20:10:22   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 07 2023 20:10:22   Exiting.
 Aug 07 2023 22:22:51   Connection type set to 'auto' - Attempting serial first
 Aug 07 2023 22:23:01   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 07 2023 22:23:01   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 07 2023 22:23:01   Exiting.
 Aug 08 2023 00:18:08   Connection type set to 'auto' - Attempting serial first
 Aug 08 2023 00:18:18   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 08 2023 00:18:18   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 08 2023 00:18:18   Exiting.
 Aug 08 2023 04:18:04   Connection type set to 'auto' - Attempting serial first
 Aug 08 2023 04:18:14   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 08 2023 04:18:14   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 08 2023 04:18:14   Exiting.
 Aug 08 2023 05:36:17   Connection type set to 'auto' - Attempting serial first
 Aug 08 2023 05:36:27   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 08 2023 05:36:27   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 08 2023 05:36:27   Exiting.
 Aug 08 2023 12:56:07   Connection type set to 'auto' - Attempting serial first
 Aug 08 2023 12:56:17   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 08 2023 12:56:17   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 08 2023 12:56:17   Exiting.
 Aug 08 2023 15:06:47   Connection type set to 'auto' - Attempting serial first
 Aug 08 2023 15:06:57   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 08 2023 15:06:57   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 08 2023 15:06:57   Exiting.
 Aug 09 2023 01:40:10   Connection type set to 'auto' - Attempting serial first
 Aug 09 2023 01:40:20   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 09 2023 01:40:20   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 09 2023 01:40:20   Exiting.
 Aug 09 2023 01:40:20   Connection type set to 'auto' - Attempting serial first
 Aug 09 2023 01:40:30   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 09 2023 01:40:30   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 09 2023 01:40:30   Exiting.
 
I'm having similar problems with "Cannot receive LCD text from Controller/Script" with my 2 current fermentations, except mine cutout after a few hours.

Running on a linux mint VM. Everything connects fine for a couple hours after a reboot.

fermentrack-processmgr.log

Code:
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:New BrewPi device found: dev-5
INFO:processmgr:Settings: Start delay: 2s, Sleep Interval: 15s,
INFO:processmgr:New BrewPi device found: dev-3
INFO:processmgr:New BrewPi device found: dev-5
 Aug 08 2023 22:32:50   Connection type set to 'auto' - Attempting serial first
 Aug 08 2023 22:33:00   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 08 2023 22:33:00   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 08 2023 22:33:00   Exiting.
 
I'm having a similar issue running docker on a Debian VM. After a day or two the connection to the ESP32 dies and I get the "Cannot receive LCD text from Controller/Script" error. Here's my fermentrack-processmgr.log, for whatever it's worth. I did just update to the newest version, so maybe that will magically fix this problem?
Code:
Sentry is attempting to send 2 pending events
Waiting up to 2 seconds
Press Ctrl-C to quit
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
    self.connect()
  File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/django/__init__.py", line 621, in connect
    return real_connect(self)
  File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 200, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
    connection = Database.connect(**conn_params)
  File "/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py", line 122, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: Connection refused
    Is the server running on host "127.0.0.1" and accepting
    TCP/IP connections on port 5432?


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/app/brewpi-script/fermentrack_caller.py", line 41, in <module>
    for this_id in active_device_ids:
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 280, in __iter__
    self._fetch_all()
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1324, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 171, in __iter__
    for row in compiler.results_iter(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size):
  File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1130, in results_iter
    results = self.execute_sql(MULTI, chunked_fetch=chunked_fetch, chunk_size=chunk_size)
  File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1173, in execute_sql
    cursor = self.connection.cursor()
  File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 259, in cursor
    return self._cursor()
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 235, in _cursor
    self.ensure_connection()
  File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
    self.connect()
  File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
    self.connect()
  File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/django/__init__.py", line 621, in connect
    return real_connect(self)
  File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 200, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
    connection = Database.connect(**conn_params)
  File "/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py", line 122, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: could not connect to server: Connection refused
    Is the server running on host "127.0.0.1" and accepting
    TCP/IP connections on port 5432?

Sentry is attempting to send 2 pending events
Waiting up to 2 seconds
Press Ctrl-C to quit
 Aug 08 2023 16:37:31   Connection type set to 'auto' - Attempting serial first
 Aug 08 2023 16:37:41   No serial attached BrewPi found.  Trying TCP serial (WiFi)
 Aug 08 2023 16:37:41   Invalid WiFi configuration for device  - Cannot resolve wifi_host '' and no wifi_host_ip set
 Aug 08 2023 16:37:41   Exiting.
 
@adman @Bizmo @pers - And in each case, restarting the Pi (or Fermentrack) solves the issue (without you having to reconfigure anything)?

Pretty sure I know what is going on if thats the case, and have an idea for how to fix it (or at least fix the blocking) short term.
 
@adman @Bizmo @pers - And in each case, restarting the Pi (or Fermentrack) solves the issue (without you having to reconfigure anything)?

Pretty sure I know what is going on if thats the case, and have an idea for how to fix it (or at least fix the blocking) short term.
Yes. Restarting fixes without reconfiguring.
 
OK. I just pushed a possible (hacky) fix. This will either solve it (by forcing everything to restart when it hits that issue) or will accomplish nothing -- but it's worth a try.

I have a more strategic fix mapped out in my head but it will take awhile to write, unfortunately. Let me know if this helps and I can go from there.
 
OK. I just pushed a possible (hacky) fix. This will either solve it (by forcing everything to restart when it hits that issue) or will accomplish nothing -- but it's worth a try.

I have a more strategic fix mapped out in my head but it will take awhile to write, unfortunately. Let me know if this helps and I can go from there.
I'm in the middle of a fermentation so don't want to update until finished. Will report back when completed.
 
OK. I just pushed a possible (hacky) fix. This will either solve it (by forcing everything to restart when it hits that issue) or will accomplish nothing -- but it's worth a try.

I have a more strategic fix mapped out in my head but it will take awhile to write, unfortunately. Let me know if this helps and I can go from there.
Not currently fermenting anything, so I just upgraded. It had only been half a day since I'd restarted all of the docker containers, so everything was still working at the time. I'll update here if it breaks again or if it goes several days without issue.

Thanks Thorrak!!
 
I wrote what I think is a more strategic solution just now - but it's enough of a change that I'm not looking to test in production (and I'm on a plane at the moment, so I can't test it myself).

If anyone is interested in giving it a shot, please try running
Code:
install.sh -i testing
from your fermentrack-tools directory. :)
 
I wrote what I think is a more strategic solution just now - but it's enough of a change that I'm not looking to test in production (and I'm on a plane at the moment, so I can't test it myself).

If anyone is interested in giving it a shot, please try running
Code:
install.sh -i testing
from your fermentrack-tools directory. :)
Thanks, am away for a few days but will install and test when I get back :)
 
I was just about to post that my install had been running for 24 hours without breaking when I checked and saw the very unwelcome "Cannot receive LCD text from Controller/Script". Restarted the dockers and everything is back up for now. Since I'm not currently fermenting anything and my fermentrack install is not currently all that functional anyway, I volunteer for tribute. I'll install from testing.

I'll let you know how it goes...
-Adam
 
Currently at 48 hours+ with the testing install and no problems with disconnection from the ESP32. This is the longest it's worked for me since I moved to the docker install, so that's something positive!
 
Currently at 48 hours+ with the testing install and no problems with disconnection from the ESP32. This is the longest it's worked for me since I moved to the docker install, so that's something positive!
Perfect! I’ll see about getting it merged to Master later tonight.
 
Perfect! I’ll see about getting it merged to Master later tonight.
Well, spoke too soon. It died about 12 hours after I made that post. Here's stderr.log from my two esp devices:
Device 1:
Code:
 Aug 14 2023 02:25:10   Controller debug message: INFO MESSAGE 18: Negative peak detected:  41.3, estimated:  41.3. Previous cool estimator:  0.000, New cool estimator:  0.000.
 Aug 14 2023 02:37:40   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:37:40   Line received was: T:{"BeerTemp": 37.74,"BeerSet": 37.70,"BeerAnn":null,"FridgeTemp": 42.00,"FridgeSet": 40.98,"FridgeAnn":null,"State":0}
 Aug 14 2023 02:40:15   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:40:15   Line received was: T:{"BeerTemp": 37.82,"BeerSet": 37.70,"BeerAnn":null,"FridgeTemp": 42.23,"FridgeSet": 40.90,"FridgeAnn":null,"State":0}
 Aug 14 2023 02:41:17   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:41:17   Line received was: T:{"BeerTemp": 37.85,"BeerSet": 37.70,"BeerAnn":null,"FridgeTemp": 42.29,"FridgeSet": 40.77,"FridgeAnn":null,"State":0}
 Aug 14 2023 02:42:20   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:42:20   Line received was: T:{"BeerTemp": 37.87,"BeerSet": 37.70,"BeerAnn":null,"FridgeTemp": 42.35,"FridgeSet": 40.66,"FridgeAnn":null,"State":0}
 Aug 14 2023 02:43:21   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:43:21   Line received was: T:{"BeerTemp": 37.89,"BeerSet": 37.70,"BeerAnn":null,"FridgeTemp": 42.38,"FridgeSet": 40.62,"FridgeAnn":null,"State":0}
 Aug 14 2023 02:43:40   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:43:40   Line received was: T:{"BeerTemp": 37.90,"BeerSet": 37.70,"BeerAnn":null,"FridgeTemp": 42.42,"FridgeSet": 40.62,"FridgeAnn":null,"State":4}
 Aug 14 2023 02:44:53   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:44:53   Line received was: T:{"BeerTemp": 37.96,"BeerSet": 37.70,"BeerAnn":null,"FridgeTemp": 42.49,"FridgeSet": 40.37,"FridgeAnn":null,"State":4}
 Aug 14 2023 02:44:54   Connection type WiFi selected.  Trying TCP serial (WiFi)
 Aug 14 2023 02:45:44   Connecting to BrewPi esp10436883.local (via 192.168.30.167) on port 23
 Aug 14 2023 02:45:48   Successfully connected to controller.
 Aug 14 2023 02:45:48   Notification: Script started, with no active beer being logged
 Aug 14 2023 02:45:58   Checking software version on controller...
 Aug 14 2023 02:45:58   Found BrewPi v0.2.4, running commit 00000000, running on a ESP8266 ESP8266 with a DIY shield on port 192.168.30.167:23

 Aug 14 2023 02:45:58   BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
 Aug 14 2023 02:45:58   Bound to TCP socket on port 2962, interface localhost
 Aug 14 2023 02:45:58   Controller debug message: WARNING 1: Invalid command received by Arduino: x
 Aug 14 2023 02:45:59   Installed devices received: [{"i": 0, "t": 1, "c": 1, "b": 1, "f": 9, "h": 2, "d": 0, "p": 12, "v": 38.074, "a": "282C34B50500006B", "j": 0.0}, {"i": 1, "t": 1, "c": 1, "b": 0, "f": 5, "h": 2, "d": 0, "p": 12, "v": 42.574, "a": "28B0E98C050000CE", "j": 0.0}, {"i": 3, "t": 3, "c": 1, "b": 0, "f": 2, "h": 1, "d": 0, "p": 16, "v": 0, "x": 1}, {"i": 4, "t": 3, "c": 1, "b": 0, "f": 3, "h": 1, "d": 0, "p": 14, "v": 1, "x": 1}]
 Aug 14 2023 02:46:01   Controller debug message: WARNING 2: Temperature sensor disconnected pin 0, address 28CF54B605000082
 Aug 14 2023 02:46:01   Available devices received: [{"i": -1, "t": 0, "c": 1, "b": 0, "f": 0, "h": 2, "d": 0, "p": 12, "v": null, "a": "28CF54B605000082", "j": 0.0}, {"i": -1, "t": 0, "c": 1, "b": 0, "f": 0, "h": 1, "d": 0, "p": 13, "x": 1}]
 Aug 14 2023 02:46:17   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:46:17   Line received was: T:{"BeerTemp": 38.04,"BeerSet": 37.70,"BeerAnn":null,"FridgeTemp": 42.57,"FridgeSet": 40.19,"FridgeAnn":null,"State":4}
 Aug 14 2023 02:46:48   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:46:48   Line received was: T:{"BeerTemp": 38.06,"BeerSet": 37.70,"BeerAnn":null,"FridgeTemp": 42.57,"FridgeSet": 40.11,"FridgeAnn":null,"State":4}
 Aug 14 2023 02:47:18   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:47:18   Line received was: T:{"BeerTemp": 38.07,"BeerSet": 37.70,"BeerAnn":null,"FridgeTemp": 42.58,"FridgeSet": 40.03,"FridgeAnn":null,"State":4}
 Aug 14 2023 02:48:35   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:48:35   Line received was: T:{"BeerTemp": 38.08,"BeerSet": 37.70,"BeerAnn":null,"FridgeTemp": 42.59,"FridgeSet": 39.90,"FridgeAnn":null,"State":4}
 Aug 14 2023 02:49:38   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:49:38   Line received was: T:{"BeerTemp": 38.11,"BeerSet": 37.70,"BeerAnn":null,"FridgeTemp": 42.62,"FridgeSet": 39.83,"FridgeAnn":null,"State":4}
 Aug 14 2023 02:50:40   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:50:40   Line received was: T:{"BeerTemp": 38.15,"BeerSet": 37.70,"BeerAnn":null,"FridgeTemp": 42.67,"FridgeSet": 39.72,"FridgeAnn":null,"State":4}
 Aug 14 2023 02:51:16   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:51:16   Line received was: T:{"BeerTemp": 38.17,"BeerSet": 37.70,"BeerAnn":null,"FridgeTemp": 42.65,"FridgeSet": 39.61,"FridgeAnn":null,"State":4}
 Aug 14 2023 02:51:43   Connection type WiFi selected.  Trying TCP serial (WiFi)
Process Process-4:
Traceback (most recent call last):
  File "/app/brewpi-script/brewpi.py", line 305, in BrewPiScript
    conn, addr = s.accept()
  File "/usr/local/lib/python3.9/socket.py", line 293, in accept
    fd, addr = self._accept()
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
psycopg2.errors.NotNullViolation: null value in column "wifi_host_ip" violates not-null constraint
DETAIL:  Failing row contains (1, Garage Fridge, F, 30, t, 2962, localhost, active, auto, None, esp8266, active, BEERSOCKET, wifi, esp10436883.local, 23, null, 3, null, t, , null, 8557e05e-76f1-4f6b-8e4d-9b45f6fc6d61).


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/local/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/app/brewpi-script/brewpi.py", line 626, in BrewPiScript
    config_obj.save_beer_log_point(new_row)
  File "/app/brewpi-script/fermentrack_config_loader.py", line 169, in save_beer_log_point
    brewpi_device = app.models.BrewPiDevice.objects.get(id=self.brewpi_device_id)
  File "/usr/local/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 431, in get
    num = len(clone)
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 262, in __len__
    self._fetch_all()
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1324, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 51, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
  File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
    cursor.execute(sql, params)
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 98, in execute
    return super().execute(sql, params)
  File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/django/__init__.py", line 596, in execute
    return real_execute(self, sql, params)
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
django.db.utils.IntegrityError: null value in column "wifi_host_ip" violates not-null constraint
DETAIL:  Failing row contains (1, Garage Fridge, F, 30, t, 2962, localhost, active, auto, None, esp8266, active, BEERSOCKET, wifi, esp10436883.local, 23, null, 3, null, t, , null, 8557e05e-76f1-4f6b-8e4d-9b45f6fc6d61).

Device 2:
Code:
  File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
    cursor.execute(sql, params)
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 98, in execute
    return super().execute(sql, params)
  File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/django/__init__.py", line 596, in execute
    return real_execute(self, sql, params)
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
django.db.utils.IntegrityError: null value in column "wifi_host_ip" violates not-null constraint
DETAIL:  Failing row contains (2, Kegerator, F, 30, t, 2316, localhost, active, auto, None, esp8266, active, BEERSOCKET, wifi, esp2663352.local, 23, null, 4, null, t, , null, a3a00d39-41d5-4fb9-82a0-0c03d7c18c48).

 Aug 14 2023 02:45:24   Connection type WiFi selected.  Trying TCP serial (WiFi)
 Aug 14 2023 02:45:24   Connecting to BrewPi esp2663352.local (via 192.168.30.166) on port 23
 Aug 14 2023 02:45:27   Successfully connected to controller.
 Aug 14 2023 02:45:27   Notification: Script started, with no active beer being logged
 Aug 14 2023 02:45:37   Checking software version on controller...
 Aug 14 2023 02:45:37   Found BrewPi v0.2.4, running commit 00000000, running on a ESP8266 ESP8266 with a DIY shield on port 192.168.30.166:23

 Aug 14 2023 02:45:37   BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
 Aug 14 2023 02:45:37   Bound to TCP socket on port 2316, interface localhost
 Aug 14 2023 02:45:38   Controller debug message: WARNING 1: Invalid command received by Arduino: x
 Aug 14 2023 02:45:38   Installed devices received: [{"i": 0, "t": 1, "c": 1, "b": 0, "f": 5, "h": 2, "d": 0, "p": 12, "v": 41.785, "a": "287208B60500007B", "j": 0.0}, {"i": 3, "t": 3, "c": 1, "b": 0, "f": 3, "h": 1, "d": 0, "p": 14, "v": 1, "x": 1}]
 Aug 14 2023 02:45:40   Available devices received: [{"i": -1, "t": 0, "c": 1, "b": 0, "f": 0, "h": 1, "d": 0, "p": 16, "x": 1}, {"i": -1, "t": 0, "c": 1, "b": 0, "f": 0, "h": 1, "d": 0, "p": 13, "x": 1}]
Process Process-5:
Traceback (most recent call last):
  File "/app/brewpi-script/brewpi.py", line 305, in BrewPiScript
    conn, addr = s.accept()
  File "/usr/local/lib/python3.9/socket.py", line 293, in accept
    fd, addr = self._accept()
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 97, in inner
    return func(*args, **kwargs)
psycopg2.ProgrammingError: no results to fetch

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/local/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/app/brewpi-script/brewpi.py", line 626, in BrewPiScript
    config_obj.save_beer_log_point(new_row)
  File "/app/brewpi-script/fermentrack_config_loader.py", line 169, in save_beer_log_point
    brewpi_device = app.models.BrewPiDevice.objects.get(id=self.brewpi_device_id)
  File "/usr/local/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 431, in get
    num = len(clone)
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 262, in __len__
    self._fetch_all()
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1324, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 51, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
  File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1208, in execute_sql
    return list(result)
  File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1646, in cursor_iter
    for rows in iter((lambda: cursor.fetchmany(itersize)), sentinel):
  File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1646, in <lambda>
    for rows in iter((lambda: cursor.fetchmany(itersize)), sentinel):
  File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 97, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 97, in inner
    return func(*args, **kwargs)
django.db.utils.ProgrammingError: no results to fetch
 Aug 14 2023 02:45:44   Connection type WiFi selected.  Trying TCP serial (WiFi)
 Aug 14 2023 02:46:01   Connecting to BrewPi esp2663352.local (via 192.168.30.166) on port 23
 Aug 14 2023 02:46:04   Successfully connected to controller.
 Aug 14 2023 02:46:04   Notification: Script started, with no active beer being logged
 Aug 14 2023 02:46:15   Checking software version on controller...
 Aug 14 2023 02:46:15   Found BrewPi v0.2.4, running commit 00000000, running on a ESP8266 ESP8266 with a DIY shield on port 192.168.30.166:23

 Aug 14 2023 02:46:15   BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
 Aug 14 2023 02:46:15   Bound to TCP socket on port 2316, interface localhost
 Aug 14 2023 02:46:15   Controller debug message: WARNING 1: Invalid command received by Arduino: x
 Aug 14 2023 02:46:16   Installed devices received: [{"i": 0, "t": 1, "c": 1, "b": 0, "f": 5, "h": 2, "d": 0, "p": 12, "v": 41.785, "a": "287208B60500007B", "j": 0.0}, {"i": 3, "t": 3, "c": 1, "b": 0, "f": 3, "h": 1, "d": 0, "p": 14, "v": 1, "x": 1}]
 Aug 14 2023 02:46:17   Available devices received: [{"i": -1, "t": 0, "c": 1, "b": 0, "f": 0, "h": 1, "d": 0, "p": 16, "x": 1}, {"i": -1, "t": 0, "c": 1, "b": 0, "f": 0, "h": 1, "d": 0, "p": 13, "x": 1}]
 Aug 14 2023 02:48:04   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:48:04   Line received was: T:{"BeerTemp":null,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 41.78,"FridgeSet": 40.00,"FridgeAnn":null,"State":4}
 Aug 14 2023 02:49:07   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:49:07   Line received was: T:{"BeerTemp":null,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 41.78,"FridgeSet": 40.00,"FridgeAnn":null,"State":4}
 Aug 14 2023 02:50:09   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:50:09   Line received was: T:{"BeerTemp":null,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 41.76,"FridgeSet": 40.00,"FridgeAnn":null,"State":4}
 Aug 14 2023 02:51:11   JSON decode error: Field 'id' expected a number but got 'F'.
 Aug 14 2023 02:51:11   Line received was: T:{"BeerTemp":null,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 41.71,"FridgeSet": 40.00,"FridgeAnn":null,"State":4}
 
And @Thorrak, while I'm taking your time chasing down bugs, I'm noticing this one: python -um fermentrack_caller is eating a full cpu right now on my VM.
I think what is happening is that when an error occurs in communication with the database the process monitor deadlocks which ultimately takes things down. The "proper" solution in the testing branch stops the process monitor from directly interacting with the database for the most commonly used database call by creating an API endpoint in Fermentrack that can be used instead. Unfortunately, there are still other database calls left which sound like they're creating issues here.

I went ahead and added some code to hopefully help handle these -- its not the proper way of handling this, but it's the best I'm going to be able to do for a few days and will help validate if this is the correct direction of travel. If you don't mind testing this by re-running install.sh -i testing again, I'd appreciate it!
 
I think what is happening is that when an error occurs in communication with the database the process monitor deadlocks which ultimately takes things down. The "proper" solution in the testing branch stops the process monitor from directly interacting with the database for the most commonly used database call by creating an API endpoint in Fermentrack that can be used instead. Unfortunately, there are still other database calls left which sound like they're creating issues here.

I went ahead and added some code to hopefully help handle these -- its not the proper way of handling this, but it's the best I'm going to be able to do for a few days and will help validate if this is the correct direction of travel. If you don't mind testing this by re-running install.sh -i testing again, I'd appreciate it!
Will do. I've been experiencing some instability with my Debian VMs, so I need to run that down as well so we're not chasing too many variables.
 
Hm. Yeah, installed from testing and I'm still getting the behavior of python -um fermentrack_caller using 100% of a CPU.

Edit: pasting the stderr from each of the devices to see if that helps:
Code:
Aug 16 2023 14:22:42   Connection type WiFi selected.  Trying TCP serial (WiFi)
 Aug 16 2023 14:22:43   Connecting to BrewPi esp10436883.local (via 192.168.30.167) on port 23
 Aug 16 2023 14:22:46   Successfully connected to controller.
 Aug 16 2023 14:22:46   Notification: Script started, with no active beer being logged
 Aug 16 2023 14:22:56   Checking software version on controller...
 Aug 16 2023 14:22:56   Found BrewPi v0.2.4, running commit 00000000, running on a ESP8266 ESP8266 with a DIY shield on port 192.168.30.167:23

 Aug 16 2023 14:22:56   BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
 Aug 16 2023 14:22:56   Bound to TCP socket on port 2962, interface localhost
 Aug 16 2023 14:22:56   Controller debug message: WARNING 1: Invalid command received by Arduino: x
 Aug 16 2023 14:22:57   Installed devices received: [{"i": 0, "t": 1, "c": 1, "b": 1, "f": 9, "h": 2, "d": 0, "p": 12, "v": 37.961, "a": "282C34B50500006B", "j": 0.0}, {"i": 1, "t": 1, "c": 1, "b": 0, "f": 5, "h": 2, "d": 0, "p": 12, "v": 41.336, "a": "28B0E98C050000CE", "j": 0.0}, {"i": 3, "t": 3, "c": 1, "b": 0, "f": 2, "h": 1, "d": 0, "p": 16, "v": 0, "x": 1}, {"i": 4, "t": 3, "c": 1, "b": 0, "f": 3, "h": 1, "d": 0, "p": 14, "v": 1, "x": 1}]
 Aug 16 2023 14:22:59   Controller debug message: WARNING 2: Temperature sensor disconnected pin 0, address 28CF54B605000082
 Aug 16 2023 14:23:00   Available devices received: [{"i": -1, "t": 0, "c": 1, "b": 0, "f": 0, "h": 2, "d": 0, "p": 12, "v": null, "a": "28CF54B605000082", "j": 0.0}, {"i": -1, "t": 0, "c": 1, "b": 0, "f": 0, "h": 1, "d": 0, "p": 13, "x": 1}]
 Aug 16 2023 14:31:17   Connection type WiFi selected.  Trying TCP serial (WiFi)
 Aug 16 2023 14:31:17   Connecting to BrewPi esp10436883.local (via 192.168.30.167) on port 23
 Aug 16 2023 14:31:20   Successfully connected to controller.
 Aug 16 2023 14:31:20   Notification: Script started, with no active beer being logged
 Aug 16 2023 14:31:30   Checking software version on controller...
 Aug 16 2023 14:31:30   Found BrewPi v0.2.4, running commit 00000000, running on a ESP8266 ESP8266 with a DIY shield on port 192.168.30.167:23

 Aug 16 2023 14:31:30   BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
 Aug 16 2023 14:31:30   Bound to TCP socket on port 2962, interface localhost
 Aug 16 2023 14:31:31   Controller debug message: WARNING 1: Invalid command received by Arduino: x
 Aug 16 2023 14:31:32   Installed devices received: [{"i": 0, "t": 1, "c": 1, "b": 1, "f": 9, "h": 2, "d": 0, "p": 12, "v": 37.848, "a": "282C34B50500006B", "j": 0.0}, {"i": 1, "t": 1, "c": 1, "b": 0, "f": 5, "h": 2, "d": 0, "p": 12, "v": 40.998, "a": "28B0E98C050000CE", "j": 0.0}, {"i": 3, "t": 3, "c": 1, "b": 0, "f": 2, "h": 1, "d": 0, "p": 16, "v": 0, "x": 1}, {"i": 4, "t": 3, "c": 1, "b": 0, "f": 3, "h": 1, "d": 0, "p": 14, "v": 1, "x": 1}]
 Aug 16 2023 14:31:33   Controller debug message: WARNING 2: Temperature sensor disconnected pin 0, address 28CF54B605000082
 Aug 16 2023 14:31:34   Available devices received: [{"i": -1, "t": 0, "c": 1, "b": 0, "f": 0, "h": 2, "d": 0, "p": 12, "v": null, "a": "28CF54B605000082", "j": 0.0}, {"i": -1, "t": 0, "c": 1, "b": 0, "f": 0, "h": 1, "d": 0, "p": 13, "x": 1}]
 Aug 16 2023 14:48:47   Controller debug message: INFO MESSAGE 18: Negative peak detected:  40.5, estimated:  40.4. Previous cool estimator:  0.000, New cool estimator:  0.000.
 Aug 16 2023 16:03:06   Controller debug message: INFO MESSAGE 18: Negative peak detected:  40.6, estimated:  40.5. Previous cool estimator:  0.000, New cool estimator:  0.000.

Code:
 Aug 16 2023 14:22:53   Connection type WiFi selected.  Trying TCP serial (WiFi)
 Aug 16 2023 14:22:53   Connecting to BrewPi esp2663352.local (via 192.168.30.166) on port 23
 Aug 16 2023 14:22:56   Successfully connected to controller.
 Aug 16 2023 14:22:56   Notification: Script started, with no active beer being logged
 Aug 16 2023 14:23:06   Checking software version on controller...
 Aug 16 2023 14:23:06   Found BrewPi v0.2.4, running commit 00000000, running on a ESP8266 ESP8266 with a DIY shield on port 192.168.30.166:23

 Aug 16 2023 14:23:06   BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
 Aug 16 2023 14:23:06   Bound to TCP socket on port 2316, interface localhost
 Aug 16 2023 14:23:07   Controller debug message: WARNING 1: Invalid command received by Arduino: x
 Aug 16 2023 14:23:07   Installed devices received: [{"i": 0, "t": 1, "c": 1, "b": 0, "f": 5, "h": 2, "d": 0, "p": 12, "v": 41.785, "a": "287208B60500007B", "j": 0.0}, {"i": 3, "t": 3, "c": 1, "b": 0, "f": 3, "h": 1, "d": 0, "p": 14, "v": 0, "x": 1}]
 Aug 16 2023 14:23:09   Available devices received: [{"i": -1, "t": 0, "c": 1, "b": 0, "f": 0, "h": 1, "d": 0, "p": 16, "x": 1}, {"i": -1, "t": 0, "c": 1, "b": 0, "f": 0, "h": 1, "d": 0, "p": 13, "x": 1}]
 Aug 16 2023 14:31:27   Connection type WiFi selected.  Trying TCP serial (WiFi)
 Aug 16 2023 14:31:27   Connecting to BrewPi esp2663352.local (via 192.168.30.166) on port 23
 Aug 16 2023 14:32:00   Unable to connect to BrewPi 192.168.30.166 on port 23. Exiting.
 Aug 16 2023 14:32:01   Connection type WiFi selected.  Trying TCP serial (WiFi)
 Aug 16 2023 14:32:01   Connecting to BrewPi esp2663352.local (via 192.168.30.166) on port 23
 Aug 16 2023 14:32:35   Unable to connect to BrewPi 192.168.30.166 on port 23. Exiting.
 Aug 16 2023 14:32:36   Connection type WiFi selected.  Trying TCP serial (WiFi)
 Aug 16 2023 14:32:36   Connecting to BrewPi esp2663352.local (via 192.168.30.166) on port 23
 Aug 16 2023 14:33:10   Unable to connect to BrewPi 192.168.30.166 on port 23. Exiting.
 Aug 16 2023 14:33:11   Connection type WiFi selected.  Trying TCP serial (WiFi)
 Aug 16 2023 14:33:11   Connecting to BrewPi esp2663352.local (via 192.168.30.166) on port 23
 Aug 16 2023 14:33:44   Successfully connected to controller.
 Aug 16 2023 14:33:44   Notification: Script started, with no active beer being logged
 Aug 16 2023 14:33:54   Checking software version on controller...
 Aug 16 2023 14:33:54   Found BrewPi v0.2.4, running commit 00000000, running on a ESP8266 ESP8266 with a DIY shield on port 192.168.30.166:23

 Aug 16 2023 14:33:54   BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
 Aug 16 2023 14:33:54   Bound to TCP socket on port 2316, interface localhost
 Aug 16 2023 14:33:55   Controller debug message: WARNING 1: Invalid command received by Arduino: x
 Aug 16 2023 14:33:55   Installed devices received: [{"i": 0, "t": 1, "c": 1, "b": 0, "f": 5, "h": 2, "d": 0, "p": 12, "v": 41.785, "a": "287208B60500007B", "j": 0.0}, {"i": 3, "t": 3, "c": 1, "b": 0, "f": 3, "h": 1, "d": 0, "p": 14, "v": 1, "x": 1}]
 Aug 16 2023 14:33:57   Available devices received: [{"i": -1, "t": 0, "c": 1, "b": 0, "f": 0, "h": 1, "d": 0, "p": 16, "x": 1}, {"i": -1, "t": 0, "c": 1, "b": 0, "f": 0, "h": 1, "d": 0, "p": 13, "x": 1}]
 Aug 16 2023 15:45:54   Controller debug message: INFO MESSAGE 18: Negative peak detected:  40.2, estimated:  40.0. Previous cool estimator:  0.539, New cool estimator:  0.539.
 
Hi, sorry was away for a couple of days, I've left my device running on the latest 'non testing' version for that time and the ESP has remained connected, I'm still getting a load of errors about the temp connectors disconnecting them immediately connecting but the ESP was up.

dev-8-stderr.log
Code:
 Aug 16 2023 21:18:17   Controller debug message: INFO MESSAGE 18: Negative peak detected: 6.9, estimated: 6.8. Previous cool estimator: 0.537, New cool estimator: 0.537.
 Aug 16 2023 21:31:21   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 28358EC007000032
 Aug 16 2023 21:31:23   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 28358EC007000032
 Aug 16 2023 21:39:48   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 28358EC007000032
 Aug 16 2023 21:39:49   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 28358EC007000032
 Aug 16 2023 22:05:33   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 288636C20700001A
 Aug 16 2023 22:05:33   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 288636C20700001A
 Aug 16 2023 22:15:18   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 28358EC007000032
 Aug 16 2023 22:15:20   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 28358EC007000032
 Aug 16 2023 22:41:08   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 28358EC007000032
 Aug 16 2023 22:41:09   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 28358EC007000032
 Aug 16 2023 22:51:43   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 288636C20700001A
 Aug 16 2023 22:51:44   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 288636C20700001A
 Aug 16 2023 22:56:36   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 28358EC007000032
 Aug 16 2023 22:56:36   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 28358EC007000032
 Aug 17 2023 02:13:48   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 280F2A07D6013CE8
 Aug 17 2023 02:13:49   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 280F2A07D6013CE8
 Aug 17 2023 02:29:17   Controller debug message: INFO MESSAGE 18: Negative peak detected: 5.6, estimated: 5.5. Previous cool estimator: 0.537, New cool estimator: 0.537.
 Aug 17 2023 02:46:05   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 288636C20700001A
 Aug 17 2023 02:46:06   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 288636C20700001A
 Aug 17 2023 04:19:48   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 280F2A07D6013CE8
 Aug 17 2023 04:19:49   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 280F2A07D6013CE8
 Aug 17 2023 04:44:01   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 28358EC007000032
 Aug 17 2023 04:44:01   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 28358EC007000032
 Aug 17 2023 05:33:40   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 280F2A07D6013CE8
 Aug 17 2023 05:33:41   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 280F2A07D6013CE8
 Aug 17 2023 07:15:31   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 280F2A07D6013CE8
 Aug 17 2023 07:15:31   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 280F2A07D6013CE8
 Aug 17 2023 07:55:43   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 288636C20700001A
 Aug 17 2023 07:55:44   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 288636C20700001A
 Aug 17 2023 08:01:42   Controller debug message: INFO MESSAGE 18: Negative peak detected: 5.5, estimated: 5.3. Previous cool estimator: 0.537, New cool estimator: 0.537.
 Aug 17 2023 08:20:10   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 28358EC007000032
 Aug 17 2023 08:20:11   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 28358EC007000032
 Aug 17 2023 08:52:04   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 28358EC007000032
 Aug 17 2023 08:52:06   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 28358EC007000032
 Aug 17 2023 09:10:32   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 288636C20700001A
 Aug 17 2023 09:10:32   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 288636C20700001A
 Aug 17 2023 09:36:22   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 28358EC007000032
 Aug 17 2023 09:36:22   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 28358EC007000032
 Aug 17 2023 09:51:32   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 28358EC007000032
 Aug 17 2023 09:51:32   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 28358EC007000032
 Aug 17 2023 11:00:42   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 288636C20700001A
 Aug 17 2023 11:00:43   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 288636C20700001A
 Aug 17 2023 11:13:45   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 28358EC007000032
 Aug 17 2023 11:13:47   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 28358EC007000032
 Aug 17 2023 11:57:17   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 288636C20700001A
 Aug 17 2023 11:57:18   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 288636C20700001A
 Aug 17 2023 12:53:23   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 28358EC007000032
 Aug 17 2023 12:53:26   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 28358EC007000032
 Aug 17 2023 13:36:10   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 28358EC007000032
 Aug 17 2023 13:36:12   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 28358EC007000032
 Aug 17 2023 13:53:11   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 280F2A07D6013CE8
 Aug 17 2023 13:53:12   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 280F2A07D6013CE8
 Aug 17 2023 16:03:48   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 28358EC007000032
 Aug 17 2023 16:03:50   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 28358EC007000032
 Aug 17 2023 16:04:58   Notification: Beer temperature set to 1.7 degrees in web interface
 Aug 17 2023 16:11:41   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 288636C20700001A
 Aug 17 2023 16:11:41   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 288636C20700001A
 Aug 17 2023 16:30:31   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 288636C20700001A
 Aug 17 2023 16:30:32   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 288636C20700001A
 Aug 17 2023 17:15:12   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 280F2A07D6013CE8
 Aug 17 2023 17:15:13   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 280F2A07D6013CE8
 Aug 17 2023 18:39:21   Notification: Started logging for beer 'COOLING'.
 Aug 17 2023 18:39:50   Data logging stopped
 Aug 17 2023 18:40:26   Notification: Started logging for beer 'COOLING'.

fermentrack-stderr.log
Code:
[2023-08-12 11:33:54 +0000] [1942] [INFO] Booting worker with pid: 1942
[2023-08-12 11:34:24 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:1942)
[2023-08-12 11:34:25 +0000] [1942] [INFO] Worker exiting (pid: 1942)
[2023-08-12 11:34:26 +0000] [27] [WARNING] Worker with pid 1942 was terminated due to signal 9
[2023-08-12 11:34:27 +0000] [1947] [INFO] Booting worker with pid: 1947
[2023-08-12 11:34:57 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:1947)
[2023-08-12 11:34:58 +0000] [1947] [INFO] Worker exiting (pid: 1947)
[2023-08-12 11:35:00 +0000] [27] [WARNING] Worker with pid 1947 was terminated due to signal 9
[2023-08-12 11:35:00 +0000] [1952] [INFO] Booting worker with pid: 1952
[2023-08-12 11:35:31 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:1952)
[2023-08-12 11:35:32 +0000] [1952] [INFO] Worker exiting (pid: 1952)
[2023-08-12 11:35:33 +0000] [27] [WARNING] Worker with pid 1952 was terminated due to signal 9
[2023-08-12 11:35:34 +0000] [1957] [INFO] Booting worker with pid: 1957
[2023-08-12 11:36:05 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:1957)
[2023-08-12 11:36:05 +0000] [1957] [INFO] Worker exiting (pid: 1957)
[2023-08-12 11:36:06 +0000] [27] [WARNING] Worker with pid 1957 was terminated due to signal 9
[2023-08-12 11:36:07 +0000] [1962] [INFO] Booting worker with pid: 1962
[2023-08-12 11:36:37 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:1962)
[2023-08-12 11:36:37 +0000] [1962] [INFO] Worker exiting (pid: 1962)
[2023-08-12 11:36:38 +0000] [27] [WARNING] Worker with pid 1962 was terminated due to signal 9
[2023-08-12 11:36:38 +0000] [1967] [INFO] Booting worker with pid: 1967
[2023-08-12 11:37:09 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:1967)
[2023-08-12 11:37:09 +0000] [1967] [INFO] Worker exiting (pid: 1967)
[2023-08-12 11:37:10 +0000] [27] [WARNING] Worker with pid 1967 was terminated due to signal 9
[2023-08-12 11:37:10 +0000] [1973] [INFO] Booting worker with pid: 1973
[2023-08-12 11:37:41 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:1973)
[2023-08-12 11:37:41 +0000] [1973] [INFO] Worker exiting (pid: 1973)
[2023-08-12 11:37:42 +0000] [27] [WARNING] Worker with pid 1973 was terminated due to signal 9
[2023-08-12 11:37:43 +0000] [1976] [INFO] Booting worker with pid: 1976
[2023-08-12 11:38:14 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:1976)
[2023-08-12 11:38:14 +0000] [1976] [INFO] Worker exiting (pid: 1976)
[2023-08-12 11:38:15 +0000] [27] [WARNING] Worker with pid 1976 was terminated due to signal 9
[2023-08-12 11:38:16 +0000] [1981] [INFO] Booting worker with pid: 1981
[2023-08-12 11:38:46 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:1981)
[2023-08-12 11:38:46 +0000] [1981] [INFO] Worker exiting (pid: 1981)
[2023-08-12 11:38:47 +0000] [27] [WARNING] Worker with pid 1981 was terminated due to signal 9
[2023-08-12 11:38:47 +0000] [1986] [INFO] Booting worker with pid: 1986
[2023-08-12 11:39:18 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:1986)
[2023-08-12 11:39:18 +0000] [1986] [INFO] Worker exiting (pid: 1986)
[2023-08-12 11:39:19 +0000] [27] [WARNING] Worker with pid 1986 was terminated due to signal 9
[2023-08-12 11:39:20 +0000] [1991] [INFO] Booting worker with pid: 1991
[2023-08-12 11:39:50 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:1991)
[2023-08-12 11:39:50 +0000] [1991] [INFO] Worker exiting (pid: 1991)
[2023-08-12 11:39:51 +0000] [27] [WARNING] Worker with pid 1991 was terminated due to signal 9
[2023-08-12 11:39:51 +0000] [1993] [INFO] Booting worker with pid: 1993
[2023-08-12 11:40:22 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:1993)
[2023-08-12 11:40:24 +0000] [27] [WARNING] Worker with pid 1993 was terminated due to signal 9
[2023-08-12 11:40:25 +0000] [1996] [INFO] Booting worker with pid: 1996
[2023-08-12 11:40:55 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:1996)
[2023-08-12 11:40:56 +0000] [27] [WARNING] Worker with pid 1996 was terminated due to signal 9
[2023-08-12 11:40:57 +0000] [2000] [INFO] Booting worker with pid: 2000
[2023-08-12 11:41:28 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:2000)
[2023-08-12 11:41:29 +0000] [2000] [INFO] Worker exiting (pid: 2000)
[2023-08-12 11:41:32 +0000] [27] [WARNING] Worker with pid 2000 was terminated due to signal 9
[2023-08-12 11:41:32 +0000] [2004] [INFO] Booting worker with pid: 2004
[2023-08-12 11:42:02 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:2004)
[2023-08-12 11:42:03 +0000] [2004] [INFO] Worker exiting (pid: 2004)
[2023-08-12 11:42:04 +0000] [27] [WARNING] Worker with pid 2004 was terminated due to signal 9
[2023-08-12 11:42:04 +0000] [2008] [INFO] Booting worker with pid: 2008
[2023-08-12 14:56:52 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:191)
[2023-08-12 14:56:54 +0000] [27] [WARNING] Worker with pid 191 was terminated due to signal 9
[2023-08-12 14:56:55 +0000] [2019] [INFO] Booting worker with pid: 2019
[2023-08-12 17:03:40 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:147)
[2023-08-12 17:03:43 +0000] [27] [WARNING] Worker with pid 147 was terminated due to signal 9
[2023-08-12 17:03:44 +0000] [2030] [INFO] Booting worker with pid: 2030
[2023-08-12 18:44:38 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:2030)
[2023-08-12 18:44:46 +0000] [27] [WARNING] Worker with pid 2030 was terminated due to signal 9
[2023-08-12 18:44:46 +0000] [2041] [INFO] Booting worker with pid: 2041
[2023-08-13 05:01:07 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:2019)
[2023-08-13 05:01:08 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:2041)
[2023-08-13 05:01:10 +0000] [27] [WARNING] Worker with pid 2019 was terminated due to signal 9
[2023-08-13 05:01:10 +0000] [27] [WARNING] Worker with pid 2041 was terminated due to signal 9
[2023-08-13 05:01:11 +0000] [2053] [INFO] Booting worker with pid: 2053
[2023-08-13 05:01:11 +0000] [2052] [INFO] Booting worker with pid: 2052
[2023-08-13 05:35:07 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:2008)
[2023-08-13 05:35:11 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:2052)
[2023-08-13 05:35:17 +0000] [27] [WARNING] Worker with pid 2008 was terminated due to signal 9
[2023-08-13 05:35:17 +0000] [27] [WARNING] Worker with pid 2052 was terminated due to signal 9
[2023-08-13 05:35:18 +0000] [2074] [INFO] Booting worker with pid: 2074
[2023-08-13 05:35:18 +0000] [2075] [INFO] Booting worker with pid: 2075
[2023-08-13 09:55:56 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:2075)
[2023-08-13 09:56:00 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:2053)
[2023-08-13 09:56:12 +0000] [27] [WARNING] Worker with pid 2075 was terminated due to signal 9
[2023-08-13 09:56:12 +0000] [27] [WARNING] Worker with pid 2053 was terminated due to signal 9
[2023-08-13 09:56:13 +0000] [2097] [INFO] Booting worker with pid: 2097
[2023-08-13 09:56:13 +0000] [2096] [INFO] Booting worker with pid: 2096
[2023-08-13 09:56:43 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:2096)
[2023-08-13 09:56:44 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:2097)
[2023-08-13 09:56:45 +0000] [27] [WARNING] Worker with pid 2096 was terminated due to signal 9
[2023-08-13 09:56:45 +0000] [27] [WARNING] Worker with pid 2097 was terminated due to signal 9
[2023-08-13 09:56:45 +0000] [2106] [INFO] Booting worker with pid: 2106
[2023-08-13 09:56:45 +0000] [2107] [INFO] Booting worker with pid: 2107
[2023-08-13 22:12:16 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:2107)
[2023-08-13 22:12:20 +0000] [27] [WARNING] Worker with pid 2107 was terminated due to signal 9
[2023-08-13 22:12:22 +0000] [2128] [INFO] Booting worker with pid: 2128
[2023-08-13 22:12:51 +0000] [27] [CRITICAL] WORKER TIMEOUT (pid:2128)
[2023-08-13 22:12:51 +0000] [2128] [INFO] Worker exiting (pid: 2128)
[2023-08-13 22:12:52 +0000] [27] [WARNING] Worker with pid 2128 was terminated due to signal 9
[2023-08-13 22:12:52 +0000] [2134] [INFO] Booting worker with pid: 2134
Not Found: /favicon.ico[\CODE]
 
After my last post (a bit more than 48 hours ago), I restarted the docker containers and I have not had an issue since. The fermentrack containers in the debian VM are still connected to the ESPs, and I haven't seen any runaway python processes. I'll continue to update, and @Thorrak please let me know if there's anything else you want me to test.
 
Came here to post about a disconnecting freezing problem I'm seeing recently and looks like others are having it as well. The fermentation before this went off without hitch the only thing I've changed between then and now is both fermentrack and my device had updates available. I decided to do both after my beer was done. I reflashed my device with the new firmware (an s2 mini with a custom shield and standard lcd screen) I repaired all my sensors and pins etc everything seemed to work so I turned it off. I put a beer in last night and it will run for a few hours then I get cannot connect to script. On the device the screen freezes and it seems locked up the fridge relay shuts off and it stops controlling the beer. It seems to run fine for about 2 - 3 hours before it quits... I noticed there was an update for fermentrack again so I just installed it just now I usually don't update in the middle of a beer so hopefully this helps

Ill add my error log if it helps find a bug


Aug 19 2023 16:11:47 BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
Aug 19 2023 16:11:47 Bound to TCP socket on port 2244, interface localhost
Aug 19 2023 16:11:49 Installed devices received: [{"c": 1, "b": 0, "f": 2, "h": 1, "p": 5, "x": true, "d": false, "r": "Heat", "i": 0}, {"c": 1, "b": 0, "f": 3, "h": 1, "p": 7, "x": true, "d": false, "r": "Cool", "i": 1}, {"c": 1, "b": 1, "f": 9, "h": 2, "p": 9, "x": false, "d": false, "a": "28A3602E212206DD", "j": "0.000", "i": 2}, {"c": 1, "b": 0, "f": 5, "h": 2, "p": 9, "x": false, "d": false, "a": "28BEF12F21220639", "j": "0.000", "i": 3}]
Aug 19 2023 16:11:49 Available devices received: [{"c": 1, "b": 0, "f": 0, "h": 1, "p": 11, "x": true, "d": false, "r": "Door", "i": -1}]
Aug 19 2023 17:04:13 Controller debug message: INFO MESSAGE 18: Negative peak detected: 61.7, estimated: 60.7. Previous cool estimator: 1.301, New cool estimator: 1.061.
Aug 19 2023 17:39:13 Controller debug message: INFO MESSAGE 18: Negative peak detected: 63.3, estimated: 62.0. Previous cool estimator: 1.061, New cool estimator: 0.859.
Aug 19 2023 18:12:58 Controller debug message: INFO MESSAGE 18: Negative peak detected: 65.4, estimated: 65.8. Previous cool estimator: 0.859, New cool estimator: 0.859.
Aug 19 2023 19:38:04 Error: controller is not responding to new data requests. Exiting.
Aug 19 2023 19:38:07 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 19:38:07 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 19:38:10 Successfully connected to controller.
Aug 19 2023 19:38:10 Notification: Script started, with no active beer being logged
Aug 19 2023 19:38:20 Checking software version on controller...
Aug 19 2023 19:38:30 Error: Cannot receive version number from controller. Your controller is either not programmed or not responding.
Aug 19 2023 19:38:42 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 19:38:42 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 19:38:45 Successfully connected to controller.
Aug 19 2023 19:38:45 Notification: Script started, with no active beer being logged
Aug 19 2023 19:38:55 Checking software version on controller...
Aug 19 2023 19:39:05 Error: Cannot receive version number from controller. Your controller is either not programmed or not responding.
Aug 19 2023 19:39:07 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 19:39:07 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 19:39:10 Successfully connected to controller.
Aug 19 2023 19:39:10 Notification: Script started, with no active beer being logged
Aug 19 2023 19:39:20 Checking software version on controller...
Aug 19 2023 19:39:30 Error: Cannot receive version number from controller. Your controller is either not programmed or not responding.
Aug 19 2023 19:39:37 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 19:39:37 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 19:39:40 Successfully connected to controller.
Aug 19 2023 19:39:40 Notification: Script started, with no active beer being logged
Aug 19 2023 19:39:50 Checking software version on controller...
Aug 19 2023 19:40:00 Error: Cannot receive version number from controller. Your controller is either not programmed or not responding.
Aug 19 2023 19:40:12 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 19:40:12 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 19:45:45 Successfully connected to controller.
Aug 19 2023 19:45:45 Notification: Script started, with no active beer being logged
Aug 19 2023 19:45:55 Checking software version on controller...
Aug 19 2023 19:46:05 Error: Cannot receive version number from controller. Your controller is either not programmed or not responding.
Aug 19 2023 19:46:18 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 19:46:18 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 20:01:50 Successfully connected to controller.
Aug 19 2023 20:01:50 Notification: Script started, with no active beer being logged
Aug 19 2023 20:02:00 Checking software version on controller...
Aug 19 2023 20:02:10 Error: Cannot receive version number from controller. Your controller is either not programmed or not responding.
Aug 19 2023 20:02:19 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 20:02:19 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 20:05:05 Successfully connected to controller.
Aug 19 2023 20:05:05 Notification: Script started, with no active beer being logged
Aug 19 2023 20:05:15 Checking software version on controller...
Aug 19 2023 20:05:25 Error: Cannot receive version number from controller. Your controller is either not programmed or not responding.
Aug 19 2023 20:05:40 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 20:05:40 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 20:05:43 Successfully connected to controller.
Aug 19 2023 20:05:43 Notification: Script started, with no active beer being logged
Aug 19 2023 20:05:53 Checking software version on controller...
Aug 19 2023 20:05:53 Found BrewPi v0.2.4, running commit 2efdbfb build 2efdbfb, running on a ESP32 ESP32-S2 with a DIY shield on port 192.168.1.230:23

Aug 19 2023 20:05:53 BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
Aug 19 2023 20:05:53 Bound to TCP socket on port 2244, interface localhost
Aug 19 2023 20:05:55 Installed devices received: [{"c": 1, "b": 0, "f": 2, "h": 1, "p": 5, "x": true, "d": false, "r": "Heat", "i": 0}, {"c": 1, "b": 0, "f": 3, "h": 1, "p": 7, "x": true, "d": false, "r": "Cool", "i": 1}, {"c": 1, "b": 1, "f": 9, "h": 2, "p": 9, "x": false, "d": false, "a": "28A3602E212206DD", "j": "0.000", "i": 2}, {"c": 1, "b": 0, "f": 5, "h": 2, "p": 9, "x": false, "d": false, "a": "28BEF12F21220639", "j": "0.000", "i": 3}]
Aug 19 2023 20:05:55 Available devices received: [{"c": 1, "b": 0, "f": 0, "h": 1, "p": 11, "x": true, "d": false, "r": "Door", "i": -1}]
Aug 19 2023 20:16:41 Lost connection to controller on read. Attempting to reconnect.
Aug 19 2023 20:16:42 Lost connection to controller on write. Attempting to reconnect.
Aug 19 2023 20:16:42 Serial Error: [Errno 9] Bad file descriptor)
Aug 19 2023 20:16:44 Unable to connect to BrewPi 192.168.1.230 on port 23. Exiting.
Aug 19 2023 20:18:07 Error: controller is not responding to new data requests. Exiting.
Aug 19 2023 20:18:21 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 20:18:21 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 20:18:24 Successfully connected to controller.
Aug 19 2023 20:18:24 Notification: Script started, with no active beer being logged
Aug 19 2023 20:18:34 Checking software version on controller...
Aug 19 2023 20:18:35 Found BrewPi v0.2.4, running commit 2efdbfb build 2efdbfb, running on a ESP32 ESP32-S2 with a DIY shield on port 192.168.1.230:23

Aug 19 2023 20:18:35 BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
Aug 19 2023 20:18:35 Bound to TCP socket on port 2244, interface localhost
Aug 19 2023 20:18:37 Installed devices received: [{"c": 1, "b": 0, "f": 2, "h": 1, "p": 5, "x": true, "d": false, "r": "Heat", "i": 0}, {"c": 1, "b": 0, "f": 3, "h": 1, "p": 7, "x": true, "d": false, "r": "Cool", "i": 1}, {"c": 1, "b": 1, "f": 9, "h": 2, "p": 9, "x": false, "d": false, "a": "28A3602E212206DD", "j": "0.000", "i": 2}, {"c": 1, "b": 0, "f": 5, "h": 2, "p": 9, "x": false, "d": false, "a": "28BEF12F21220639", "j": "0.000", "i": 3}]
Aug 19 2023 20:18:37 Available devices received: [{"c": 1, "b": 0, "f": 0, "h": 1, "p": 11, "x": true, "d": false, "r": "Door", "i": -1}]
Aug 19 2023 20:36:46 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 20:36:46 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 20:36:50 Successfully connected to controller.
Aug 19 2023 20:36:50 Notification: Script started, with no active beer being logged
Aug 19 2023 20:37:00 Checking software version on controller...
Aug 19 2023 20:37:00 Found BrewPi v0.2.4, running commit 2efdbfb build 2efdbfb, running on a ESP32 ESP32-S2 with a DIY shield on port 192.168.1.230:23

Aug 19 2023 20:37:00 BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
Aug 19 2023 20:37:00 Bound to TCP socket on port 2244, interface localhost
Aug 19 2023 20:37:08 Installed devices received: [{"c": 1, "b": 0, "f": 2, "h": 1, "p": 5, "x": true, "d": false, "r": "Heat", "i": 0}, {"c": 1, "b": 0, "f": 3, "h": 1, "p": 7, "x": true, "d": false, "r": "Cool", "i": 1}, {"c": 1, "b": 1, "f": 9, "h": 2, "p": 9, "x": false, "d": false, "a": "28A3602E212206DD", "j": "0.000", "i": 2}, {"c": 1, "b": 0, "f": 5, "h": 2, "p": 9, "x": false, "d": false, "a": "28BEF12F21220639", "j": "0.000", "i": 3}]
Aug 19 2023 20:37:08 Available devices received: [{"c": 1, "b": 0, "f": 0, "h": 1, "p": 11, "x": true, "d": false, "r": "Door", "i": -1}]
Aug 19 2023 20:38:24 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 20:38:24 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 20:38:27 Successfully connected to controller.
Aug 19 2023 20:38:27 Notification: Script started, with no active beer being logged
Aug 19 2023 20:38:37 Checking software version on controller...
Aug 19 2023 20:38:37 Found BrewPi v0.2.4, running commit 2efdbfb build 2efdbfb, running on a ESP32 ESP32-S2 with a DIY shield on port 192.168.1.230:23

Aug 19 2023 20:38:37 BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
Aug 19 2023 20:38:37 Bound to TCP socket on port 2244, interface localhost
Aug 19 2023 20:38:39 Installed devices received: [{"c": 1, "b": 0, "f": 2, "h": 1, "p": 5, "x": true, "d": false, "r": "Heat", "i": 0}, {"c": 1, "b": 0, "f": 3, "h": 1, "p": 7, "x": true, "d": false, "r": "Cool", "i": 1}, {"c": 1, "b": 1, "f": 9, "h": 2, "p": 9, "x": false, "d": false, "a": "28A3602E212206DD", "j": "0.000", "i": 2}, {"c": 1, "b": 0, "f": 5, "h": 2, "p": 9, "x": false, "d": false, "a": "28BEF12F21220639", "j": "0.000", "i": 3}]
Aug 19 2023 20:38:39 Available devices received: [{"c": 1, "b": 0, "f": 0, "h": 1, "p": 11, "x": true, "d": false, "r": "Door", "i": -1}]
Aug 19 2023 20:42:44 Controller debug message: INFO MESSAGE 18: Negative peak detected: 60.8, estimated: 60.3. Previous cool estimator: 0.859, New cool estimator: 0.707.
 
Came here to post about a disconnecting freezing problem I'm seeing recently and looks like others are having it as well. The fermentation before this went off without hitch the only thing I've changed between then and now is both fermentrack and my device had updates available. I decided to do both after my beer was done. I reflashed my device with the new firmware (an s2 mini with a custom shield and standard lcd screen) I repaired all my sensors and pins etc everything seemed to work so I turned it off. I put a beer in last night and it will run for a few hours then I get cannot connect to script. On the device the screen freezes and it seems locked up the fridge relay shuts off and it stops controlling the beer. It seems to run fine for about 2 - 3 hours before it quits... I noticed there was an update for fermentrack again so I just installed it just now I usually don't update in the middle of a beer so hopefully this helps

Ill add my error log if it helps find a bug


Aug 19 2023 16:11:47 BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
Aug 19 2023 16:11:47 Bound to TCP socket on port 2244, interface localhost
Aug 19 2023 16:11:49 Installed devices received: [{"c": 1, "b": 0, "f": 2, "h": 1, "p": 5, "x": true, "d": false, "r": "Heat", "i": 0}, {"c": 1, "b": 0, "f": 3, "h": 1, "p": 7, "x": true, "d": false, "r": "Cool", "i": 1}, {"c": 1, "b": 1, "f": 9, "h": 2, "p": 9, "x": false, "d": false, "a": "28A3602E212206DD", "j": "0.000", "i": 2}, {"c": 1, "b": 0, "f": 5, "h": 2, "p": 9, "x": false, "d": false, "a": "28BEF12F21220639", "j": "0.000", "i": 3}]
Aug 19 2023 16:11:49 Available devices received: [{"c": 1, "b": 0, "f": 0, "h": 1, "p": 11, "x": true, "d": false, "r": "Door", "i": -1}]
Aug 19 2023 17:04:13 Controller debug message: INFO MESSAGE 18: Negative peak detected: 61.7, estimated: 60.7. Previous cool estimator: 1.301, New cool estimator: 1.061.
Aug 19 2023 17:39:13 Controller debug message: INFO MESSAGE 18: Negative peak detected: 63.3, estimated: 62.0. Previous cool estimator: 1.061, New cool estimator: 0.859.
Aug 19 2023 18:12:58 Controller debug message: INFO MESSAGE 18: Negative peak detected: 65.4, estimated: 65.8. Previous cool estimator: 0.859, New cool estimator: 0.859.
Aug 19 2023 19:38:04 Error: controller is not responding to new data requests. Exiting.
Aug 19 2023 19:38:07 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 19:38:07 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 19:38:10 Successfully connected to controller.
Aug 19 2023 19:38:10 Notification: Script started, with no active beer being logged
Aug 19 2023 19:38:20 Checking software version on controller...
Aug 19 2023 19:38:30 Error: Cannot receive version number from controller. Your controller is either not programmed or not responding.
Aug 19 2023 19:38:42 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 19:38:42 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 19:38:45 Successfully connected to controller.
Aug 19 2023 19:38:45 Notification: Script started, with no active beer being logged
Aug 19 2023 19:38:55 Checking software version on controller...
Aug 19 2023 19:39:05 Error: Cannot receive version number from controller. Your controller is either not programmed or not responding.
Aug 19 2023 19:39:07 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 19:39:07 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 19:39:10 Successfully connected to controller.
Aug 19 2023 19:39:10 Notification: Script started, with no active beer being logged
Aug 19 2023 19:39:20 Checking software version on controller...
Aug 19 2023 19:39:30 Error: Cannot receive version number from controller. Your controller is either not programmed or not responding.
Aug 19 2023 19:39:37 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 19:39:37 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 19:39:40 Successfully connected to controller.
Aug 19 2023 19:39:40 Notification: Script started, with no active beer being logged
Aug 19 2023 19:39:50 Checking software version on controller...
Aug 19 2023 19:40:00 Error: Cannot receive version number from controller. Your controller is either not programmed or not responding.
Aug 19 2023 19:40:12 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 19:40:12 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 19:45:45 Successfully connected to controller.
Aug 19 2023 19:45:45 Notification: Script started, with no active beer being logged
Aug 19 2023 19:45:55 Checking software version on controller...
Aug 19 2023 19:46:05 Error: Cannot receive version number from controller. Your controller is either not programmed or not responding.
Aug 19 2023 19:46:18 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 19:46:18 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 20:01:50 Successfully connected to controller.
Aug 19 2023 20:01:50 Notification: Script started, with no active beer being logged
Aug 19 2023 20:02:00 Checking software version on controller...
Aug 19 2023 20:02:10 Error: Cannot receive version number from controller. Your controller is either not programmed or not responding.
Aug 19 2023 20:02:19 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 20:02:19 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 20:05:05 Successfully connected to controller.
Aug 19 2023 20:05:05 Notification: Script started, with no active beer being logged
Aug 19 2023 20:05:15 Checking software version on controller...
Aug 19 2023 20:05:25 Error: Cannot receive version number from controller. Your controller is either not programmed or not responding.
Aug 19 2023 20:05:40 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 20:05:40 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 20:05:43 Successfully connected to controller.
Aug 19 2023 20:05:43 Notification: Script started, with no active beer being logged
Aug 19 2023 20:05:53 Checking software version on controller...
Aug 19 2023 20:05:53 Found BrewPi v0.2.4, running commit 2efdbfb build 2efdbfb, running on a ESP32 ESP32-S2 with a DIY shield on port 192.168.1.230:23

Aug 19 2023 20:05:53 BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
Aug 19 2023 20:05:53 Bound to TCP socket on port 2244, interface localhost
Aug 19 2023 20:05:55 Installed devices received: [{"c": 1, "b": 0, "f": 2, "h": 1, "p": 5, "x": true, "d": false, "r": "Heat", "i": 0}, {"c": 1, "b": 0, "f": 3, "h": 1, "p": 7, "x": true, "d": false, "r": "Cool", "i": 1}, {"c": 1, "b": 1, "f": 9, "h": 2, "p": 9, "x": false, "d": false, "a": "28A3602E212206DD", "j": "0.000", "i": 2}, {"c": 1, "b": 0, "f": 5, "h": 2, "p": 9, "x": false, "d": false, "a": "28BEF12F21220639", "j": "0.000", "i": 3}]
Aug 19 2023 20:05:55 Available devices received: [{"c": 1, "b": 0, "f": 0, "h": 1, "p": 11, "x": true, "d": false, "r": "Door", "i": -1}]
Aug 19 2023 20:16:41 Lost connection to controller on read. Attempting to reconnect.
Aug 19 2023 20:16:42 Lost connection to controller on write. Attempting to reconnect.
Aug 19 2023 20:16:42 Serial Error: [Errno 9] Bad file descriptor)
Aug 19 2023 20:16:44 Unable to connect to BrewPi 192.168.1.230 on port 23. Exiting.
Aug 19 2023 20:18:07 Error: controller is not responding to new data requests. Exiting.
Aug 19 2023 20:18:21 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 20:18:21 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 20:18:24 Successfully connected to controller.
Aug 19 2023 20:18:24 Notification: Script started, with no active beer being logged
Aug 19 2023 20:18:34 Checking software version on controller...
Aug 19 2023 20:18:35 Found BrewPi v0.2.4, running commit 2efdbfb build 2efdbfb, running on a ESP32 ESP32-S2 with a DIY shield on port 192.168.1.230:23

Aug 19 2023 20:18:35 BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
Aug 19 2023 20:18:35 Bound to TCP socket on port 2244, interface localhost
Aug 19 2023 20:18:37 Installed devices received: [{"c": 1, "b": 0, "f": 2, "h": 1, "p": 5, "x": true, "d": false, "r": "Heat", "i": 0}, {"c": 1, "b": 0, "f": 3, "h": 1, "p": 7, "x": true, "d": false, "r": "Cool", "i": 1}, {"c": 1, "b": 1, "f": 9, "h": 2, "p": 9, "x": false, "d": false, "a": "28A3602E212206DD", "j": "0.000", "i": 2}, {"c": 1, "b": 0, "f": 5, "h": 2, "p": 9, "x": false, "d": false, "a": "28BEF12F21220639", "j": "0.000", "i": 3}]
Aug 19 2023 20:18:37 Available devices received: [{"c": 1, "b": 0, "f": 0, "h": 1, "p": 11, "x": true, "d": false, "r": "Door", "i": -1}]
Aug 19 2023 20:36:46 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 20:36:46 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 20:36:50 Successfully connected to controller.
Aug 19 2023 20:36:50 Notification: Script started, with no active beer being logged
Aug 19 2023 20:37:00 Checking software version on controller...
Aug 19 2023 20:37:00 Found BrewPi v0.2.4, running commit 2efdbfb build 2efdbfb, running on a ESP32 ESP32-S2 with a DIY shield on port 192.168.1.230:23

Aug 19 2023 20:37:00 BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
Aug 19 2023 20:37:00 Bound to TCP socket on port 2244, interface localhost
Aug 19 2023 20:37:08 Installed devices received: [{"c": 1, "b": 0, "f": 2, "h": 1, "p": 5, "x": true, "d": false, "r": "Heat", "i": 0}, {"c": 1, "b": 0, "f": 3, "h": 1, "p": 7, "x": true, "d": false, "r": "Cool", "i": 1}, {"c": 1, "b": 1, "f": 9, "h": 2, "p": 9, "x": false, "d": false, "a": "28A3602E212206DD", "j": "0.000", "i": 2}, {"c": 1, "b": 0, "f": 5, "h": 2, "p": 9, "x": false, "d": false, "a": "28BEF12F21220639", "j": "0.000", "i": 3}]
Aug 19 2023 20:37:08 Available devices received: [{"c": 1, "b": 0, "f": 0, "h": 1, "p": 11, "x": true, "d": false, "r": "Door", "i": -1}]
Aug 19 2023 20:38:24 Connection type WiFi selected. Trying TCP serial (WiFi)
Aug 19 2023 20:38:24 Connecting to BrewPi chamberL.local (via 192.168.1.230) on port 23
Aug 19 2023 20:38:27 Successfully connected to controller.
Aug 19 2023 20:38:27 Notification: Script started, with no active beer being logged
Aug 19 2023 20:38:37 Checking software version on controller...
Aug 19 2023 20:38:37 Found BrewPi v0.2.4, running commit 2efdbfb build 2efdbfb, running on a ESP32 ESP32-S2 with a DIY shield on port 192.168.1.230:23

Aug 19 2023 20:38:37 BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
Aug 19 2023 20:38:37 Bound to TCP socket on port 2244, interface localhost
Aug 19 2023 20:38:39 Installed devices received: [{"c": 1, "b": 0, "f": 2, "h": 1, "p": 5, "x": true, "d": false, "r": "Heat", "i": 0}, {"c": 1, "b": 0, "f": 3, "h": 1, "p": 7, "x": true, "d": false, "r": "Cool", "i": 1}, {"c": 1, "b": 1, "f": 9, "h": 2, "p": 9, "x": false, "d": false, "a": "28A3602E212206DD", "j": "0.000", "i": 2}, {"c": 1, "b": 0, "f": 5, "h": 2, "p": 9, "x": false, "d": false, "a": "28BEF12F21220639", "j": "0.000", "i": 3}]
Aug 19 2023 20:38:39 Available devices received: [{"c": 1, "b": 0, "f": 0, "h": 1, "p": 11, "x": true, "d": false, "r": "Door", "i": -1}]
Aug 19 2023 20:42:44 Controller debug message: INFO MESSAGE 18: Negative peak detected: 60.8, estimated: 60.3. Previous cool estimator: 0.859, New cool estimator: 0.707.
nope it disconnected again like an hour after the update.. The device doesn't seem frozen at least yet and is still controlling the beer. THe log has an interesting error now

Process Process-2:
Traceback (most recent call last):
File "/app/brewpi-script/brewpi.py", line 305, in BrewPiScript
conn, addr = s.accept()
File "/usr/local/lib/python3.9/socket.py", line 293, in accept
fd, addr = self._accept()
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/local/lib/python3.9/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/app/brewpi-script/brewpi.py", line 694, in BrewPiScript
new_temp = config_obj.get_profile_temp()
File "/app/brewpi-script/fermentrack_config_loader.py", line 95, in get_profile_temp
return self.brewpi_device.get_profile_temp()
File "/app/app/models.py", line 596, in get_profile_temp
return self.active_profile.profile_temp(self.time_profile_started, self.temp_format)
File "/app/app/models.py", line 1748, in profile_temp
if current_time <= (time_started + profile_points[0].ttl):
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 318, in __getitem__
return qs._result_cache[0]
IndexError: list index out of range
 
Hi, sorry was away for a couple of days, I've left my device running on the latest 'non testing' version for that time and the ESP has remained connected, I'm still getting a load of errors about the temp connectors disconnecting them immediately connecting but the ESP was up.

dev-8-stderr.log
Code:
 Aug 16 2023 21:18:17   Controller debug message: INFO MESSAGE 18: Negative peak detected: 6.9, estimated: 6.8. Previous cool estimator: 0.537, New cool estimator: 0.537.
 Aug 16 2023 21:31:21   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 28358EC007000032
 Aug 16 2023 21:31:23   Controller debug message: INFO MESSAGE 0: Temp sensor connected on pin 13, address 28358EC007000032
 Aug 16 2023 21:39:48   Controller debug message: WARNING 2: Temperature sensor disconnected pin 13, address 28358EC007000032

The temp connector issue is being detected/reported by the controller, and more than likely has something to do with the hardware you're using. Typical culprits are (in order) a bad temperature sensor, dirty/insufficient power to the temperature sensor, loose connections between the temp sensors and the controller, or having too many temperature sensors on the bus.

If you have one of my recent PCB designs, you may be able to change the voltage being sent to the OneWire devices -- if you have it set to 3.3v it may make sense to try changing it to 5v. If you have it set to 5v, it might be worth trying 3.3v -- some knock-off ds18b20 sensors I've encountered actually prefer 3.3v for some reason (which is why I made it selectable in the first place!).


After my last post (a bit more than 48 hours ago), I restarted the docker containers and I have not had an issue since. The fermentrack containers in the debian VM are still connected to the ESPs, and I haven't seen any runaway python processes. I'll continue to update, and @Thorrak please let me know if there's anything else you want me to test.

Glad to hear it -- I just went ahead and merged these changes into master since it sounds like they helped! A normal install.sh run should now pull these changes going forward.


Came here to post about a disconnecting freezing problem I'm seeing recently and looks like others are having it as well. The fermentation before this went off without hitch the only thing I've changed between then and now is both fermentrack and my device had updates available. I decided to do both after my beer was done. I reflashed my device with the new firmware (an s2 mini with a custom shield and standard lcd screen) I repaired all my sensors and pins etc everything seemed to work so I turned it off. I put a beer in last night and it will run for a few hours then I get cannot connect to script. On the device the screen freezes and it seems locked up the fridge relay shuts off and it stops controlling the beer. It seems to run fine for about 2 - 3 hours before it quits... I noticed there was an update for fermentrack again so I just installed it just now I usually don't update in the middle of a beer so hopefully this helps

Does Fermentrack work for awhile then lose connection to the devices and require a restart (of Fermentrack) to come back up? If so, this is the same issue that @adman and others have been helping me tackle. As I mentioned above, I just pushed out an update that should help greatly with this.

To note, the controllers should continue to work fine if this happens. The issue is between the database and Fermentrack's script manager -- not something that is taking place on the controller.


nope it disconnected again like an hour after the update.. The device doesn't seem frozen at least yet and is still controlling the beer. THe log has an interesting error now

Process Process-2:
Traceback (most recent call last):
File "/app/brewpi-script/brewpi.py", line 305, in BrewPiScript
conn, addr = s.accept()
File "/usr/local/lib/python3.9/socket.py", line 293, in accept
fd, addr = self._accept()
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/local/lib/python3.9/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/app/brewpi-script/brewpi.py", line 694, in BrewPiScript
new_temp = config_obj.get_profile_temp()
File "/app/brewpi-script/fermentrack_config_loader.py", line 95, in get_profile_temp
return self.brewpi_device.get_profile_temp()
File "/app/app/models.py", line 596, in get_profile_temp
return self.active_profile.profile_temp(self.time_profile_started, self.temp_format)
File "/app/app/models.py", line 1748, in profile_temp
if current_time <= (time_started + profile_points[0].ttl):
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 318, in __getitem__
return qs._result_cache[0]
IndexError: list index out of range

Did it disconnect and then come back up when this happened, or disconnect and stay disconnected?
 
The temp connector issue is being detected/reported by the controller, and more than likely has something to do with the hardware you're using. Typical culprits are (in order) a bad temperature sensor, dirty/insufficient power to the temperature sensor, loose connections between the temp sensors and the controller, or having too many temperature sensors on the bus.

If you have one of my recent PCB designs, you may be able to change the voltage being sent to the OneWire devices -- if you have it set to 3.3v it may make sense to try changing it to 5v. If you have it set to 5v, it might be worth trying 3.3v -- some knock-off ds18b20 sensors I've encountered actually prefer 3.3v for some reason (which is why I made it selectable in the first place!).




Glad to hear it -- I just went ahead and merged these changes into master since it sounds like they helped! A normal install.sh run should now pull these changes going forward.




Does Fermentrack work for awhile then lose connection to the devices and require a restart (of Fermentrack) to come back up? If so, this is the same issue that @adman and others have been helping me tackle. As I mentioned above, I just pushed out an update that should help greatly with this.

To note, the controllers should continue to work fine if this happens. The issue is between the database and Fermentrack's script manager -- not something that is taking place on the controller.




Did it disconnect and then come back up when this happened, or disconnect and stay disconnected?
So it stayed disconnected, however, with this one restarting the server that ran fermentrack brought it back for a bit since the controller was still controlling. But a while later it lost it again and the restart didn’t fix it I went out to the controller and found it again frozen and not controlling. I currently have the controller plugged into a smart outlet and set an automation on the smart outlet to cycle power to controller every hour and a half as sort of a safeguard hack to push me through this beer and prevent it from freezing it’s holding + or - 1 degree F now. But I’m definitely concerned why my controller is freezing up. I didn’t have the issue with my last beer before I reflashed the updated firmware. I’m not sure how old the firmware I had on was but I think it was around when support for the s2 mini was first put out.
 
The temp connector issue is being detected/reported by the controller, and more than likely has something to do with the hardware you're using. Typical culprits are (in order) a bad temperature sensor, dirty/insufficient power to the temperature sensor, loose connections between the temp sensors and the controller, or having too many temperature sensors on the bus.

If you have one of my recent PCB designs, you may be able to change the voltage being sent to the OneWire devices -- if you have it set to 3.3v it may make sense to try changing it to 5v. If you have it set to 5v, it might be worth trying 3.3v -- some knock-off ds18b20 sensors I've encountered actually prefer 3.3v for some reason (which is why I made it selectable in the first place!).




Glad to hear it -- I just went ahead and merged these changes into master since it sounds like they helped! A normal install.sh run should now pull these changes going forward.




Does Fermentrack work for awhile then lose connection to the devices and require a restart (of Fermentrack) to come back up? If so, this is the same issue that @adman and others have been helping me tackle. As I mentioned above, I just pushed out an update that should help greatly with this.

To note, the controllers should continue to work fine if this happens. The issue is between the database and Fermentrack's script manager -- not something that is taking place on the controller.




Did it disconnect and then come back up when this happened, or disconnect and stay disconnected?
I just did an ./install.sh on my fermentrack instance since you pushed that update and for good measure pulled and re-flahsed my s2 mini from my controller using brewflasher with a flash erase. I popped it back in reassigned all my pins. I disabled the automation I had on the smart plug to reset it I'll let it run and keep my eye on it and hope this holds. At least I can reset it remote with the smart plug if I need since I'm leaving town later. I've never not trusted my Brewpi before lol. I just flashed the ESP32-S2 BrewPi-ESP32-S2- v15b- WiFi Im assuming thats the right one for the S2 mini Brewflasher spit out this for my chip type during the install. Chip is ESP32-S2FNR2 (revision v0.0)
 
I just did an ./install.sh on my fermentrack instance since you pushed that update and for good measure pulled and re-flahsed my s2 mini from my controller using brewflasher with a flash erase. I popped it back in reassigned all my pins. I disabled the automation I had on the smart plug to reset it I'll let it run and keep my eye on it and hope this holds. At least I can reset it remote with the smart plug if I need since I'm leaving town later. I've never not trusted my Brewpi before lol. I just flashed the ESP32-S2 BrewPi-ESP32-S2- v15b- WiFi Im assuming thats the right one for the S2 mini Brewflasher spit out this for my chip type during the install. Chip is ESP32-S2FNR2 (revision v0.0)
@Thorrak Just an update I imagine it was a combination of both your update to fermentrack and the reflash with flash erase. I've been stable again since I posted this morning and notably the error log is clean now and I hardly have anything going into the log like my above posts. Everything in my log looks like it should be there.
 
Well I spoke to soon just looked before I went out of town. Cannot connect to script. Screens frozen saying cooling and time isn’t ticking. It’s not cooling the relay isn’t on and the log went crazy again. I think my problem is stemming from the device somehow.
 

Attachments

  • IMG_6082.jpeg
    IMG_6082.jpeg
    1.6 MB · Views: 0
  • IMG_6081.png
    IMG_6081.png
    618.2 KB · Views: 0
@Thorrak is there a pinout of the 10 pin TFT connector for your Lolin D32 board ?
I can see there is an Eagle scm for it but I don't have it installed.
My apologies if it's been answered earlier in the thread somewhere...
 
@Thorrak is there a pinout of the 10 pin TFT connector for your Lolin D32 board ?
I can see there is an Eagle scm for it but I don't have it installed.
My apologies if it's been answered earlier in the thread somewhere...

I've got no idea if it's been asked before, but here it is:

Screenshot 2023-08-24 at 4.42.02 PM.png
Screenshot 2023-08-24 at 4.43.53 PM.png

Let me know if that's not what you're looking for - happy to help provide!
 
@Thorrak I'm kind of at a standstill with my problem. The beers done so I've started troubleshooting I've tried flashing a different S2 mini and it behaves the same. I believe the firmware I was on that worked before I updated was probably that version 11 that's the oldest one showing on your github. As I remember it didn't say it as specifically for the S2 when in fermentrack. But it did work for me. Is there a way with brewflasher to flash the old versions?
 
Back
Top