Tools for reading your Tilt hydrometer on a Raspberry Pi, storing the results as CSV, and mailing you summaries and plots. Intended for use as two cron jobs (recording data and mailing plots).
- plot: detect missing file and send sensible message
-
python bluez, matplotlib, pandas
sudo apt-get install python3-bluez
orpip3 install PyBluez
-
Make the bluetooth interface accessible without being root:
-
sudo setcap cap_net_raw+eip /usr/bin/python3.7
(for example) -
Note: this command does not follow symlinks so applying it to
/usr/bin/python3
won't work -
You need to run this command whenever apt updates that library
-
-
A working
/usr/sbin/sendmail
command is required (nullmailer is sufficient)
- The same config file is used for both.
15 * * * * path/to/pi-tilt/record.py -c path/to/config.json
00 09,21 * * * path/to/pi-tilt/plot.py -c path/to/config.json
-
hydrometers
: map of Tilt colors to CSV filenames (absolute or relative to the directory the config file is in) -
readings
: number of readings to take (then record the median of the density and temperature readings) -
wait_seconds
: interval between readings -
give_up_minutes
: quit after this amount of time -
mail_from
: e-mail address -
mail_to
: list of e-mail addresses
water
: SG reading in water after changing the battery (for recalibration); if absent, a default of 1000 will be used
-
Derived from https://github.com/atlefren/pytilt and updated to Python 3
-
The code in
blescan-py
is adapted from https://github.com/switchdoclabs/iBeacon-Scanner- -
The Tilt UUID-to-color mapping is taken from: https://github.com/tbryant/brewometer-nodejs