Download OpenAPI specification:Download
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.
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.
The Bond Local API uses unencrypted HTTP using a simple token-based authentication mechanism.
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.
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.
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
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"
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
.
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]
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"}}
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}"
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).
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
.
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.
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/
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:
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.
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:
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:
The following discussion is in terms of Groups but should be understood as also applying to Scenes unless otherwise specified.
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.
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"]
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.
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.
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.
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.
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.
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).
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.
Schedules on groups and scenes need to be installed into each shard, and the Bond Home app performs downward synchronization on the skeds.
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.
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.
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.
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 IDd
: 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 IDs
: HTTP status codem
: 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 bodyThere'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/
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 IDd
: 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 IDs
: HTTP status codem
: 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.
[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.
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.
For Bond PIN "1234", your HomeKit Setup Code is "12341234".
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.
Open the Home app on your iPhone/iPad and follow these steps:
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.
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/.
A "Smart by Bond" appliance is a smart appliance that uses the API described here, other than those parts designated as "Bridge Only".
Within the Bond ecosystem, the term "device" always refers to a home appliance connected to Bond. A Bond Bridge is not itself a device.
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.
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.
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.
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.
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.
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.
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.
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.
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.
(none)
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.
(none)
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.
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.
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.
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.
(none)
[ <mode>, <mean>, <var> ]
: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.
The Direction feature is used by reversible Ceiling Fans to track the direction of the fan motor.
The Direction feature requires the Power feature.
(none)
The forward and reverse modes are sometimes called Summer and Winter, respectively.
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.
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.
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.
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.
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.
NOTE: The brightness level is remembered on TurnLightOff and restored on TurnLightOn.
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.
null
to restore factory default.(none)
(none)
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.
(none)
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.
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.
The Flame feature is used by fireplaces to indicate flame level.
The Flame feature requires the Power feature.
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.The Open feature is used to describe a device that can be opened and closed. Common use cases are motorized shades and garage doors.
(none)
If your remote has a discrete stopping command, consider using the Hold() action to stop the motion of the device.
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.
(none)
[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.
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.
(none)
(none)
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.
(none)
Collected here are some actions that may be used with other features, but have no state-change behavior on the Bond.
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.
{- "_": "7fc1e84b",
- "3b20f300": {
- "_": "9a5e1136"
}, - "4caf6472": {
- "_": "409d124b"
}
}
name required | string |
type required | string
This The |
subtype | string [Added in v2.21] The subtype field is used to distinguish between categories of devices sublter than the Currently, subtype is only used for Motorized Window Coverings and Awnings (
This field does not impact functionality in any way.
Furthermore, the The WARNING: Although currently it is not the case, at some point the same |
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
|
location | string |
{- "name": "My Fan",
- "type": "CF",
- "subtype": "AWNING",
- "template": "A1",
- "location": "Kitchen"
}
{- "_id": "01234567"
}
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
device_id required | number |
{- "name": "My Fan",
- "type": "CF",
- "subtype": "AWNING",
- "template": "A1",
- "location": "Kitchen",
- "actions": [
- "TurnOn",
- "TurnOff",
- "TogglePower",
- "SetSpeed",
- "IncreaseSpeed",
- "DecreaseSpeed"
], - "properties": {
- "_": "84cd8a43"
}, - "state": {
- "_": "ad9bcde4"
}, - "commands": {
- "_": "ad9bcde4"
}
}
device_id required | number |
name required | string |
type required | string
This The |
subtype | string [Added in v2.21] The subtype field is used to distinguish between categories of devices sublter than the Currently, subtype is only used for Motorized Window Coverings and Awnings (
This field does not impact functionality in any way.
Furthermore, the The WARNING: Although currently it is not the case, at some point the same |
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
|
location | string |
{- "name": "My Fan",
- "type": "CF",
- "subtype": "AWNING",
- "template": "A1",
- "location": "Kitchen"
}
{- "name": "My Fan",
- "type": "CF",
- "subtype": "AWNING",
- "template": "A1",
- "location": "Kitchen",
- "actions": [
- "TurnOn",
- "TurnOff",
- "TogglePower",
- "SetSpeed",
- "IncreaseSpeed",
- "DecreaseSpeed"
], - "properties": {
- "_": "84cd8a43"
}, - "state": {
- "_": "ad9bcde4"
}, - "commands": {
- "_": "ad9bcde4"
}
}
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)
device_id required | number |
{- "breeze": [
- 1,
- 0.2,
- 0.9
], - "brightness": 75,
- "light": 1,
- "power": 0,
- "speed": 2,
- "timer": 3599
}
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
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.
device_id required | number |
{- "trust_state": false,
- "addr": "10101",
- "freq": 434300,
- "bps": 3000,
- "zero_gap": 30
}
See the documentation of the individual properties for whether they can be PATCHed.
device_id required | number |
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 |
{- "trust_state": false
}
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
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.
action_name required | string |
device_id required | number |
{- "argument": 4
}
{- "argument": 4
}
[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).
device_id required | number |
{- "addr": [
- "dead",
- "0f2a",
- "0002",
- "0003"
], - "addr_slots": 5,
- "learn_window_ms": 60000,
- "learn_window_remaining_ms": 1100,
- "learn_window_open": true,
- "learn_count": 0,
- "addr0_is_dip": true
}
[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.
device_id required | number |
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. |
{- "addr": [
- "dead",
- "0f2a",
- "0002",
- "0003"
], - "learn_window_open": true,
- "addr0_is_dip": true
}
{- "addr": [
- "dead",
- "0f2a",
- "0002",
- "0003"
], - "addr_slots": 5,
- "learn_window_ms": 60000,
- "learn_window_remaining_ms": 1100,
- "learn_window_open": true,
- "learn_count": 0,
- "addr0_is_dip": true
}
[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.
device_id required | number |
{- "addr": [
- "dead",
- "0f2a",
- "0002",
- "0003"
], - "addr_slots": 5,
- "learn_window_ms": 60000,
- "learn_window_remaining_ms": 1100,
- "learn_window_open": true,
- "learn_count": 0,
- "addr0_is_dip": true
}
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.
device_id required | number |
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
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]
device_id required | number |
{- "enabled": false,
- "state": {
- "light": 1,
- "brightness": 100,
- "power": 0,
- "speed": 3
}
}
device_id required | number |
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. |
{- "enabled": false,
- "state": {
- "light": 1,
- "brightness": 100,
- "power": 0,
- "speed": 3
}
}
{- "enabled": false,
- "state": {
- "light": 1,
- "brightness": 100,
- "power": 0,
- "speed": 3
}
}
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.
device_id required | number |
{- "enabled": false,
- "state": {
- "light": 1,
- "brightness": 100,
- "power": 0,
- "speed": 3
}
}
Returns a list of command IDs and the corresponding command hashes. Please see the "Hash Tree" documentation for an explanation of hashes.
device_id required | string |
{- "_": "7fc1e84b",
- "3b20f300": {
- "_": "9a5e1136"
}, - "4ad874d2": {
- "_": "84819a9f"
}, - "a94328bc": {
- "_": "23141efa"
}, - "d87d6ef2": {
- "_": "2425a8bc"
}
}
Creates a Command under a specific Device.
device_id required | string |
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 |
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. |
{- "name": "Light",
- "action": "SetSpeed",
- "argument": 3,
- "icon": "speed_3",
- "category_name": "fan",
- "button_type": "tap",
- "hidden": true
}
{- "_id": "01234567"
}
Get information about a Command.
device_id required | string |
command_id required | string |
{- "name": "Light",
- "action": "SetSpeed",
- "argument": 3,
- "icon": "speed_3",
- "category_name": "fan",
- "button_type": "tap",
- "hidden": true
}
Modifies any fields of an existing Command.
device_id required | string |
command_id required | string |
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 |
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. |
{- "name": "Light",
- "action": "SetSpeed",
- "argument": 3,
- "icon": "speed_3",
- "category_name": "fan",
- "button_type": "tap",
- "hidden": true
}
{- "_error_id": 1,
- "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}
Deletes specified Command.
Any associated Signal will be implicitly deleted.
device_id required | string |
command_id required | string |
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
Get signal associated with this command.
device_id required | string |
command_id required | string |
{- "freq": 434000,
- "modulation": "OOK",
- "data": "110100110110H",
- "encoding": "cq",
- "bps": 1000,
- "reps": 12
}
Creates a Signal associated with this Command.
device_id required | string |
command_id required | string |
freq required | number Frequency in kHz:
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
If not provided, defaults to |
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/ CQ encoding (
|
bps required | number Bitrate of |
reps | number Number of times that data should be repeated. If not provided, |
use_scan | boolean If present and true, the Signal recorded by the most recent scan will be used, with all other fields ignored |
{- "freq": 434000,
- "modulation": "OOK",
- "data": "110100110110H",
- "encoding": "cq",
- "bps": 1000,
- "reps": 12,
- "use_scan": true
}
{- "_error_id": 1,
- "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}
Modifies any fields of an existing Signal.
device_id required | string |
command_id required | string |
freq required | number Frequency in kHz:
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
If not provided, defaults to |
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/ CQ encoding (
|
bps required | number Bitrate of |
reps | number Number of times that data should be repeated. If not provided, |
use_scan | boolean If present and true, the Signal recorded by the most recent scan will be used, with all other fields ignored |
{- "freq": 434000,
- "modulation": "OOK",
- "data": "110100110110H",
- "encoding": "cq",
- "bps": 1000,
- "reps": 12,
- "use_scan": true
}
{- "_error_id": 1,
- "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}
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.
device_id required | string |
command_id required | string |
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
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.
device_id required | string |
command_id required | string |
{ }
{- "_error_id": 1,
- "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}
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.
{- "_": "7fc1e84b",
- "3b20f300": {
- "_": "9a5e1136"
}, - "4caf6472": {
- "_": "409d124b"
}
}
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.
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. |
{- "name": "Kitchen Shades",
- "devices": [
- "aabbccdd",
- "11223344",
- "deadbeef"
]
}
{- "_id": "01234567"
}
Groups are collections of Devices on a single Bridge.
group_id required | number |
{- "name": "Kitchen Shades",
- "devices": [
- "aabbccdd",
- "11223344",
- "deadbeef"
], - "types": [
- "MS"
], - "locations": [
- "Kitchen"
], - "actions": [
- "Open",
- "Close",
- "Preset"
], - "state": {
- "_": "ad9bcde4"
}
}
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.
group_id required | number |
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. |
{- "name": "Kitchen Shades",
- "devices": [
- "aabbccdd",
- "11223344",
- "deadbeef"
]
}
{- "name": "Kitchen Shades",
- "devices": [
- "aabbccdd",
- "11223344",
- "deadbeef"
], - "types": [
- "MS"
], - "locations": [
- "Kitchen"
], - "actions": [
- "Open",
- "Close",
- "Preset"
], - "state": {
- "_": "ad9bcde4"
}
}
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.
group_id required | string |
device | string ID of Device to add |
{- "device": "aabbccdd"
}
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
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.
group_id required | string |
device_id required | string |
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
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.
group_id required | number |
{- "open": 1
}
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.
group_id required | number |
{- "trust_state": false,
- "addr": "10101",
- "freq": 434300,
- "bps": 3000,
- "zero_gap": 30
}
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.]
group_id required | number |
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 |
{- "trust_state": false
}
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
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.
action_name required | string |
group_id required | number |
{- "argument": 4
}
{- "argument": 4
}
Returns a list of sked_ids and the corresponding sked hashes. Please see the "Hash Tree" documentation for an explanation of hashes.
device_id required | string |
{- "_": "7fc1e84b",
- "3b20f300": {
- "_": "9a5e1136"
}, - "4ad874d2": {
- "_": "84819a9f"
}, - "a94328bc": {
- "_": "23141efa"
}, - "d87d6ef2": {
- "_": "2425a8bc"
}
}
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:
mark
is midnight
but sys/time.tz
is null
mark
is dawn
, dusk
, sunrise
, or sunset
, but sys/time.grid
is null
device_id required | string |
enabled | boolean If false, schedule will never execute, but will remain in device database. Oneshot schedules (with 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 | any Argument to action, if needed. |
seconds required | integer Time at which schedule should execute, relative to |
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 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:
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. |
{- "enabled": true,
- "action": "SetBrightness",
- "argument": 80,
- "seconds": -3600,
- "days_of_week": [
- false,
- true,
- true,
- true,
- true,
- true,
- false
], - "mark": "sunset"
}
{- "_id": "01234567"
}
Get information about a Device Schedule.
device_id required | string |
sked_id required | string |
{- "enabled": true,
- "action": "SetBrightness",
- "argument": 80,
- "seconds": -3600,
- "days_of_week": [
- false,
- true,
- true,
- true,
- true,
- true,
- false
], - "mark": "sunset"
}
Modifies any fields of an existing Device Schedule.
device_id required | string |
sked_id required | string |
enabled | boolean If false, schedule will never execute, but will remain in device database. Oneshot schedules (with 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 | any Argument to action, if needed. |
seconds required | integer Time at which schedule should execute, relative to |
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 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:
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. |
{- "enabled": true,
- "action": "SetBrightness",
- "argument": 80,
- "seconds": -3600,
- "days_of_week": [
- false,
- true,
- true,
- true,
- true,
- true,
- false
], - "mark": "sunset"
}
{- "_error_id": 1,
- "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}
Deletes specified Device Schedule. Naturally, the Device Schedule will be canceled.
device_id required | string |
sked_id required | string |
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
Returns a list of sked_ids and the corresponding sked hashes. Please see the "Hash Tree" documentation for an explanation of hashes.
group_id required | string |
{- "_": "7fc1e84b",
- "3b20f300": {
- "_": "9a5e1136"
}, - "4ad874d2": {
- "_": "84819a9f"
}, - "a94328bc": {
- "_": "23141efa"
}, - "d87d6ef2": {
- "_": "2425a8bc"
}
}
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:
mark
is midnight
but sys/time.tz
is null
mark
is dawn
, dusk
, sunrise
, or sunset
, but sys/time.grid
is null
group_id required | string |
enabled | boolean If false, schedule will never execute, but will remain in device database. Oneshot schedules (with 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 | any Argument to action, if needed. |
seconds required | integer Time at which schedule should execute, relative to |
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 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:
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. |
{- "enabled": true,
- "action": "SetBrightness",
- "argument": 80,
- "seconds": -3600,
- "days_of_week": [
- false,
- true,
- true,
- true,
- true,
- true,
- false
], - "mark": "sunset"
}
{- "_id": "01234567"
}
Get information about a Group Schedule.
group_id required | string |
sked_id required | string |
{- "enabled": true,
- "action": "SetBrightness",
- "argument": 80,
- "seconds": -3600,
- "days_of_week": [
- false,
- true,
- true,
- true,
- true,
- true,
- false
], - "mark": "sunset"
}
Modifies any fields of an existing Group Schedule.
group_id required | string |
sked_id required | string |
enabled | boolean If false, schedule will never execute, but will remain in device database. Oneshot schedules (with 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 | any Argument to action, if needed. |
seconds required | integer Time at which schedule should execute, relative to |
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 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:
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. |
{- "enabled": true,
- "action": "SetBrightness",
- "argument": 80,
- "seconds": -3600,
- "days_of_week": [
- false,
- true,
- true,
- true,
- true,
- true,
- false
], - "mark": "sunset"
}
{- "_error_id": 1,
- "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}
Deletes specified Group Schedule. Naturally, the Group Schedule will be canceled.
group_id required | string |
sked_id required | string |
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
location | string |
name | string |
bluelight | integer Amount of blue light emitted from the Bond when it's idle: at |
{- "location": "My Room",
- "name": "My Bridge",
- "bluelight": 127
}
{- "location": "My Room",
- "name": "My Bridge",
- "bluelight": 127,
- "frequencies": [
- [
- 38,
- 38
], - [
- 433050,
- 434079
]
]
}
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.
{- "_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 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
freq required | number Frequency in kHz:
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
If not provided, defaults to |
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/ CQ encoding (
|
bps required | number Bitrate of |
reps | number Number of times that data should be repeated. If not provided, |
use_scan | boolean If present and true, the Signal recorded by the most recent scan will be used, with all other fields ignored |
{- "freq": 434000,
- "modulation": "OOK",
- "data": "110100110110H",
- "encoding": "cq",
- "bps": 1000,
- "reps": 12,
- "use_scan": true
}
{- "_error_id": 1,
- "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}
Start scanning for RF/IR signals.
freq | number Frequency to scan in kHz. If not provided, scan will search all RF frequencies, but not IR. Specify |
modulation | string
If not provided, defaults to Only applicable to RF. (GFSK scanning currently unimplemented.) |
{- "freq": 434000,
- "modulation": "OOK"
}
{- "_error_id": 1,
- "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}
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.
{- "format": [
- "freq",
- "rssi"
], - "results": [
- [
- 350000,
- 80
], - [
- 351000,
- 87
], - [
- 352000,
- 92
]
]
}
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:
"locked": 0
, the correct pin
,
and your account_code
(if you want to take ownership of the Bond)token
"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.
{- "locked": 0,
- "token": "8f514567acaf9869",
- "account_code": "1234567890",
- "nonce": "876a2b14c55b3e5a",
- "pin_attempts_left": 9,
- "disable": false
}
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
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. |
{- "locked": 0,
- "account_code": "1234567890",
- "pin": "1234",
- "disable": false
}
{- "locked": 0,
- "account_code": "1234567890",
- "pin": "1234",
- "disable": false
}
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.
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. |
{- "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
}
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
Configure the Bond's BPUP transport.
broadcast | boolean If true, the Bond will broadcast all state updates on port 30007 (disabled by default) |
{- "broadcast": true
}
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
enabled | boolean
|
{- "enabled": false
}
{- "_error_id": 1,
- "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}
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:
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).
{- "hidden_requires_bssid": true,
- "format": [
- "ssid",
- "bssid",
- "auth",
- "ch",
- "signal"
], - "results": [
- [
- "REIyQzk1",
- "00A423DB2C9D",
- 4,
- 1,
- 90
], - [
- "b2xpYnJhIGFpcnBvcnQgMQ==",
- "4C3275C649C4",
- 3,
- 11,
- 74
], - [
- "UGxheVNpZ2h0XzVH",
- "003E5D921274",
- 4,
- 6,
- 73
], - [
- "b2xpYnJhIG1pZmkgMw==",
- "101331C514C7",
- 3,
- 6,
- 61
], - [
- "S0VFQk9YIFcxNTBOUg==",
- "D8EB97B1B322",
- 0,
- 11,
- 60
], - [
- "VmVyaXpvbi1NQkhBMTAtMTRDNy1ndWVzdA==",
- "121331C514C8",
- 3,
- 6,
- 60
], - [
- "b2xpYnJhIGFpcnBvcnQgMQ==",
- "9801A7E7ABD4",
- 3,
- 6,
- 57
], - [
- "b3B0aW11bXdpZmlfUGFzc3BvaW50",
- "E00EDA137575",
- 5,
- 1,
- 39
], - [
- "NkMxNDYw",
- "0072826C1468",
- 4,
- 1,
- 36
], - [
- "UkRMRiBXaS1GaSBOZXR3b3Jr",
- "881FA13633AA",
- 3,
- 1,
- 33
], - [
- "SFAtUHJpbnQtRjEtT2ZmaWNlamV0IFBybyA4NjAw",
- "28924ABF85F1",
- 3,
- 6,
- 30
], - [
- "Wm9oYXIgYWlycG9ydA==",
- "00F76FCDE89C",
- 3,
- 11,
- 28
], - [
- "aWM=",
- "149182C06087",
- 3,
- 1,
- 26
], - [
- "bWVkaWFsaW5r",
- "14358B0B1920",
- 2,
- 1,
- 24
]
]
}
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.
{- "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"
}
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.
status | number Indication of whether the Wi-Fi settings have been successful:
|
ssid | string or null Can be |
bssid | string or null Can be |
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 |
gw | string or null Can be |
netmask | string or null Can be |
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 |
dns_alt | string or null Can be |
password | string or null <password> Can be |
{- "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="
}
{- "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"
}
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.
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
Note that there are seperate DNS settings for the Ethernet and Wi-Fi interfaces.
{- "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"
}
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.
status | number
|
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 |
{- "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"
}
{- "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"
}
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.
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
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.
rwdg_disable | boolean
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. |
{- "rwdg_disable": false
}
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
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.
{- "progress": -1,
- "error_msg": "net_connect"
}
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.
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 |
http_port | string HTTP port number of server.
Used only if |
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 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. |
{- "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
}
{- "progress": -1,
- "error_msg": "net_connect"
}
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.
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
Get detailed version information about hardware and firmware.
{- "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"
}
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.
{- "host": "192.168.1.107",
- "http_port": "80",
- "path": "/snapshots",
- "timestamp": "1618599782",
- "filename": "/ZZDE12345_v2.18.4-alpha_1618599782_0f8d01fa.bsnap",
- "dev_ids": [
- "aabbccdd"
], - "backup": 0,
- "restore": -1,
- "progress": 999,
- "error_msg": "connection error"
}
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.
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: 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. |
{- "host": "192.168.1.107",
- "http_port": "80",
- "path": "/snapshots",
- "timestamp": "1618599782",
- "filename": "/ZZDE12345_v2.18.4-alpha_1618599782_0f8d01fa.bsnap",
- "dev_ids": [
- "aabbccdd"
]
}
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
Perform a reset operation, of which there are several types:
Setup reset will cause:
Factory reset will cause:
type | string
|
{- "type": "factory"
}
{- "_error_id": 1,
- "_error_msg": "You need authentication credentials to continue"
}
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.
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 | boolean If false, then time has not (yet) been set or determined via NTP. Device Schedules do not run unless |
tz | string or null Timezone string, as per tz_database.
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:
See: https://en.wikipedia.org/wiki/Maidenhead_Locator_System |
{- "unix_time": 1581708795,
- "time_set": true,
- "tz": "America/Sao_Paolo",
- "grid": "FN30aw"
}
{- "_error_id": 1,
- "_error_msg": "The resource wasn't created because of a validation problem (This field will have a description of the problem)"
}
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:
|
{- "compliance_region": "au"
}
{- "compliance_region": "au"
}
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]partition required | string |
{- "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
}
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.
ip | string |
port | number |
{- "ip": "192.168.1.102",
- "port": 1337
}
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.
manual | number
|
value | string Concatinated 24-bit RGB hex values for each of the In the example, the 5 LEDs are set to Red, Green, Blue, White, and Off, respectively. |
{- "manual": 1,
- "value": "FF000000FF000000FFFFFFFF000000"
}
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.
shutdown | number |
{- "shutdown": 1
}
(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.
{- "log_signals": false,
- "silence_tx": false
}
(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.
log_signals | boolean |
silence_tx | boolean |
{- "log_signals": false,
- "silence_tx": false
}
{- "log_signals": false,
- "silence_tx": false
}