Skip to main content

PyPI version

Bond Command Line Interface

EDIT: This project is in a beta state. We released it on the principle of release early & often. It is here just in case it benefits a member of the Bond Home community. Your mileage may vary!

Purpose

This tool exists to make it easy to manipulate a Bond from a command line, for use by:

  • Bond community
  • internal use in engineering and customer support

Installation

Install with

pip install bond-cli

Getting Started

Find Bonds on local network:

bond discover

Select a Bond and set the token so we can go deeper:

bond select <your Bond's ID or a prefix>

If your Bond's token is unlocked, select will retrieve and store it. Otherwise, you have a couple options. You can unlock the token yourself (a power cycle is the easiest way, it'll be unlocked for a period after a reboot), and run the following to automatically retrieve and store it:

bond token

Or, you can manually set the token, which you could find in the Bond Home app in the Bond's settings screen.

bond token <your Bond's token>

Now that you've selected a Bond and stored its token, you're ready to interact with it.

Check its firmware version:

bond version

Device Management

Create a template device:

bond devices create --name "Formidable Fan" --location "Bedroom" --template A1 --addr 101 --freq 300000 --bps 1000 --zero_gap 1234

You can then see the fan on your Bond Home app.

List existing devices:

bond devices list

Delete one or more devices:

bond devices delete <DEVICE1_ID> <DEVICE2_ID>

Device Groups

Create a device group:

bond groups create --name "All Shades" <BOND1_ID>:<DEVICE1_ID> <BOND2_ID>:<DEVICE1_ID> <BOND2_ID>:<DEVICE2_ID> 

List the existing device groups:

bond groups list

List the device groups on a single Bond (may not represent the whole group):

bond groups list --bond-id <BOND_ID>

Live Logging

You can also start a livelog:

bond livelog --level info

Upgrade Your Bond

You can upgrade your selected bond:

bond upgrade beta

Getting Help

Get more help with:

bond -h

or you can get help with any subcommand

bond select -h

Contributing

Bug reports and feature requests in the form of issues and pull requests are strongly encouraged!

To develop locally, you can clone the repository from github, remove the package if already present, then install it to pip in local editable mode:

git clone git@github.com:bondhome/bond-cli.git
cd bond-cli
pip uninstall bond-cli
pip install -e "."

Now all changes made in your local copy of bond-cli will be reflected in the bond executable.

Release Procedure

To make a release, bump the version number in setup.py on trunk, then make an annotated tag

git tag -a "v1.8.7"

with a version matching that in setup.py. You'll be prompted to write some release notes. Alternatively, use the Github repository's releases interface to create a release.

Upon pushing the tag or publishing the release, CI will deploy to PyPi.

Release files for bond-cli 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bond-cli 0.3.0
File Size Uploaded
bond-cli-0.3.0.tar.gz 19.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bond-cli 0.3.0
File Interpreter ABI Platform
bond_cli-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 49.3 kB

Release files / bond-cli-0.3.0.tar.gz

Download URL bond-cli-0.3.0.tar.gz
Size 19.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5106186e441f99a4c740f26f0329d5bff322d92fb286b3f587bb56d085010f0b
BLAKE2b-256 checksum
How to use checksums
01e24fe813572750bf75997a87c00eedcf173ef7b24ec75148d26bbc21c5fb44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / bond_cli-0.3.0-py3-none-any.whl

Download URL bond_cli-0.3.0-py3-none-any.whl
Size 29.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97be954b8d7165928dcf29ab3a6e043cc2e9af8a0fa3c2ce105fec0c01649b10
BLAKE2b-256 checksum
How to use checksums
173338702746cadf20b3db0adce7801b447d0a4daeed00ad8a532f6e509ef6f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.1

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release 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