Bond Local API (v3.0.0)

Download OpenAPI specification:Download

Introduction

Scope

The Bond V2 API allows control of Ceiling Fans, Fireplaces, and other Bond devices. It is intended for integration with offline control systems, for use by advanced users, hobbiests, integrators, and installers.

For the purposes of device control, it does not matter whether these devices are remote-controlled devices that Work with Bond (connected via a Bond Bridge) or smart devices that are Smart by Bond.

This documentation describes the Local HTTP API for Bond products running v2 firmware. This API does not require an internet connection, but does require that the API client be able to directly communicate with the Bond over HTTP. Typically this means being on the same Wi-Fi network. We are still working on a Cloud API, which will be very similar to the Local API.

Contributing

We welcome your corrections and improvements to this documentation! You can find the source code for the documentation at the link below. Feel free to open a PR.

https://github.com/bondhome/api-v2

Security

The Bond Local API uses unencrypted HTTP using a simple token-based authentication mechanism.

Why HTTP and not HTTPS?

After speaking with many users interested in Local API, we discovered that users were satisfied with the protection provided by their Wi-Fi network's password, and that it is more important to provide easy and low-latency control of Bond devices than to provide security against other devices and users on the Wi-Fi network.

Furthermore, it can be challenging for an API client to use HTTPS securely. In order to protect against malicious devices or users inside your Wi-Fi network, it would be necessary for an HTTPS API client to check the validity of the Bond's HTTPS certificate against an Olibra Certificate Authority. The web standard of using domain-based certificate chain-of-trust does not work when offline, because the Bond does not have a domain name, being a device on your local network rather than on the public internet. As a consequence, an HTTPS API would not work from many webbrowsers due to the certificate being untrusted.

That said, if you have untrusted users or devices on your Wi-Fi network, we recommend placing Bond on a seperate home automation network to which the untrusted users do not have the password.

Security on the Internet

Rest assured that when Bond products communicate with Bond Cloud (which is needed for integration and voice control support), we use industry-standard secure TLS connections, secured with per-unit public key cryptography. There is no unencrypted communication between Bond hardware and Bond Cloud.

Please be sure to always use Bond behind a firewall, and do not set up port-forwarding to the Bond Local API, to ensure that unsecured communications do not take place over the public internet.

Firmware Versions

To get the optimal match between this documentation and your Bond's exposed API, we recommend you update your Bond to the most recent firmware available. In situations where part of this API is only available on Beta firmware, we will try to make this clear. To use such a feature, you'll need to upgrade your firmware with a Beta app. You can sign up to receive Beta apps through one of the links in this post, and we will typically post about Beta features in the Beta category of the forums

Getting Started

Finding the Bond IP

First, power on a Bond device and connect it to your Wi-Fi network. Use the Bond app to confirm that the Bond's firmware is at least version v2.

The newest versions of the Bond Home app (starting in v2.15) have the Bond's IP address in the Bond's "Network Info" screen. Tapping it will copy it to your clipboard. If ping is more convenient for you, please refer to the instructions below.

From your PC connected to the same network, try pinging the Bond. For example, if your Bond ID is ZZBL12345, you can ping it by running the following command in a terminal:

ping BB18038.local

You should see the IP address printed, along with reply messages. Press Ctrl-C to exit the ping program:

PING bb18038.local (192.100.0.61): 56 data bytes
64 bytes from 192.100.0.61: icmp_seq=0 ttl=64 time=96.800 ms
64 bytes from 192.100.0.61: icmp_seq=1 ttl=64 time=34.902 ms
64 bytes from 192.100.0.61: icmp_seq=2 ttl=64 time=4.226 ms
^C
--- bb18038.local ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 4.226/45.309/96.800/38.503 ms

You can see the IP address of this Bond is 192.100.0.61.

Note that the lookup from Bond ID to IP address is performed using mDNS. You will need to make sure that mDNS is installed and enabled on your system (this is the default for most Linux distros and on MacOS).

You can search for all Bonds on your local network. On Linux, do:

avahi-browse -a | grep bond

And on MacOS, do:

dns-sd -B _bond._tcp .

In both cases, you will see a list of Bonds on your Wi-Fi network and their IP addresses.

[Added in v2.18.2] If you want to check for firmware version and discoverability of the Bond without connecting to it, you may look into the text properties of the _bond._tcp mDNS service:

dns-sd -Z _bond._tcp .

You should see a line like this in the reply:

ZPEA77090._bond._tcp TXT "v=v2.18.0-2-gf4ddfba8-dirty-merck-discoverability" "d=0"

Check Bond Version

Next, let's check the Bond's firmware version. To do this, we will use a command-line utility called cURL. cURL is installed by default on MacOS and most Linux distributions.

To check the firmware version, run this command:

curl -i http://192.100.0.61/v2/sys/version

The flag -i means "display header information". You should see output similar to this:

HTTP/1.1 200 OK
Content-Length: 243
Content-Type: application/json; charset=utf-8

{"target":"snowbird","fw_ver":"v2.5.2","fw_date":"Fri Feb 22 14:13:25 -03 2019","make":"Olibra LLC","model":"model","branding_profile":"O_SNOWBIRD","uptime_s":380,"_":"c342ae74"}

Where, we see the firmware version is v2.5.2.

Getting the Bond Token

Note that no token is required for the version endpoint, but other endpoints will require token-based authentication.

The Bond Home app has the Bond's token in the Bond's "Settings" screen. Tapping it will copy it to your clipboard. If curl is more convenient for you, please refer to the instructions below.

To get the token, follow this procedure:

Power cycle the Bond, and then within 10 minutes, access the token endpoint as follows:

  curl -i http://192.100.0.61/v2/token

You should see a return body containing token such as this:

{locked":0,"pin_attempts_left":10,"token":"f074b61f628018fd","nonce":"0000000000000000","v1_nonce":"0000000000000000","account_code":"","v1_email":"","_":"c9bb9590"}

Copy the token and use it with a BOND-Token header in subsequent requests.

Alternatively, the token may be provided by setting the _token field within the request body. [Since v2.6.23]

Get Device Information

To get a list of devices on the Bond, do:

curl -H "BOND-Token: f074b61f628018fd" -i http://192.100.0.61/v2/devices

Or, to use the embedded token technique:

curl -i http://192.100.0.61/v2/devices -X GET -d "{\"_token\": \"f074b61f628018fd\"}"

You will get a list of devices such as this:

{"_":"f7e407f1","79135791":{"_":"599b0fc5"}}

Here we see there is one device with id 79135791.

We can request the device details by doing:

curl -H "BOND-Token: f074b61f628018fd" -i http://192.100.0.61/v2/devices/79135791

And we can see the device name, location, and available Actions:

{"name":"Magic Fan","type":"CF","actions":["TurnOn","TurnOff","SetSpeed","IncreaseSpeed","DecreaseSpeed"],"location":"Dungeon","_":"599b0fc5","commands":{"_":"be8e1896"}}

Set the Fan Speed

Finally, let's try setting the fan's speed:

curl -H "BOND-Token: f074b61f628018fd" -i http://192.100.0.61/v2/devices/79135791/actions/SetSpeed -X PUT -d "{\"argument\": 3}"

API Concepts

64-bit Keys

As of v3.0.0 firmware, Bond products have moved to 64-bit keys as resource identifiers, instead of the previous 32-bit keys. So, rather than a device being identified by an 8-digit hex string, the ids for newly created devices will be 16-digit hex strings.

In an effort to minimize distruption to API clients, already created resources (devices, commands, skeds, etc.) will continue to be represented using the same exact string on the API. Additional leading zeros will not be added. So, for example, a device with id 01abcdef will continue to enumerate as 01abcdef in v2.22. The Bond API is however libral in what it accepts, removing leading zeros. So any of the following received ids will be understood to point to this device: 1abcdef, 01abcdef, 0000000001abcdef.

Internally, the Bond API uses this rule:

If the upper 32-bits of an ID are zero, then send as 8 hex digits (32-bit). Otherwise, send as 16 hex digits (64-bit).

Hash Tree

The Bond API is organized as a tree of endpoints, starting at the root. Here's an incomplete example:

- v2
  - devices
    - 00000001
      - commands
      - state
    - 00000002
      - commands
      - state
    - 00000003
      - commands
      - state
  - sys
    - network

Clearly, if the entire tree were expanded on a request of the root, then the resulting request may be very large! This large response body would cause several problems, including taking a long time to transmit over slow networks, taking time to generate, and being too large to be effectively transmitted over the message-based protocol MQTT.

Therefore, Bond only returns a single level of the tree on every request.

Each node of the tree has a 32-bit "hash" value which is changed whenever that node, or any of the child nodes, are modified. This hash is provided in every reply body as the "_" object.

When a requested endpoint has children that are not expanded, the child values are replaced with just the child hashes.

For example, when requesting the devices endpoint, you may receive the following response:

{"_":"f7e407f1","79135791":{"_":"599b0fc5"}}

Let's break this down:

  • "_":"f7e407f1" : This is the hash value of the devices object. If any devices are added, modified, or deleted, this hash will change.

  • "79135791" : This is the device id of the one device on this Bond.

  • {"_":"599b0fc5"} : This is the hash object representing device with id 79135791.

If the API client wants to get the name of the device, it is necessary to make a seperate request on the device itself: GET devices/79135791, which would return the name and location directly associated with the device, as well as hash objects for the child nodes of device: commands and state.

Local Hash vs Subtree Hash

The _ hashes discussed above are designed to allow a client to quickly discover changes to a Bond's state. As we've shown, this requires the hash at a particular endpoint to incorporate not only that endpoint's state but also the state of all the children. However, it is sometimes desireable to have a hash of just the data local to that endpoint, that is, data not contained within a child.

[As of v3 firmware] we introduce a new __ (double underscore) field called a "local hash". This is intended to be used by the Bond Cloud and Bond Apps specifically for downwards synchronization as required for the Groups and Scenes features.

Most integrators can safely ignore the local hashes.

Request ID

The purpose of the Request ID is to allow a client to retry a non-idempotent request (PUT, POST, PATCH, or DELETE) without risk of Bond taking the same action twice.

If you need to implement a retry mechanism in your integration, please contact the Bond Engineering Team via the Bond Forums https://forum.bondhome.io/

Request Flags

Each request may contain a number of request flags, which can be specified on HTTP via the Bond-Flags header (or via the f field for BPUP and MQTT transports). These flags are not needed in most integrations, but are used by Bond Home app and some partner integrations to facilitate debugging at scale.

Flags are:

  • bit 0: (reserved)
  • bit 1: DOWNSYNC: request is part of downward synchronization
  • bit 2: UP: request is moving away from Bond
  • bit 3: DUP: request is retransmitted or cached reply
  • bit 4: UCAST: (internal use)
  • bit 5: QUIET: (internal use)
  • bit 6: BCAST: (internal use)
  • bit 7: PASSTHRU: (internal use)

Modified Times

Certain endpoints may track their last modified time in a special __modified field. The modified time is an integer representing the time in seconds since the Unix epoch when the endpoint was last modified.

Currently the endpoints exposing __modified are:

groups/{}
groups/{}/skeds
groups/{}/skeds/{}
scenes/{}
scenes/{}/skeds
scenes/{}/skeds/{}

The modified times are set using the request time as specified in the BOND-Unixtime HTTP header (or u flag on BPUP and MQTT). Example:

BOND-Unixtime: 1643114517

{ ..., "u":"1643114517", ... }

Clients who may modify any shard endpoints should specify this header on all reqeusts. If this "unixtime" field is not provided, the Bond will use its internal real-time clock, if already set.

Conversely, if the Bond's internal clock is not yet set, it will use the timestamp specified in this field as the internal time. For this reason, only use the BOND-Unixtime header on systems with accurate clocks, such as smart phones. Incorrectly set times may result in shard synchronization issues and skeds running unexpectedly.

Groups and Scenes

Bond Home V3 introduces Groups and Scenes as major new features. In designing these features, we needed to meet several requirements requested by the Bond community:

  1. Groups and Scenes must work offline. A loss of internet connection must not interfere with control and feedback, and should not prevent creation and management, when the Bond Home app is on the same local network as the devices in question.
  2. Smart by Bond devices can be grouped or added to a Scene with no Bond Bridge required as a hub.
  3. Groups and Scenes must be resiliant to any individual Bond units going offline. That is, there must not be a central controller as a single point of failure. If only a subset of the Group or Scene devices are online, then they should still execute action requests.
  4. Intuitive UI in the Bond Home app for creating, managing, and controling Groups and Scenes. The user should be blissfully unaware of any lower-level complexities.

In order to achieve the above, we chose a design where a Group or Scene object is distributed among the participating Bond units. The Group or Scene endpoint data that lives on a single Bond is called a shard. Each Bond unit acts as if it were the only participant in the Group or Scene, using only the data in its own shard, with no communication among Bond units.

The API client is responsible for managing the various shards. The most difficult aspects of this---involving correction of inconsistent data between Bonds---is handled by the Bond Home apps. However, some complexity does remain for integrators who need to send multiple requests to control a Group and must merge the data returned by those requests to present a sensible interface to the control system and ultimately the user.

We will here discuss:

  • discovery, control, and feedback (for all API clients)
  • management (for Bond Home app)

The following discussion is in terms of Groups but should be understood as also applying to Scenes unless otherwise specified.

Discovery

To discover the Groups available on a Bond network, the client should first query the groups/ enumeration to get the group IDs in which each Bond participates. The union of the Group IDs gives the list of Groups on the network.

For example:

ZZBL12345:groups = {
  "0000000000000001":{...},
  "0000000000000002":{...},
  "0000000000000003":{...}
}

KSMJWCE12345:groups = {
  "0000000000000002":{...},
  "0000000000000004":{...}
}

There are a total of 4 groups on the network:

"0000000000000001"
"0000000000000002"
"0000000000000003"
"0000000000000004"

In this example, the Bond Bridge (ZZ...) participates in three groups with IDs 1, 2, and 3, while a Smart by Bond fan (K...) participates in groups 2 and 4.

Next, the client should query each of the group shard endpoints group/{}. The list of devices participating in the group is the union of the devices in the group shards.

For example, if the result of querying the groups/{} endpoint for the group with ID 2 is:

ZZBL12345:groups/0000000000000002 = {
  "__modified": 1642788966,
  "name": "Great Room Fans",
  "types": ["CF"],
  "locations": ["Great Room"],
  "devices": ["aabbccdd", "11223344"],
  "actions": ["TurnOn", "TurnOff"]
}

KSMJWCE12345:groups/0000000000000002 = {
  "__modified": 1642788968,
  "name": "Great Room Fans",
  "types": ["CF"],
  "locations": ["Great Room"],
  "devices": ["1"]
  "actions": ["TurnOn", "TurnOff", "TurnLightOn", "TurnLightOff"]
}

Then the API client concludes that the group named "Great Room Fans" contains three devices:

ZZBL12345:aabbccdd
ZZBL12345:11223344
KSMJWCE12345:1

In the case of a disagreement of the name between shards, the client should use the name from the group shard with the most recent modified time (__modified). If there is a tie for modified time, the client may choose arbitrarily among the shards.

The type of the group is indicated by the types array, which is typically only of length one. In this case we see it is CF for Ceiling Fan.

Control

Determining Available Actions

The actions available on a group is the intersection of the actions available on the group shards. So, using the example from the previous section, although the group shard on the Smart by Bond fan (serial number K...) supports TurnLightOn and TurnLightOff actions, the shard on the Bond Bridge does not. So the intersection of the actions arrays is just:

["TurnOn", "TurnOff"]

Executing a Group Action

To execute an action on the group, the client should send PUT requests to the actions on each group shard. So, to turn on the Great Room Fans group, the client would send two requests using the same Group ID:

PUT http://ZZBL12345/v2/groups/0000000000000001/actions/TurnOn
PUT http://KSMJWCE12345/v2/groups/0000000000000001/actions/TurnOn

Preferably these requests should be run concurrently so that the time required to process the first request does not delay the execution of the action on the second shard.

Success, Error, and Timeout

If all requests complete successfully, then the group action can be considered a success. If any errors or timeouts occur, then an error should be reported to the user.

State Feedback

Whenever a group changes state, a state update is sent for the group shards and all member devices. Whenever a device state changes, a state update is sent for that devices plus an update for the state of any groups which contain that device.

Group shards report state under groups/{}/state. The schema of this endpoint is similar to that of devices/{}/state, except that state variables on a group can take the value null when the member devices disagree, as discussed below in the documentation for this endpoint. Although the Bond Bridge will combine the states of the member devices into a single state for the group shard, it is the responsibility of the API client to merge the states of each group shard to obtain an overall state for the group.

For example, suppose the client receives the following state updates:

ZZBL12345:groups/0000000000000001/state = {
  "power": 1,
}

KSMJWCE12345:groups/0000000000000001/state = {
  "power": 1,
  "light": 0
}

The client would intersect the state keys to remove any state variables not shared by all shards, and then set the values to either null if there is disagreement between shards, or to the common value. In this case the client would conclude the group state to be:

{"power": 1}

If now one of the member devices, say the Smart by Bond fan, is turned off, then the client would receive a state update for the device and group:

KSMJWCE12345:devices/1/state = {
  "power": 0,
  "light": 0
}

KSMJWCE12345:groups/0000000000000001/state = {
  "power": 0,
  "light": 0
}

The client would now combine the two group shard states to conclude:

{"power": null}

That is, that the power state of the group is indeterminate. On a UI with seperate ON/OFF buttons, this would usually be represented by highlighting neither button.

Management

Group Creation

To create a new group, the client should send requests to each of the participating Bonds with the list of devices to include. Crucially, all shards must have the same group ID so that they will be understood as a single group by other clients. The preferred way to accomplish this is to allow the Bond to generate a random ID for the first shard, and then to specify that ID in the _post_id field during the subsequent POST requests to the other Bonds.

For example, suppose we want to add 3 Smart by Bond lights to a group called "Kitchen Lights". The requests and responses might go like this:

> POST http://TWCTBXX00001/v2/groups {"name": "Kitchen Lights", "devices": [1]}
< 201 OK {"_post_id": "0000000000000001"}

> POST http://TWCTBXX00002/v2/groups {"_post_id": "0000000000000001", "name": "Kitchen Lights", "devices": [1]}
< 201 OK {"_post_id": "0000000000000001"}

> POST http://TWCTBXX00003/v2/groups {"_post_id": "0000000000000001", "name": "Kitchen Lights", "devices": [1]}
< 201 OK {"_post_id": "0000000000000001"}

The last two requests could be parallelized.

Alternatively the client could pre-generate the ID and parallelize all three requests. However, the client MUST be sure to use a good random number generator and generate a 64-bit (16-nibble) hex string in lower-case with leading zeros.

Group Deletion

To delete a group, the client should send a DELETE request to each of the shards. If one of the Bonds is offline, then the group will only be partially deleted. The user must bring that Bond back online in order to finish deleting the group. In the meantime, the group will still exist containing just the devices on the offline Bond.

Removing Device from Group

Devices may be removed from the Group via DELETE groups/{}/devices/{}. When the last device is removed from a group, the shard containing that device will disappear (an implicit deletion).

Changing Group Name

To change the name of a group, the client should send a PATCH request to each of the shards. The name can be changed as long as there is at least one online Bond participating in the group. If any Bonds are offline, their group/{} endpoints will still have the old name. However, this does not pose a problem for API clients because the name should be taken from the group shard with the most recent __modified field.

The Bond Home app performs a special downward synchronization whereby out-of-date group shard names are updated with the latest. That is, when Bonds previously offline come back online, they are PATCHed with the name of the most recent shard in the group. Other API clients do not need to perform this downward sync function.

Skeds

Schedules on groups and scenes need to be installed into each shard, and the Bond Home app performs downward synchronization on the skeds.

Sked Creation

Similar to group creation, Bond Home app creates the sked on each shard using the same 64-bit ID for that sked on each shard. The sked ID must be different than the group ID. Example:

> POST http://TWCTBXX00001/v2/groups/0000000000000001/skeds {"action":"SetBrightness", "argument":75, "mark":"sunrise", "seconds":0}
< 201 OK {"_post_id": "0000000000000007"}

> POST http://TWCTBXX00002/v2/groups/0000000000000001/skeds {"_post_id": "0000000000000007", "action":"SetBrightness", "argument":75, "mark":"sunrise", "seconds":0}
< 201 OK {"_post_id": "0000000000000007"}

> POST http://TWCTBXX00003/v2/groups/0000000000000001/skeds {"_post_id": "0000000000000007", "action":"SetBrightness", "argument":75, "mark":"sunrise", "seconds":0}
< 201 OK {"_post_id": "0000000000000007"}

The last two requests could be parallelized.

Sked Modification

Similar to changing the name of a group, the client can modify the sked settings by broadcasting a PATCH to the sked on each group shards.

Here, in the event that a Bond is offline, the sked will continue being executed with the outdated parameters until the Bond Home app performs downward synchronization to update that sked.

Sked Deletion

Deleting a group or scene sked is as simple as sending DELETE to the sked on each shard.

In the event of one or more Bonds being offline, they will continue to execute the sked until the Bond Home app syncs with them and removes the sked which was supposed to be deleted. The Bond Home app knows that a sked was deleted by checking the __modified timestamp on the group shard skeds enumeration groups/{}/skeds. If a sked is present on an older enumeration but absent on a newer one, it will be removed from the old enumeration. Similarly, if a sked is present on the newer enumeration but absent on the old one, then the Bond Home app will downwards-synchronize by POSTing the missing sked.

Bond Push UDP Protocol (BPUP)

CAVEAT: BPUP is currently in Beta status. Breaking changes may occur to this API as we collect community feedback.

A common problem in writing drivers to support Bond devices is a need to update the client whenever device state changes. With the HTTP API, this implies inefficient polling. So we've added support for "Bond Push", a UDP-based API for low-latency control and feedback within the local network.

A client initiates a connection by opening a UDP socket to the Bond on port 30007 and sending a Keep-Alive datagram, which is just a single newline character. This subscribes the client to state updates from devices. Equivalent to the regex devices/.*/state.

The Bond will acknowledge the subscription by immediately replying with the Bond ID:

{"B":"ZZBL12345"}\n

The client should continue to send the Keep-Alive datagram on the same socket every 60 seconds to keep the connection active. If no Keep-Alive datagram is received after 125 seconds, Bond will stop sending feedback to the client.

A future update will allow subscribing to a different topic pattern.

The Bond will send to all active clients Update datagrams consisting of a JSON object terminated by a newline character. Here's an example Update datagram:

{"B":"ZZBL12345","d":0,"v":"v2.18.2","t":"devices/aabbccdd/state","i":"00112233bbeeeeff","s":200,"m":0,"f":255,"b":{"_":"ab9284ef","power":1,"speed":2}}\n

Breaking down the fields:

  • B: the Bond ID
  • d: discoverability (0=not discoverable, 1=setup mode, 2=sos mode) [new in v2.18.2]
  • v: firmware version [new in v2.18.2]
  • t: topic (the path from HTTP URL)
  • i: request ID
  • s: HTTP status code
  • m: HTTP method (0=GET, 1=POST, 2=PUT, 3=DELETE, 4=PATCH)
  • f: flags (Olibra-internal use)
  • x: source transport (transport from which the request was received. Can be: "http", "mqtt", "bond" (gratuitous reply), "cli" (serial terminal), with other values reserved for future use) [Since v2.12.1]
  • b: HTTP response body

There's also some client-specific error messages,

{"B":"ZZBL12345","err_id":631,"err_msg":"BPUP client timeout"}\n

For feature requests and concerns, please contact the Bond Engineering Team via the Bond Forums https://forum.bondhome.io/

MQTT

IMPORTANT NOTE: MQTT redirection is implemented, but is currently untested. It may not work at all. If you have a use case for this API, please let us know on the forums so that we can better prioritize implementing and testing this API.

You can configure your Bond to communicate with a custom MQTT broker through the api/mqtt endpoint.

When the Bond connects to its configured MQTT broker, it subscribes to the topic v2/<Bond ID>/down/#, where # is a wildcard. It publishes messages to v2/<Bond ID>/up/<subtopic>, where the subtopic is that indicated in this documentation less the v2/ prefix.

A concrete example: requesting devices from the Bond.

The equivalent to HTTP GET v2/devices from a Bond with ID ZZBL12345 is publishing a message to v2/ZZBL12345/down/devices with the payload {"m": 0} (since the default for "m" (HTTP method) is 0 (GET), this payload could also just be {})

The Bond, if it had a single device with id 12345678, would then publish to v2/ZZBL12345/up/devices with the payload

{"B": "ZZBL12345", "d": 2, "v": "v2.18.2", "t": "devices", "m": 0, "i": <randomly-generated request ID>, "s": 200, "f": 255, "b" {"_": <devices hash>, "12345678": {"_": <12345678's hash>}}}

Breaking down the fields:

  • B: the Bond ID
  • d: discoverability (0=not discoverable, 1=setup mode, 2=sos mode) [new in v2.18.2]
  • v: firmware version [new in v2.18.2]
  • t: subtopic (the path from HTTP URL, without the v2/ prefix)
  • i: request ID
  • s: HTTP status code
  • m: HTTP method (0=GET, 1=POST, 2=PUT, 3=DELETE, 4=PATCH)
  • f: flags (Olibra-internal use)
  • b: HTTP response body

(Note: the first two fields are redundant, they could be extracted from the MQTT topic)

The MQTT broker to which the Bond is connected is treated as trusted, so token authentication is not necessary. Make sure you check the server certificate using the appropriate fields in the api/mqtt endpoint to avoid man-in-the-middle attacks.

HomeKit

[Added in v3.5.1] The HomeKit integration is available on Bond Bridge Pro and support Shade devices. The integration is disabled by default, but you can enable/disable it through the Bond Home iOS app or the api/bhk endpoint.

Setup Code

The Setup Code is generated based on your Bond PIN (your Bond PIN two times). The Bond PIN is located on the product label. The Setup Code is also available on the Bond Home iOS app.

Setup Code example

For Bond PIN "1234", your HomeKit Setup Code is "12341234".

Bond Home iOS app

Added in v2.40.2, the HomeKit info is available in both the Bond Settings screen and the Manage Integrations screen.

In the Bond Settings screen, the HomeKit info is presented under the Advanced Settings section.

In the Manage Integrations screen you should see the HomeKit listed if at least one of your Bonds supports it. The HomeKit cell shows how many Bonds have the HomeKit integration enabled (not available) at the moment. Tapping on the cell will take you to the HomeKit List screen, showing the HomeKit info for every Bond that supports it.

The HomeKit info consists of a toggle switch to enable/disable the feature and shows its Setup Code.

Add a Bridge in the Home app

Open the Home app on your iPhone/iPad and follow these steps:

  • Tap on "Add Accessory"
  • Choose the "I Don't Have a Code or Cannot Scan" option
  • Tap on your Bond Bridge name in the list of Nearby Accessories
  • Select the "Add Anyway" option for the "Uncertified Accessory" prompt
  • Enter yours Bond Bridge Setup code and hit Continue
  • Set the Location and Name for your Bridge
  • Set the location and Name for your Bridge's devices, if any

Discoverability

Bonds may be discovered via either mDNS or BPUP. A Bond on the network will reply to queries regardless of its discoverability. However, clients (especially the Bond Home app) need to know if the device should be shown in the list of devices available for setup, or whether it is functioning normally and should be ignored. (This is a usability rather than a security consideration.)

To this end, we have added [in v2.18.2] a discoverability flag in the mDNS, BPUP, and even MQTT replies, with the following possible values:

  • 0 = not discoverable: Bond is on an account and functioning normally. Should not appear in any list of Bonds ready to set up.

  • 1 = setup mode: Bond is not on an account. This is either a new unit, or a unit that has had a GREEN or WHITE reset performed. The unit's light ring will be either Solid Green (ready on Ethernet) or Flashing Green (ready on Wi-Fi).

  • 2 = SOS mode: the Bond is on an account, however there is either a cloud connection problem, or for Smart by Bond devices where the user has held down the Power button to re-enable discoverability. In this case, the light ring (if present) will indicate an error, and the Config AP will be opened. SOS mode is automatically exited if the cloud connection is restored.

Glossary

Bond Bridge

The Bond Bridge, also referred to simply as "Bond", connects RF- and IR-controlled devices to Wi-Fi. Learn more at https://bondhome.io/product/.

Smart by Bond

A "Smart by Bond" appliance is a smart appliance that uses the API described here, other than those parts designated as "Bridge Only".

Device

Within the Bond ecosystem, the term "device" always refers to a home appliance connected to Bond. A Bond Bridge is not itself a device.

Feature

Bond devices support one or more "features", such as Speed or Brightness, which come with a set of Actions, State Variables, and Properties that define and control some aspect of the device.

For example, a device which supports the Light feature will always have actions for TurnLightOn, TurnLightOff, and ToggleLight. Furthermore, it will always have the light state variable.

See the Features section below for detail on all supported features.

Action

Devices are controlled by calling "actions" such as SetSpeed or TurnOff.

Some actions require an "argument" to be included. For example, SetSpeed requires an integer argument with the speed number to set.

Actions represent a user's intent, but do not nessisarly map one-to-one onto the commands that are sent to a device. Actions abstract away the complexity of the underlying commands needed to achieve the desired change in state of a device.

Commands

Bond Bridges operate by translating actions into "commands". While actions are in a user's language, commands are in the device's remote control's language. Often there is a one-to-one mapping from actions to commands, for example, most ceiling fans have distinct RF commands for each speed. So the action "SetSpeed(3)" is always translated into the same RF signal that tells the device to go to the third speed.

However, sometimes a device does not have a single command which always accomplishes a specific action. For example, most ceiling fans do not have a specific command corresponding to the TurnOn action, but rather, Bond remembers the previous speed that the fan was set to, and uses a particular SetSpeed command to accompish the TurnOn action. On the other hand, certain ceiling fans do have a specific TurnOn command. In that case the TurnOn action will always map to the TurnOn command. This results in the correct speed being restored even if the factory remote control was used.

Signal

The term "signal" refers to the actual RF or IR transmission sent to the remote-controlled device to accomplish a particular command.

Every command should have exactly one corresponding signal. However, the Bond Bridge supports a number of signal endpoints which allow manipulation of signals directly, such as signal/scan to receive signals, or signal/tx to transmit a signal without association to a device.

State Variable

The Bond Bridge makes an effort to track the state of devices, and this state is represented by a set of "state variables", such as speed and brightness.

Speed variables cannot be set directly, but rather are manipulated indirectly through actions. For example, the SetSpeed action with an argument of 3 has the side-effect of setting the speed state variable to 3 and the power variable to 1.

Properties

Some device Features have a "Property" which parameterizes the devices capabilities. For example, multi-speed ceiling fans supporting the Speed feature will always have a max_speed property which gives the maximum speed which the speed state variable may take.

Some properties are read-only, others are PATCH-able.

Feature Toggles

Properties starting with feature_ are called feature toggles, and always default to true. When a feature toggle is set to false, the corresponding feature is disabled along with all dependent features, leaving only the top-level feature toggle.

For example, on a device with Light, UpDownLight, Brightness, and UpDownLightBrightness features, setting feature_light to false will cause all properties, state variables, and actions for all four of these features to be removed from the API, including the feature toggles feature_brightness and feature_up_down_light. Only feature_light will remain.

The intended use of feature toggles is in the Bond Home application's device settings screen, wherein the currently visible feature toggles should correspond exactly to toggle switches. Furthermore, the client need not have any feature-specific code for this: the order of feature toggles in the properties JSON object may be used as the UI display order, and the display names may be programmatically derived from the property names, e.g. feature_up_down_light displayed as "Up Down Light".

Feature toggles are only available for some features, and are currently only available for Smart by Bond devices.

Features

Devices have a combination of actions, state variables, and fixed properties. In order to understand how these relate to each other, it is helpful to organize actions into features and study one feature at a time.

Power

The Power feature controls the basic on/off state of a device.

For Ceiling Fans, it refers to the state of the fan motor. Note that most ceiling fans have lights which are not governed by the Power feature.

For Fireplaces, it refers to the state of the flame. Note that many fireplaces have separate light or fan functions, which are not governed by the Power feature.

Properties

(none)

State Variables

  • power: (integer) 1 = on, 0 = off

Actions

  • TurnOn(): Turn device power on.
  • TurnOff(): Turn device power off.
  • TogglePower(): Change device power from on to off, or off to on.

Timer

The Timer feature allows turning off a device after a specified delay, similar to the dial timer interface on toaster ovens.

The Timer feature requires the Power feature.

Properties

(none)

State Variables

  • timer: (integer) seconds remaining on timer, or 0 meaning no timer running

Actions

  • SetTimer(s): Start timer for s seconds. If power if off, device is implicitly turned on. If argument is zero, the timer is canceled without turning off the device.

NOTE: The timer is canceled implicitly by any action on the Power, Speed, or Breeze features, other than TurnOn. For example, if a timer is running, and the user turns off the device and then turns it back on, the timer will be canceled and therefore the device will not turn off again unexpectedly. The intention that a timer is designed to help reduce energy consumption, but should never surprise the user who forgot that they enabled the timer function earlier. When the timer reaches zero it runs TurnOff, so it will turn off the device whether it is set at a specific speed or it is set to breeze.

Speed

The Speed feature is used by multiple-speed Ceiling Fans to track the motor speed.

The Speed feature requires the Power feature.

Note that while many Fireplaces have a built-in fan, they do not use the Speed feature. See FpFan feature.

Properties

  • max_speed: (integer, read-only) highest speed available

State Variables

  • speed: (integer) value from 1 to max_speed. If power=0, speed represents the last speed setting and the speed to which the device resumes when user asks to turn on.

Actions

  • SetSpeed(speed): Set speed and turn on. If speed>max_speed, max_speed is assumed. If the fan is off, implicitly turn on the power. Setting speed to zero or a negative value is ignored.
  • IncreaseSpeed(speeds): Increase speed of fan by specified number of speeds. If the fan is off, implicitly turn on the power.
  • DecreaseSpeed(speeds): Decrease fan speed by specified number of speeds. If attempting to decrease fan speed below 1, the fan will remain at speed 1. That is, power will not be implicitly turned off. If the power is already off, DecreaseSpeed is ignored.

NOTE: When the device is turned off, the previous speed is remembered. When the fan is then turned back on, it will resume at the previous speed.

Breeze

The Breeze feature of many multi-speed Ceiling Fans provides a randomized breeze.

Breeze works by pseudorandomly changing the power and speed of the fan over time to create a natural breeze effect. There are two parameters of the breeze which may be adjusted to provide the desired breeze effect.

The Breeze feature requires the Speed feature.

Properties

(none)

State Variables

  • breeze: (array) array of the form [ <mode>, <mean>, <var> ]:
    • mode: (integer) 0 = breeze mode disabled, 1 = breeze mode enabled
    • mean: (integer) sets the average speed. 0 = minimum average speed (calm), 100 = maximum average speed (storm)
    • var: (integer) sets the variability of the speed. 0 = minimum variation (steady), 100 = maximum variation (gusty)

Actions

  • BreezeOn(): Enable breeze with remembered parameters. Defaults to [50,50].
  • BreezeOff(): Stop breeze. Fan remains on at current speed.
  • SetBreeze(breeze): Enable breeze with specified parameters (same as breeze state variable). Example SetBreeze([1, 20, 90]).

NOTE: If breeze is enabled when the fan is powered off, then breeze will be restored at power on.

NOTE: Calling SetBreeze with first parameter equal to 0 will disable breeze, but still set the specified mean and var parameters.

NOTE: SetSpeed implicitly disables breeze mode.

Direction

The Direction feature is used by reversible Ceiling Fans to track the direction of the fan motor.

The Direction feature requires the Power feature.

Properties

(none)

State Variables

  • direction: (integer) 1 = forward, -1 = reverse.

The forward and reverse modes are sometimes called Summer and Winter, respectively.

Actions

  • SetDirection(direction): Control forward and reverse.
  • ToggleDirection(): Reverse the direction of the fan.

Light

The Light feature governs the basic on/off status of a device's main light.

This is a very common feature of Ceiling Fans, and present on many Fireplaces.

See the UpDownLight feature for the behavior of devices with dual lights.

Properties

  • feature_light: (boolean, PATCH-able) true = Light feature enabled (default), false = Light feature disabled

State Variables

  • light: (integer) 1 = light on, 0 = light off

Actions

  • TurnLightOn(): Turn light on.
  • TurnLightOff(): Turn off light.
  • ToggleLight(): Change light from on to off, or off to on.

UpDownLight

The UpDownLight feature governs the on/off status of a device's upwards- and downards-facing lights, such as the ceiling-wash "up light" and direct "down light" found on some high-end ceiling fans.

The corresponding physical remote often has seperate buttons for the UpLight and DownLight, but no button for just "Light". However, Bond always makes the Light feature available along with UpDownLight to make these devices easy to integrate. For example, saying "Alexa, Turn on the Light" corresponds to the TurnLightOn action, which will have a reasonable result for devices with UpDownLight.

UpDownLight depends on Light feature.

Properties

  • feature_up_down_light: (boolean, PATCH-able) true = Up Down Light feature enabled (default), false = Up Down Light feature disabled, both physical light circuits will operate as one Light.

State Variables

  • up_light: (integer) 1 = up light enabled, 0 = up light disabled
  • down_light: (integer) 1 = down light enabled, 0 = down light disabled

If both up_light and light are 1, then the up light will be on, and similar for down light.

Note that both up_light and down_light may not be simultaneously zero, so that the device is always ready to respond to a TurnLightOn request.

Actions

  • TurnUpLightOn(): Turn up light on.
  • TurnDownLightOn(): Turn down light on.
  • TurnUpLightOff(): Turn off up light.
  • TurnDownLightOff(): Turn off down light.
  • ToggleUpLight(): Change up light from on to off, or off to on.
  • ToggleDownLight(): Change down light from on to off, or off to on.

Note that TurnLightOff/TurnLightOn honor the up_light and down_light enable variables. That is, the user is able to use the factory remote to select a prefered combination of up and down light, and that combination is restored when TurnLightOn is called, perhaps through a voice integration.

Brightness

The Brightness feature governs lights which can be dimmed to specified brightness level.

This feature is common on classic Ceiling Fans whose remotes have displays. Note, however, that classic Ceiling Fans whose remotes do not have displays typically only support HoldToDim or HoldToDimUpDown feature.

Properties

  • feature_brightness: (boolean, PATCH-able) true = Brightness feature enabled (default), false = Brightness feature disabled. When PATCH-ing to false, brightness is set to 100 prior to disabling the feature.

State Variables

  • brightness: (integer) percentage value of brightness, 1-100. If light=0, brightness represents the last brightness setting and the brightness to resume when user turns on light. If fan has no dimmer or a non-stateful dimmer, brightness is always 100.

Actions

  • SetBrightness(brightness): Set the brightness of the light to specified percentage. Value of 0 is ignored, use TurnLightOff instead.
  • IncreaseBrightness(amount): Increase brightness of light by specified percentage. If light is off, it will be turned on at (0 + amount).
  • DecreaseBrightness(amount): Decrease light brightness by specified percentage. If attempting to decrease brightness below 1%, light will remain at 1%. Use TurnLightOff to turn off the light. If the light is off, the light will remain off but the remembered brightness will be decreased.
  • CycleBrightness(amount): Cycle brightness up/down. Implicitly turns on light. NOTE: This action is for the sake of remote controls with a hold-to-dim button. Please do not use in integrations because it tends to be a frustrating experience. SetBrightness is strongly preferred for its predictability.

NOTE: The brightness level is remembered on TurnLightOff and restored on TurnLightOn.

LowEndTrim

The LowEndTrim feature allows a remapping of the brightness levels to increase the minimum physical brightness sent to the lights. This is useful with landscape lighting dimmers where the installer has a choice of luminaires which may have different minimum duty-cycle requirements.

When a value of X% brightness is requested via the API (or, of course, via the app), the value will be remapped to Y% before being sent to the lights, accoring to the formula:

Y = (X - 1)*(100 - low_end_trim)/99 + low_end_trim

In plain English: low_end_trim sets the minimum brightness of the lights.

Availability: Currently on SBB low-voltage dimmers only.

Properties

  • low_end_trim: (integer) percentage value of minimum physical brightness to send to lights. Set to 1% for full brightness range. Allowed range: 1 to 90, inclusive. PATCH to null to restore factory default.

State Variables

(none)

Actions

(none)

UpDownBrightness

The UpDownBrightness feature extends the Brightness feature to cover the ability of ceiling fans with separately dimmable up and down lights.

This feature is almost only found on Smart by Bond Ceiling Fans.

Properties

(none)

State Variables

  • up_light_brightness: (integer) percentage value of up light brightness, 1-100.
  • down_light_brightness: (integer) percentage value of down light brightness, 1-100.

Actions

  • SetUpLightBrightness(brightness): Similar to SetBrightness but only for the up light.
  • SetDownLightBrightness(brightness): Similar to SetBrightness but only for the down light.
  • IncreaseUpLightBrightness(amount): Similar to IncreaseBrightness but only for the up light.
  • IncreaseDownLightBrightness(amount): Similar to IncreaseBrightness but only for the down light.
  • DecreaseUpLightBrightness(amount): Similar to DecreaseBrightness but only for the up light.
  • DecreaseDownLightBrightness(amount): Similar to DecreaseBrightness but only for the down light.

NOTE: The brightness level of each light is remembered on TurnLightOff, TurnUpLightOff, TurnDownLightOff and restored on TurnLightOn, etc.

NOTE: IncreaseBrightness and DecreaseBrightness operate on whichever of the up and down lights are enabled, but will never enable or disable one or the other light.

ColorTemp

The ColorTemp feature is used to control the correlated color temperature (CCT) of a light.

The ColorTemp feature requires the Light and Brightness features, and there are currently no products with both ColorTemp and UpDownLight. In other words, all CCT-adjustable products have exactly one dimmable light, and if the Brightness option is disabled via feature toggles, the ColorTemp feature will also be disabled.

Note that the color temperature is works in 100 Kelvin (K) steps. Attempts to set non-multiples of 100 K will result in undefined rounding behavior.

Properties

  • max_color_temp: (integer) maximum color temperature in Kelvin
  • min_color_temp: (integer) minimum color temperature in Kelvin

State Variables

  • color_temp: (integer) color temperature in Kelvin. Resolution: 100 K

Actions

  • SetColorTemp(int): Set color temperature. Implicitly turns Light on.
  • IncreaseColorTemp(int): Increase color temperature a specified number of degrees K. Implicitly turn Light on.
  • DecreaseColorTemp(int): Increase color temperature a specified number of degrees K. Implicitly turns Light on.
  • CycleColorTemp(int): Change color temperature in cyclical fashion, similar to CycleBrightness. Implicitly turns on Light. NOTE: This exists for the sake of remote controls, it is generally not useful for integrations, please use SetColorTemp instead.
  • CycleColorTempPreset(): Jump to next preset CCT value from an internal list of presets. Number and value of presets undefined and may vary by model. Useful for very basic integrations where you have just a single push button.

Flame

The Flame feature is used by fireplaces to indicate flame level.

The Flame feature requires the Power feature.

Properties

State Variables

  • flame: (integer) value from 1 to 100. If power=0, flame represents the last flame setting and the flame to which the device resumes when user asks to turn on.

Actions

  • SetFlame(flame): Set flame and turn on. If flame>100, 100 is assumed. If the fireplace is off, implicitly turn on the power. Setting flame to zero or a negative value is ignored.
  • IncreaseFlame(flame): Increase flame level of fireplace by specified number of flames. If the fireplace is off, implicitly turn on the power.
  • DecreaseFlame(flame): Decrease flame level by specified number of flames. If attempting to decrease fireplace flame below 1, the fireplace will remain at fflame 1. That is, power will not be implicitly turned off. If the power is already off, DecreaseFlame is ignored.

Open

The Open feature is used to describe a device that can be opened and closed. Common use cases are motorized shades and garage doors.

Properties

(none)

State Variables

  • open: (integer) 1 = open, 0 = closed

Actions

  • Open(): Open the device.
  • Close(): Close the device.
  • ToggleOpen(): Close the device if it's open, open it if it's closed

Notes

If your remote has a discrete stopping command, consider using the Hold() action to stop the motion of the device.

Position

The Position feature is used to describe a device that can be opened to a specific position as a percentage. The common use case is motorized shades.

The Position feature requires the Open feature.

Properties

(none)

State Variables

  • position: (integer) value from 0 to 100: 0 = open, 100 = closed.

Actions

  • SetPosition(position): Set device to specified position percentage.
  • IncreasePosition(amount): Close the device by the specified percentage of the full range.
  • DecreasePosition(amount): Open the device by the specified percentage of the full range.

Notes

[March 2021] At this time, the Position feature is available only for certain Motorized Shades on the Bond Bridge Pro.

The feature may be enabled or disabled via the feature toggle property feature_position, analogous to the other feature toggles. However, if course_time is present, it will need to also be set to a non-negative value before the actions and state variables will be exposed, so as to avoid integrations from showing a slider interface without the Bridge having the capability of setting position.

CourseTime

The CourseTime feature is used for shades whose RF protocols do not natively support Position. Bond Bridge Pro emulates a Position feature using a custom dead reckoning algorithm. This requires the client to specify the time required for the shade to open or close.

The CourseTime feature requires the Position feature.

Properties

  • course_time: (integer) specifies the amount of time, in milliseconds, required for the device to fully open or close. Depending on the device template, this property may or may not be present. Defaults to -1, meaning unconfigured.

State Variables

(none)

Actions

(none)

FpFan

The FpFan feature controls a fireplace fan. The FpFan feature is independent of the power feature, which for fireplaces indicates whether the flame is on or off.

Properties

(none)

State Variables

  • fpfan_power: (integer) 1 = on, 0 = off
  • fpfan_speed: (integer) from 1-100

Actions

  • TurnFpFanOff(): Turn the fireplace fan off
  • TurnFpFanOn(): Turn the fireplace fan on, restoring the previous speed
  • SetFpFan(speed): Sets the speed of the fireplace fan

Misc, including dimmers

Collected here are some actions that may be used with other features, but have no state-change behavior on the Bond.

Actions

  • Stop(): This action tells the Bond to stop any in-progress transmission and empty its transmission queue.
  • Hold(): Can be used when a signal is required to tell a device to stop moving or the like, since Stop is a special "stop transmitting" action
  • Pair(): Used in devices that need to be paired with a receiver.
  • StartDimmer(): Start dimming. The Bond should time out its transmission after 30 seconds, or when the Stop action is called.
  • StartUpLightDimmer(): Use this and the StartDownLightDimmer instead of StartDimmer if your device has two dimmable lights.
  • StartDownLightDimmer(): The counterpart to StartUpLightDimmer
  • StartIncreasingBrightness(): Similar to StartDimmer, but doesn't cycle and only increases brightness.
  • StartDecreasingBrightness(): Similar to StartDimmer, but doesn't cycle and only decreases brightness.

Devices

List your devices

Returns a list of device IDs and the corresponding device hashes. The hashes change if any part of the device (its name, location, state) has changed. Please see the "Hash Tree" documentation for an example.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "_": "7fc1e84b",
  • "3b20f300": {
    },
  • "4caf6472": {
    }
}

Create new device

Request Body schema: application/json
name
required
string
type
required
string
  • CF : Ceiling Fan
  • FP : Fireplace
  • MS : Motorized Window Coverings (Shades, Screens, Drapes) and Awnings
  • GX : Generic device
  • LT : Light
  • BD : Bidet

This type field does not impact the functionality of the device. The type field should be used by API clients to improve the user experience. For example, the Bond Home app uses this field to determine what icon to show when browsing a list of Devices on the Bridge.

The type field may be used by integrations to determine the category of interface to be selected when such a selection is mandated by the platform. For example, Google Assistant integration requires developers to choose a device type such as Fan or Light. however we strongly encourage developers to implement the functional aspects of integrations based on Features (i.e., available Actions, State variables, and Properties).

subtype
string

[Added in v2.21]

The subtype field is used to distinguish between categories of devices sublter than the type field permits.

Currently, subtype is only used for Motorized Window Coverings and Awnings (type = MS), with the following options:

  • ROLLER: a roller blackout shade which blocks light and provides privacy
  • SHEER: a shade which permits light to pass and does not provide privacy
  • AWNING: an outdoor patio covering

This field does not impact functionality in any way. Furthermore, the subtype field must only be used for analytics and aesthetic purposes by the API client. New subtypes may be introduced without notice. API clients should always be prepared to fall back to a reasonable default based on the device type.

The subtype field is not limited by the firmware, but rather specified by Bond internally and included in Device creation requests from the Bond Home app.

WARNING: Although currently it is not the case, at some point the same subtype string may be re-used with different meanings between different device types. To take a hypothetical example, we may have a gas-powered fireplace device (type = FP, subtype = GAS) but also a gas-powered bidet (type = BD, subtype = GAS).

template
string

An internal name describing what sort of protocol the remote represented by the device implements. Upon a POST with a valid template string, the device self-populates its panel with some default controls, initializes its state, and finds a script to define its behavior.

Most templated devices need additional parameters, such as an address addr, frequency freq, bits per second bps, and length of the zeros between repetititions zero_gap. These should be specified in an object properties in the POST body.

location
string

Responses

Request samples

Content type
application/json
{
  • "name": "My Fan",
  • "type": "CF",
  • "subtype": "AWNING",
  • "template": "A1",
  • "location": "Kitchen"
}

Response samples

Content type
application/json
{
  • "_id": "01234567"
}

Delete device

Authorizations:
None
path Parameters
device_id
required
number

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Get device

Basic device information. The "_" in each of state, properties, actions, and commands will change if that endpoint's resource changes.

NOTE: commands are only present on Bridge devices

Authorizations:
None
path Parameters
device_id
required
number

Responses

Response samples

Content type
application/json
{
  • "name": "My Fan",
  • "type": "CF",
  • "subtype": "AWNING",
  • "template": "A1",
  • "location": "Kitchen",
  • "actions": [
    ],
  • "properties": {
    },
  • "state": {
    },
  • "commands": {
    }
}

Change device field

Authorizations:
None
path Parameters
device_id
required
number
Request Body schema: application/json
name
required
string
type
required
string
  • CF : Ceiling Fan
  • FP : Fireplace
  • MS : Motorized Window Coverings (Shades, Screens, Drapes) and Awnings
  • GX : Generic device
  • LT : Light
  • BD : Bidet

This type field does not impact the functionality of the device. The type field should be used by API clients to improve the user experience. For example, the Bond Home app uses this field to determine what icon to show when browsing a list of Devices on the Bridge.

The type field may be used by integrations to determine the category of interface to be selected when such a selection is mandated by the platform. For example, Google Assistant integration requires developers to choose a device type such as Fan or Light. however we strongly encourage developers to implement the functional aspects of integrations based on Features (i.e., available Actions, State variables, and Properties).

subtype
string

[Added in v2.21]

The subtype field is used to distinguish between categories of devices sublter than the type field permits.

Currently, subtype is only used for Motorized Window Coverings and Awnings (type = MS), with the following options:

  • ROLLER: a roller blackout shade which blocks light and provides privacy
  • SHEER: a shade which permits light to pass and does not provide privacy
  • AWNING: an outdoor patio covering

This field does not impact functionality in any way. Furthermore, the subtype field must only be used for analytics and aesthetic purposes by the API client. New subtypes may be introduced without notice. API clients should always be prepared to fall back to a reasonable default based on the device type.

The subtype field is not limited by the firmware, but rather specified by Bond internally and included in Device creation requests from the Bond Home app.

WARNING: Although currently it is not the case, at some point the same subtype string may be re-used with different meanings between different device types. To take a hypothetical example, we may have a gas-powered fireplace device (type = FP, subtype = GAS) but also a gas-powered bidet (type = BD, subtype = GAS).

template
string

An internal name describing what sort of protocol the remote represented by the device implements. Upon a POST with a valid template string, the device self-populates its panel with some default controls, initializes its state, and finds a script to define its behavior.

Most templated devices need additional parameters, such as an address addr, frequency freq, bits per second bps, and length of the zeros between repetititions zero_gap. These should be specified in an object properties in the POST body.

location
string

Responses

Request samples

Content type
application/json
{
  • "name": "My Fan",
  • "type": "CF",
  • "subtype": "AWNING",
  • "template": "A1",
  • "location": "Kitchen"
}

Response samples

Content type
application/json
{
  • "name": "My Fan",
  • "type": "CF",
  • "subtype": "AWNING",
  • "template": "A1",
  • "location": "Kitchen",
  • "actions": [
    ],
  • "properties": {
    },
  • "state": {
    },
  • "commands": {
    }
}

Device State

Get device state

Authorizations:
None
path Parameters
device_id
required
number

Responses

Response samples

Content type
application/json
{
  • "breeze": [
    ],
  • "brightness": 75,
  • "light": 1,
  • "power": 0,
  • "speed": 2,
  • "timer": 3599
}

Update state belief

Update the Bond's belief about the state of a device.

This is useful, for example, for Ceiling Fans that have a command for ToggleLight, but no discrete commands TurnLightOn and TurnLightOff. In this case, it is possible for the Bond's belief about the device state to be incorrect, and so this method allows that belief to be corrected.

This does NOT cause the Bond to transmit any control signal.

(Bridge-Only)

Authorizations:
None
path Parameters
device_id
required
number
Request Body schema: application/json
any (State)

Responses

Request samples

Content type
application/json
{
  • "breeze": [
    ],
  • "brightness": 75,
  • "light": 1,
  • "power": 0,
  • "speed": 2,
  • "timer": 3599
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Device Properties

Get device properties

See the Features section above for other properties which may be available on your devices.

A quick description of trust_state by example follows:

The scenario: the Bond has a "ToggleLight" command, and the Bond believes the light to be on. The user requests the action "LightOn". If the Bond trusts its state, it will do nothing, as the light is already on, and sending a toggle command would turn it off. If, however, the Bond does not trust its state, it will send the toggle, and believe that now it knows the true state of the physical device.

trust_state set to false is mostly useful if the user intends to use a physical remote together with the Bond and is the default, trust state set to true is mostly useful if the user would like to control their device remotely with complete confidence that what the Bond reports is the device's actual state.

Authorizations:
None
path Parameters
device_id
required
number

Responses

Response samples

Content type
application/json
{
  • "trust_state": false,
  • "addr": "10101",
  • "freq": 434300,
  • "bps": 3000,
  • "zero_gap": 30
}

Update properties

See the documentation of the individual properties for whether they can be PATCHed.

Authorizations:
None
path Parameters
device_id
required
number
Request Body schema: application/json
trust_state
boolean

Whether or not the Bond should trust its toggleable state belief. This is the confidence the Bond has that this device's state belief is accurate, and is only present if a "Toggle" command is present (for power, light, direction, etc.), and is false by default. (Bridge-only)

Responses

Request samples

Content type
application/json
{
  • "trust_state": false
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Device Actions

Execute a device action

action_name is the name of the action from the actions list in the response to GET /devices/{device_id}.

This endpoint blocks until confirmation that the Bond has executed the action. Timeout shall be no more than 7 seconds.

To check the resulting state, the client may query /devices/{device_id}/state.

See the Features section to learn what the various actions mean, and what argument is expected, if any. For example, the action SetSpeed takes an integer parameter which is the desired speed number.

Authorizations:
None
path Parameters
action_name
required
string
device_id
required
number
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "argument": 4
}

Response samples

Content type
application/json
{
  • "argument": 4
}

Device Remote Address

Get SBB Remote Address and Learn Window

[SBB-only] Provides the current SBB remote address and information about the learn window. The SBB unit will only honor commands received with a matching address.

NOTE: If addr0_is_dip is present and true, then the first address (addr0) corresponds to physical "DIP" switches on the receiver. The client may take this into account by seperately listing this "DIP" setting from the rest of the addresses which may be set via the API. Note that the special address 0xdead indicates that the DIP setting is being ignored (after it has been explicitely deleted via the API).

Authorizations:
None
path Parameters
device_id
required
number

Responses

Response samples

Content type
application/json
{
  • "addr": [
    ],
  • "addr_slots": 5,
  • "learn_window_ms": 60000,
  • "learn_window_remaining_ms": 1100,
  • "learn_window_open": true,
  • "learn_count": 0,
  • "addr0_is_dip": true
}

Modify Device Remote Address or Learn Window

[SBB-only] Modify either the Device Remote Address or open/close the learn window. While the learn window is open, the SBB unit may learn a new physical remote when user presses the Learn button (or holds down the Power/Stop button for 5 seconds).

Note that on most SBB receivers, the learn window is automatically opened when electrical power is first connected. This is the typical "auto-learning" function. However, on recievers with DIP switches (addr0_is_dip), the learn window must be opened manually. This is because those receivers follow the conceptually simpler model of "you gotta set the DIP switches on the reciever and transmitter to match" without any "magic learning" occuring---at least until you use the Manage Remotes feature of the Bond Home app or this endpoint directly.

Note that to add a new remote address, the addr field should be PATCHed with a single string, not an array. The provided address will be appended to the array of addresses, with the oldest address being overwritten if len(addr[]) was already equal to addr_slots.

If the same address is learned which was already in the list, the duplicate will indeed be added. This is to allow an installer to use a low-tech way of forgetting unwanted remotes---by re-learning the same remote 5 times---which the installers are used to doing with similar receivers.

This endpoint is useful especially where there are multiple SBB devices on the same mains circuit.

Authorizations:
None
path Parameters
device_id
required
number
Request Body schema: application/json
addr
Array of strings

Learned remote address(es) in hexadecimal, may be patched only with a single address string to be added.

learn_window_open
boolean

Whether new address can be learned via RF. True iff learn_window_remaining_ms is nonzero.

addr0_is_dip
boolean

If present and true, indicates that the receiver has DIP switches which may be adjusted to set the zeroth address.

Responses

Request samples

Content type
application/json
{
  • "addr": [
    ],
  • "learn_window_open": true,
  • "addr0_is_dip": true
}

Response samples

Content type
application/json
{
  • "addr": [
    ],
  • "addr_slots": 5,
  • "learn_window_ms": 60000,
  • "learn_window_remaining_ms": 1100,
  • "learn_window_open": true,
  • "learn_count": 0,
  • "addr0_is_dip": true
}

Reset Device Remote Address and Learn Window

[SBB-only] If no addr is provided, then: Restores factory default Device Remote Address and closes learn window. If the receiver has DIP switches (addr0_is_dip) then the default address will be determined by the position of those DIP switches.

However, if addr is provided, then: Removes just the specified address from the list. If the receiver has DIP switches (addr0_is_dip) and the address being deleted is the first one (addr0) then that address will be changed to 0xdead. This is useful if a receiver is installed with DIP switches indicating an address which is being used by a neighbor. To avoid interference, the user can delete addr0 via the app. NOTE: Any change to the DIP switches on the reciever will cause the addr0 to change to reflect that new DIP setting.

Authorizations:
None
path Parameters
device_id
required
number

Responses

Response samples

Content type
application/json
{
  • "addr": [
    ],
  • "addr_slots": 5,
  • "learn_window_ms": 60000,
  • "learn_window_remaining_ms": 1100,
  • "learn_window_open": true,
  • "learn_count": 0,
  • "addr0_is_dip": true
}

Device Reload

Reload device

Reload the command table for the given device definition. This deletes all current commands and rebuilds the device definition's default commands. This will overwrite any user customization of the commands, such as renaming, icon changes, and deleting commands.

The device's state and properties are preserved, in order to avoid a loss of control.

This endpoint may be called after a template device definition has been updated to cause newly-defined or modified commands to be exported to the device panel.

This endpoint is only available for a device with a template string.

Authorizations:
None
path Parameters
device_id
required
number

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Power Cycle State

Read Power Cycle State

This feature is intended to be used with smart Ceiling Fan receivers that are connected to "dumb" wall switches. Many users have existing non-smart ceiling fans which are connected to non-smart wall switches. These non-smart ceiling fans typically have some pull switches where the user can set the desired state, and then the wall switch is used as the means of operating the device. For example, the ceiling fan may be the primary light source in the room, and the user relies on the wall switch as a normal light switch. When they then make the fan smart by adding a Smart By Bond receiver to the fan, they expect that they can continue to use the wall switch. A problem arises when the user turns off the fan light using the API (Alexa, app, etc.) and then enters the room and attempts to operate using the wall switch. The fan will remain in the state with light off. The Power On State feature allows users to guarantee a prefered state every time the device powers on, making it easier to use in a situation where the wall switch is relied upon.

This feature is only available on certain SBB products where it makes sense, specifically all ceiling fans. We have not enabled it on in-wall switches and dimmers and other SBB products where there is only a power supply or circuit breaker behind the product, rather than there possibly being a user-facing "dumb" wall switch.

[SBB-only, added in v2.17]

Authorizations:
None
path Parameters
device_id
required
number

Responses

Response samples

Content type
application/json
{
  • "enabled": false,
  • "state": {
    }
}

Update Power Cycle State

Authorizations:
None
path Parameters
device_id
required
number
Request Body schema: application/json
enabled
boolean

If true, device will revert to specified state after power loss. If false, device will maintain previous state across power loss ("Last State" feature).

state
object

State to revert to after power loss. Same schema as for Device state.

Responses

Request samples

Content type
application/json
{
  • "enabled": false,
  • "state": {
    }
}

Response samples

Content type
application/json
{
  • "enabled": false,
  • "state": {
    }
}

Set Power Cycle State to defaults

Deleting the Power Cycle State for a Device will cause it to revert to the default as programmed from the factory. This is typically a disabled state. For most API clients, it makes more sense to use PATCH rather than DELETE.

Authorizations:
None
path Parameters
device_id
required
number

Responses

Response samples

Content type
application/json
{
  • "enabled": false,
  • "state": {
    }
}

Device Commands

Get list of Commands

Returns a list of command IDs and the corresponding command hashes. Please see the "Hash Tree" documentation for an explanation of hashes.

path Parameters
device_id
required
string

Responses

Response samples

Content type
application/json
{
  • "_": "7fc1e84b",
  • "3b20f300": {
    },
  • "4ad874d2": {
    },
  • "a94328bc": {
    },
  • "d87d6ef2": {
    }
}

Create new Command

Creates a Command under a specific Device.

path Parameters
device_id
required
string
Request Body schema: application/json
name
required
string

Name of corresponding button displayed in Bond App

action
required
string

Action which should be triggered when button is pressed.

argument
any or null

Argument of action. If absent, no argument will be used. May be any JSON value, not only an object.

icon
string

Icon slug. (This is the base of the name of the icon to use to represent this command in the App.)

category_name
string

The category in which to group this command.

button_type
string

The type of button to use for this command.

hidden
boolean

Whether to hide this command in the mobile app. Useful for exposing an action, but not showing its command on the device panel.

Responses

Request samples

Content type
application/json
{
  • "name": "Light",
  • "action": "SetSpeed",
  • "argument": 3,
  • "icon": "speed_3",
  • "category_name": "fan",
  • "button_type": "tap",
  • "hidden": true
}

Response samples

Content type
application/json
{
  • "_id": "01234567"
}

Get specific Command

Get information about a Command.

path Parameters
device_id
required
string
command_id
required
string

Responses

Response samples

Content type
application/json
{
  • "name": "Light",
  • "action": "SetSpeed",
  • "argument": 3,
  • "icon": "speed_3",
  • "category_name": "fan",
  • "button_type": "tap",
  • "hidden": true
}

Modify an existing Command

Modifies any fields of an existing Command.

path Parameters
device_id
required
string
command_id
required
string
Request Body schema: application/json
name
required
string

Name of corresponding button displayed in Bond App

action
required
string

Action which should be triggered when button is pressed.

argument
any or null

Argument of action. If absent, no argument will be used. May be any JSON value, not only an object.

icon
string

Icon slug. (This is the base of the name of the icon to use to represent this command in the App.)

category_name
string

The category in which to group this command.

button_type
string

The type of button to use for this command.

hidden
boolean

Whether to hide this command in the mobile app. Useful for exposing an action, but not showing its command on the device panel.

Responses

Request samples

Content type
application/json
{
  • "name": "Light",
  • "action": "SetSpeed",
  • "argument": 3,
  • "icon": "speed_3",
  • "category_name": "fan",
  • "button_type": "tap",
  • "hidden": true
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}

Delete a Command

Deletes specified Command.

Any associated Signal will be implicitly deleted.

path Parameters
device_id
required
string
command_id
required
string

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Device Command Signal

Get Signal associated with Command

Get signal associated with this command.

path Parameters
device_id
required
string
command_id
required
string

Responses

Response samples

Content type
application/json
{
  • "freq": 434000,
  • "modulation": "OOK",
  • "data": "110100110110H",
  • "encoding": "cq",
  • "bps": 1000,
  • "reps": 12
}

Store new Signal

Creates a Signal associated with this Command.

path Parameters
device_id
required
string
command_id
required
string
Request Body schema: application/json
freq
required
number

Frequency in kHz:

  • >= 1000 is RF
  • < 1000 is IR

Bond Bridge can only receive IR signals at or near 38 kHz, and will report all IR signals as 38 kHz.

Bond Bridge currently transmits all IR signals at 38 kHz also.

modulation
string
  • OOK = on-off keying
  • GFSK = gaussian frequency-shift keying

If not provided, defaults to OOK.

data
required
string

String representation of data bits to be transmitted.

The maximum length of the data string is 6144 bytes.

encoding
required
string

Specifies the encoding of the data string.

In all cases, the duration of each bit is 1/bps seconds.

CQ encoding ("cq")

This is a simple encoding where bits are represented using 0 and 1, with some abbreviations for sequences of bits.

Each character represents one or more bits:

  • 0 single zero bit
  • 1 single one bit
  • C 2^0 (1) zero bits
  • D 2^1 (2) zero bits
  • E 2^2 (4) zero bits
  • F 2^3 (8) zero bits
  • ...
  • Q 2^14 (16384) zero bits
  • c thru q are just like C thru Q, but for one bits
  • A the three bits 110
  • B the three bits 011

Hex ("hex")

This is a simple encoding where the data string consists of hex bytes. Each hex byte represents 8 bits of data.

Hex encoding is currently limited to only work at 40000 bps.

This is the default encoding for scan results.

bps
required
number

Bitrate of data. Range is 100 to 40000.

reps
number

Number of times that data should be repeated.

If not provided, 1 is assumed.

use_scan
boolean

If present and true, the Signal recorded by the most recent scan will be used, with all other fields ignored

Responses

Request samples

Content type
application/json
{
  • "freq": 434000,
  • "modulation": "OOK",
  • "data": "110100110110H",
  • "encoding": "cq",
  • "bps": 1000,
  • "reps": 12,
  • "use_scan": true
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}

Modify an existing Signal

Modifies any fields of an existing Signal.

path Parameters
device_id
required
string
command_id
required
string
Request Body schema: application/json
freq
required
number

Frequency in kHz:

  • >= 1000 is RF
  • < 1000 is IR

Bond Bridge can only receive IR signals at or near 38 kHz, and will report all IR signals as 38 kHz.

Bond Bridge currently transmits all IR signals at 38 kHz also.

modulation
string
  • OOK = on-off keying
  • GFSK = gaussian frequency-shift keying

If not provided, defaults to OOK.

data
required
string

String representation of data bits to be transmitted.

The maximum length of the data string is 6144 bytes.

encoding
required
string

Specifies the encoding of the data string.

In all cases, the duration of each bit is 1/bps seconds.

CQ encoding ("cq")

This is a simple encoding where bits are represented using 0 and 1, with some abbreviations for sequences of bits.

Each character represents one or more bits:

  • 0 single zero bit
  • 1 single one bit
  • C 2^0 (1) zero bits
  • D 2^1 (2) zero bits
  • E 2^2 (4) zero bits
  • F 2^3 (8) zero bits
  • ...
  • Q 2^14 (16384) zero bits
  • c thru q are just like C thru Q, but for one bits
  • A the three bits 110
  • B the three bits 011

Hex ("hex")

This is a simple encoding where the data string consists of hex bytes. Each hex byte represents 8 bits of data.

Hex encoding is currently limited to only work at 40000 bps.

This is the default encoding for scan results.

bps
required
number

Bitrate of data. Range is 100 to 40000.

reps
number

Number of times that data should be repeated.

If not provided, 1 is assumed.

use_scan
boolean

If present and true, the Signal recorded by the most recent scan will be used, with all other fields ignored

Responses

Request samples

Content type
application/json
{
  • "freq": 434000,
  • "modulation": "OOK",
  • "data": "110100110110H",
  • "encoding": "cq",
  • "bps": 1000,
  • "reps": 12,
  • "use_scan": true
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}

Delete a Signal

Deletes specified Signal.

Attempts to use the corresponding Actions will return 500 until a new Signal is associated with this Command or the Command is deleted.

path Parameters
device_id
required
string
command_id
required
string

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Device Command Transmit

Transmit Command

Transmits the signal associated with the command.

Note: This does NOT execute the associated Action, but rather just transmits the signal as if it had been PUT to signal/tx, so the device state will not be updated and light gating will not be checked.

path Parameters
device_id
required
string
command_id
required
string
Request Body schema: application/json
Schema not provided

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}

Groups

List your Groups

Returns a list of Group IDs and the corresponding Group hashes. The hashes change if any part of the Group (its name, state, type, etc.) has changed. The hash is not updated if underlying Devices are updated in a way which does not effect the Group state or type.

Groups are only supported on Bond Bridges, not on Smart by Bond. Furthermore, Groups may only include Devices on the same Bridge.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "_": "7fc1e84b",
  • "3b20f300": {
    },
  • "4caf6472": {
    }
}

Create new Group

For the creation of a Group distributed across multiple Bonds, clients should provide a 64-bit ID for the Group and provide that same ID in each Group POST request in the _id field. See introductory section "Groups and Scenes" for detail. If the _id field is not provided, a random ID will be assigned as with POST requests to other enumerations.

A Group is created containing the device IDs in the devices array. Using the devices field requires the client to predetermine what devices are compatible in the sense of having a non-empty Actions intersection. If even a single device is incompatible, then the entire POST will fail with a 400 error. For this reason, it is simpler for the client to make individual Groups Devices POSTs for each device to be added to the Group, so that the Bond firmware may provide a 400 error in case a device cannot be added due to incompatability.

Note that types and locations fields cannot be specified when creating a Group: these fields are calculated based on the member Devices.

Request Body schema: application/json
name
required
string
devices
Array of arrays

List of member Device IDs.

This field may be set during Group creation, or may be updated using PATCH.

Alternatively, use the Group Devices endpoint's POST/DELETE methods to add/remove Devides from the Group.

Responses

Request samples

Content type
application/json
{
  • "name": "Kitchen Shades",
  • "devices": [
    ]
}

Response samples

Content type
application/json
{
  • "_id": "01234567"
}

Get Group

Groups are collections of Devices on a single Bridge.

Authorizations:
None
path Parameters
group_id
required
number

Responses

Response samples

Content type
application/json
{
  • "name": "Kitchen Shades",
  • "devices": [
    ],
  • "types": [
    ],
  • "locations": [
    ],
  • "actions": [
    ],
  • "state": {
    }
}

Change Group field

The devices list may be PATCHed to perform a bulk change to the membership in the group. A 400 error is returned if the devices are incompatible.

If the devices list is PATCHed to empty, the group shard will vanish. That is, the group shard will be removed from the groups enumeration. The groups enumeration will be sent as a gratuitous GET response.

To add Devices to the Group, use POST method on the Group Devices enumeration. To remove a Device from the Group, use the DELETE method of the Group Device resource.

Authorizations:
None
path Parameters
group_id
required
number
Request Body schema: application/json
name
required
string
devices
Array of arrays

List of member Device IDs.

This field may be set during Group creation, or may be updated using PATCH.

Alternatively, use the Group Devices endpoint's POST/DELETE methods to add/remove Devides from the Group.

Responses

Request samples

Content type
application/json
{
  • "name": "Kitchen Shades",
  • "devices": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "Kitchen Shades",
  • "devices": [
    ],
  • "types": [
    ],
  • "locations": [
    ],
  • "actions": [
    ],
  • "state": {
    }
}

Delete Group

The entire Group is deleted.

Authorizations:
None
path Parameters
group_id
required
number

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Group Devices

Add Device to Group

Device with the specified ID is added to the Group.

A gratuitous update of the corresponding Group endpoint will occur to update clients as to the new devices, actions, state, and properties.

Authorizations:
None
path Parameters
group_id
required
string
Request Body schema: application/json
device
string

ID of Device to add

Responses

Request samples

Content type
application/json
{
  • "device": "aabbccdd"
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Remove Device from Group

Device with the ID specified in the URL is removed from the Group.

A gratuitous update of the corresponding Group endpoint will occur to update clients as to the new devices, actions, state, and properties.

When the last device is removed from a group shard, the group shard will vanish. This applies whether the removal is explicit or implicit when the device is deleted entirely from the Bridge.

That is, the group shard will be removed from the groups enumeration. The groups enumeration will be sent as a gratuitous GET response.

Authorizations:
None
path Parameters
group_id
required
string
device_id
required
string

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Group State

Get Group State

Group State lists those state variables which are common to all member Devices. If all member Devices have the same value for a particular state variable, then the Group variable will take that value. However, if member Devices differ in value, then the Group variable will take the value null.

Note that Group states cannot be PATCHed.

Authorizations:
None
path Parameters
group_id
required
number

Responses

Response samples

Content type
application/json
{
  • "open": 1
}

Group Properties

Get Group properties

See the Features section above for other properties which may be available on your Groups.

Similar to the Group State object, the Properties available for a Group are those Properties which exist on every Device in the Group. If all Devices have the same value for a Property, then that value will be provided here. If Devices do not agree on a value, then that Property will be listed but with a null value.

Authorizations:
None
path Parameters
group_id
required
number

Responses

Response samples

Content type
application/json
{
  • "trust_state": false,
  • "addr": "10101",
  • "freq": 434300,
  • "bps": 3000,
  • "zero_gap": 30
}

Update properties

PATCHing one or more Group Properties implicitely PATCHes those Properties on all Devices in the Group. Gratuitous PATCH replies are sent for each Device before this PATCH reply returns. If any errors occur in any of the underlying Device PATCH requests, this request will return a 500 error and the Devices' Properties will be left in undefined condition.

Example: If you set up 8 individual shades in your kitchen and then add them all to a Group, you can then, with a single request, enable or disable the feature_position Property to enable/disable the "slider" feature. [This "slider" feature is avaiable only on the Bond Bridge Pro.]

Authorizations:
None
path Parameters
group_id
required
number
Request Body schema: application/json
trust_state
boolean

Whether or not the Bond should trust its toggleable state belief. This is the confidence the Bond has that this device's state belief is accurate, and is only present if a "Toggle" command is present (for power, light, direction, etc.), and is false by default. (Bridge-only)

Responses

Request samples

Content type
application/json
{
  • "trust_state": false
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Group Actions

Execute a Group Action

action_name is the name of the action from the actions list in the response to GET /groups/{group_id}.

This endpoint blocks until confirmation that the Bond has executed the Action on all member Devices. Timeout shall be no more than 7 seconds.

To check the resulting state, the client may query /groups/{group_id}/state, but the member Device States are also updated.

Authorizations:
None
path Parameters
action_name
required
string
group_id
required
number
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "argument": 4
}

Response samples

Content type
application/json
{
  • "argument": 4
}

Device Schedules

Get list of Device Schedules

Returns a list of sked_ids and the corresponding sked hashes. Please see the "Hash Tree" documentation for an explanation of hashes.

path Parameters
device_id
required
string

Responses

Response samples

Content type
application/json
{
  • "_": "7fc1e84b",
  • "3b20f300": {
    },
  • "4ad874d2": {
    },
  • "a94328bc": {
    },
  • "d87d6ef2": {
    }
}

Create new Device Schedule

Creates a Device Schedule under a specific Device.

If the timezone or location settings in sys/time are not set, a 400 error may result depending on what mark is requested. Specifically, the following requests will result in an 400 error:

  • POSTed mark is midnight but sys/time.tz is null
  • POSTed mark is dawn, dusk, sunrise, or sunset, but sys/time.grid is null
path Parameters
device_id
required
string
Request Body schema: application/json
enabled
boolean

If false, schedule will never execute, but will remain in device database.

Oneshot schedules (with days_of_week all False) automatically disable after executing once.

Defaults to true on PUT and POST.

action
required
string

Action which will be run on device when schedule executes. If action requires an argument, argument field is required.

argument
any

Argument to action, if needed.

seconds
required
integer

Time at which schedule should execute, relative to mark, in seconds. Negative numbers indicate "before" the mark, positive numbers indicate "after" the mark.

days_of_week
required
Array of booleans

Days of week on which the schedule should execute.

First element is for Sunday, last element is for Saturday.

The example value is for a schedules that executes only on weekdays.

Special case: if array is all false, the sked will run exactly once and will then disable itself (enabled=false). This is rendered on UIs as a "Run Once" option.

Default: run every day, that is, array of 7 trues

mark
required
string

Event which serves as the benchmark for the daily relative time. Options are:

  • midnight: seconds is the time in seconds since midnight in the timezone specified by the sys/time endpoint.

  • sunrise: seconds is seconds before or after local sunrise, as calculated using the Grid Locator (see sys/time endpoint).

  • sunset: like sunrise but when the sun goes down!

  • dawn: seconds is seconds before or after local civil dawn: that is, when it gets light outside before sunrise. This is when sun is 6 degrees below the horizon.

  • dusk: like dawn, but for civil dusk: when it actually gets dark some time after sunset, when the sun has descending 6 degrees below the horizon.

For our beloved customers near or within the Arctic Circle: please note that there will be periods of days around the solstices that schedules based on the solar marks will not execute.

Responses

Request samples

Content type
application/json
{
  • "enabled": true,
  • "action": "SetBrightness",
  • "argument": 80,
  • "seconds": -3600,
  • "days_of_week": [
    ],
  • "mark": "sunset"
}

Response samples

Content type
application/json
{
  • "_id": "01234567"
}

Get specific Device Schedule

Get information about a Device Schedule.

path Parameters
device_id
required
string
sked_id
required
string

Responses

Response samples

Content type
application/json
{
  • "enabled": true,
  • "action": "SetBrightness",
  • "argument": 80,
  • "seconds": -3600,
  • "days_of_week": [
    ],
  • "mark": "sunset"
}

Modify an existing Device Schedule

Modifies any fields of an existing Device Schedule.

path Parameters
device_id
required
string
sked_id
required
string
Request Body schema: application/json
enabled
boolean

If false, schedule will never execute, but will remain in device database.

Oneshot schedules (with days_of_week all False) automatically disable after executing once.

Defaults to true on PUT and POST.

action
required
string

Action which will be run on device when schedule executes. If action requires an argument, argument field is required.

argument
any

Argument to action, if needed.

seconds
required
integer

Time at which schedule should execute, relative to mark, in seconds. Negative numbers indicate "before" the mark, positive numbers indicate "after" the mark.

days_of_week
required
Array of booleans

Days of week on which the schedule should execute.

First element is for Sunday, last element is for Saturday.

The example value is for a schedules that executes only on weekdays.

Special case: if array is all false, the sked will run exactly once and will then disable itself (enabled=false). This is rendered on UIs as a "Run Once" option.

Default: run every day, that is, array of 7 trues

mark
required
string

Event which serves as the benchmark for the daily relative time. Options are:

  • midnight: seconds is the time in seconds since midnight in the timezone specified by the sys/time endpoint.

  • sunrise: seconds is seconds before or after local sunrise, as calculated using the Grid Locator (see sys/time endpoint).

  • sunset: like sunrise but when the sun goes down!

  • dawn: seconds is seconds before or after local civil dawn: that is, when it gets light outside before sunrise. This is when sun is 6 degrees below the horizon.

  • dusk: like dawn, but for civil dusk: when it actually gets dark some time after sunset, when the sun has descending 6 degrees below the horizon.

For our beloved customers near or within the Arctic Circle: please note that there will be periods of days around the solstices that schedules based on the solar marks will not execute.

Responses

Request samples

Content type
application/json
{
  • "enabled": true,
  • "action": "SetBrightness",
  • "argument": 80,
  • "seconds": -3600,
  • "days_of_week": [
    ],
  • "mark": "sunset"
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}

Delete a Device Schedule

Deletes specified Device Schedule. Naturally, the Device Schedule will be canceled.

path Parameters
device_id
required
string
sked_id
required
string

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Group Schedules

Get list of Group Schedules

Returns a list of sked_ids and the corresponding sked hashes. Please see the "Hash Tree" documentation for an explanation of hashes.

path Parameters
group_id
required
string

Responses

Response samples

Content type
application/json
{
  • "_": "7fc1e84b",
  • "3b20f300": {
    },
  • "4ad874d2": {
    },
  • "a94328bc": {
    },
  • "d87d6ef2": {
    }
}

Create new Group Schedule

Creates a Group Schedule under a specific Group.

If the timezone or location settings in sys/time are not set, a 400 error may result depending on what mark is requested. Specifically, the following requests will result in an 400 error:

  • POSTed mark is midnight but sys/time.tz is null
  • POSTed mark is dawn, dusk, sunrise, or sunset, but sys/time.grid is null
path Parameters
group_id
required
string
Request Body schema: application/json
enabled
boolean

If false, schedule will never execute, but will remain in device database.

Oneshot schedules (with days_of_week all False) automatically disable after executing once.

Defaults to true on PUT and POST.

action
required
string

Action which will be run on device when schedule executes. If action requires an argument, argument field is required.

argument
any

Argument to action, if needed.

seconds
required
integer

Time at which schedule should execute, relative to mark, in seconds. Negative numbers indicate "before" the mark, positive numbers indicate "after" the mark.

days_of_week
required
Array of booleans

Days of week on which the schedule should execute.

First element is for Sunday, last element is for Saturday.

The example value is for a schedules that executes only on weekdays.

Special case: if array is all false, the sked will run exactly once and will then disable itself (enabled=false). This is rendered on UIs as a "Run Once" option.

Default: run every day, that is, array of 7 trues

mark
required
string

Event which serves as the benchmark for the daily relative time. Options are:

  • midnight: seconds is the time in seconds since midnight in the timezone specified by the sys/time endpoint.

  • sunrise: seconds is seconds before or after local sunrise, as calculated using the Grid Locator (see sys/time endpoint).

  • sunset: like sunrise but when the sun goes down!

  • dawn: seconds is seconds before or after local civil dawn: that is, when it gets light outside before sunrise. This is when sun is 6 degrees below the horizon.

  • dusk: like dawn, but for civil dusk: when it actually gets dark some time after sunset, when the sun has descending 6 degrees below the horizon.

For our beloved customers near or within the Arctic Circle: please note that there will be periods of days around the solstices that schedules based on the solar marks will not execute.

Responses

Request samples

Content type
application/json
{
  • "enabled": true,
  • "action": "SetBrightness",
  • "argument": 80,
  • "seconds": -3600,
  • "days_of_week": [
    ],
  • "mark": "sunset"
}

Response samples

Content type
application/json
{
  • "_id": "01234567"
}

Get specific Group Schedule

Get information about a Group Schedule.

path Parameters
group_id
required
string
sked_id
required
string

Responses

Response samples

Content type
application/json
{
  • "enabled": true,
  • "action": "SetBrightness",
  • "argument": 80,
  • "seconds": -3600,
  • "days_of_week": [
    ],
  • "mark": "sunset"
}

Modify an existing Group Schedule

Modifies any fields of an existing Group Schedule.

path Parameters
group_id
required
string
sked_id
required
string
Request Body schema: application/json
enabled
boolean

If false, schedule will never execute, but will remain in device database.

Oneshot schedules (with days_of_week all False) automatically disable after executing once.

Defaults to true on PUT and POST.

action
required
string

Action which will be run on device when schedule executes. If action requires an argument, argument field is required.

argument
any

Argument to action, if needed.

seconds
required
integer

Time at which schedule should execute, relative to mark, in seconds. Negative numbers indicate "before" the mark, positive numbers indicate "after" the mark.

days_of_week
required
Array of booleans

Days of week on which the schedule should execute.

First element is for Sunday, last element is for Saturday.

The example value is for a schedules that executes only on weekdays.

Special case: if array is all false, the sked will run exactly once and will then disable itself (enabled=false). This is rendered on UIs as a "Run Once" option.

Default: run every day, that is, array of 7 trues

mark
required
string

Event which serves as the benchmark for the daily relative time. Options are:

  • midnight: seconds is the time in seconds since midnight in the timezone specified by the sys/time endpoint.

  • sunrise: seconds is seconds before or after local sunrise, as calculated using the Grid Locator (see sys/time endpoint).

  • sunset: like sunrise but when the sun goes down!

  • dawn: seconds is seconds before or after local civil dawn: that is, when it gets light outside before sunrise. This is when sun is 6 degrees below the horizon.

  • dusk: like dawn, but for civil dusk: when it actually gets dark some time after sunset, when the sun has descending 6 degrees below the horizon.

For our beloved customers near or within the Arctic Circle: please note that there will be periods of days around the solstices that schedules based on the solar marks will not execute.

Responses

Request samples

Content type
application/json
{
  • "enabled": true,
  • "action": "SetBrightness",
  • "argument": 80,
  • "seconds": -3600,
  • "days_of_week": [
    ],
  • "mark": "sunset"
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}

Delete a Group Schedule

Deletes specified Group Schedule. Naturally, the Group Schedule will be canceled.

path Parameters
group_id
required
string
sked_id
required
string

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Bridge

Get Bridge info

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "location": "My Room",
  • "name": "My Bridge",
  • "bluelight": 127,
  • "frequencies": [
    ]
}

Change Bridge info

Authorizations:
None
Request Body schema: application/json
location
string
name
string
bluelight
integer

Amount of blue light emitted from the Bond when it's idle: at 0 the light is off, and at 255 the light is at its maximum brightness.

Responses

Request samples

Content type
application/json
{
  • "location": "My Room",
  • "name": "My Bridge",
  • "bluelight": 127
}

Response samples

Content type
application/json
{
  • "location": "My Room",
  • "name": "My Bridge",
  • "bluelight": 127,
  • "frequencies": [
    ]
}

Reset Bridge info

After deletion, default values will be restored.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Transmit

Cancel a Transmission

If a Signal is being transmitted, it is immediately interrupted, and a 204 is returned.

A 204 is also returned even if there was no Signal being transmitted.

NOTE: Internally, this flushes the radio command queue, so any requested transmissions which were queued waiting for an earlier tranmission to complete will also be canceled. This also cancels any queued scans, but does not cancel a scan already in progress.

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}

Transmit a Signal

Transmit an RF or IR signal from a Bond Bridge.

If use_scan is present and true, the signal recorded by the previous scan will be used, and all other fields will be ignored

Request Body schema: application/json
freq
required
number

Frequency in kHz:

  • >= 1000 is RF
  • < 1000 is IR

Bond Bridge can only receive IR signals at or near 38 kHz, and will report all IR signals as 38 kHz.

Bond Bridge currently transmits all IR signals at 38 kHz also.

modulation
string
  • OOK = on-off keying
  • GFSK = gaussian frequency-shift keying

If not provided, defaults to OOK.

data
required
string

String representation of data bits to be transmitted.

The maximum length of the data string is 6144 bytes.

encoding
required
string

Specifies the encoding of the data string.

In all cases, the duration of each bit is 1/bps seconds.

CQ encoding ("cq")

This is a simple encoding where bits are represented using 0 and 1, with some abbreviations for sequences of bits.

Each character represents one or more bits:

  • 0 single zero bit
  • 1 single one bit
  • C 2^0 (1) zero bits
  • D 2^1 (2) zero bits
  • E 2^2 (4) zero bits
  • F 2^3 (8) zero bits
  • ...
  • Q 2^14 (16384) zero bits
  • c thru q are just like C thru Q, but for one bits
  • A the three bits 110
  • B the three bits 011

Hex ("hex")

This is a simple encoding where the data string consists of hex bytes. Each hex byte represents 8 bits of data.

Hex encoding is currently limited to only work at 40000 bps.

This is the default encoding for scan results.

bps
required
number

Bitrate of data. Range is 100 to 40000.

reps
number

Number of times that data should be repeated.

If not provided, 1 is assumed.

use_scan
boolean

If present and true, the Signal recorded by the most recent scan will be used, with all other fields ignored

Responses

Request samples

Content type
application/json
{
  • "freq": 434000,
  • "modulation": "OOK",
  • "data": "110100110110H",
  • "encoding": "cq",
  • "bps": 1000,
  • "reps": 12,
  • "use_scan": true
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}

Scan

Start a Scan

Start scanning for RF/IR signals.

Request Body schema: application/json
freq
number

Frequency to scan in kHz.

If not provided, scan will search all RF frequencies, but not IR.

Specify 38 to explicitly scan IR.

modulation
string
  • OOK = on-off keying
  • GFSK = gaussian frequency-shift keying

If not provided, defaults to OOK.

Only applicable to RF.

(GFSK scanning currently unimplemented.)

Responses

Request samples

Content type
application/json
{
  • "freq": 434000,
  • "modulation": "OOK"
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}

Check scan progress

Get information about a scan in progress, or the last completed scan.

Responses

Response samples

Content type
application/json
{
  • "freq": 434000,
  • "modulation": "OOK",
  • "running": false,
  • "total_timeout": 30,
  • "success": true
}

Cancel a Scan

Immediately stop scanning, and delete results.

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Scan Result

Get Signal from a Scan

Get the signal resulting from the most recent scan

Responses

Response samples

Content type
application/json
{
  • "freq": 434000,
  • "modulation": "OOK",
  • "data": "110100110110H",
  • "encoding": "cq",
  • "bps": 1000,
  • "reps": 12
}

Rssi

Get Receive Signal Strength Indication (RSSI)

Sweeps over the frequency range supported by the product, and returns a list of frequency-rssi ordered pairs.

This is useful for determining tuning of antennas.

Responses

Response samples

Content type
application/json
{
  • "format": [
    ],
  • "results": [
    ]
}

Token

Get Local API Token

Request token for accessing Bond over local network.

If locked is true, reply will contain neither token nor account_code.

Typical use case for this endpoint is:

  • request GET, finding that the endpoint is locked
  • perform PATCH with "locked": 0, the correct pin, and your account_code (if you want to take ownership of the Bond)
  • request GET again to get token
  • perform PATCH with "locked": 1

Alternatively, user may perform the proof-of-ownership event (such as holding down the Power button on a SBB remote for 5 sec), which will unlock the endpoint. In that case, the API client should poll GET waiting for unlock.

Lastly, this endpoint is unlocked for 10 minutes following power cycle.

Note: The token is not required for /sys/version and /token endpoints. However, all other endpoints require token to be provided in a BOND-Token HTTP header.

Responses

Response samples

Content type
application/json
{
  • "locked": 0,
  • "token": "8f514567acaf9869",
  • "account_code": "1234567890",
  • "nonce": "876a2b14c55b3e5a",
  • "pin_attempts_left": 9,
  • "disable": false
}

Add Bond to an Account (or Unlock Token)

If locked, provide pin (located on the product label) to unlock this endpoint. If pin is not provided or incorrect, a 401 will be returned.

If an account_code is provided, saves it to the Bond. When the Bond communicates with the backend, the Bond will be added to the account associated with account_code. You can find your account_code on the user screen in the mobile app.

You can also use this endpoint to simply find out your Bond's locked token by providing a pin

Request Body schema: application/json
locked
integer

If 1, means that the client wants to immediately re-lock this endpoint.

If 0, means that the client wants to unlock the endpoint.

account_code
string

10-digit account code, used to specify which account to associate the Bond with.

(Absolute maximum for this field is 16 alpha-numeric characters)

This does NOT include any checksum digits which may be added when displayed for the customer in the app, and required by the Bond WebGUI to eliminate typo issues.

pin
string

Pin number, if required, as part of unlocking procedure.

disable
boolean

If disabled, HTTP and other local APIs will not require token to function. Only disable on trusted networks, and only when using fixed IP addresses to avoid controlling the wrong Bond. Defaults to false, i.e., token required by default.

Responses

Request samples

Content type
application/json
{
  • "locked": 0,
  • "account_code": "1234567890",
  • "pin": "1234",
  • "disable": false
}

Response samples

Content type
application/json
{
  • "locked": 0,
  • "account_code": "1234567890",
  • "pin": "1234",
  • "disable": false
}

MQTT

Configure MQTT Transport

IMPORTANT NOTE: MQTT redirection is currently untested. If you have a use case for this API, please let us know on the forums so that we can better prioritize implementing this API.

Configure the Bond's MQTT Transport, which is used for communication with the Bond Cloud or an offline MQTT broker. Note that Bond uses MQTT over TLS with certificate-based authentication. Password-based authentication is not supported.

Some advanced users may elect to run their own MQTT brokers, so this endpoint allows customizing of the MQTT broker address and the various related security settings.

Note that any manipulation of this endpoint will result in the Bond disconnecting from Bond Cloud, and therefore integrations and control away from home will become unavailable.

NOTE: All settings only take effect after reboot.

Authorizations:
None
Request Body schema: application/json
host
string

IP address or domain name of the MQTT broker. If set to empty string, the default Bond Cloud server will be used.

port
number

Specify a different port number for the MQTT broker. If set to 0, the Bond Cloud default port number will be used (8883). Note that the communication is secured by TLS (SSL).

cert
string

Specify a custom Bond certificate. Typically, this is the Bond-specific certificate concatenated with the Bond-signing CA certificate. Write to empty string to go back to the Bond's default certificate.

key
string

Specify a custom Bond private key. Write to empty string to go back to the Bond's default private key.

enabled
boolean

[Added in v3.3.3] If true (default), Bond will attempt MQTT connection. If MQTT connection fails, Bond becomes discoverable again via Config AP. If false, Bond will not attempt MQTT connection and Config AP will remain deactivated.

server_cert
string

Specify a custom MQTT server CA. Set to empty string to return to default.

server_cert_check
boolean

Set to false to disable verification of the MQTT server CA. It is strongly recommend to leave this option enabled, because otherwise a man-in-the-middle attack is possible.

Responses

Request samples

Content type
application/json
{
  • "host": "my-mqtt-server.myhome.com",
  • "port": 8883,
  • "cert": "certificate_goes_here",
  • "key": "key_goes_here",
  • "enabled": true,
  • "server_cert": "certificate_goes_here",
  • "server_cert_check": true
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Get MQTT Configuration

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "host": "my-mqtt-server.myhome.com",
  • "port": 8883,
  • "cert_set": true,
  • "key_set": true,
  • "server_cert_set": true,
  • "enabled": true,
  • "server_cert_check": true
}

Reset MQTT Config to defaults

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

BPUP

Configure BPUP Transport

Configure the Bond's BPUP transport.

Authorizations:
None
Request Body schema: application/json
broadcast
boolean

If true, the Bond will broadcast all state updates on port 30007 (disabled by default)

Responses

Request samples

Content type
application/json
{
  • "broadcast": true
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Get BPUP Configuration

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "broadcast": true
}

Reset BPUP Config to defaults

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

HomeKit

Get Bond HomeKit configuration.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "enabled": false,
  • "paired": false,
  • "setup_code": "12341234"
}

