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

So im using Fermentrack and ispindel. Having trouble with iSpindel battery life. Did the voltage calibration. Is there a way to display Battery voltage in the graph?

Cheers

/Niklas
 
So im using Fermentrack and ispindel. Having trouble with iSpindel battery life. Did the voltage calibration. Is there a way to display Battery voltage in the graph?
The thing with a two-axis graph is there are only two axes. While it *could* be put on the graph, it would be at the expense of either temp or gravity. If @Thorrak decides he wants to capture it, it would be on a separate graph or just a dashboard value.
 
@Thorrak have you added the 0.2.12 I2C version firmware to the flash tool yet? I looked to update my minion with the new shield at I2C support but didn't see the right firmware, only the beta firmware you said do not use.
 
@Thorrak have you added the 0.2.12 I2C version firmware to the flash tool yet? I looked to update my minion with the new shield at I2C support but didn't see the right firmware, only the beta firmware you said do not use.
Do you mean @LBussy ’s?

If so, I thought I had, but if you’re not seeing it let me know and I’ll work with him to get it added.
 
Are there instructions on enabling bluetooth for the Tilt? I keep getting error "Connection type Bluetooth packages for python have not been installed. Tilt Hydrometers cannot be connected via Bluetooth." on my Raspberry Pi 3 and Arduino Uno R3.
 
Are there instructions on enabling bluetooth for the Tilt? I keep getting error "Connection type Bluetooth packages for python have not been installed. Tilt Hydrometers cannot be connected via Bluetooth." on my Raspberry Pi 3 and Arduino Uno R3.

Which version of Raspbian are you using?
 

Got it - I think there's a bug that is (was) preventing installs from working properly under Buster. That said...

Update on the Bluetooth issues under Buster

Apparently, previous versions of Raspbian included libbluetooth-dev by default which is a prerequisite for installing the pybluez library which is used by Fermentrack to communicate with bluetooth devices. For Fermentrack to work under Buster, that library needs to be installed.

I’ve added this to the install script so future installations should work fine, but for completed installs you will need to install libbluetooth-dev manually (and then trigger a forced update in Fermentrack to get pybluez installed). Here’s how to do that:

  1. Log into your Raspberry Pi via ssh
  2. Run “sudo apt-get install libbluetooth-dev”
  3. Run “sudo su fermentrack”
  4. Run “source ~/venv/bin/activate”
  5. Run “cd ~/fermentrack”
  6. Run “pip install -r requirements.txt”

This should result in pybluez being installed without any error messages
 
I will first admit that I am likely having trouble because I'm a linux noob. But...I could use some help.


I am running a pi 4 that is hosting both a minecraft server and pihole. The minecraft server has a map plugin that is on port 8123.

I was unable to get Fermentrack to install via the curl command so I cloned the repo and ran the install script for user "fermentrack".

I then tried accessing the admin panel for Fermentrack and was directed to a pihole page.

I then looked in /home/fermentrack/log and I did a tail on all logs. I get an address already in use for circusd. This is not presented in anyway to the user, I only found it in the log.

Here is the output:
/home/fermentrack/fermentrack/log$ tail *.log
==> circusd.log <==
2019-10-16 19:29:49 circus[31170] [ERROR] Could not bind 0.0.0.0:8123
2019-10-16 19:29:49 circus[31170] [ERROR] exception [Errno 98] Address already in use caught
2019-10-16 19:30:13 circus[31238] [ERROR] Could not bind 0.0.0.0:8123
2019-10-16 19:30:13 circus[31238] [ERROR] exception [Errno 98] Address already in use caught
2019-10-16 19:40:14 circus[31471] [ERROR] Could not bind 0.0.0.0:8123
2019-10-16 19:40:14 circus[31471] [ERROR] exception [Errno 98] Address already in use caught
2019-10-16 19:50:14 circus[31584] [ERROR] Could not bind 0.0.0.0:8123
2019-10-16 19:50:14 circus[31584] [ERROR] exception [Errno 98] Address already in use caught
2019-10-16 20:00:13 circus[31864] [ERROR] Could not bind 0.0.0.0:8123
2019-10-16 20:00:13 circus[31864] [ERROR] exception [Errno 98] Address already in use caught
==> fermentrack-processmgr.log <==
==> fermentrack-stderr.log <==
==> huey-stderr.log <==
==> huey-stdout.log <==



