Right. That temp profile scenario is one consideration I was wondering about.fwiw, if Fermentrack follows the same paradigm as its BrewPi predecessor, a controller will maintain the last settings even if the host dies.
Having four units controlled by a single RPi here in the boonies where power isn't guaranteed, that's important to me
The one implication with this is a "slope" will not happen with a dead host. Whatever the last temperature Set Point was issued will be maintained until the host comes back to life.
So unless you're running a Profile, there's no need to keep a connection open. I probably should have said that first
In any case, you can connect and change settings from wherever. I don't think there's anything to prevent that - just to prove it I pulled up one of my controllers on my desktop and laptop and changed settings from both. It just works.
Cheers!
Makes sense. Thanks. So I can basically close the browser in the garage and it leaves the web server, Django, scripts, etc., all running.You only need to keep whatever is actually running the Fermentrack host application going.
What do you want to know (or do with it)?can't seem to find any documentation related to the manual gravity api... anyone have any info?
What do you want to know (or do with it)?
I have my own script running on RPI to gather tilt and one-wire readings. I'd like to post the tilt data "to" fermtrack so it can be displayed on the GUI. I'd also like to be able to "fetch" the one-wire sensor readings and all the other data (chilling, heating, temps, etc) that will now have a fermtrack one-wire sensor where i can't put two sensors (like thermowell in a fermenter). I currently log this data to influxDB and use grafana with other tools for alerting and data gathering.
The main reason I don't want to use Fermentrack to read the tilts is because it can't due to range... I use stainless fermenters inside a chest freezer and found that the only way to read them was to run an external usb-bluetooth dongle on the end of a long usb extension cord. I tried the tilt repeater and it worked so-so... and the commercially avail one only repeats only one color (i have two fermenters in each chamber). I instead wrote my own python script to read via bluetooth and announce results to influxDB similar to tilt-bridge. I also have 2 chest freezers, each with a usb-dongle style bluetooth hanging inside via a long usb extension cable. I don't think the rpi could handle the moisture inside the freezer... and i don't want it there anyway due to accasional blow-outs that require cleaning with a water hose. Putting a tilt bridge or RPI inside the freezer also causes problems with wifi reception.
Anyway, i'm sure some (probably not a lot) of people want to gather their sensor data themselves then post to various things... it would be nice to at least be able to do a "manual" gravity sensor and update fermtrack as well. Alternatively, since i'm now removing the one-wire from my old setup and using a brewpi wired one... I'd like to be able to grab that data again as well. I saw the docs are "todo" so i peaked at the github and found the django URLs to guide me in finding some data endpoints. I think i could probably view the source for the "manual entry" page and figure out how to post directly there but i suspect it'd just be easier to use a rest-endpoint since django is already in use.
I found these endpoints which provide me with data:
/api/gravity/ = dumps gravity readings, doesn't appear to have "post/put" endpoint
/api/lcd = displays what's on the LCD, unstructured data but does have sensor readings
/api/panel/1 = reading of sensors in structured json, i can pull one-wire readings here
/devices/1/backlight/toggle/ = doesn't appear to actually toggle backlight, would be useful for flashing if an alarm is present
Really just looking for an endpoint to post manual gravity readings and i'd be square.
That makes sense. Right now, there isn't an API endpoint for this, but I've got no objection to creating one. If you want to throw an issue up on GitHub so I don't forget, I'll try to get one added - though unfortunately it may be a bit.
To your comment about just pushing through the form handler, the code for processing posted manual endpoints is here: thorrak/fermentrack
The issue you will run into just posting the data is the CSRF protection - you'd have to get a token from the page prior to posting to make that work.
Thank you!No problem.. created Create API endpoints for posting manual gravity data · Issue #557 · thorrak/fermentrack just for an endpoint to do manual gravity readings. I'll take a look at the CSRF tokens, haven't had to do that in the past but there is a first time for everything.
qq, what's the "Controller Response Test"? Everything seems to be working swimmingly but if I do a 'debug device connection' it fails at the Controller Response Test. I'm running the i2c arduino uno with an esp8266 bridging serial... so i'm curious if this test involves trying to reset the uno for programming, or if there is a response "version" coming back to fermentrack that it doesn't understand/recognize.
def test_telnet(hostname, port):
# This attempts to test the validity of a controller
# It returns a tuple (probably not the best way to do this) which is in the format:
# Initial Connection Test (bool), Version Response Test (bool), Version Response (str)
try:
tn = telnetlib.Telnet(host=hostname, port=port, timeout=3)
except socket.timeout:
return False, False, None
except ConnectionRefusedError:
return False, False, None
try:
tn.write(b"n\r\n")
version_string = tn.read_until(b"}",3)
except:
return True, False, None
return True, True, version_string
Found the issue... something with py3 and the changes to how ascii/encoding works and telnetlib. If I change the test_telnet() to specify "b" for ascii I get a Pass with the full reply. Otherwise the telnet.write() ends up tripping an exception and I get "None". I'm running this in a docker composed from ubuntu(latest, so 20.xx)... I'm not sure if I've violated the intended scenarios, or if I've found something that will be exposed when RPi ends up upgrading to buster w/py3, etc.
Code:def test_telnet(hostname, port): # This attempts to test the validity of a controller # It returns a tuple (probably not the best way to do this) which is in the format: # Initial Connection Test (bool), Version Response Test (bool), Version Response (str) try: tn = telnetlib.Telnet(host=hostname, port=port, timeout=3) except socket.timeout: return False, False, None except ConnectionRefusedError: return False, False, None try: tn.write(b"n\r\n") version_string = tn.read_until(b"}",3) except: return True, False, None return True, True, version_string
curl -L install.fermentrack.com | sudo bash
curl -L https://raw.githubusercontent.com/thorrak/fermentrack-tools/docker/automated_install/auto-install.sh | bash
curl -L install.fermentrack.com | bash
will begin to default to docker-based installations.would you recommend us “non containered” users to consider moving towards the Docker version?
For now - until this code is pushed to master - if you want to install the Dockerized version the command is slightly longer, but just as easy:curl -L https://raw.githubusercontent.com/thorrak/fermentrack-tools/docker/automated_install/auto-install.sh | bash
Pulling django (jdbeeler/fermentrack:latest)...
latest: Pulling from jdbeeler/fermentrack
ERROR: no matching manifest for linux/386 in the manifest list entries
Pulling django (jdbeeler/fermentrack:latest)...
latest: Pulling from jdbeeler/fermentrack
ERROR: no matching manifest for linux/386 in the manifest list entries
::: Waiting for Fermentrack install to initialize and become responsive.
Heh. I only had it compiling for x64 and armv7. Let me add an i386 target - give me a few.Saw this post just as I wanted to get Fermentrack up and running and I thought great. I have an old Atom powered netbook that is running Lubuntu 18.04 and ran the above script. Things went well until I got this message:
Code:Pulling django (jdbeeler/fermentrack:latest)... latest: Pulling from jdbeeler/fermentrack ERROR: no matching manifest for linux/386 in the manifest list entries Pulling django (jdbeeler/fermentrack:latest)... latest: Pulling from jdbeeler/fermentrack ERROR: no matching manifest for linux/386 in the manifest list entries ::: Waiting for Fermentrack install to initialize and become responsive.
Any ideas? I suspect one of the containers doesn't like i386 architecture....
Thanks
Saw this post just as I wanted to get Fermentrack up and running and I thought great. I have an old Atom powered netbook that is running Lubuntu 18.04 and ran the above script. Things went well until I got this message:
Code:Pulling django (jdbeeler/fermentrack:latest)... latest: Pulling from jdbeeler/fermentrack ERROR: no matching manifest for linux/386 in the manifest list entries Pulling django (jdbeeler/fermentrack:latest)... latest: Pulling from jdbeeler/fermentrack ERROR: no matching manifest for linux/386 in the manifest list entries ::: Waiting for Fermentrack install to initialize and become responsive.
Any ideas? I suspect one of the containers doesn't like i386 architecture....
Thanks
Done. The Fermentrack image now will be cross-compiled for i386 as well going forward.
I am pretty sure the other containers in the stack are compiled for i386 as well - if anything fails, let me know and I can see if I can determine why.
Are you running the master or dev branch of Fermentrack? If dev, have you updated recently?I've got a D32 Pro with TFT tiltbridge setup and working; I can see it's working by seeing the tilt values. It also is accessible via my network. However, I can't seem to get readings in my fermentrack dashboard. I've added the sensor via add gravity sensor> tilt hydrometer > add values (already added tiltbridge) > create sensor. It'll show the sensor in Fermentrack, but it's blank. I've tried to ensure all packages are installed, all updates are done, and reboots. I've ensured that the fermentrack can reach the tiltbridge by pinging it. It seems I have the same issue with my OLED variant now as well. Any suggestions on how to fix this?
*Edited*
Found this in the web application's logs via the help page. Maybe this helps shed some light.
0.0.0.0 - - [04/Jan/2021 20:46:02] "POST /tiltbridge/ HTTP/1.0" 500 124147
0.0.0.0 - - [04/Jan/2021 20:46:12] "GET /api/log/text/fermentrack/stderr/ HTTP/1.0" 200 7706
0.0.0.0 - - [04/Jan/2021 20:46:34] "GET /api/log/text/fermentrack/stderr/ HTTP/1.0" 200 7706
Internal Server Error: /tiltbridge/
Traceback (most recent call last):
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 "/home/fermentrack/venv/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/home/fermentrack/fermentrack/gravity/views_tilt.py", line 394, in tiltbridge_handler
raw_temp = int(tiltbridge_data['tilts'][this_tilt]['temp'])
ValueError: invalid literal for int() with base 10: '69.0'
ERROR:django.request:Internal Server Error: /tiltbridge/
Traceback (most recent call last):
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 "/home/fermentrack/venv/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/home/fermentrack/fermentrack/gravity/views_tilt.py", line 394, in tiltbridge_handler
raw_temp = int(tiltbridge_data['tilts'][this_tilt]['temp'])
ValueError: invalid literal for int() with base 10: '69.0'
Seems to be working OK so far.
I will be getting a USB Bluetooth dongle to add to my netbook soon. Will I be able to get this to work with the Docker install to read my Tilt? Or will I need to build a TildBridge?
It definitely works with the built-in Bluetooth adapters on the RPis, so I'm guessing it will work in your case as well.
Bluetooth support is a primary reason I ended up going the "net=host" route for the docker containers. I am not a fan of that approach, but it's the best option that was out there.
Got my Bluetooth adapter today and can read my Tilt without any problems.
However, I do seem to have a problem where I cannot access the user interface after rebooting. If I run docker-update.sh I can access it once a again. I suspect there is something not getting put into he startup programs or the crontab. Can you point me in the right direction on what I need to add so Fermetrack works after rebooting.
Enter your email address to join: