Skip to content

Python 3 library for interacting with Pitboss grills and smokers

License

Notifications You must be signed in to change notification settings

dknowles2/pytboss

Repository files navigation

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

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


async def state_callback(data):
    print(data)


async def main():
    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:
        asyncio.sleep(0.1)


asyncio.run(main())

Installation

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.