Brewometer integration

I’ve been using the brewpi for about 5 brews now, installed on a Rasberry Pi generation I

Today I got my Tilt hydrometer

I wanted to include this in the brewpi interface following the instructions on GitHub

However, after updating with the updater.py command, my brewpi no longer works

Now I’m getting “script not running”. It’s been over 6 months that I installed my raspberry so updating took a long time, something in that update must have screwed something up…

Somebody here that might have an idea on what went wrong?

just found out that it was not the update that made my brewpi no longer work, but copying/overwriting the files from github. When I do this, I get an error that brewpi has a version which is not compatible with the arduino…

Are these github files only useable with the spark?

apparently there was a seperate github for the legacy branch (https://github.com/jlvnyc/brewpi-brewometer), so I tried again with this one. Now I don’t get the version error but I get this:

Oct 29 2016 22:28:15 Opening serial port
Oct 29 2016 22:28:15 Notification: Script started for beer 'My First BrewPi Run’
Oct 29 2016 22:28:25 Checking software version on controller…
Oct 29 2016 22:28:25 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port /dev/ttyACM0

Traceback (most recent call last):
File “/home/brewpi/brewpi.py”, line 421, in
startBeer(config[‘beerName’])
File “/home/brewpi/brewpi.py”, line 296, in startBeer
changeWwwSetting(‘beerName’, beerName)
File “/home/brewpi/brewpi.py”, line 229, in changeWwwSetting
wwwSettingsFile = open(wwwSettingsFileName, ‘r+b’)
IOError: [Errno 13] Permission denied: '/var/www/userSettings.json’
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 810, in __bootstrap_inner
File “/usr/lib/python2.7/threading.py”, line 763, in run
File “/home/brewpi/backgroundserial.py”, line 81, in __listenThread
File “/usr/local/lib/python2.7/dist-packages/serial/serialutil.py”, line 572, in inWaiting
File “/usr/local/lib/python2.7/dist-packages/serial/serialposix.py”, line 456, in in_waiting
: ‘NoneType’ object has no attribute ‘ioctl’

@sbowler do you have any idea what I’m doing wrong here?

Finaly made it work!! Also combined with apache to get an admin login page and the normal stripped down version without buttons etc.

Only thing I’m missing is logging of the battery, is that possible?

Starting a nice monologue here, bummer that all the activity of this thread is dead :-/

Small update: my battery died in under 12hours :frowning: apparently I have a faulty unit. They will send me a replacement.

Another thing I noticed: 12 hours of dataloging at 10second interval and the interface is no longer useable on my iphone (very slow). I’ll try increasing to 2 or 5 minute interval. But this is a bad start… What after 3 weeks into fermentation? (I do fermentation + lagering/cold crash in the same tank). I could start a new log for this offcource…

@sbowler Since I won’t be using the tilt tomorrow when brewing, since it is not working properly, is there an easy way to make brewpi stop logging the “empty” datapoints of the SG sensor? So my log is not getting super slow?

And for the future, is there a way to not log the sensors that are not in use? I mean all the other “colors”? Re-write something in a script so it only logs the sensors that we want it to log?

1 Like

Hi @sbowler.

I brought back a brewometer from the US this week and am trying to integrate it with brewpi.

I’ve got all of the files in place and the BrewometerTest.py is receiving data for my red brewometer no problem.

Brewpi is showing the BO in the webpage but no data for it? It seems to know I have a red one as that is the only line plotted. I have checked the data in /var/www/html and it is logging data to the .csv file. This just doesn’t seem to be making it on to the brewpi web page.

Any ideas please?

Sorted!!. Looks like beer-chart.js had been overwritten somehow. It also didn’t like www-data being used as owner on /var/www. I re chowned everything back to brewpi and it was fine. It’s worth noting that I am testing with water in prep for the boil I have going at the moment. Hence the low gravity!

@KLucky_13 I had the same problem with short logging intervals, the site would load eventually but it took a very long time. Longer logging intervals work. I just finished a three week fermentation and it was slow at the end, but still usable.
The problem is that the battery only lasts for three weeks. With BLE I would have expected the battery of this size to last much longer, anyone else here who can share how long their Tilt/Brewometer lasts with a fresh battery?

On my implementation and several others prior in this thread, the nonactive hydrometers do not show in the sidepanel. Not sure where your installation might have gone wrong, but I had something similar after I implemented password protection on part of the site, could be related to that admin.php setup. Now i have a password on the whole site, with no public panel, and can no longer see the nonactive coloured tilts.

@sbowler… I have a new problem. I have set the calibration file and it is saying the following in the brewpi log.

ERROR: Brewometer (Red): Unable to initialise Gravity Calibration data (brewometer/GRAVITY.red) - list index out of range

I have the following in there at the moment.

1.034, 1.050

I get the same message when trying to calibrate temp too.

Rich

I don’t see the other SG meters in the side. I just read in this thread that they are plotting “null” data. So not showing but it is there. Which gives you 2 plots per colour even if they are not used/visible.

3 weeks? Ok that’s already longer than mine (dead after 12 hours), but still… This would mean a new battery at each brew session (=4-5 euros for a battery).

Their website states: up to 3 months depending on the use. What would they mean with “depending on the use”?

@Richard_Crump is your SG meter that far out of range? That you need to calibrate from 1.034 to 1.050? Or are you just testing?

I don’t know but it looks that way. This is my first go with the brewometer… It read fine at 1.000 in water. I just finished my brew day. Expected OG was 1.049. My own old fashioned hydrometer reads 1.050 and the brewometer reads 1.034 so I’m trying to calibrate to get 1.034 to show as the actual 1.050.

I’ve also emailed the Brewometer guys to see if this variance is normal too.

Rich

Hi @KLucky_13, Sorry for the lack of replies over the past 2 days… It’s a long weekend here, so haven’t been near my PC…

To answer a few of your questions:

  • Battery Level: I’m not aware of a way to log the battery level from the brewometer. It doesn’t publish that detail in the beacon message.
  • Stopping logging: If you turn the Tilt off by sitting it upside down, the script will stop logging points. Similarly, if you have two Tilts, you can disable one by turning it off. However, there’s no way to specify which Tilt to log vs not log if you have Multiple Tilts and Multiple BrewPis… It would be a good future enhancement, but I’m reluctant to spend too much time on that until @Elco releases the new version of the web interface, which is meant to have better support for additional sensors.

I’m glad you were able to work out your other issues. Unfortunately I don’t have any visibility of that Branch (but pleased that someone has been able to adapt this to the Arduino codebase).

Hi @Richard_Crump… I’ve not seen that error before and I couldn’t reproduce it just now with those values. IS it possible for you to attach your calibration file or send a OneDrive/DropBox/GoogleDrive link?

Well I have used mine for 2 brews for 3 weeks each and plus the postage to Australia for about 3 weeks and a week into my current brew for a week and orginal battery still working for me.

ok. I’m attaching it here.

it resides in /home/brewpi/brewometer. The file is actually GRAVITY.red but I have added the .txt on the end to allow me to upload it as an attachment.

Error is.

ERROR: Brewometer (Red): Unable to initialise Gravity Calibration data (brewometer/GRAVITY.red) - list index out of range

Thanks,
Rich

/GRAVITY.red.txt (563 Bytes)

I have set the interval at which it collects datapoints to 2 minutes, however, when I check back a while later, it has reset himself to 10 seconds. Anyone knows what’s happening there?

Hi Richard.

I see what’s going on now. Unfortunately the file parsing logic is fairly basic, so does not handle the blank line before the #Original SG Value, Calibrated value line. So to fix, just remove the blank line, so that your file looks like:
#Gravity Calibration file for Brewometer #To be active, the file should be named GRAVITY.<colour> in the brewometer/ folder #and have at least one calibration value inside. #So to calibrate a black brewometer, the file would be called GRAVITY.black #The following example two calibration points are used. #0.997 read from the brewometer will be calibrated to the actual value of 0.999 #1.056 read from the brewometer will be calibrated to the actual value of 1.060 #Other calibration points will be calculated. #Original SG Value, Calibrated Value 1.034, 1.050

It’s something I may look to fix in a future version.

I’ve seen that too, and my assumption it’s just a Bug in the web interface that’s just not showing the set value in that drop down list.

Oh ok, So only the UI is bugging? It’s still set to the chosen parameter only the interface is showing something else? Than its not that big of a deal