# sous-vide

> Node.js API to control Anova water circulators. So far, only tested on a 2nd generation Anova Precision Cooker.

Latest version **1.1.0** (published 2017-04-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install sous-vide
pnpm add sous-vide
yarn add sous-vide
bun add sous-vide
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2017-04-24 |
| First published | 2017-04-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 80 |
| Author | Dylan Frankland |
| Maintainers | dfrankland |
| Keywords | anova, bluetooth, ble, cooking |

## Links

- npm: https://www.npmjs.com/package/sous-vide
- Repository: https://github.com/dfrankland/sous-vide
- Homepage: https://github.com/dfrankland/sous-vide#readme
- Issues: https://github.com/dfrankland/sous-vide/issues
- npm.io page: https://npm.io/package/sous-vide

## Dependencies (3)

- [noble](https://npm.io/package/noble.md) ^1.8.1
- [crowd-control](https://npm.io/package/crowd-control.md) ^1.0.0
- [isomorphic-fetch](https://npm.io/package/isomorphic-fetch.md) ^2.2.1

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2017-04-24
- 1.0.3 — 2017-04-23
- 1.0.2 — 2017-04-17
- 1.0.1 — 2017-04-17
- 1.0.0 — 2017-04-17

## README

# sous-vide

Node.js API to control Anova water circulators.

**tl;dr** [go check out the `example.js`.][1]

> Note: only tested on a 2nd generation Anova Precision Cooker.

## Prerequisites

Make sure to meet all prerequisites set out by [`noble`][2] 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][3] 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][4] 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...

[1]: https://github.com/dfrankland/sous-vide/blob/master/example.js
[2]: https://github.com/sandeepmistry/noble#prerequisites
[3]: https://github.com/dfrankland/sous-vide/blob/master/docs/ble.md
[4]: https://github.com/dfrankland/sous-vide/blob/master/docs/rest.md

---
_Source: https://npm.io/package/sous-vide · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
