GitXplorerGitXplorer
d

sous-vide

public
78 stars
8 forks
19 issues

Commits

List of commits on branch master.
Unverified
23579cc100f59b13421eae23d9a0f2cfd413da60

1.1.0

ddfrankland committed 8 years ago
Unverified
73832163c120f116ddd1ae98f9a0a7cdbbe8e7eb

Update README.md

ddfrankland committed 8 years ago
Unverified
8fe81b414e0577bd2f1cccb51ad685cf518a10bd

Update README.md

ddfrankland committed 8 years ago
Unverified
a29716f40330e51e40a1f84d31aa76cbacb3e14f

Update example.js

ddfrankland committed 8 years ago
Unverified
dfda1900ac645abc0a663aa871d9f5c33bab1926

Update REST API sendCommand to be more verbose on error

ddfrankland committed 8 years ago
Unverified
43feb525bb1a292b1c0341713baa5987c7b2a068

Add connect command to REST API to add credentials

ddfrankland committed 8 years ago

README

The README file for this repository.

sous-vide

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.

Prerequisites

Make sure to meet all prerequisites set out by noble to use the Bluetooth Low Energy (BLE) API.

APIs

Bluetooth Low Energy (BLE)

anova.ble.connect([macAddress])

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.

sendCommand(commandString)

Function to queue a command to be sent to the Anova device. Returns a promise with the response from the device.

anova.ble.commands

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.

anova.ble.constants

An object with constants that are used as constraints when configuring the Anova device with commands.

anova.ble.responses

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.

anova.ble.randomString

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.

REST

anova.rest.connect([credentials])

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 command anova.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 the anova.ble.commands.SET_NUMBER command in conjunction with anova.ble.randomString.

Returns undefined if passing credentials object, otherwise returns an array of [id, secretKey].

anova.rest.sendCommand(url, [postBody])

Wrapper function for fetch to call Anova REST API.

  • url: A URL to send the call to. Call will be a GET, unless a postBody is given in which case it will be a POST.

  • postBody: An optional object that will be stringified and sent as the POST body.

Returns a promise that resolves to the JSON response of the API call.

anova.rest.commands

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.

anova.rest.constants

An object with constants that are used as constraints when calling the Anova REST API.

anova.rest.responses

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

Recipes API coming soon...