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.4.tar.gz (142.4 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.4-py3-none-any.whl (52.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytboss-2026.8.4.tar.gz
  • Upload date:
  • Size: 142.4 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.4.tar.gz
Algorithm Hash digest
SHA256 1b2d056a543f65b8e9209adfc8a690731274584884536aab70f9300f566d0318
MD5 d354ae750ae6cfce667e9a08dc488e29
BLAKE2b-256 3f8b804327958c7471ee2f55652ef0f487bbf5d2138bb65869cf39eb1dd0af22

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytboss-2026.8.4-py3-none-any.whl
  • Upload date:
  • Size: 52.5 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9dea0cddd64e41e3c768af38a97db72ed87132395cb482429ea79c94f7527e47
MD5 38c5af017423c65354243119442504e9
BLAKE2b-256 208dd16ea25e7e5421af02771abefc3c6567d07de5e402af4383c42593d36733

See more details on using hashes here.

Release history Release notifications | RSS feed

2026.8.6

2 files

2026.8.5

2 files

This release

2026.8.4 This release

2 files

2026.8.3

2 files

2026.8.2

2 files

2026.8.1

2 files

2026.8.0

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