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.2.tar.gz (126.7 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.2-py3-none-any.whl (35.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytboss-2026.8.2.tar.gz
  • Upload date:
  • Size: 126.7 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.2.tar.gz
Algorithm Hash digest
SHA256 f46a72a6dfb657cf6e62a70d2651b7382c38e05a1353c8bebcc9b9e8e0fcc663
MD5 f68ac4f325f1460228594060fd6870d5
BLAKE2b-256 08e826e1e7e3605f7f34a1a2cf20a39005e982853823445b2397926d219e5c7e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytboss-2026.8.2-py3-none-any.whl
  • Upload date:
  • Size: 35.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d8f15defb9591d6d8e7d91f84634826cd73ed37e84e3792a82cea6e420e0a16d
MD5 0848bec109ac4536db5200a9940aabd5
BLAKE2b-256 10950eb60f962706a8a533c86d9eb5af9918a27387092dea91c1275a6775891e

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

This release

2026.8.2 This release

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