# BrewBench Docs

Documentation for BrewBench services and API

{% embed url="<https://brewbench.co>" %}

Welcome to BrewBench Docs, follow us on most socials and [medium](https://medium.com/@brewbench/) for current updates.

* **Medium** <https://medium.com/@brewbench/>
* **iOS App** <https://apps.apple.com/us/app/id1527603859>
* **Android App** [https://play.google.com/store/apps/details?id=co.brewbench.monitor](https://play.google.com/store/apps/details?id=co.brewbench.monitor\&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1)
* **Amazon Fire App** <https://smile.amazon.com/dp/B08P92GCDV>
* **Amazon Fire TV App** <https://smile.amazon.com/dp/B08XMYV69B>
* **Reddit** [https://www.reddit.com/r/BrewBench](https://www.reddit.com/r/BrewBench/)&#x20;
* **Facebook** <https://www.facebook.com/BrewBench>
* **Instagram** [https://www.instagram.com/BrewBench](https://www.instagram.com/BrewBench/)
* **YouTube** <https://www.youtube.com/channel/UCAg0Q2PNsMApVw7OpKY0iVw>
* **Github** <https://github.com/brewbench>
* **Donate** <https://venmo.com/u/brewbench>


# BrewBench Manuals

Manuals for BrewBench Sensors

### BrewBench Box

{% file src="/files/erZizNa0bAopYZaVc442" %}
BBBBB-10000 - BrewBench Box
{% endfile %}

### BrewBench Stick

{% file src="/files/Vc7MU37hL2xkxVq8iwQt" %}
BT-1001 - BrewBench Stick Plus
{% endfile %}

{% file src="/files/TRHFrTnJ81wPhlfq3Rfy" %}
BT-1000 - BrewBench Stick
{% endfile %}


# BrewBench Monitor App API

Send data from a device to the BrewBench App.

## Generic Device Reading

<mark style="color:green;">`POST`</mark> `https://sensor.brewbench.co/device/{token}`

Post data from any device.  At least one data value is required. Data should not be posted more often than every 15 minutes (900 seconds).  Your API key is required either in the path or header.

#### Path Parameters

| Name                                    | Type   | Description                 |
| --------------------------------------- | ------ | --------------------------- |
| token<mark style="color:red;">\*</mark> | String | API Token (App -> Settings) |

#### Headers

| Name                                        | Type   | Description                 |
| ------------------------------------------- | ------ | --------------------------- |
| X-API-KEY<mark style="color:red;">\*</mark> | String | API Token (App -> Settings) |

#### Request Body

| Name                                   | Type   | Description                                                                    |
| -------------------------------------- | ------ | ------------------------------------------------------------------------------ |
| name<mark style="color:red;">\*</mark> | String | A user unique name for you device                                              |
| source                                 | String | Source Name (Default Generic)                                                  |
| temp                                   | Number | Temperature                                                                    |
| temp\_unit                             | String | C or F (Default C)                                                             |
| gravity                                | Number | Gravity                                                                        |
| gravity\_unit                          | String | G or P (Default P)                                                             |
| temp\_adjust                           | Number | Amount to adjust the temp value by                                             |
| ambient                                | Number | Ambient Temperature                                                            |
| ambient\_unit                          | String | C or F (Default C)                                                             |
| ambient\_adjust                        | Number | Amount to adjust the ambient value by                                          |
| device\_id                             | String | A user unique id for you device (takes precedence over name for device lookup) |
| pressure                               | Number | Pressure                                                                       |
| pressure\_unit                         | String | psi, bar, mBar, Pa, kPa, hPa, inHg, mmHg (Default psi)                         |
| co2\_ppm                               | Number | CO2 Parts Per Million                                                          |
| bpm                                    | Number | Bubbles Per Minute                                                             |
| moisture                               | Number | Moisture %                                                                     |
| humidity                               | Number | Humidity %                                                                     |
| battery                                | Number | Battery voltage (4.2 - 3.3)                                                    |
| rssi                                   | Number | WiFi RSSI                                                                      |
| angle                                  | Number | Hydrometer angle                                                               |
| hysteresis                             | Number | Hydrometer hysteresis                                                          |
| interval                               | Number | Post interval in seconds                                                       |
| comment                                | String | Comment                                                                        |

{% tabs %}
{% tab title="400: Bad Request Response for at lease one data value not posted." %}

```javascript
{
  "error": {
    "statusCode": 400,
    "name": "Error",
    "message": "missing required device data"
  }
}
```

{% endtab %}

{% tab title="201: Created Response for a successful device reading, response will contain fields that were posted." %}

```javascript
{
  "name": "Generic Device",
  "temp": 30,
  "temp_unit": "C",
  "humidity": 35,
  "rssi": -58
}
```

{% endtab %}

{% tab title="401: Unauthorized Response for API key not found" %}

```javascript
{
  "error": {
    "statusCode": 401,
    "name": "Error",
    "message": "user not authorized"
  }
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Response for passing a field not listed above." %}

```javascript
{
  "error": {
    "statusCode": 422,
    "name": "UnprocessableEntityError",
    "message": "The request body is invalid. See error object `details` property for more info.",
    "code": "VALIDATION_FAILED",
    "details": [
      {
        "path": "",
        "code": "additionalProperties",
        "message": "should NOT have additional properties",
        "info": {
          "additionalProperty": "air"
        }
      }
    ]
  }
}
```

{% endtab %}

{% tab title="404: Not Found Response for not sending token in the URL path" %}

```javascript
{
  "error": {
    "statusCode": 404,
    "name": "NotFoundError",
    "message": "Endpoint \"POST /device\" not found."
  }
}
```

{% endtab %}

{% tab title="429: Too Many Requests Response for posting sooner than every 900 seconds." %}

```javascript
{
  "error": {
    "statusCode": 429,
    "name": "Error",
    "message": "sorry you cannot post more than every 900 seconds"
  }
}
```

{% endtab %}
{% endtabs %}


# BrewBench App

App features


# Deleting Your Account

All sensors and data will be permanently deleted.

1. Open the BrewBench Monitor App
2. From the home screen click on Settings
3. Swipe / Scroll to the bottom
4. Under the Danger Zone heading, tap the Remove button next to Remove Account

If you cannot login to your account, contact us with the email that you signed up with, <https://www.brewbench.co/#contact>


# Deleting Your Data

All sensor data will be permanently deleted.

1. Open the BrewBench Monitor App
2. From the home screen, tap on Sensors
3. Tap on the sensor you wish to remove data from
4. Tap on edit in the bottom bar
5. Swipe / Scroll to the bottom
6. Under the Danger Zone heading, tap Delete next to readings

If you cannot login to your account, contact us with the email that you signed up with, <https://www.brewbench.co/#contact>


# Integrations

BrewBench Monitor App Integrations

### Devices

The BrewBench Monitor App supports many device integrations including an open source DIY sensor integration.

* **Tilt** - [https://tilthydrometer.com](https://tilthydrometer.com/)
  * Tilt Pro - <https://tilthydrometer.com/products/tilt-pro-wireless-hydrometer-and-thermometer>
  * Tilt Pi (Recommended) - <https://tilthydrometer.com/products/tilt-pi-v2-buster-dec20-raspberry-pi-sd-card-image-download>
* **iSpindel** - <https://github.com/universam1/iSpindel>
  * Open Source Distilling - [https://www.opensourcedistilling.com/ispindel](https://www.opensourcedistilling.com/ispindel/)
* **Floaty** - [https://floatyhydrometer.com](https://floatyhydrometer.com/)
* **Brewbrain** - [https://brewbrain.nl](https://brewbrain.nl/)

Brewbrain uses [SenML](https://datatracker.ietf.org/doc/html/rfc8428) so there is limited support for this.&#x20;

### Software

The BrewBench Monitor App supports sending data to other APIs including any custom DIY API.  Checkout forwarders in the app under Sensor -> Forwarders.

* **Brewer's Friend** - [https://www.brewersfriend.com](https://www.brewersfriend.com/)
* **Brewfather** - [https://brewfather.app](https://brewfather.app/)
* **Ubidots** - [https://ubidots.com](https://ubidots.com/)


# iSpindel

Integrating with iSpindel

{% embed url="<https://www.ispindel.de/>" %}

### Firmware

1. Download the latest firmware, binary file, from <https://github.com/universam1/iSpindel/releases>
2. Copy your BrewBench API key and save it somewhere, you'll need to paste this into step 8 for configuration.
3. Plug a micro USB into the closest port on your iSpindel.
4. Tap the side button next to the micro USB port 3-4 times with a small flat head screwdriver to start up the WiFi in config mode.
5. Connect to the **iSpindel\_iSpindel000** network.
6. Open the config URL in your browser <http://192.168.4.1>.
7. Click on maintenance and make sure you have the latest firmware, if not then upload the one you downloaded in step 1.
   1. ![](/files/4mWfTRpkD1TOIPfIz8kz)

### Configuration

Then click on configuration and setup the following

1. Change the iSpindel name
2. Set the interval to 900 (15 min)
3. Select HTTP for Service Type
4. Paste your BrewBench API key in for Token
5. Enter sensor.brewbench.co for Service Address
6. Enter 80 for the Service Port
7. Enter /ispindel/\[BrewBench API Key] for Path / URI (Replacing \[BrewBench API Key] for your Key and Save
8. <img src="/files/zu6XIRrfnReoCOM6ACNj" alt="" data-size="original">

* If you don't want to DIY one you can buy one from Open Source Distilling

{% embed url="<https://www.opensourcedistilling.com/ispindel>" %}

### App settings

You can copy your API key from settings in the app or from the add iSpindel screen.  Use the default /ispindel/\[API KEY] endpoint for plato.  The app will display this in the temp setting you have selected.

<img src="/files/NMOKIAWEdAWTtc4grzWo" alt="" data-size="original">

### Debugging

You can debug the iSpindel with [Arduino Studio](https://www.arduino.cc/en/software)

1. Open Arduino Studio
2. Plug your iSpindel into the micro USB
3. Select the port from Tools -> port
4. Open the Serial Monitor from Tools
5. Select 115200 baud

<img src="/files/I4UJJBKSrJOuMU8M1R2e" alt="" data-size="original">

### Building

<https://www.opensourcedistilling.com/ispindel/>


# Tilt

Integrating with Tilt

{% embed url="<https://tilthydrometer.com/>" %}

### Tilt App

Paste the BrewBench cloud URL copied from the app and paste it into Cloud URL input in the Tilt App.

### TiltPi&#x20;

We highly recommend using TiltPi over the app.  <https://tilthydrometer.com/products/tilt-pi-v2-buster-jan22-raspberry-pi-sd-card-image-download>

Once setup, connect to <http://tiltpi.local:1880/ui> and add the BrewBench cloud URL copied from the BrewBench app.


# Hydrom

Integrating with Hydrom

{% embed url="<https://hydrom.io/>" %}

In the BrewBench App use the add Hydrom and enter the following info into the Hydrom Services.

![](/files/pDzJjgpoDWCWnxOVvF7D)


