Simple API to interact with the Traeger-Grill API
Project description
PyTraeger
This Project enables Traeger Grill Monitoring. For my Use-Case a Grafana Dashboard utilizes a PostgreSQL Database (demo/example02.py).
This lib does 3 things.
- It initiates authentication with AWS
- It starts the MQTT-Client (thread 1)
- It polls for updates (thread 2)
Usage in a Nutshell:
-- DEMO 1 --
from pytraeger.manager import Manager as TraegerManager
def call_me(event_grill):
_LOGGER.info("Message from %s. Grill: %-5s | Probe: %-5s",
event_grill.identifier,
event_grill.data['status']['grill'],event_grill.data['status']['probe'] )
a = TraegerManager(interval_idle=10, interval_busy=5)
for grill in a.api.grills:
grill.register_listener(call_me)
Getting Started
Fill the environmentfile.
cat .devcontainer/devcontainer.env
PYTRAEGER_PASSWORD=xxx
PYTRAEGER_USERNAME=xxx
# Optional for DB. Enabled in Dockerfile
PGHOST=xxx
PGUSER=xxx
PGPASSWORD=xxx
$ docker build . -t traegertest
$ docker run --env-file .devcontainer/devcontainer.env traegertest
2023-08-04 20:00:31,474 - root - INFO - Debugging of API
2023-08-04 20:00:37,449 - root - INFO - Message from XXXXXXXXX. Grill: 35 | Probe: 37
2023-08-04 20:00:42,569 - root - INFO - Message from XXXXXXXXX. Grill: 35 | Probe: 37
Known Issues:
- EMail-Login is case sensitive
- DB-Usecase doesnt clean up
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytraeger-0.5.tar.gz
(6.4 kB
view details)
Built Distribution
File details
Details for the file pytraeger-0.5.tar.gz
.
File metadata
- Download URL: pytraeger-0.5.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68f518232e61361114617b3d08bb5a88fc779fd952caaee10c55581f3c68a013 |
|
MD5 | e9952fd4224273b67bc755aa1a52cda4 |
|
BLAKE2b-256 | 8b0bf227dba18e846a4e62fd1fefee9fd81e3911542e5aee8ee4a020dff70c1f |
File details
Details for the file pytraeger-0.5-py3-none-any.whl
.
File metadata
- Download URL: pytraeger-0.5-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fc97cff09c9d4c31c00e3de9632b475eb970c5654ac9cff82ca68c26623963c |
|
MD5 | 39787561dbb2321dc8b5b6b50cf52d6e |
|
BLAKE2b-256 | 85180abe69928e4323c182d7c99495b4bfa531b9f9969fcf436751815e42859a |