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.
Looking for some help.

Had an update of Fermentrack today and now I'm only getting 502 - Bad Gateway - nginx/1.10.3.

P.S. Extreme novice with this
Are you running the docker version? If so, log into your Pi via SSH and run:


Bash:
cd fermentrack-tools
./docker-update.sh

...and you should be good to go.
 
First off - You guys did an amazing on Fermentrack.

Secondily - Everything works great with fermentrack so this may not be a question for here. I'm dealing with a few devices and as such the IP address are unique , and can change (I'm using DNS to assign). I've just changed the local name hoping this would allow me to remote in using newhostname instead of 192.168.0.XXX but no dice. Anybody know if there is a way to set up the pi's to have a local name (regardless of network settings) that I could use this way ?
 
I'm dealing with a few devices and as such the IP address are unique , and can change (I'm using DNS to assign). I've just changed the local name hoping this would allow me to remote in using newhostname instead of 192.168.0.XXX but no dice. Anybody know if there is a way to set up the pi's to have a local name (regardless of network settings) that I could use this way ?
I'm not sure I am following - you want to use the system name to access your interface via your web browser? Like "myfermenter1.local?" If that's correct, you can take a look at this section of the documentation for Brew Bubbles where I explain mDNS Support for Client OS.
 
I'm not sure I am following - you want to use the system name to access your interface via your web browser? Like "myfermenter1.local?" If that's correct, you can take a look at this section of the documentation for Brew Bubbles where I explain mDNS Support for Client OS.


Thank LBussy - Yes - That's what i meant I browse to one of the two pi's I have from my desk in the house. Open up chrome and enter 192.168.0.241 (for example into the browser). I would prefer to enter ferm1 etc in the same way. It's no biggie I know but..

BTW Thanks for your help atound this project - It is great what you guys have done and have a happy New Year.
 
This is all @Thorrak’s gig, I’m just helping.

Then yes, what I linked will help. You will need to use the name ferm1.local after you make sure you have support for Bonjour.
 
This is all @Thorrak’s gig, I’m just helping.

Then yes, what I linked will help. You will need to use the name ferm1.local after you make sure you have support for Bonjour.


Thanks - Bonjour could be a problem. Corporate, locked down, laptop. I'm unable to install additional software on it. Don't sell yourself short. I see you replying and assisting to lots of users. A community Thanks.
 
Ah, well that sucks. If you manage your local network, you could use a DNS server on one of your Pi's, and forward anything not on the local network to an external DNS.

While this is possible I would put it in the realm of "PIA" and not likely to be worth it unless you are already running PiHole or something like that.

What you could do is use static DHCP reservations, and use something like X.X.X.10 for fermenter 1, X.X.X.20 for fermenter 2, and so on.
 
At least 2 years back.

Has been working like a dream, ~ 30 brews temperature controlled perfectly.
It's gone from bad to worse. Tried to reinstall but now I'm getting the standard "Site can't be reached"

1641089929844.png
 
It's gone from bad to worse. Tried to reinstall but now I'm getting the standard "Site can't be reached"
I don't know how you got where you are, but reinstalling was not something that I saw anyone recommend to you. Fermentrack is Docker-based now and the version you have is pre-that install process.

At this point, so long as you are okay with losing your historical data, you have two paths:
  1. Try to uninstall Redis and then install the Docker version
  2. Re-flash your SD card, and start over clean with the Docker version
I sincerely recommend #2 since Raspbian has a new release and I'm going to go out on a limb and guess you have not updated the OS to keep up with things.

For #2 (again, this is really the recommended path,) download the Raspberry Pi Imager and follow the prompts. To make it even easier, when you run the Imaging utility, hit Shift-Ctrl-X and set up things like your initial password, turning on SSH, and connecting to your WiFi before you ever do your first boot. Then you can do the normal curl -L install.fermentrack.com | bash command.

If you are hell-bent on #1, try the following:

Bash:
sudo apt-get remove -y redis-server
sudo rm -rf /home/pi/fermentrack-tools
sudo reboot now
curl -L install.fermentrack.com | bash

I give that a 50% chance of success. If you fail, you are back to #2.
 
Hello, it has been a long time since I have harassed you folks.

I have been running fermentrack on a VM but I have since decided to move it to an RPI for bluetooth capability.

I ran the automated installer recently which installed via Docker. When checking for TILT compatibility the fermentrack test script shows that I need to run:

sudo setcap cap_net_raw,cap_net_admin+eip /usr/local/bin/python3.9

This would resolve the necessary flags to interact with bluetooth. However, I do not have ANYTHING in /usr/local/bin. Thus, that command fails.

Should I try running the fix environment script, even though this was a docker install?
 
I ran the automated installer recently which installed via Docker. When checking for TILT compatibility the fermentrack test script shows that I need to run:

sudo setcap cap_net_raw,cap_net_admin+eip /usr/local/bin/python3.9

This would resolve the necessary flags to interact with bluetooth. However, I do not have ANYTHING in /usr/local/bin. Thus, that command fails.

Should I try running the fix environment script, even though this was a docker install?
Try this:

Bash:
setcap cap_net_raw+eip $(eval readlink -f `which python3`)
 
setcap cap_net_raw+eip $(eval readlink -f `which python3`)

Good call on this. Certainly closer but still receiving the same error message.

Based on your command I simply did a "which python3" and found that mine is in /usr/bin/python3. I substituted that into the suggested command from the flag test and again, no change in message.

I then did a reboot of the RPI and still receive THIS as the current flag:
Current flags: /usr/local/bin/python3.9 cap_net_admin,cap_net_raw=eip

Thanks for the quick reply!
 
Good call on this. Certainly closer but still receiving the same error message.

Based on your command I simply did a "which python3" and found that mine is in /usr/bin/python3. I substituted that into the suggested command from the flag test and again, no change in message.

I then did a reboot of the RPI and still receive THIS as the current flag:
Current flags: /usr/local/bin/python3.9 cap_net_admin,cap_net_raw=eip

...which I believe
Good call on this. Certainly closer but still receiving the same error message.

Based on your command I simply did a "which python3" and found that mine is in /usr/bin/python3. I substituted that into the suggested command from the flag test and again, no change in message.

I then did a reboot of the RPI and still receive THIS as the current flag:
Current flags: /usr/local/bin/python3.9 cap_net_admin,cap_net_raw=eip

Thanks for the quick reply!
Which fermentrack still shows as incorrect. Just in case I wasn't clear about that. Looks like I should be seeing admin+eip as the cap_net_raw?

Thanks for the quick reply!
 
I picked up a KP-125 Kasa mini smart plug and was able to connect it to Wifi using a guest account as I don't want to rely on the cloud for remote access. I'd prefer to just be able to use my Remot3 to VNC into my Rpi that is also running my Fermentrack and use a command line direct to the Kasa smart plug to cycle the power to my ESP8266 so that it connects back into WiFi and Fermentrack can pick it up again. @happyduke had a post involving controlling a kasa smart plug but again it involves the kasa cloud which I'd rather avoid.

I'm able to ping the IP of the Kasa smart plug locally. I'll look into Home Assistant but a simple command line ability to turn it on and off would be all I need.

If @Thorrak does add an autoreconnect to the firmware flashes of the esp2866s for slow router reboots this will not be necessary but until then the smart plug might do the job.
I do control the plug programatically through the local WiFi, the cloud based version is for non-technical folks :)
I found an .sh file on Github for HS-100 which allows me to turn it off/on by IP. Not sure about KP-125, though, but I'm pretty sure it's been reversed engineered as well.

Cheers!
 
I don't know how you got where you are, but reinstalling was not something that I saw anyone recommend to you. Fermentrack is Docker-based now and the version you have is pre-that install process.

