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.1.tar.gz (127.0 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.1-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytboss-2026.8.1.tar.gz
  • Upload date:
  • Size: 127.0 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.1.tar.gz
Algorithm Hash digest
SHA256 df3ed0030c1b5cd3c6f1b540eace874a7c25dc2716694de087f67ba7ba677fc1
MD5 207ca15c78f7e39f9f1efd31e47f2484
BLAKE2b-256 b48f4036aba926b1f3945cc9a3e7872377eb31ba294606dfecdb69ada7cc2f4a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytboss-2026.8.1-py3-none-any.whl
  • Upload date:
  • Size: 38.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1df9de8a654b2734d062a565346914f5faa5cb67fef465b4477c7383ec8f53e2
MD5 b3f642c43729c3a13a5150244401e2f9
BLAKE2b-256 73bf1a0e37ff61e527dfa1effb910eb9c3421f205b4ff82db59ea13520781700

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

This release

2026.8.1 This release

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