Can anyone assist? I also tried a top and also a ps -eaf | grep fermentrack and it does not appear to be running on the system.

It does look like my first issue is related to the installation? Followed by an issue being behind pihole and the last a port issue. Hopefully I can get some good feedback as I'm trying to get Fermentrack up for a cider that I will kick off this weekend.

Thank you very much for any help you can provide!
 
Port 8123 is the port that Fermentrack runs on/circus listens to, so if you have somwthing else running on that poet Fermentrack unfortunately won’t work. I haven’t ever used Pihole so I can’t speak to it but I’m guessing it’s just detecting that the connection failed as a result of the port conflict.
 
PiHole uses lighthttpd and will bind port 80 so not only do you have to fix the conflict with minecraft/circusd, you will have nginx/lighthttpd conflicts.

Honestly, I think you are asking a little much of that poor Pi. Once you start mixing servers as you are, you are going to have these problems. These are surmountable issues, but you will have a steep learning curve.
 
To @LBussy ’s point - the pi is more than powerful enough, but without Linux experience maintaining a bunch of packages on a single device with non-standard configurations is going to be tough. My recommendation would be to do yourself a favor and pick up a Pi Zero W for Fermentrack and use the more powerful Pi 4 for the Minecraft and PiHole servers.

If you really want to run all of the daemons on the same server, you can but at a minimum you’ll need to change the ports everything is running on. The circus port can be generally changed in the circus.ini file (in the same directory as your Fermentrack install) and the nginx port is configured in the nginx config files (check /etc/nginx/sites-enabled).

Again - this isn’t a supported configuration, and I don’t recommend it, but it should work. The main issue is that the circus port changes will likely be overwritten when you upgrade Fermentrack.
 
Thank you all for the feeback. I do truly accept your opinions and I can see that I'm getting myself into a tricky situation.

With that said, I think it is also a good challenge to help me learn more about handling various processes in linux. I appreciate the config details @Thorrak and I think I'll give that a try. After installing minecraft(server, plugins, etc) and pihole which both went fairly smooth...I got a little lost once I installed fermentrack. It seemed a little less clear to me how to configure and manually run things.

Another reason why I am being stubborn is the fact that I am using an SSD on this pi with the intention of having it host a variety of needs. I would eventually like to get this into a robust backup routine with the potential of adding some drive/hardware redundancy.

Thank you again
 
I was able to get my three services running concurrently and I can access the Fermentrack interface. I also was able to add my ESP8266 device from a previous attempt at fermentrack.

The downside is that I am failing the DNS test and Cached IP test. I suspect these are both due to pihole handling my DNS services. And/or something related to the firewall on the pi.


Rather than randomly trying things...I guess it is worth asking for another bit of guidance here.

The ESP interface to script port is 2234
The ESP interface to device port is 23 (WIFI)

Is this simply a matter of a "ufw allow"? If so, would this be on both ports or just port 23? It looks like port 23 is TCP so I would factor that into the allow.

Thank you
 
Without having gone through this or testing at all - yes I think if you have ufw enabled that would be a good thing to look at. An easy test would be to turn off ufw and if Fermentrack works, you have your answer. That way you're not possibly creating the wrong ufw rule and making a bad test.
 
Thanks for the reply!
I guess it is a good thing that I took a look because I missed the critical step of actually enabling UFW as I intended to.

So, I guess UFW was not the issue. I did add rules for those two ports which I can play with more once I get things working.

I disabled pihole to make sure it was not interfering and restarted fermentrack. Errors are exactly the same.

In /log/dev-chronical-stderr.log
Oct 19 2019 18:44:44 Connection type WiFi selected. Trying TCP serial (WiFi)
Oct 19 2019 18:44:44 Unable to resolve hostname esp8662052.local. Exiting.

If I PING esp8662052.local:
erik@ubuntu:/home/fermentrack/fermentrack/utils$ ping esp8662052.local
ping: esp8662052.local: Name or service not known

But I do see the device on my network...simply as esp8662052 (not .local). I can ping that IP and get responses.



I ended up modifying /etc/hosts/ and pointing the ip address to esp8662052.local. I now have passing tests on everything but Controller Response Test.
All I have attached to the board right now is the temp probe so I'll see about using it for logging purposes on this upcoming batch and then I'll try and fix that error once I have circuitry wired up.
 
