Brewometer integration


Hi all, I have just recently purchased the new BrewPi and currently running the latest Firmware and software on Raspbian Jessie.
Is it possible to integrate the Tilt hydrometer ?


So I’m having a web interface issue with my integrated Tiltmeter version. Anyone else? I’ve been running the Tiltmeter with my BrewPi (Arduino) successfully since July. I’ve been setting my data logging to 10 minutes (following the earlier thread with @sbowler and @NottingHill). As long as the brew session is less than about 2 weeks, I’ve not had any problems until about 3 brew ago (I’ve probably done 15 brews since July, total). It started out that the web interface would time-out after a couple of days. Could not gain access to the BrewPi via a number devices and web software programs nor could I get in via PuTTY. On this current brew session, which I started about 12 hours ago, the Web Interface is non-responsive. My only option is to re-cycle power (unplug), which we all know is not a good thing. However, I do get access back to the BrewPi. I

Again, wondering if anyone is having the same issue? Wondering if this is tied to the Tiltmeter logging (it is a new session)? Or is this corrupted software somewhere?


Is there anyway at all to get this data into the arduino to actually use for the temp control? I have a fermentasarus and it doesn’t have a thermowell so starting to look at wireless ones.

Can the pi for example mimic the one wire protocol and just send the signal to the arduino via a wire that appears like a thermometer? Is there a simpler way?

Edit: I’ve just found this:

Which extends the pi zero (which my brewpi runs on) to be able to communcate over a 1 wire bus. So, in theory this could be used to send the temp data to the arduino or spark?

Tutorial here:



After a few months away from brewing I’m ready to start again so I did a clean install on a RPi3. I have the docker installation running and can see the Web UI. All looks good so far.

I want to integrate the Tilt into the setup so I went to git and began the install.

This is the first sign of trouble:
$ sudo apt-get install bluez python-bluez python-scipy python-numpy libcap2-bin
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package python-bluez
E: Unable to locate package python-scipy
E: Unable to locate package python-numpy

Which leads to this:
$ python
Traceback (most recent call last):
File “”, line 2, in
import TiltHydrometer
File “/home/pirate/brewpi-brewometer/tiltHydrometer-test/”, line 12, in
import blescan
File “/home/pirate/brewpi-brewometer/tiltHydrometer-test/”, line 21, in
import bluetooth._bluetooth as bluez

I have checked to see if the Tilt is recognized:
$ sudo hcitool lescan
LE Scan …
88:C2:55:AC:26:BF (unknown)
88:C2:55:AC:26:BF Tilt
30:8C:FB:29:3E:EE (unknown)
05:5B:D9:E4:D7:1A (unknown)
C8:69:CD:2C:A1:74 (unknown)
C8:69:CD:2C:A1:74 (unknown)
88:C2:55:AC:31:87 (unknown)
88:C2:55:AC:31:87 Tilt

And now I’m at a dead end.
Has this already been addressed?


did you do an apt-get update & apt-get dist-upgrade before your install?


I did the fresh install about a month ago.

At the time I did the standard docker pull to build the container.

Doing and upgrade and update now.


It might not fix things but you should always do an update & upgrade before installing other software on linux. At the very least the update.

Update will update the package list on your computer, dist-upgrade will upgrade the installed packages & dependencies. If you don’t do the update, you’ll be working off an out of date package list which might give you the problems above when apt can’t find the packages in the out of date location. dist-upgrade will bring in security/bug fixes. It will also give you the most up to date version which can help if packages you’re newly installing don’t specify dependencies properly. Unless those badly written packages want an old version of a dependency, in which case it’ll make things worse :stuck_out_tongue:


With the implementation of the container it’s a bit ambiguous as to what to update first.
There is the pirate account on the actual pi and then the brewpi container.

This also leads to confusion as to where the installation should occur.

After a bit of doing and redoing I finally made it through all the instructions.

The UI shows all the possible colors of the Tilt but doesn’t show any data for the 2 I have.
This is the log just after start up?
Jan 26 2018 11:24:40 Fresh start! Log files erased.
Jan 26 2018 11:25:15 Notification: Script started for beer 'Tilt Test’
Jan 26 2018 11:25:15 Connecting to controller…
Jan 26 2018 11:25:15 Opening serial port
Jan 26 2018 11:25:15 Checking software version on controller…
Jan 26 2018 11:25:15 Found BrewPi v0.5.2 build 0.5.2-0-g72e633171, running on a Particle Photon with a V2 shield on port /dev/ttyACM0

