TiltBridge Junior is a standalone daemon for reading data from a Tilt Hydrometer and sending it to a data target such as Fermentrack. It is intended to be run on a Raspberry Pi, using the Pi's bluetooth sensor, but likely can be run on any Linux system with a bluetooth sensor.
If you are looking for a standalone, hardware Tilt-to-WiFi bridge, check out the TiltBridge - my project to build a self-contained, single component, solder-free Tilt-to-WiFi bridge using an ESP-32.
In order to work, this daemon requires access to the Bluetooth sensor on the host system, in addition to several other requirements. These include:
- Running in "host" network mode
- Running in privileged mode
- Mounting the host's
/dev
directory into the container
The easiest way to do this is using docker-compose. A sample docker-compose.yml file has been included which shows how to configure the container to run in this manner.
TiltBridge Jr requires Python 3.8 or greater. To run it, install the dependencies in requirements.txt
, create a .env
file containing the configuration options desired (see below), and then run python3 -m tiltbridge_junior
.
This daemon requires either being run as root or being run in an instance of Python that has the necessary capability flags set. To set these flags, do the following:
- (Optional) Activate the virtualenv you wish to use TiltBridge Junior with
- Determine the (potential symlink) location of your Python binary by running
which python3
- Determine the true location of your python binary by running
readlink -e {path}
, replacing{path}
with the path from step 2 - Add the capability flags by running
sudo setcap 'cap_net_raw,cap_net_admin+eip' {path}
, replacing{path}
with the path from step 3
Once the capability flags have been set, you can run TiltBridge Junior by running python3 -m tiltbridge
TiltBridge Junior is configured via environment variables, which can be set using a .env
file. A sample .env
file is
provided as .env.sample
. Copy/rename this file to .env
and edit it in a text editor prior to using TiltBridge Jr.