Enable or disable the Bond HomeKit integration.

Authorizations:
None
Request Body schema: application/json
enabled
boolean
  • false: HomeKit logic and operations will not be executed. All settings remains in device database. (default)
  • true: HomeKit logic and operations will run.

Responses

Request samples

Content type
application/json
{
  • "enabled": false
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}

Reset Bond HomeKit configuration, unpairing if paired.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Wi-Fi Scan

Scan for Wi-Fi networks

A GET request starts a new Wi-Fi network scan (unless a scan is already in progress), and returns the results of the most recently completed scan. It is not an error for scan to be called before the scan has completed; however, the old results will be returned. A 204 is returned if no scan has been run yet since boot.

The results are returned as a nested JSON array (a 2D table) rather than a JSON object for compactness. The format array gives the meaning of each column of the results table.

The ssid field contains the network name. It is base64-encoded because arbitrary characters are allowed by the Wi-Fi standard.

The auth field gives the type of network security:

  • 0 = unsecured (open)
  • 1 = WEP
  • 2 = WPA PSK
  • 3 = WPA2 PSK
  • 4 = WPA/WPA2 PSK
  • 5 = WPA2 Enterprise [currently unsupported by Bond]

Note that for auth types 0 and 1, the application should warn the user that the network could be more secure, and should be set to WPA2 for best security.