Unhandled exception in thread started by >
Traceback (most recent call last):
File “/home/brewpi/”, line 373, in scan
File “/home/brewpi/”, line 107, in hci_le_set_scan_parameters
old_filter = sock.getsockopt( bluez.SOL_HCI, bluez.HCI_FILTER, 14)
_bluetooth.error: (9, ‘Bad file descriptor’)

I’m going to start over with a fresh install and then decide if I want to pursue the integration again. I’m zero for 2 on installations so far and think this is actually taking away from my brew time.


The updates and modifications should be performed within the container. I’ve not updated the instructions for a container install as I’m not running my pi that way. It seems that you need to make sure you run the container in privileged network mode to get access to the bluetooth device.

If you run the test script, this needs to also be run inside the container to confirm the setup will work.


Unfortunately, Not with the current version of Brewpi. The temperature control is implemented in the Spark, not in the Raspberry pi. I believe this was done for reliability reasons.

The accuracy of the one wire temperature sensors is a lot greater than th etemperature readings from the Tilt. I’ve also switched to a Fermentasaurus and have put a thermowell through the pressure lid.


That’s my point. The pi has the temp data and could send it to the spark/arduino via the one wire protocol. The spark / arduino just sees this as a normal temp sensor with correct one wire ID and does its thing. The pi can read / write data to a one wire bus so I am sure this is possible and it can mimic a temp sensor. And I’m sure the brewometer in the beer is more accurate than a one wire strapped to the side of it.

Anyway, besides all this, can you ferment under pressure with the thermowell in? Coz if you can this is a moot point I guess :slight_smile:


Fair enough then. I indeed missed that point. It should be possible, just need to do the coding.

You can (and I have) ferment under pressure with the thermowell. Before i did it, I spoke with the Fermentasaurus manufacturer and they said it should be possible. I’ve drilled a hole in the lid, and have the thermowell going through a grommet. I’ve pressure tested to 70 PSI and after about 10 mins, the lid gasket failed (due to incorrect seating) with no leakage around the thermowell. :slight_smile:


Interesting. So did you drill the hole and bond the thermowell to the lid? If not how did you make a good seal. I doubt I’ll ever need more than 20psi to be honest. Though that said if the lid fails anywhere in the future it will surely be where I drill it. And they aren’t cheap!

Anyway, besides all this I think I’m just trying to find an excuse to buy a tilt hydrometer when I go the states in march!

I might buy one of them one wire boards for my pi zero, play about and report back if I can mimic a thermometer. Almost certain it’s possible as one wire is digital so it’s just a case of working out what to send. And an actual one wire thermometer will help with that.


So to satisfy my curiosity I did a clean install.

I followed the directions in the wiki to create the boot disk (the wifi setup and machine name are now in /boot/user-data).
I did apt-get upgrade and updates.
I created the brewpi container using the --privilege option.
I create the Portainer container.

I entered the console on the container and did apt-get upgrade and updates.
I cloned the git directory: root@f9648c4b9a69:/home/brewpi# git clone
I added the required libraries: root@f9648c4b9a69:/home/brewpi# sudo apt-get install bluez python-bluez python-scipy python-numpy libcap2-bin
I executed the permissions update: root@f9648c4b9a69:/home/brewpi# sudo setcap cap_net_raw+eip $(eval readlink -f which python)
Up to this point I had no hard errors, only a couple of:
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.

I attempted the test script:
root@f9648c4b9a69:/home/brewpi/brewpi-brewometer/tiltHydrometer-test# python
Scanning - 20 Secs (Control+C to exit early)
Red: None
Green: None
Black: None
Purple: None
Orange: None
Blue: None
Yellow: None
Pink: None
Unhandled exception in thread started by <bound method TiltHydrometerManager.scan of <TiltHydrometer.TiltHydrometerManager instance at 0x76b67940>>
Traceback (most recent call last):
File “/home/brewpi/brewpi-brewometer/tiltHydrometer-test/”, line 360, in scan
File “/home/brewpi/brewpi-brewometer/tiltHydrometer-test/”, line 107, in hci_le_set_scan_parameters
old_filter = sock.getsockopt( bluez.SOL_HCI, bluez.HCI_FILTER, 14)
_bluetooth.error: (9, ‘Bad file descriptor’)

Just for fun I tied the scan tool:
root@f9648c4b9a69:/home/brewpi/brewpi-brewometer/tiltHydrometer-test# sudo hcitool lescan
Could not open device: No such device