I wonder if PiHole disables mDNS? Check the ahavi daemon by issuing the command:
Code:
sudo systemctl status avahi-daemon
It should show a status of active (running).

If it's running, the /etc/avahi/avahi-daemon.conf file has a line that begins with allow-interfaces=. It should either be commented out, or list the adapter (probably wlan0.) If it's enabled and the adapter is not listed it will block lookups on that adapter.

Next, see if there's a file named /etc/mdns.allow. If it's there it either needs to have "*" or at least ".local" listed in it. If the file is not there, that's fine. It should default to allowing all if not present. If the file is present and empty it will disallow mDNS lookups.

Then look for a file named /etc/nsswitch.conf. The line labeled hosts: should look something like this:
Code:
hosts:          files mdns4_minimal [NOTFOUND=return] dns

There are some avahi diagnostics available with the packages avahi-utils and mdns-scan which might help.

After that ... I'm out of ideas I think. :)
 
Thanks for the reply!
...
But I do see the device on my network...simply as esp8662052 (not .local). I can ping that IP and get responses.

I ended up modifying /etc/hosts/ and pointing the ip address to esp8662052.local. I now have passing tests on everything but Controller Response Test.

Some routers don't allow DNS multicast, so "x.local" type addresses don't work. It's generally pretty rare, but I have heard a few people running into that issue. Are you using an address similar to "raspberrypi.local" to SSH into the Pi itself?
 
Can you run fermentrack on a controller with a single temp probe?

I’m running multiple conicals and a glycol chiller (using the Ssbrewtech ftss pump/heat mat)

Finally got it all wired up correctly after having some issues with crappy probes.

I was wanting to have the controller just work off the beer temp and not have a second probe for the glycol temp. Is this possible?
 
It is possible to run with one probe, but it can't be assigned to beer temp. For it to work, the one probe needs to be the chamber temp. Not sure with your system if you can trick it into working by putting the chamber temp into your fermenter, but that definitely wouldn't be a standard setup. But glycol isn't a standard setup either...

I believe that @LBussy is working on a glycol profile for his BrewPi Remix.
 
Chamber temp and using Fridge Constant (so far.) Additionally, I had to make some changes to lower the min times. It's not configurable at runtime right now since I didn't want to find another way to go OOM on the Arduino.
 
Chamber temp and using Fridge Constant (so far.) Additionally, I had to make some changes to lower the min times. It's not configurable at runtime right now since I didn't want to find another way to go OOM on the Arduino.

Thanks, that’s what I was playing with yesterday, but couldn’t get it to actually cool/trigger the relays, which I assume is just something I messed up in the settings/constraints.

I’ll give it another go tonight after work.

Having the second probe isn’t really a major issue, and I can add one, but I just didn’t want to have 2-3 extra wires hanging around my chiller when it’s all the same temp and isn’t even controlled by fermentrack.

Cheers!
 
Be aware that there is a delay before the controller will heat or cool when you first start it up. Watching the status text in the LCD will give you a clue there.
 
Just wanted to share a pic of my completed controller! I haven't tested in a real world scenario yet, but everything seems to be responding properly! Thanks to @Thorrak @LBussy @day_trippr and @CadiBrewer for helping me work through troubleshooting way back in this thread. Cheers!
:mug:
 

Attachments

  • IMG_2059.jpg
    IMG_2059.jpg
    1.9 MB · Views: 96
Just wanted to share a pic of my completed controller! I haven't tested in a real world scenario yet, but everything seems to be responding properly! Thanks to @Thorrak @LBussy @day_trippr and @CadiBrewer for helping me work through troubleshooting way back in this thread. Cheers!
:mug:
Ohhh man. What enclosure is that? That looks fantastic!
 
Thank you for the help and sorry for the delay in responding.

Check the ahavi daemon

Next, see if there's a file named /etc/mdns.allow.

Then look for a file named /etc/nsswitch.conf. The line labeled hosts: should look something like this:
Code:
hosts:          files mdns4_minimal [NOTFOUND=return] dns

I don't seem to be running ahavi daemon and there is nothing in /etc/ for it either. Same goes for mdns. It is not in /etc/ either.

I do have the nsswitch.conf file. Where...

hosts: files dns

Should I make any changes to that in order to match the mdns4?

Some routers don't allow DNS multicast, so "x.local" type addresses don't work. It's generally pretty rare, but I have heard a few people running into that issue. Are you using an address similar to "raspberrypi.local" to SSH into the Pi itself?