The signal field contains an indication of access point signal quality (which may be derived from signal strength and/or signal-to-noise ratio), ranging from 0 to 100.

If hidden_requires_bssid is present and true, and the user wants to connect to a hidden network, the user must supply the BSSID (that is, the MAC address of the access point).

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "hidden_requires_bssid": true,
  • "format": [
    ],
  • "results": [
    ]
}

Wi-Fi Station

Get current Wi-Fi settings

Get the name (base64-encoded in ssid) of the Wi-Fi network to which the Bond is currently connected.

A numerical status field is also provided (see details below).

The BSSID of the network's access point is provided, hex-encoded in bssid. If bssid_set is present and true, then the Bond has been configured to only connect to an access point with a specific BSSID, specified in an earlier PUT.

The MAC address of the Bond is also provided, hex-encoded in mac. If this MAC address is not available, it will be null.

Some network configuration fields are returned: the Bond's IP address (ip), its default gateway (gw), its netmask (netmask), and its DNS and fallback DNS (dns and dns_alt). static_ip_set is present and true if a previous PUT has configured the Bond to use static values for these field. dns_set and dns_alt_set are present and true if an earlier PUT has configured the DNS used by the Bond.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "status": 2,
  • "ssid": "bGlua3N5cw==",
  • "bssid": "001122334455",
  • "bssid_set": true,
  • "mac": "30aea48fa8e8",
  • "static_ip_set": false,
  • "ip": "192.168.1.42",
  • "gw": "192.168.1.1",
  • "netmask": "255.255.255.0",
  • "dns_set": true,
  • "dns": "8.8.8.8",
  • "dns_alt": "8.8.4.4"
}