Also for fun, I then did the same steps on the actual pi.
The results from the scan worked correctly.
HypriotOS/armv7: pirate@brewpi1 in ~
$ sudo hcitool lescan
LE Scan …
05:5B:D9:E4:D7:1A (unknown)
88:C2:55:AC:31:87 (unknown)
88:C2:55:AC:31:87 Tilt
1C:1A:C0:87:89:82 (unknown)
1C:1A:C0:87:89:82 (unknown)
18:AF:61:B8:0F:E3 (unknown)
18:AF:61:B8:0F:E3 (unknown)
C8:69:CD:2C:A1:74 (unknown)
C8:69:CD:2C:A1:74 (unknown)
88:C2:55:AC:26:BF (unknown)
88:C2:55:AC:26:BF Tilt
76:C2:62:3B:71:05 (unknown)
76:C2:62:3B:71:05 (unknown)
D4:DF:DD:62:13:CE (unknown)
D4:DF:DD:62:13:CE (unknown)
E0:36:E2:CB:F7:94 N0F47
E0:36:E2:CB:F7:94 (unknown)
DE:9D:5C:00:E7:40 (unknown)
DE:9D:5C:00:E7:40 (unknown)

And I’m now zero for 3 attempts for using this feature.
Currently there are several very different platforms running brewpi and it’s nearly impossible to verify compatibility in each environment.
Thanks to all those that spent the effort creating it but until the bluetooth/container interface is easily connected, this seems out of my reach.


You seem to be quite close to getting it to work. I believe the problem you’re now facing is how/if the docker container can access the bluetooth stack. Have you launched your Brewpi container with the networking host mode?

If you haven’t, I’d try there and then attempt to run the sudo hcitool lescan command to see if you’ve got access to the device. Assuming this now works, then you’ll probably need to re-run the sudo setcap... command as well then you can re-attempt the command.


I deleted my previous container and used this command to create a new brewpi instance:
docker run -d --privileged --net=host --name brewpi -p 80:80 -v ~/brewpi-data:/data -v /etc/timezone:/etc/timezone -v /etc/localtime:/etc/localtime --restart always brewpi/brewpi-raspbian

After doing the updates and git clone and installing the additional libraries this is the result:

root@brewpi1:/home/brewpi# sudo hcitool lescan
LE Scan …
C8:69:CD:2C:A1:74 (unknown)
C8:69:CD:2C:A1:74 (unknown)
05:5B:D9:E4:D7:1A (unknown)
1C:1A:C0:87:89:82 (unknown)
1C:1A:C0:87:89:82 (unknown)
E1:AF:D6:55:D5:2E Tile
E1:AF:D6:55:D5:2E (unknown)
E0:36:E2:CB:F7:94 N0F47
E0:36:E2:CB:F7:94 (unknown)
F4:5A:59:56:E1:1D (unknown)
F4:5A:59:56:E1:1D (unknown)
FD:F4:22:7B:C2:9C Tile
FD:F4:22:7B:C2:9C (unknown)

The scan does indeed work. Building the container in host mode shares the resources on the pi. Notice the prompt is now root@brewpi1 instead of root@f9648c4b9a69 as was created using the run command listed in the wiki. Additional research shows this option might not be available to other non pi platforms.

When I return home I’ll be able to wake the Tilt and start checking the graphs.

Thanks for the help.


Hey @sbowler, so I’m having a hell of a time trying to figure this out. I’m just trying to get the hex value for the battery from my tilt. When I first tried doing the lescan I was getting input/output errors. So I did a hcitool hci0 down/up and the lescan started to work. It gives me only one result / MAC address titled (unknown). But being that my setup is in my garage, I’m pretty sure it’s my tilt. So I try to run the gatttool command (with that one MAC address) to get the hex value for 0x0048 and I get: “connect error: Connection refused (111)”. My bluez package is running 5.23-2+rpi2. I have ran this command as pi and root with the same results. Any ideas?


FWIW, I’m pretty sure the Tilt ships from the UK.


I too would love to control temp with the Tilt. I’ve found that it floating in the wort is much more accurate than the temp prob taped to the outside of my bucket.


@sbowler and others. New to the whole BrewPi and having little luck getting it all running with tilt integration.
I bought the Tilt, RPI 3 and Arduino in the hope of logging fermentation progress and eventually controlling temp. I’ve built the Pi and BrewPi and brewometer integration. I didn’t add the arduino controller as yet. I can run the TiltHyrometertest script and get results. I cannot get data to log for BrewPi.
Based on an earlier post, I added fuscus (in lieu of Arduino) and can now get data to log, but not graph Error is “could not parse data”. Looking at the data, I see this:

Feb 05 2018 20:55:51;null;null;null;NaN;null;null;1;null;null;null72.0;1.023;
Thoughts? Am I doing it wrnog using the fuscus device?