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.
Yea my pi just got restarted, but I can try I guess. The battery isn't dead because the tilt app can grab It directly

edit:Both the fermentrack log and the tilt time seem to line up. might be worth disconnecting and reconnecting the tilt when im done with this beer?
Following up on this issue, because it seems to be happening more frequently to me, even with restarts. Below is my latest readings. Those sharp lines are where the gaps are. The battery in the Tilt is brand new, and I set up an old phone with the Tilt app to also log. No gaps shown in that.
Bad Graph.png


For reference, here's the same beer earlier. The temp drops are more varied and there aren't sharp angles.
Good Graph.png
 
The error is on brewpi_to_push_id, which should come from the fourth option here (Brewpi to push). It looks like it wants a BrewPi device, not a gravity sensor.

View attachment 700627

As for the battery question, that's voltage. It's a nominal 3.7 volt battery, but max charge will be around 4.2 volts, and if I remember correctly it's usable down to about 3.2 (or maybe it was 3.5) before your iSpindel will stop functioning properly.
thanks for the reply. I can’t select any brewpi_id and I can’t key into the field I believe. I’m not at home so I’ll have to verify tonight.
 
Following up on this issue, because it seems to be happening more frequently to me, even with restarts. Below is my latest readings. Those sharp lines are where the gaps are. The battery in the Tilt is brand new, and I set up an old phone with the Tilt app to also log. No gaps shown in that.

snip

For reference, here's the same beer earlier. The temp drops are more varied and there aren't sharp angles.

snip
did you update the software in between? i know i did the latest updates before starting my latest brew, not sure if some pointers got mixed around between the versions - but yours at least seems to maintain the tracking. mine doesnt seem to have ever re-registered. its reporting as if it did but my gravity and temp are both way low like its locked up on a past value
 
