Skip to main content

pytboss

Python 3 library for interacting with Pitboss grills and smokers.

Note that this project has no official relationship with Pitboss or Danson's. Use at your own risk.

Usage

pytboss supports two ways of talking to a grill: a direct Bluetooth LE connection, or a WebSocket connection to the PitBoss cloud service. Both use the same PitBoss API once connected — only the Transport passed to it differs.

Bluetooth LE

If you don't already know your grill's Bluetooth address, you can discover nearby devices with bleak:

import asyncio
from bleak import BleakScanner


async def discover():
    devices = await BleakScanner.discover()
    for device in devices:
        print(device.address, device.name)


asyncio.run(discover())

Once you have the address, connect and subscribe to state updates:

import asyncio
from bleak import BleakScanner
from pytboss import BleConnection, PitBoss


async def state_callback(data):
    print(data)


async def main():
    device_address = "AA:BB:CC:DD:EE:FF"  # Your grill's Bluetooth address.
    ble_device = await BleakScanner.find_device_by_address(device_address)
    model = "PBV4PS2"  # Or your model. See below.
    boss = PitBoss(BleConnection(ble_device), model)
    # Subscribe to updates from the smoker.
    await boss.subscribe_state(state_callback)
    await boss.start()
    while True:
        await asyncio.sleep(0.1)


asyncio.run(main())

WebSocket

The WebSocket transport talks to the PitBoss cloud service instead of connecting directly over Bluetooth, which is useful when the grill isn't in Bluetooth range. It requires the grill's unique identifier (grill_id), which you can find in the PitBoss mobile app or account settings; this library does not currently provide a way to look it up.

import asyncio
from pytboss import PitBoss, WebSocketConnection


async def state_callback(data):
    print(data)


async def main():
    grill_id = "your-grill-id"
    model = "PBV4PS2"  # Or your model. See below.
    boss = PitBoss(WebSocketConnection(grill_id), model)
    await boss.subscribe_state(state_callback)
    await boss.start()
    while True:
        await asyncio.sleep(0.1)


asyncio.run(main())

Error handling

Calls to the grill can fail for a number of reasons — the grill may be unreachable, the connection may drop, or an RPC may be rejected. These are all raised as subclasses of pytboss.exceptions.Error:

from pytboss.exceptions import Error, GrillUnavailable, InvalidGrill, NotConnectedError

try:
    boss = PitBoss(WebSocketConnection(grill_id), model)
    await boss.start()
except InvalidGrill:
    print(f"Unknown grill model: {model}")
except GrillUnavailable:
    print("Could not reach the grill.")
except NotConnectedError:
    print("Not connected to the grill.")
except Error as ex:
    print(f"Unexpected error: {ex}")

Installation

pytboss requires Python 3.12 or later.

Pip

To install pytboss, run this command in your terminal:

$ pip install pytboss

Source code

Pytboss is actively developed on Github, where the code is always available.

You can either clone the public repository:

$ git clone https://github.com/dknowles2/pytboss

Or download the latest tarball:

$ curl -OL https://github.com/dknowles2/pytboss/tarball/main

Once you have a copy of the source, you can embed it in your own Python package, or install it into your site-packages easily:

$ cd pytboss
$ python -m pip install .

Supported Models

The following models should be supported. Note however that only the PBV4PS2 model has been tested.

Development

To work on pytboss itself, install uv and sync the test dependencies (uv manages the Python 3.12+ interpreter and virtual environment for you):

$ uv sync --group test

Run the test suite, linter, and type checker:

$ uv run pytest
$ uv run ruff check .
$ uv run mypy .

pre-commit hooks are also available; sync the dev group and install them with:

$ uv sync --group dev
$ uv run pre-commit install

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytboss-2026.8.0.tar.gz (126.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytboss-2026.8.0-py3-none-any.whl (38.4 kB view details)

Uploaded Python 3

File details

Details for the file pytboss-2026.8.0.tar.gz.

File metadata

  • Download URL: pytboss-2026.8.0.tar.gz
  • Upload date:
  • Size: 126.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for pytboss-2026.8.0.tar.gz
Algorithm Hash digest
SHA256 bd4137570b3beb1143ec1da77302c17514b88f4a768309bf1100703efa04d87e
MD5 4e64d7cc6523e2ca688f645dcf4585fd
BLAKE2b-256 ff83c66910c7cde84d9db99f40f86618ef4582e27f5bc7f74940c77b9845b219

See more details on using hashes here.

File details

Details for the file pytboss-2026.8.0-py3-none-any.whl.

File metadata

  • Download URL: pytboss-2026.8.0-py3-none-any.whl
  • Upload date:
  • Size: 38.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for pytboss-2026.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b7dc743cca46bb95ea52e789a87273cb8c9f375d34fc972e757d439ab6a7954b
MD5 8e45bc922ff6bf20ccf9b4bc07a87a83
BLAKE2b-256 7f838392d91df050c8937784fbc35f817d24f5da2a34612dd99669f2906015e8

See more details on using hashes here.

Release history Release notifications | RSS feed

2026.8.6

2 files

2026.8.5

2 files

2026.8.4

2 files

2026.8.3

2 files

2026.8.2

2 files

2026.8.1

2 files

This release

2026.8.0 This release

2 files

2026.7.0

2 files

2025.12.0

2 files

2025.9.0

2 files

2025.7.0

2 files

2025.6.2

2 files

2025.6.1

2 files

2025.6.0

2 files

2025.1.0

2 files

2024.12.2

2 files

2024.12.1

2 files

2024.10.2

2 files

2024.10.1

2 files

2024.10.0

2 files

2024.6.1

2 files

2024.6.0

2 files

2024.4.0

2 files

2024.2.1

2 files

2024.2.0

2 files

2024.1.0

2 files

2023.11.0

2 files

2023.9.1

2 files

2023.9.0

2 files

2023.6.1

2 files

2023.6.0

2 files

2023.5.0

2 files

2023.4.2

2 files

2023.4.1

2 files

2023.4.0

2 files

2023.3.3

2 files

2023.3.2

2 files

2023.3.1

2 files

2023.3.0

2 files

2023.2.1

2 files

2023.2.0

2 files

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