At this point, so long as you are okay with losing your historical data, you have two paths:
  1. Try to uninstall Redis and then install the Docker version
  2. Re-flash your SD card, and start over clean with the Docker version
I sincerely recommend #2 since Raspbian has a new release and I'm going to go out on a limb and guess you have not updated the OS to keep up with things.

For #2 (again, this is really the recommended path,) download the Raspberry Pi Imager and follow the prompts. To make it even easier, when you run the Imaging utility, hit Shift-Ctrl-X and set up things like your initial password, turning on SSH, and connecting to your WiFi before you ever do your first boot. Then you can do the normal curl -L install.fermentrack.com | bash command.

If you are hell-bent on #1, try the following:

Bash:
sudo apt-get remove -y redis-server
sudo rm -rf /home/pi/fermentrack-tools
sudo reboot now
curl -L install.fermentrack.com | bash

I give that a 50% chance of success. If you fail, you are back to #2.

Thanks Lee

Impatient got me where I am :), my bad. Need to breath!!

The continual struggle of working away from home whilst trying to keep a close eye on the favorite brew. Never easy to manage.

I'll definitely go for option 2.
 
This is all @Thorrak’s gig, I’m just helping.

Hey - take credit where credit is due! You've got write access to the repo, after all...

Thanks - Bonjour could be a problem. Corporate, locked down, laptop. I'm unable to install additional software on it. Don't sell yourself short. I see you replying and assisting to lots of users. A community Thanks.

You may not be as SoL as you'd think -- For certain applications, Microsoft added native mDNS support at some point over the past two/three years. It's worth trying, and if that doesn't work, I'd go the static DHCP route. As a side note - depending on your router, it may already implement a DNS service which your devices are picking up. If it is, it may already have the ability to resolve names for devices on your network. Thanks to the weather we're living without power at the moment so I can't see if the router here has that screen, but I know I've had routers in the past that offered this functionality.

Hello, it has been a long time since I have harassed you folks.

I have been running fermentrack on a VM but I have since decided to move it to an RPI for bluetooth capability.

I ran the automated installer recently which installed via Docker. When checking for TILT compatibility the fermentrack test script shows that I need to run:

sudo setcap cap_net_raw,cap_net_admin+eip /usr/local/bin/python3.9

This would resolve the necessary flags to interact with bluetooth. However, I do not have ANYTHING in /usr/local/bin. Thus, that command fails.

Should I try running the fix environment script, even though this was a docker install?

Have you tested Tilt support? It may actually work, even though it reports otherwise.

That diagnostic screen needs to be updated - that check hasn't worked in awhile, unfortunately - and the instructions do not apply to Docker-based installs. The installation of python that needs that flag set is inside of the Docker container, and the flag is automatically set for you when the container is assembled.
 
For certain applications, Microsoft added native mDNS support at some point over the past two/three years. It's worth trying, and if that doesn't work, I'd go the static DHCP route.
It's been a while since I've researched it, but in their wisdom, Microsoft (at least originally) implemented it to support printers and the like. That means it's available to 64-bit applications and most browsers are 32-bit. That said, it is worth a try. Just use http://{hostname}.local and if that doesn't work, try http://{hostname}.
 
Have you tested Tilt support? It may actually work, even though it reports otherwise.

That diagnostic screen needs to be updated - that check hasn't worked in awhile, unfortunately - and the instructions do not apply to Docker-based installs. The installation of python that needs that flag set is inside of the Docker container, and the flag is automatically set for you when the container is assembled.

I did not! I figured you were smarter than me and I trusted your test scripts (oops lol). I'll toss the pi in the garage and keep my fingers crossed. Thanks for circling back to this and I hope all goes well.
 
I've been running fermentrack on a Pi/Uno setup for two years now. It was working great until my 3b+ PI died yesterday just as I was finishing up a brew day :eek:. Expected the SDCard to be bad, but I was able to mount the SDCard in my linux machine and download the /home/fermentrack directory.