thanks for the reply. I can’t select any brewpi_id and I can’t key into the field I believe. I’m not at home so I’ll have to verify tonight.
Do you have any brewpi sensors, or just the iSpindel? The way the ThingSpeak support is currently set up, it is meant to push temp data from a brewpi, not gravity data from an iSpindel. If you're like me and only using the iSpindel so far, there aren't any brewpi sensors to put into that field (you'll just see the '---------' in the dropdown).
 
did you update the software in between? i know i did the latest updates before starting my latest brew, not sure if some pointers got mixed around between the versions - but yours at least seems to maintain the tracking. mine doesnt seem to have ever re-registered. its reporting as if it did but my gravity and temp are both way low like its locked up on a past value
I ran an update right before brewing, but haven't run one since. Those two graphs are both from my current fermentation. It's the inconsistency that's confusing me.
 
HarlemBrewDoug said:
Following up on this issue, because it seems to be happening more frequently to me, even with restarts. Below is my latest readings. Those sharp lines are where the gaps are. The battery in the Tilt is brand new, and I set up an old phone with the Tilt app to also log. No gaps shown in that.View attachment 700629

I too have experienced the same phenomena and seen the same graphs.

After some experimenting, I started to suspect signal strength as the issue. (I ferment in stainless, inside a converted beverage cooler. My TiltBridge is 1.5-3 ft away) Anyway, I started measuring signal strength at my TiltBridge. When my Tilt was graphing properly, I was in that -75 to -84 dBm range. When my Tilt looked “stuck”/not graphing, the signal strength was somewhere between -85 to -95 dBm.

If you ferment in Stainless, and/or your TiltBridge or Fermentrack Pi are far from your fermentation vessel, I would suspect it may be signal strength for you too.

My answer to the problem was to build a Bluetooth repeater that I place in my fermentation chamber. I am two ferments in, with no dropped signal (knock on wood).
 
The error is on brewpi_to_push_id, which should come from the fourth option here (Brewpi to push). It looks like it wants a BrewPi device, not a gravity sensor.

View attachment 700627

As for the battery question, that's voltage. It's a nominal 3.7 volt battery, but max charge will be around 4.2 volts, and if I remember correctly it's usable down to about 3.2 (or maybe it was 3.5) before your iSpindel will stop functioning properly.

Do you have any brewpi sensors, or just the iSpindel? The way the ThingSpeak support is currently set up, it is meant to push temp data from a brewpi, not gravity data from an iSpindel. If you're like me and only using the iSpindel so far, there aren't any brewpi sensors to put into that field (you'll just see the '---------' in the dropdown).
:confused:yeah I only have iSpindel. My idea was to push to ThingSpeak, then use ifttt to talk to my inkbird wireless plugs to turn on/off heater or cooling. was an idea :cool:
 
Do you have any brewpi sensors, or just the iSpindel? The way the ThingSpeak support is currently set up, it is meant to push temp data from a brewpi, not gravity data from an iSpindel. If you're like me and only using the iSpindel so far, there aren't any brewpi sensors to put into that field (you'll just see the '---------' in the dropdown).
its funny tho, if you hover over the brewpi to push words, it says ignored if all devices selected. How do you select all devices?
 
Following up on this issue, because it seems to be happening more frequently to me, even with restarts. Below is my latest readings. Those sharp lines are where the gaps are. The battery in the Tilt is brand new, and I set up an old phone with the Tilt app to also log. No gaps shown in that.
If you are going directly from Tilt to Fermentrack, it's very likely because of the UART in the Pi. These can be slowed down to help prevent these missing data pieces. Have a look at this issue.

If you don't want to read and you just want to do something, you can try running this script:
Code:
curl -L uartspeed.brewpiremix.com | sudo bash
It will slow down your BT UART and so far it seems to have helped people with this issue.

Yes, it says BrewPi, yes, it will work fine for Fermentrack. :)

It's also something that's helped by using Tiltbridge. This is because Tiltbridge uses WiFi to send the data to the Pi instead of using the Pi's BT UART.
 
Thanks @garzlok and @LBussy .

While I do have an SS fermenter, my Pi sits directly on top of the mini-fridge. I was thinking that would help deal with the signal strength issue, but if you were seeing significant drop at just 1.5 feet, it must have been wishful thinking. What kind of repeater did you get? A quick google/amazon search brought up a bunch of audio gear. Newegg wasn't much better.

I'll try the UART script to see if that helps. Couldn't hurt, right?
 
I'll try the UART script to see if that helps. Couldn't hurt, right?
Well, I would not release it if I thought it would hurt. Still, YMMV and all that. :) I don;t have any reports of bad things happening, and more than a few reports of good things happening. This is a part of the BPR install.

What kind of repeater did you get?
Tilt makes a repeater. Tiltbridge is also a repeater that you can make. Both will work with Fermentrack.
 
Thanks @garzlok and @LBussy .

While I do have an SS fermenter, my Pi sits directly on top of the mini-fridge. I was thinking that would help deal with the signal strength issue, but if you were seeing significant drop at just 1.5 feet, it must have been wishful thinking. What kind of repeater did you get? A quick google/amazon search brought up a bunch of audio gear. Newegg wasn't much better.

So, I already run a TiltBridge. In my case, the UART script wouldn’t have helped me. In fact, I have a second Pi running a developmental Fermentrack build. I placed that Pi near my TiltBridge, and it had no issues picking up the Tilt signal.(However, I have a TiltBridge, and it will be utilized to it’s full potential dag-nabit) I have two fermentation chambers, stacked on top of each other. My TiltBridge is located just above the chambers. I too, thought that being so close, signal strength would not be an issue, but alas.

As far as Repeater...well, I built a similar one to the Tilt Repeater that @LBussy referenced. The DIY directions to that build can be found here.

The good news is, you have options. Hopefully the UART script will work for you.
 
@LBussy i ran your script and got the following readout. should there be errors?

Code:
pi@raspberrypi:~ $ curl -L uartspeed.brewpiremix.com | sudo bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   291  100   291    0     0   1293      0 --:--:-- --:--:-- --:--:--  1293
100  3035  100  3035    0     0   5704      0 --:--:-- --:--:-- --:--:--  5704
bash: line 97: main: command not found
/usr/bin/btuart backed up to /home/pi/btuart.bak.
/usr/bin/btuart updated.
Restarting bluetooth.
Bluetooth daemon restarted. Please restart any client scripts.
bash: line 102: syntax error near unexpected token `}'
bash: line 102: `}'


Im also thinking the culprit might be my Pi. tried finding it on bluetooth with my phone and it wasnt showing up as available. is this normal? I ran hciconfig -a and got
Code:
hci0:   Type: Primary  Bus: UART
        BD Address: DC:A6:32:1F:45:90  ACL MTU: 1021:8  SCO MTU: 64:1
        UP RUNNING
        RX bytes:2922 acl:0 sco:0 events:154 errors:0
        TX bytes:6333 acl:0 sco:0 commands:154 errors:0
        Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH SNIFF
        Link mode: SLAVE ACCEPT
        Name: 'raspberrypi'
        Class: 0x000000
        Service Classes: Unspecified
        Device Class: Miscellaneous,
        HCI Version: 5.0 (0x9)  Revision: 0x122
        LMP Version: 5.0 (0x9)  Subversion: 0x6119
        Manufacturer: Cypress Semiconductor Corporation (305)

that address or raspberrypi does not appear in my bluetooth search from my samsung. I ran a full set of update/upgrades. should i remove/reinstall bt? fermentrack says all the debugging items are OK