Connect to a Wi-Fi network

For compatibility reasons, the PATCH endpoint can also be accessed using the PUT method.

Instruct the Bond to connect to the network specified.

The Bond immediately saves the settings in non-volatile storage, and therefore the settings will persist even after power cycle.

The network name must be specified in ssid (base64-encoded). A password (again base64-encoded) is required unless it is an unsecured (open) network. The required security type (WEP/WPA/WPA2) is automatically determined by the Bond.

For DNS, Bond always tries default DNS servers first. However, our chosen DNS servers are blocked on some networks, so Bond will fall back to DNS servers provided by DHCP or specified by dns and dns_alt. If dns or dns_alt are provided, Bond will ignore any DNS servers proposed by DHCP. This behavior was decided upon after many customer service interactions which revealed an epidemic of bad ISP DNS servers which prevent what we originally though was reasonable: respecting the DHCP-provided servers by default.

If bssid is present, the Bond will only connect to an access point with the supplied, hex-encoded BSSID.

Authorizations:
None
Request Body schema: application/json
status
number

Indication of whether the Wi-Fi settings have been successful:

  • -4 = Wi-Fi not configured
  • -3 = disabled because Ethernet is selected
  • -2 = authentication failure
  • -1 = network not found
  • 0 = attempting to connect
  • 1 = connected, but no IP address yet
  • 2 = connected with IP address assigned
  • 3 = connected to cloud (MQTT)