In the meantime, I pulled an older PI 3b (and of course the image on the sdcard wouldn't boot) and I loaded fermentrack using the magic command-line and have it all running in docker now. Which is great. took all of 20 minutes to get running and configured.
Nice work!
Now, here's my ask. Can I import the data I've saved off the old card to get the beer and log info in the new instance?
 
I've been running fermentrack on a Pi/Uno setup for two years now. It was working great until my 3b+ PI died yesterday just as I was finishing up a brew day :eek:. Expected the SDCard to be bad, but I was able to mount the SDCard in my linux machine and download the /home/fermentrack directory.

In the meantime, I pulled an older PI 3b (and of course the image on the sdcard wouldn't boot) and I loaded fermentrack using the magic command-line and have it all running in docker now. Which is great. took all of 20 minutes to get running and configured.
Nice work!
Now, here's my ask. Can I import the data I've saved off the old card to get the beer and log info in the new instance?
Can you pull the SQLite file and the data directory? If so, you should be golden. Shoot me your sqlite file and I can try to work some magic.
 
I did not! I figured you were smarter than me and I trusted your test scripts (oops lol). I'll toss the pi in the garage and keep my fingers crossed. Thanks for circling back to this and I hope all goes well.

FYI, this worked fine. Thanks again!

PS: Any plans to smooth out the gravity readings?
 
Can you pull the SQLite file and the data directory? If so, you should be golden. Shoot me your sqlite file and I can try to work some magic.
That'd be awesome!!
BTW, I've done this once myself from sqllite to sqllite. Looks like you are using postgres now so I didn't try
 

Attachments

  • fermentrack.zip
    29.7 KB · Views: 5
I've been running fermentrack on a Pi/Uno setup for two years now. It was working great until my 3b+ PI died yesterday just as I was finishing up a brew day :eek:. Expected the SDCard to be bad, but I was able to mount the SDCard in my linux machine and download the /home/fermentrack directory.

In the meantime, I pulled an older PI 3b (and of course the image on the sdcard wouldn't boot) and I loaded fermentrack using the magic command-line and have it all running in docker now. Which is great. took all of 20 minutes to get running and configured.
Nice work!
Now, here's my ask. Can I import the data I've saved off the old card to get the beer and log info in the new instance?
My Tilt joined right up to the new config, but a day in it to the brew isn't updating. SG and Temp stuck on initial readi
ng.
Looking at the Tilt diagnostics, everything is good except the `setcap`, but I saw somewhere that this is handled in the docker container. So I'm at a loss

Anything to try?
 
Last edited:
My Tilt joined right up to the new config, but a day in it to the brew isn't updating. SG and Temp stuck on initial readi
ng.
Looking at the Tilt diagnostics, everything is good except the `setcap`, but I saw somewhere that this is handled in the docker container. So I'm at a loss

Anything to try?
well, I restarted the docker-compose stack and all is well at the moment
 
well, I restarted the docker-compose stack and all is well at the moment
So tilt data collection stopped again after ~24 hours. What container contains the data collection? I restarted nginx but that didn't appear to help. Is it in django?
 
Are you running the docker version? If so, log into your Pi via SSH and run:


Bash:
cd fermentrack-tools
./docker-update.sh

...and you should be good to go.


Im getting the same 502 Bad Gateway after updating.

I thought i had the docker version so ran the update script vis SSH but throwing lots of errors so maybe not.

Any ideas?
Thanks!


Code:
pi@raspberrypi:~/fermentrack-tools $ ./docker-update.sh
Using default tag: latest
Got permission denied while trying to connect to the Docker daemon socket at uni 
x:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/cr eate?fromImage=jdbeeler%2Ffermentrack&tag=latest: dial unix /var/run/docker.sock: connect: permission denied
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
Got permission denied while trying to connect to the Docker daemon socket at uni x:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.24/networks/prune: dial unix /var/run/docker.sock: connect: permission denied
Building postgres
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
 
Last edited:
Hi,

I've been using Fermentrack for a a while now. I have a prompt to update but when i try i get the following. Any thoughts?

1641853009245.png
 
After recently having to re-flash and start clean with the Docker version of Fermentrack, I have had a very strangle issue occur.

After two days of fermenting the Beer sensor dropped to Zero reading (Fridge sensor also Zero, Room sensor leveled at 19.63 C), and of course the heating of the ferment started up. The sensor remained on zero for approximately 12hrs before I had the chance to check the ferment via Brewfather App. (I’m currently working away)

Noted, via the iSpindel attached to the Brewfather app and in the FV, the iSpindel temperature was rising steadily and no readings at all from the Fermentrack sensors.



Unfortunately, the VNC or SDD would also not connect so thankfully my better half (She who must be obeyed) was able to reboot the RPi. Once back on line, the senor was also back in operation. Until I’m back from work I can not check the sensors but I struggle to see how it can be the sensors if it returned to full function after reboot.

Has anyone else experience a similar issue with zeroing out of temperature sensors

1641963542906.png
 
The only issue I've had that might be related was an intermeittent connection on one of my temperature probes. I remade all the joints and not had an issue since. My symptoms were similar but was at home when it happened and when I wiggled my connectors, temperature readings returned.
 
I do control the plug programatically through the local WiFi, the cloud based version is for non-technical folks :)
I found an .sh file on Github for HS-100 which allows me to turn it off/on by IP. Not sure about KP-125, though, but I'm pretty sure it's been reversed engineered as well.

Cheers!
Yup works for the KP-125.
I did a search on python script & kasa and found a project called python-kasa and installed it. Now all I need to do on the command line is
pi@xxxxxx:~ $ kasa --plug --host 192.xxx.x.xxx on
Turning on SmartPlug1
pi@xxxxxx:~ $ kasa --plug --host 192.xxx.x.xxx off
Turning off SmartPlug1

no kasa cloud or account needed.
 
After the latest github update I am having the same problems ( bad gateway/ can not connect). I also ran the docker update but I am getting the errors as well.


pi@Rainyday:~/fermentrack-tools $ ./docker-update.sh
Using default tag: latest
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/create?fromImage=jdbeeler%2Ffermentrack&tag=latest": dial unix /var/run/docker.sock: connect: permission denied
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/networks/prune": dial unix /var/run/docker.sock: connect: permission denied
Building postgres
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
 
Hi all. First time using fermentrack in a few months, don't know if somethings changed. System works in that I can program a set temperature but when I try to log i get,

Environment:


Request Method: POST
Request URL: http://192.168.0.19/devices/1/beer/create/

Django Version: 3.0.14
Python Version: 3.7.3
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'app.apps.AppConfig',
'firmware_flash.apps.AppConfig',
'gravity.apps.GravityAppConfig',
'external_push.apps.AppConfig',
'constance',
'constance.backends.database',
'huey.contrib.djhuey']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']



Traceback (most recent call last):
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/query.py", line 559, in get_or_create
return self.get(**kwargs), False
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/query.py", line 417, in get
self.model._meta.object_name

During handling of the above exception (Beer matching query does not exist.), another exception occurred:
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 86, in _execute
return self.cursor.execute(sql, params)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 396, in execute
return Database.Cursor.execute(self, query, params)

The above exception (database disk image is malformed) was the direct cause of the following exception:
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/fermentrack/venv/lib/python3.7/site-packages/sentry_sdk/integrations/django/views.py", line 67, in sentry_wrapped_callback
return callback(request, *args, **kwargs)
File "/usr/lib/python3.7/contextlib.py", line 74, in inner
return func(*args, **kwds)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/home/fermentrack/fermentrack/app/decorators.py", line 25, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/home/fermentrack/fermentrack/app/beer_views.py", line 32, in beer_create
device=form.cleaned_data['device'])
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/query.py", line 562, in get_or_create
return self._create_object_from_params(kwargs, params)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/query.py", line 596, in _create_object_from_params
obj = self.create(**params)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/query.py", line 433, in create
obj.save(force_insert=True, using=self.db)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/base.py", line 749, in save
force_update=force_update, update_fields=update_fields)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/base.py", line 787, in save_base
force_update, using, update_fields,
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/base.py", line 890, in _save_table
results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/base.py", line 929, in _do_insert
using=using, raw=raw,
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/query.py", line 1204, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1394, in execute_sql
cursor.execute(sql, params)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 100, in execute
return super().execute(sql, params)
File "/home/fermentrack/venv/lib/python3.7/site-packages/sentry_sdk/integrations/django/__init__.py", line 535, in execute
return real_execute(self, sql, params)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 68, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 86, in _execute
return self.cursor.execute(sql, params)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 86, in _execute
return self.cursor.execute(sql, params)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 396, in execute
return Database.Cursor.execute(self, query, params)