the tilt app continues to be able to find the Tilt just fine. I deleted the sensor from fermentrack, and attempted to reattach, but all i get is -.-- for readings
 
Last edited:
@LBussy i ran your script and got the following readout. should there be errors?
Well first, congratulations on being the first person for whom this has not worked. :)

1601574433700.png


The script does make a backup - but if you want to PM me the contents of your /usr/bin/btuart file, I'd be happy to take a look at what went sideways. Looks like a formatting error.
 
Thanks to the help of this forum (@day_trippr, @Thorrak) and the fermentrack docs, I built an Arduino-based (because I had the parts) brewpi with Fermentrack and used it last with my ferment. It worked well for temp control. However, the data from my Tilt isn't being read. I have removed and re-added it, checked the battery strength and run a "test" brew. Fermentrack just doesn't see it any longer.
The Tilt troubleshooter shows everything installed and OK.
Prior to adding the temp controller, I'd done many beers with this Tilt and Fermentrack install

Info:
Fermentrack on latest build; Pi is this (updates applied regularly):
Model : Raspberry Pi 3 Model B Plus Rev 1.3
Debian ver: 10.6

Where can I look next?
 
Last edited:
my only thought apart from a guts change from April-ish would be something changing on the tilt side? but that seems unlikely/more people might have issues. @uSlackr are you on dev or master branch? i found i was on dev, but switching now doesnt seem to change anything, and may not mean anything, just trying to narrow down

Also unsure if related, but noticing my controller 'failed' the response test. not sure if its a firmware out of date thing, or what. the data from the controller and the 'response' to commands seems to work great. this controller was what my tilt was paired with. but even when not paired the tilt isnt reporting, so i imagine this isnt the cause
 
Last edited:
Thanks to the help of this forum (day_trippr, Thorrak) and Thorrak docs, I built and Arduino based brewpi with Fermentrack and used it last ferment. It worked well. However, the data from my Tilt didn't' update. I have removed and re-added it, checked the battery strength and run a "test"brew. It just doesn't see it any longer.
The Tilt troubleshooter shows everything installed and OK.

Where can I look next?

Why is there no "shake fist at sky" emoji?

Let me open the code up and take a look.


my only thought apart from a guts change from April-ish would be something changing on the tilt side? but that seems unlikely/more people might have issues. @uSlackr are you on dev or master branch? i found i was on dev, but switching now doesnt seem to change anything, and may not mean anything, just trying to narrow down

Also unsure if related, but noticing my controller 'failed' the response test. not sure if its a firmware out of date thing, or what. the data from the controller and the 'response' to commands seems to work great. this controller was what my tilt was paired with. but even when not paired the tilt isnt reporting, so i imagine this isnt the cause


Nothing changed on the Tilt side - the more likely culprit is a change on the Pi regarding software supporting the Bluetooth UART. @chucknorris101 / @HarlemBrewDoug / @uSlackr - Are you guys using Pi 3s or a different Pi?

We had to leave town recently to help out family in VA, but I just so happened to bring a Tilt and a Pi with me. I'll get them set up this afternoon and see what I can find.
 
thanks Thorrak! Im on a Pi 4 B running Raspbian (just did the latest updates). I had not updated the pi in the interim from last working to finding the issue. My issue started with it being 'stuck' at the FG and temp of the previous beer through the whole ferm of the new one (didnt really check before tossing it in), then after trying to remove/reconnect its just -.--
 
@Thorrak i couldnt find this log in the webinterface, but found it dootin around in the files. hopefully its helpful. Definitely seems to be trying to work :) ha "tilt--stderr.log"

guessing this would have been helpful to @LBussy as well, sorry just found it!
 

Attachments

  • tilt log.txt
    17.7 KB · Views: 5
Nothing changed on the Tilt side - the more likely culprit is a change on the Pi regarding software supporting the Bluetooth UART. @chucknorris101 / @HarlemBrewDoug / @uSlackr - Are you guys using Pi 3s or a different Pi?

We had to leave town recently to help out family in VA, but I just so happened to bring a Tilt and a Pi with me. I'll get them set up this afternoon and see what I can find.
Hope nothing serious in VA.

Model : Raspberry Pi 3 Model B Plus Rev 1.3
Debian ver: 10.6
 
Hope nothing serious in VA.

Model : Raspberry Pi 3 Model B Plus Rev 1.3
Debian ver: 10.6

Perfect - pretty sure that’s the Pi I have with me. Good to test with!