ssid
string or null

Can be null if it's not set.

bssid
string or null

Can be null if it's not set.

static_ip_set
boolean

[changed in v2.16.2] If true on write, the ip, gw, netmask fields are required. If false on write, the ip, gw, netmask fields will be ignored and DHCP configured.

ip
string or null

Can be null if it's not connected.

gw
string or null

Can be null if it's not connected.

netmask
string or null

Can be null if it's not connected.

dns_set
boolean

[changed in v2.16.2] If true on write, the dns and dns_alt fields are required. If false on write, the dns and dns_alt fields will be ignored and the default dns behavior will take effect.

dns
string or null

Can be null if it's not connected.

dns_alt
string or null

Can be null if it's not connected.

password
string or null <password>

Can be null if it's not set.

Responses

Request samples

Content type
application/json
{
  • "status": 2,
  • "ssid": "bGlua3N5cw==",
  • "bssid": "001122334455",
  • "static_ip_set": false,
  • "ip": "192.168.1.42",
  • "gw": "192.168.1.1",
  • "netmask": "255.255.255.0",
  • "dns_set": true,
  • "dns": "8.8.8.8",
  • "dns_alt": "8.8.4.4",
  • "password": "cGFzc3dvcmQ="
}

Response samples

Content type
application/json
{
  • "status": 2,
  • "ssid": "bGlua3N5cw==",
  • "bssid": "001122334455",
  • "bssid_set": true,
  • "mac": "30aea48fa8e8",
  • "static_ip_set": false,
  • "ip": "192.168.1.42",
  • "gw": "192.168.1.1",
  • "netmask": "255.255.255.0",
  • "dns_set": true,
  • "dns": "8.8.8.8",
  • "dns_alt": "8.8.4.4"
}

