Skip to main content

Tilty

A python module and CLI to capture and emit events from your tilt hydrometer

I've been unhappy with the quality/inconsistency of what I've seen out there in terms of random scripts that capture. No tests, no pluggable emitters, hard to find, etc.

The tilt essentially broadcasts iBeacon packets to send out a uuid (which type of tilt it is), a major (the temp in F), and a minor (the specific gravity).

This will capture those whenever theyre transmitted and emit them to a backend of your choosing so that you can graph it over time asynchronously.

The Tilt supports writing to a google doc which you could use with something like IFTTT or Zapier, but this is much lighter and lets you decide how you want to push that out with a pluggable backend system.

Supported Emitters

  • Webhooks
  • InfluxDB
  • Datadog (dogstatsd)

Usage

Generate Config

$ cat <<EOF >config.ini
[general]
sleep_interval = 1

# Generic application/json example
[webhook]
url = http://www.foo.com
headers = {"Content-Type": "application/json"}
payload_template = {"color": "{{ color }}", "gravity": {{ gravity }}, "temp": {{ temp }}, "timestamp": "{{ timestamp }}"}
method = POST

# Brewstat.us example
[webhook]
url = https://www.brewstat.us/tilt/0yjRbGd2/log
headers = {"Content-Type": "application/x-www-form-urlencoded; charset=utf-8"}
payload_template = {"Color": "{{ color }}", "SG": {{ gravity }}, "Temp": {{ temp }}, "Timepoint": "{{ timestamp }}"}
method = POST

[influxdb]
url = influxdb.corp.com
port = 80
database = tilty
gravity_payload_template = {"measurement": "gravity", "tags": {"color": "{{ color }}"}, "fields": {"value": {{ gravity }}}}
temperature_payload_template = {"measurement": "temperature", "tags": {"color": "{{ color }}"}, "fields": {"value": {{ temp }}}}

[datadog]
# Note: make sure that the dd agent has DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true
host = statsdhost.corp.com
port = 8125
EOF

Run

$ tilty
$ # Or from docker ( generate config into $cwd/config/config.ini )
$ docker run -it \
  -v $(pwd)/config:/etc/tilty \
  --net=host \
  myoung34/tilty:latest \
  -r --config-file /etc/tilty/config.ini

Installation

$ git clone https://github.com/myoung34/tilty
$ pip install -e .

Development

$ docker run -it -v $(pwd):/src -w /src --entrypoint /bin/sh python:3.7-alpine
$ apk add -U openssl-dev alpine-sdk libffi-dev python3-dev py3-bluez bluez-dev
$ pip3 install poetry
$ poetry install
$ poetry run tox

Metadata

Release files for Tilty 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Tilty 0.3.1
File Size Uploaded Provenance Actions
Tilty-0.3.1.tar.gz 6.9 kB Without provenance Details for Tilty-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Tilty 0.3.1
File Interpreter ABI Platform Actions
Tilty-0.3.1-py3-none-any.whl Python 3 none any Details for Tilty-0.3.1-py3-none-any.whl

Total release size: 17.7 kB

Release files / Tilty-0.3.1.tar.gz

Download URL Tilty-0.3.1.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c40cbfeb283366f109d6a0860fa8f5332ba617183f32a9d4ebc84b071b136f4d
BLAKE2b-256 checksum
How to use checksums
0fb9b7bf2b7309167733cb1da2026c134cbb69e3c5906b11a710d4778e201c4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

Release files / Tilty-0.3.1-py3-none-any.whl

Download URL Tilty-0.3.1-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b7d39687e281670ab4d9903a4f879c4eed5b1390dc241fdf7af71429b638dde
BLAKE2b-256 checksum
How to use checksums
324ebf32ace3de02e56764d5cc6b481a959e8ab58d641aa7bf374979b881f460
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

Security for Tilty 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page