My pseudo-mother-in-law broke her leg the week before she was scheduled to move to a new house. Fortunate timing in that her new house is perfect for recovering from a broken leg (no stairs!) but terrible timing in that we now get to manage her move. She was suspiciously OK with going to rehab for the next week. Hmmmm... ;)
 
Perfect - pretty sure that’s the Pi I have with me. Good to test with!

My pseudo-mother-in-law broke her leg the week before she was scheduled to move to a new house. Fortunate timing in that her new house is perfect for recovering from a broken leg (no stairs!) but terrible timing in that we now get to manage her move. She was suspiciously OK with going to rehab for the next week. Hmmmm... ;)
Glad you could help!

Gotta love family.
(Seriously - you have to love them or they drive to brew...)
 
this looks telling from the tilt-stderr.log
ERROR:asyncio:Fatal write error on socket transport
protocol: <aioblescan.aioblescan.BLEScanRequester object at 0x74b72fb0>
transport: <_SelectorSocketTransport fd=8 read=idle write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/lib/python3.7/asyncio/selector_events.py", line 857, in write
n = self._sock.send(data)
PermissionError: [Errno 1] Operation not permitted
 
I FIXED IT! thanks google. python is somehow losing/lost admin rights. googling the problem i found some similar issues. not sure which one specifically did the trick, but i ran the following commands from inside the /usr/bin/ folder

sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' python3.7
sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' pyvenv-3.7
 
I FIXED IT! thanks google. python is somehow losing/lost admin rights. googling the problem i found some similar issues. not sure which one specifically did the trick, but i ran the following commands from inside the /usr/bin/ folder

sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' python3.7
sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' pyvenv-3.7
Hmmm. Not working here. Ran the command and saw no change so I restarted the pi. Still nothing
 
I FIXED IT! thanks google. python is somehow losing/lost admin rights. googling the problem i found some similar issues. not sure which one specifically did the trick, but i ran the following commands from inside the /usr/bin/ folder

sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' python3.7
sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' pyvenv-3.7

THANK YOU!

This is definitely necessary for Tilts to work, but as you noted, it appears that in some cases it can become "unset". I'm working on a test for this now to add to the test suite for Tilt support.


For the curious:

During installation, this is set here:thorrak/fermentrack-tools

If you run the "fix environment" script then this is supposed to be set here: thorrak/fermentrack-tools

For whatever reason, however, for you guys it either isn't getting properly set, or is getting unset. I'm going to try to run a few sample installs/upgrades this afternoon to see if I can determine why this isn't getting set & tweak the install script accordingly.
 
In finding the solution, my pi didnt like it when i tried to write the command from a 'remote' folder. if i wrote the sudo....python3.7 from home/pi using the location of /usr/bin/python3.7 it threw an error, same even in the root folder where usr was a subfolder. maybe the referencing system is different/changed so the command needs more specifics?
 
In finding the solution, my pi didnt like it when i tried to write the command from a 'remote' folder. if i wrote the sudo....python3.7 from home/pi using the location of /usr/bin/python3.7 it threw an error, same even in the root folder where usr was a subfolder. maybe the referencing system is different/changed so the command needs more specifics?
Looking through the /usr/bin directory, I'm not finding the python3.7 reference. Similarly named files go up to 3.5. Not surprisingly, trying to run those commands aren't really going to work. I did just run the most recent updated dev push before checking.
 
Looking through the /usr/bin directory, I'm not finding the python3.7 reference. Similarly named files go up to 3.5. Not surprisingly, trying to run those commands aren't really going to work. I did just run the most recent updated dev push before checking.

What do you get if you run the following:
readlink -e /home/fermentrack/venv/bin/python
 
Looking through the /usr/bin directory, I'm not finding the python3.7 reference. Similarly named files go up to 3.5. Not surprisingly, trying to run those commands aren't really going to work. I did just run the most recent updated dev push before checking.
maybe this depends on the pi/distro being used?

my solution ran teh command within the file structure of the pi rather than the fermentrack folders/venv. maybe this is where the issue came from? some disconnect/association broken between the pi and the venv?
 
In finding the solution, my pi didnt like it when i tried to write the command from a 'remote' folder. if i wrote the sudo....python3.7 from home/pi using the location of /usr/bin/python3.7 it threw an error, same even in the root folder where usr was a subfolder. maybe the referencing system is different/changed so the command needs more specifics?

You’re right - you have to run the command on a hard link to the binary - not a sym link. The test I implemented should give you the fully resolved path to the base Python binary that is referenced from your virtual environment.

maybe this depends on the pi/distro being used?
Definitely. The “fix environment” scripts should force a Python 3.7 environment, but I’m thinking @HarlemBrewDoug might not be fully updated. If that readlink command returns an earlier version that might be part of the issue.
 
Back
Top