Exception Type: DatabaseError at /devices/1/beer/create/
Exception Value: database disk image is malformed

Any ideas. Its currently running without logging with no issues.
 
Hi all. First time using fermentrack in a few months, don't know if somethings changed. System works in that I can program a set temperature but when I try to log i get,

Environment:


Request Method: POST
Request URL: http://192.168.0.19/devices/1/beer/create/

Django Version: 3.0.14
Python Version: 3.7.3
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'app.apps.AppConfig',
'firmware_flash.apps.AppConfig',
'gravity.apps.GravityAppConfig',
'external_push.apps.AppConfig',
'constance',
'constance.backends.database',
'huey.contrib.djhuey']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']



Traceback (most recent call last):
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/query.py", line 559, in get_or_create
return self.get(**kwargs), False
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/query.py", line 417, in get
self.model._meta.object_name

During handling of the above exception (Beer matching query does not exist.), another exception occurred:
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 86, in _execute
return self.cursor.execute(sql, params)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 396, in execute
return Database.Cursor.execute(self, query, params)

The above exception (database disk image is malformed) was the direct cause of the following exception:
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/fermentrack/venv/lib/python3.7/site-packages/sentry_sdk/integrations/django/views.py", line 67, in sentry_wrapped_callback
return callback(request, *args, **kwargs)
File "/usr/lib/python3.7/contextlib.py", line 74, in inner
return func(*args, **kwds)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/home/fermentrack/fermentrack/app/decorators.py", line 25, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/home/fermentrack/fermentrack/app/beer_views.py", line 32, in beer_create
device=form.cleaned_data['device'])
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/query.py", line 562, in get_or_create
return self._create_object_from_params(kwargs, params)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/query.py", line 596, in _create_object_from_params
obj = self.create(**params)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/query.py", line 433, in create
obj.save(force_insert=True, using=self.db)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/base.py", line 749, in save
force_update=force_update, update_fields=update_fields)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/base.py", line 787, in save_base
force_update, using, update_fields,
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/base.py", line 890, in _save_table
results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/base.py", line 929, in _do_insert
using=using, raw=raw,
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/query.py", line 1204, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1394, in execute_sql
cursor.execute(sql, params)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 100, in execute
return super().execute(sql, params)
File "/home/fermentrack/venv/lib/python3.7/site-packages/sentry_sdk/integrations/django/__init__.py", line 535, in execute
return real_execute(self, sql, params)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 68, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 86, in _execute
return self.cursor.execute(sql, params)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 86, in _execute
return self.cursor.execute(sql, params)
File "/home/fermentrack/venv/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 396, in execute
return Database.Cursor.execute(self, query, params)

Exception Type: DatabaseError at /devices/1/beer/create/
Exception Value: database disk image is malformed

Any ideas. Its currently running without logging with no issues.

That error would indicate that you have an issue with your SD card that ended up corrupting your db3.sqlite file. :(
 
That error would indicate that you have an issue with your SD card that ended up corrupting your db3.sqlite file. :(
Any suggestion for a semi-techy person or brand new install. Having problems with the tilt connection too so might just start again.
 
Back
Top