Disconnect from Wi-Fi network

The Bond will disconnect from the current Wi-Fi network, and will not attempt to reconnect, even after a power cycle. It will be necessary to use PUT again to reconfigure Wi-Fi.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Ethernet

Get current Ethernet settings

Note that there are seperate DNS settings for the Ethernet and Wi-Fi interfaces.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "status": 2,
  • "mac": "30aea48fa8e8",
  • "static_ip_set": false,
  • "ip": "192.168.1.42",
  • "gw": "192.168.1.1",
  • "netmask": "255.255.255.0",
  • "dns_set": true,
  • "dns": "8.8.8.8",
  • "dns_alt": "8.8.4.4"
}

Customize Ethernet settings

For compatibility reasons, the PATCH endpoint can also be accessed using the deprecated PUT method.

Customize the Ethernet interface.

The Bond immediately saves the settings in non-volatile storage, and therefore the settings will persist even after power cycle.

For DNS, Bond always tries default DNS servers first. However, our chosen DNS servers are blocked on some networks, so Bond will fall back to DNS servers provided by DHCP or specified by dns and dns_alt. If dns or dns_alt are provided, Bond will ignore any DNS servers proposed by DHCP. This behavior was decided upon after many customer service interactions which revealed an epidemic of bad ISP DNS servers which prevent what we originally though was reasonable: respecting the DHCP-provided servers by default.

Authorizations:
None
Request Body schema: application/json
status
number
  • 0 = no link
  • 1 = link, but no IP address yet
  • 2 = link and IP address assigned
  • 3 = connected to cloud (MQTT)
static_ip_set
boolean

[changed in v2.16.2] If true on write, the ip, gw, netmask fields are required. If false on write, the ip, gw, netmask fields will be ignored and DHCP configured.

ip
string
gw
string
netmask
string
dns_set
boolean

[changed in v2.16.2] If true on write, the dns and dns_alt fields are required. If false on write, the dns and dns_alt fields will be ignored and the default dns behavior will take effect.

dns
string
dns_alt
string

Responses

Request samples

Content type
application/json
{
  • "status": 2,
  • "static_ip_set": false,
  • "ip": "192.168.1.42",
  • "gw": "192.168.1.1",
  • "netmask": "255.255.255.0",
  • "dns_set": true,
  • "dns": "8.8.8.8",
  • "dns_alt": "8.8.4.4"
}

Response samples

Content type
application/json
{
  • "status": 2,
  • "mac": "30aea48fa8e8",
  • "static_ip_set": false,
  • "ip": "192.168.1.42",
  • "gw": "192.168.1.1",
  • "netmask": "255.255.255.0",
  • "dns_set": true,
  • "dns": "8.8.8.8",
  • "dns_alt": "8.8.4.4"
}

Reset Ethernet Settings to Default

Bond will clear settings for Ethernet, defaulting to DHCP, DHCP-provided DNS (with fallback to hard-coded DNS servers), and Ethernet being preferred over Wi-Fi if both are available.

This will NOT disable the Ethernet port. If the attached network supports DHCP and has an internet connection, the Bond will continue to function on Ethernet.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Network Watchdog

Check Network Watchdog configuration

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "rwdg_disable": false,
  • "rwdg_timer_ms": 60000
}

Configure Network Watchdog

Configure the Wi-Fi watchdog, which runs whenever the Wi-Fi station (sta) is configured.

This watchdog feature is useful on some Wi-Fi networks where the Bond may lose its connection after some period of time.

Authorizations:
None
Request Body schema: application/json
rwdg_disable
boolean
  • true: disable Bond Cloud watchdog
  • false: enable Bond Cloud watchdog (default)

If enabled, Bond will reboot if not connected to Bond Cloud within first 10 minutes of boot, or if disconnected for 3 minutes.

Watchdog does not run if Bond is in Wi-Fi Setup mode.

NOTE: Any communication with the Bond over the HTTP transport will reset the timer as if the Bond were connected to the cloud.

Responses

Request samples

Content type
application/json
{
  • "rwdg_disable": false
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Upgrade

Get firmware upgrade status

Check the progress of a firmware upgrade.

Note that when an upgrade completes successfully, this endpoint will return a 204 again. The client should check the sys/version endpoint to determine whether the new firmware is being used.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "progress": -1,
  • "error_msg": "net_connect"
}

Start a new firmware upgrade

Instruct the Bond to upgrade to the specified firmware.