I am using the IP of the pi to SSH to it. I am sure that I could SSH to .local now with the edit to /etc/hosts. I use a google wifi and it appears that it does not support multicast :(
 
I don't seem to be running ahavi daemon and there is nothing in /etc/ for it either. Same goes for mdns. It is not in /etc/ either.
I have Google, no issues with mDNS. You’ll have to install avahi and that should take care of the rest:
Code:
apt-get install avahi-daemon avahi-discover libnss-mdns
Remember to remove the entry from your /etc/hosts file.
 
Last edited:
I am attempting to update Fermentrack using the "Update from GitHub" button in the "App Settings" page.

I get this this response:

GitCommandError at /upgrade/
Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v origin
stderr: 'error: object file .git/objects/0d/2a49c9429043006734ae4ce17c5e026a2ff57f is empty
error: object file .git/objects/0d/2a49c9429043006734ae4ce17c5e026a2ff57f is empty
fatal: loose object 0d2a49c9429043006734ae4ce17c5e026a2ff57f (stored in .git/objects/0d/2a49c9429043006734ae4ce17c5e026a2ff57f) is corrupt
fatal: the remote end hung up unexpectedly'
Request Method: GET
Request URL: http://192.168.1.121/upgrade/
Django Version: 1.11.22
Exception Type: GitCommandError
Exception Value:
Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v origin
stderr: 'error: object file .git/objects/0d/2a49c9429043006734ae4ce17c5e026a2ff57f is empty
error: object file .git/objects/0d/2a49c9429043006734ae4ce17c5e026a2ff57f is empty
fatal: loose object 0d2a49c9429043006734ae4ce17c5e026a2ff57f (stored in .git/objects/0d/2a49c9429043006734ae4ce17c5e026a2ff57f) is corrupt
fatal: the remote end hung up unexpectedly'
Exception Location: /home/fermentrack/venv/lib/python3.7/site-packages/git/cmd.py in wait, line 415
Python Executable: /home/fermentrack/venv/bin/python3
Python Version: 3.7.3
Python Path:
['/home/fermentrack/venv/lib/python3.7/site-packages/git/ext/gitdb',
'/home/fermentrack/venv/bin',
'/home/fermentrack/fermentrack',
'/home/fermentrack/venv/lib/python3.7/site-packages',
'/usr/lib/python37.zip',
'/usr/lib/python3.7',
'/usr/lib/python3.7/lib-dynload',
'.',
'/home/fermentrack/venv/lib/python3.7/site-packages/gitdb/ext/smmap']
Server time: Thu, 24 Oct 2019 17:44:06 +0000

I am afraid this is a bit beyond me.
Any suggestions?
 
First, I take exception to using"Windows 10" and "Server" in line with each other. :)

Ha, yeah LTSC has been working out okay for me so far to avoid the annoying push updates and some of the Windows bloat.

My recommendation would be a VM - and if you have not explored using VBoxVmService it's a pretty nice cohort to Oracle VirtualBox. Slap Raspberry Pi Desktop on there and Bob's your uncle. You only need to put minimal resources against a headless installation. I have many of these running on a gaming rig.

I did some work with Windows/WAMP and BrewPi a while back which may or may not help.

Honestly though - buy an RPi Zero W and be done with it.

Shortly after the experiment I installed plain vanilla debian in a VM...fermentrack was super quick and easy to set up and the VM is a minimal hit to system resources. So in the end I was just making the situation more complex than it needed to be.

I'll probably be making a second one of these controllers for a friend at some point so the Zero W looks like a great suggestion, thanks.
 
I am attempting to update Fermentrack using the "Update from GitHub" button in the "App Settings" page.

I get this this response:

GitCommandError at /upgrade/
Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v origin
stderr: 'error: object file .git/objects/0d/2a49c9429043006734ae4ce17c5e026a2ff57f is empty
error: object file .git/objects/0d/2a49c9429043006734ae4ce17c5e026a2ff57f is empty
fatal: loose object 0d2a49c9429043006734ae4ce17c5e026a2ff57f (stored in .git/objects/0d/2a49c9429043006734ae4ce17c5e026a2ff57f) is corrupt
fatal: the remote end hung up unexpectedly'
Request Method: GET
Request URL: http://192.168.1.121/upgrade/
Django Version: 1.11.22
Exception Type: GitCommandError
Exception Value:
Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v origin
stderr: 'error: object file .git/objects/0d/2a49c9429043006734ae4ce17c5e026a2ff57f is empty
error: object file .git/objects/0d/2a49c9429043006734ae4ce17c5e026a2ff57f is empty
fatal: loose object 0d2a49c9429043006734ae4ce17c5e026a2ff57f (stored in .git/objects/0d/2a49c9429043006734ae4ce17c5e026a2ff57f) is corrupt
fatal: the remote end hung up unexpectedly'
Exception Location: /home/fermentrack/venv/lib/python3.7/site-packages/git/cmd.py in wait, line 415
Python Executable: /home/fermentrack/venv/bin/python3
Python Version: 3.7.3
Python Path:
['/home/fermentrack/venv/lib/python3.7/site-packages/git/ext/gitdb',
'/home/fermentrack/venv/bin',
'/home/fermentrack/fermentrack',
'/home/fermentrack/venv/lib/python3.7/site-packages',
'/usr/lib/python37.zip',
'/usr/lib/python3.7',
'/usr/lib/python3.7/lib-dynload',
'.',
'/home/fermentrack/venv/lib/python3.7/site-packages/gitdb/ext/smmap']
Server time: Thu, 24 Oct 2019 17:44:06 +0000

I am afraid this is a bit beyond me.
Any suggestions?


That suggests the connection was interrupted as Git did its thing. Just wait a bit and try again later.
 
Shortly after the experiment I installed plain vanilla debian in a VM...fermentrack was super quick and easy to set up and the VM is a minimal hit to system resources. So in the end I was just making the situation more complex than it needed to be.

I'll probably be making a second one of these controllers for a friend at some point so the Zero W looks like a great suggestion, thanks.

Oh yeah - Debian in a VM is great. Only issue is for serial controllers depending on how your VM software handles USB devices. Highly recommended.
 
That suggests the connection was interrupted as Git did its thing. Just wait a bit and try again later.

Ok, thank you.

Will keep trying but it's not looking good. I have tried many times throughout the day with the same results.
 
error: object file .git/objects/0d/2a49c9429043006734ae4ce17c5e026a2ff57f is empty
fatal: loose object 0d2a49c9429043006734ae4ce17c5e026a2ff57f (stored in .git/objects/0d/2a49c9429043006734ae4ce17c5e026a2ff57f) is corrupt
fatal: the remote end hung up unexpectedly'

I just re-read your error, and realized I completely missed the first two lines of the above. The issue appears to be that Git got interrupted at some point, and now you have an inconsistent repo on your Pi. Thankfully, this is pretty easy to fix - but it does require manual intervention.

SSH into your Pi, and then run:
  • sudo su fermentrack
  • cd ~/fermentrack
  • git gc --aggressive --prune=now

...then log back into Fermentrack from a web browser & try again
 
I just re-read your error, and realized I completely missed the first two lines of the above. The issue appears to be that Git got interrupted at some point, and now you have an inconsistent repo on your Pi. Thankfully, this is pretty easy to fix - but it does require manual intervention.

SSH into your Pi, and then run:
  • sudo su fermentrack
  • cd ~/fermentrack
  • git gc --aggressive --prune=now

...then log back into Fermentrack from a web browser & try again

Ok, did that as follows:

pi@raspberrypi:~ $ sudo su fermentrack
fermentrack@raspberrypi:/home/pi$ cd ~/fermentrack
fermentrack@raspberrypi:~/fermentrack$ git gc --aggressive --prune=now
error: object file .git/objects/88/e58cd6e6ab802cc0c922674ad14fca27d5785e is empty
error: bad ref for .git/logs/refs/remotes/origin/HEAD
error: bad ref for .git/logs/refs/remotes/origin/master
error: object file .git/objects/88/e58cd6e6ab802cc0c922674ad14fca27d5785e is empty
error: object file .git/objects/88/e58cd6e6ab802cc0c922674ad14fca27d5785e is empty
fatal: loose object 88e58cd6e6ab802cc0c922674ad14fca27d5785e (stored in .git/obj ects/88/e58cd6e6ab802cc0c922674ad14fca27d5785e) is corrupt
fatal: failed to run reflog
fermentrack@raspberrypi:~/fermentrack$

I then went back to the browser logged out then logged back in and i still get the same error
 
Back
Top