Node.js API to control Anova water circulators.
tl;dr go check out the example.js
.
Note: only tested on a 2nd generation Anova Precision Cooker.
Make sure to meet all prerequisites set out by noble
to use the Bluetooth Low Energy (BLE) API.
Function to connect to an Anova device. Returns a promise that resolves to
another function sendCommand
. Providing a macAddress
string, you may filter
to connect to specific devices.
Function to queue a command to be sent to the Anova device. Returns a promise with the response from the device.
An object with command functions that return strings to be sent to the Anova
device with sendCommand
. Check out the docs to understand more about the
available commands.
An object with constants that are used as constraints when configuring the Anova device with commands.
Functions that check the response from a few commands. Can be useful for checking whether timers are running, the device is cooking, or if there is an error with the device.
Function to be used in conjuntion with anova.ble.commands.SET_NUMBER
.
Generates valid random strings, given a length as an integer. The valid length
for anova.ble.commands.SET_NUMBER
is 10
.
Function to set the credentials to be used for REST API calls.
-
credentials
: An optional object with the following required properties.-
id
: Anova device ID. Can be obtained with the BLE commandanova.ble.commands.GET_ID_CARD
(see example). -
secretKey
: Anova device secret key. Can be obtained by looking at the API calls made by the Anova app or by setting a new one with theanova.ble.commands.SET_NUMBER
command in conjunction withanova.ble.randomString
.
-
Returns undefined
if passing credentials
object, otherwise returns an array
of [id, secretKey]
.
Wrapper function for fetch
to call Anova REST API.
-
url
: A URL to send the call to. Call will be aGET
, unless apostBody
is given in which case it will be aPOST
. -
postBody
: An optional object that will be stringified and sent as thePOST
body.
Returns a promise that resolves to the JSON response of the API call.
An object with properties of different API commands to be sent to Anova's REST
API. Each command calls anova.rest.sendCommand
with the proper URL, HTTP
method, and POST
body if required and returns a promise.
Check out the docs to understand more about the available commands.
An object with constants that are used as constraints when calling the Anova REST API.
Functions that check the response from a few commands. Can be useful for checking whether timers are running, the device is cooking, or if there is an error with the device.
Recipes API coming soon...