The client may specify both port (HTTPS) and http_port (HTTP). Bond will use whichever protocol is implemented in the firmware.

During the upgrade, the client SHOULD query GET to monitor progress.

Whether or not the Bond reboots spontaneously at the end of the upgrade process is dependent on the client specifying the reboot parameter.

If spontaneous reboot is requested, Bond will become unreachable for a period of time during the upgrade. When the Bond becomes reachable again, GET will return 204 No Content, at which time the client should check sys/version to determine whether the upgrade was successful.

Note that network connection is slow on some networks, especially with Bond Bridge 1st Generation, therefore the client MUST NOT declare an error until a reasonable timeout period (7 minutes).

Note that network issues may cause the Bond to remain inaccessible despite the update having succeeded. Furthermore, the probability of a failure of the upgrade mechanism after the reboot step is very low. Therefore the client should represent a timeout in upgrading as a communication error rather than a firmware upgrade error.

In the case that the client did not specify reboot=1, Bond will not reboot spontaneously and the progress indication will reach 1000 and remain there until the client issues an explicit reboot (via sys/reboot). Afterwards the client can confirm firmware upgrade success by checking version as usual.

Authorizations:
None
Request Body schema: application/json
host
required
string

Fully-Qualified Domain Name or IP address of server from which to download upgrade

port
required
string

HTTPS port number of server. Used only if sys/version is missing key upgrade_http, or the key is false.

http_port
string

HTTP port number of server. Used only if sys/version contains true value for upgrade_http.

path
required
string

Path of HTTPS URL to use to fetch the firmware binary. Must not include any query or fragment. Must start with a forward slash.

Note that only HTTPS is supported. Other protocols (including unsecured HTTP) are not supported.

info
required
string

Firmware info string, consisting of SHA-256 hash of the firmware binary, firmware target, and new firmware version number.

The hash is checked after firmware is downloaded and before it is written to flash, to ensure integrity and security.

sig
required
string

Digital signature of info string, signed using Olibra's private key, and base-64 encoded. Note that, as a security precaution, different key-pair is used for each firmware target. The API client does not need to worry about the key-pairs, but only be capable of providing the appropriate info and sig fields that correspond to a particular firmware binary. This metadata is available in release notes from Olibra.

The Bond validates this signature before the firmware update is completed.

reboot
number

If non-zero, requests that the Bond reboot spontaneously upon successful completion of the upgrade installation.

If zero, the Bond will wait for an explicit reboot via sys/reboot.

Defaults to zero.

Responses

Request samples

Content type
application/json
{
  • "host": "s3.amazonaws.com",
  • "port": "443",
  • "http_port": "80",
  • "path": "/bond-updates/breck-mach1-v2.0.bin",
  • "info": "cc8d372f1b1ada5b99097e46f9d45107487e5f8b000d5ccd943100b3dc27fb55:bond-simulator:v2.0",
  • "sig": "PAGliMxpwYYkuG+48JDu6rYfF9V57xXGNy2xf8yXCoo2Gcdk8plHrez2bPWkL8TZ5ptaZBPE9UuQf8wx9nkQswBoX413GHnQhBmyX0n/DihqQCG5rR7o3dZWhDsvke20JSB18D8xjNGHaIsWITyL38UAxvkw6gx5iv1ZXZ1KvafYoXbpk0mqfPJ7e/gV3SOBYXppHkm+3nQWGyxrn+oRg7LT82/JrKc//jkg18GfB0nS0cGfa9b6XFUELjAvY3Yi2cymbErcNZfu5jmsQxIOrGvDjy5foSTO1dK5uK9x+3frbIx6dYHQ3vriHMXPO2q+G1Hszu+dqI+aFS3rEdt8DbXoQ1qn/4eKhVhfJSMox9su7o6mvxA2LPFGbXXY6aauBA+4rMObid1JQ879NR41TckN7tZz/JCPFRCe4pqx+rCdPGnY78brllrFcb9J6bZxpKuo7GZ/der5zPZAev+EMOLVtSVqGzNA8VG+tghtxWWueVHG2R3XacLsF2gzWPjONsdwYmCnAihLGNkaPhrUwRSHUs8/LBzJPYtTjH13fv6ELpylztcMPwM7KoFJRyiuhFW3m2JinIIwqT9N2jwlGN3f3Fn/CJ3jA8fLhyQ3Vu37kowLZrI+8KVAdfxEyrEDHD/HIC2CMnoB6MSkuSTVO3AAAVKjUUurFGPb8NAiIk0=",
  • "reboot": 1
}

Response samples

Content type
application/json
{
  • "progress": -1,
  • "error_msg": "net_connect"
}

Cancel any running firmware upgrade

The Bond will cancel any firmware upgrade in progress.

Canceling a firmware upgrade is always safe.

However, power cycling a Bond during a firmware upgrade is not recommended.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Version

Get version info

Get detailed version information about hardware and firmware.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "upgrade_http": true,
  • "bondid": "KSMJWCE12345",
  • "target": "zermatt",
  • "api": 2,
  • "fw_ver": "v2.9",
  • "fw_date": "Wed Nov 22 15:45:19 UTC 2020",
  • "mcu_ver": "v1.234",
  • "make": "Olibra LLC",
  • "branding_profile": "BondHome",
  • "model": "BD-1000"
}

Backup

Check Backup status

Shows whether a backup or a restore is running, including progress indication, and error messages. After operation completes, the backup or restore field is set to 2 (or -1 in case of error) and the other fields remain accessible for the client to confirm operation completion. Client should DELETE the endpoint after confirming to return endpoint to empty (204 status).

Note that only one operation can run at once.

Responses

Response samples

Content type
application/json
{
  • "host": "192.168.1.107",
  • "http_port": "80",
  • "path": "/snapshots",
  • "timestamp": "1618599782",
  • "filename": "/ZZDE12345_v2.18.4-alpha_1618599782_0f8d01fa.bsnap",
  • "dev_ids": [
    ],
  • "backup": 0,
  • "restore": -1,
  • "progress": 999,
  • "error_msg": "connection error"
}

Start a Backup or Restore

Start a backup or restore operation,

NOTE: A backup will send all devices and associated data (commands, properties, state, skeds) the specified server. Settings not associated with a particular device (such as network settings, bridge name and location) are not included.

NOTE: A restore will update devices in an additive fashion. For each device (and command or sked), if a device already exists with the same key, then it is updated. If no such device exists, then it will be created.

Request Body schema: application/json
host
string

IP address of local HTTP server that will accept or serve snapshot.

http_port
string

HTTP port number of server. Usually not 80 because mobile phone or other OS will generate a random unused high port for the application.

path
string

Path to directory on HTTP server to use. Must not include any query or fragment. Must start (but not end) with a forward slash. Must not include the filename.

timestamp
string

Required only for backup operation. Timestamp for inclusion in the filename.

filename
string

Required only for restore operation. Firmware generates the filename for backups.

Format:

/<bond-id>_<fw-ver>_<timestamp>_<random>.bsnap

Timestamp is as provided by client.

dev_ids
string

If not provided, all devices are included in backup.

If provided, this list of device IDs are backed up.

Backup includes devices with their names, locations, schedules, commands & signals, properties, and state.

Responses

Request samples

Content type
application/json
{
  • "host": "192.168.1.107",
  • "http_port": "80",
  • "path": "/snapshots",
  • "timestamp": "1618599782",
  • "filename": "/ZZDE12345_v2.18.4-alpha_1618599782_0f8d01fa.bsnap",
  • "dev_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Cancel Backup or Restore

Cancel a failed operation, or clear the success/error status.

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Reset

Reset

Perform a reset operation, of which there are several types:

Setup reset will cause:

  • serves as proof-of-ownership event so as to:
    • cause Bond Config AP to reappear
    • allow the product to be set up on a new Wi-Fi network
    • allow adding to a new Bond account
  • Wi-Fi station details may be lost, depending on the product
  • Bond will not reboot

Factory reset will cause:

  • complete erasure of Bond's local database. Specifically:
    • All devices and settings will be lost
    • Bond will need to be reconnected to Wi-Fi
  • Bond will also reboot
  • Bond will remain on the current firmware version.
Request Body schema: application/json
type
string
  • "factory": factory reset (aka "White Reset")
  • "setup": setup reset (aka "Wi-Fi Reset" or "Green reset")

Responses

Request samples

Content type
application/json
{
  • "type": "factory"
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Reboot

Reboot

Reboot Bond. No settings are modified.

This does NOT perform a factory reset!

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Time

Get time info

Get information about Bond system time, timezone, and grid location.

Responses

Response samples

Content type
application/json
{
  • "unix_time": 1581708795,
  • "time_set": true,
  • "tz": "America/Sao_Paolo",
  • "grid": "FN30aw"
}

Modify time info

Set timezone, grid location, and/or time.

If tz is set to null, all skeds based on a local time (mark=midnight) will be disabled.

Likewise, if grid is set to null, all skeds based on solar marks will be disabled.

Request Body schema: application/json
unix_time
number

Absolute time, in seconds since the UNIX epoch.

Starts at zero at first boot for most products (with no backup battery). Automatically set via NTP (unless NTP has been disabled or the NTP server is unreachable), at which time time_set is set.

time_set
boolean

If false, then time has not (yet) been set or determined via NTP.

Device Schedules do not run unless time_set is true.

tz
string or null

Timezone string, as per tz_database.

null if unset.

The current list of supported timezones is given at https://bond-updates.s3.amazonaws.com/tz_meta.json

grid
string or null

Approximate geolocation of Bond unit, expressed as a 6-character Maidenhead Grid Locator. This information is used to calculate the sunrise and sunset times for Device Schedules.

Regex: ([A-R]{2}[0-9]{2}[a-r]{2})?

null if unset.

See: https://en.wikipedia.org/wiki/Maidenhead_Locator_System

Responses

Request samples

Content type
application/json
{
  • "unix_time": 1581708795,
  • "time_set": true,
  • "tz": "America/Sao_Paolo",
  • "grid": "FN30aw"
}

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}

Reset time info to defaults

Forget time, timezone, and grid location.

As a consequence, all skeds will be immediately disabled (enabled=false).

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Power

Get power supply info

Get information about Power Supply status (which supply is active).

Sent gratuitously upon change to active supplies.

Responses

Response samples

Content type
application/json
{
  • "poe_active": true,
  • "usb_active": false
}

Locale

Get Locale info

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "compliance_region": "au"
}

Change Locale info

Authorizations:
None
Request Body schema: application/json
compliance_region
string

Region for radio frequency compliance. This option must be set by the client (Bond Home app) during setup. String is a two-digit country code (ISO 3166-1 alpha-2). Supported options:

  • us: USA, Canada, Mexico
  • au: Australia [v2.15]

Responses

Request samples

Content type
application/json
{
  • "compliance_region": "au"
}

Response samples

Content type
application/json
{
  • "compliance_region": "au"
}

Reset Locale info

After deletion, default values will be restored.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "_error_id": 1,
  • "_error_msg": "You need authentication credentials to continue"
}

Database

Get database statistics

Get some statistics about the main Bond database such as free space available.

This endpoint exists for each of the partitions on the product which use the Beau database format:

  • "db" - the main read-write database where devices and settings are stored
  • "id" - the read-only partition containing Bond ID and certificates
  • "state" - contains state of each device [Bridges only]
path Parameters
partition
required
string

Responses

Response samples

Content type
application/json
{
  • "live_records": 20,
  • "dead_records": 33,
  • "empty_pages": 0,
  • "total_dead": 110824,
  • "total_free": 900421,
  • "max_free": 4002,
  • "total_head": 900421,
  • "min_head": 15,
  • "compactions": 1,
  • "size": 1048576,
  • "page_size": 4096,
  • "dirty": false
}

LiveLog

Get LiveLog configuration

Get the current configuration of the LiveLog component.

Responses

Response samples

Content type
application/json
{
  • "ip": "192.168.1.102",
  • "port": 1337
}

Configure LiveLog

Instructs Bond to start sending UDP packets to specified IP address and port. Every log message is sent in a seperate UDP packet. Depending on log verbosity, this may cause serious performance problems, so use wisely.

This setting does not persist reboot.

Request Body schema: application/json
ip
string
port
number

Responses

Request samples

Content type
application/json
{
  • "ip": "192.168.1.102",
  • "port": 1337
}

Disable LiveLog

Responses

LEDs

Get LED state

Get status from the BLED driver.

If manual is 0, value reflects the instantaneous value of the LEDs, and may change rapidly and automatically.

Responses

Response samples

Content type
application/json
{
  • "n": 5,
  • "manual": 1,
  • "value": "FF000000FF000000FFFFFFFF000000"
}

Manually control LEDs

Use this endpoint to manually control LEDs, such as during factory test. Be sure to use the manual field to prevent value from being overridden from automatic LED control.

If manual is 0 or absent, value may still be set, but may be overridden at any time.

Request Body schema: application/json
manual
number
  • 0 : LEDs behave normally (default)
  • 1 : LED automatic control disabled, will remain fixed as set
value
string

Concatinated 24-bit RGB hex values for each of the n LEDs.

In the example, the 5 LEDs are set to Red, Green, Blue, White, and Off, respectively.

Responses

Request samples

Content type
application/json
{
  • "manual": 1,
  • "value": "FF000000FF000000FFFFFFFF000000"
}

WiFi

Get Wi-Fi power settings

The shutdown field indicates the power state of the Wi-Fi (+BLE) radio:

  • 0: normal operation
  • 1: low-power shutdown mode

If the shutdown field is not present, assume normal operation.

Responses

Response samples

Content type
application/json
{
  • "shutdown": 1
}

Change Wi-Fi power settings

Set shutdown to 1 or 0 to control the Wi-Fi (+BLE) radio power level. A value of 1 turns this radio off.

These settings do not persist past reboot.

Request Body schema: application/json
shutdown
number

Responses

Request samples

Content type
application/json
{
  • "shutdown": 1
}

RF Manager

Get RF Manager configuration

(Bond Bridge only) Intended for use in debugging signal generation. All values false by default, and changes do not persist past reboot.

silence_tx stops the Bond Bridge from transmitting anything. It should otherwise behave normally: the LEDs flash, device state should change, etc.

log_signals causes all signals to be sent to sent to any listeners as they are generated. They are sent on the topic debug/rfman/signal, and could be monitored by a BPUP client listening on this topic. This is intended as a testing tool, to verify whether signals are generated as expected.

Responses

Response samples

Content type
application/json
{
  • "log_signals": false,
  • "silence_tx": false
}

Configure RF Manager

(Bond Bridge only) Intended for use in debugging signal generation. All values false by default, and changes do not persist past reboot.

silence_tx stops the Bond Bridge from transmitting anything. It should otherwise behave normally: the LEDs flash, device state should change, etc.

log_signals causes all signals to be sent to sent to any listeners as they are generated. They are sent on the topic debug/rfman/signal, and could be monitored by a BPUP client listening on this topic. This is intended as a testing tool, to verify whether signals are generated as expected.

Request Body schema: application/json
log_signals
boolean
silence_tx
boolean

Responses

Request samples

Content type
application/json
{
  • "log_signals": false,
  • "silence_tx": false
}

Response samples

Content type
application/json
{
  • "log_signals": false,
  • "silence_tx": false
}

Reset RF Manager settings

Responses