iSpindel#
Self Hosted Cloud Hosted
An iSpindel reports its tilt, temperature and battery, and BrewGraph shows the gravity it sends. This page shows how to point the iSpindel’s HTTP service at BrewGraph.
What you need#
An iSpindel device added in BrewGraph under Devices. BrewGraph shows its device token on the device page.
An iSpindel calibrated to output gravity in specific gravity (SG), with a device name that starts with the prefix
[SG], for example[SG] iSpindel. Plato is not accepted yet.
Configure the iSpindel#
In the iSpindel firmware configuration page, fill in:
Field |
Value |
|---|---|
Service Type |
|
Token / API key |
The device token from the BrewGraph device page, for example
|
Server Address |
Cloud Hosted: |
Server Port |
|
Path / URI |
|
Sending interval (seconds) |
Cloud Hosted: not shorter than the reporting interval of your plan. In
the free beta this is about |
On Cloud Hosted, a reading that arrives faster than your plan’s reporting
interval is answered with 429 and is not stored.
The iSpindel sends the token in the request body, together with the payload
described under iSpindel in Device Ingest API: name, ID, token,
angle, temperature, temp_units, battery, gravity,
interval and RSSI.
Payload#
An accepted minimal payload:
{
"name": "[SG] iSpindel",
"token": "<token>",
"gravity": 1.045
}
A typical payload:
{
"name": "[SG] iSpindel",
"ID": 13065051,
"token": "<token>",
"angle": 66.79,
"temperature": 20.56,
"temp_units": "C",
"battery": 4.13,
"gravity": 1.045,
"interval": 900,
"RSSI": -77
}
Gravity, angle, temperature, battery, and RSSI are optional individually; at least one
measurement is required. temp_units and ID are optional.
Save the typical payload as payload.json and replace <token> in the
file and both addresses with the device token. First capture the payload for
inspection, then send the same payload to the device endpoint:
curl -X POST 'https://ingest.brewgraph.com/ingest/test/<token>' \
-H 'Content-Type: application/json' --data-binary @payload.json
curl -X POST 'https://ingest.brewgraph.com/ingest/ispindel?token=<token>' \
-H 'Content-Type: application/json' --data-binary @payload.json
Check that it works#
Save the configuration and wait for one sending interval.
Open the device in BrewGraph. The latest reading, with its gravity, temperature and battery, should appear on the device page.
Assign the device to the batch that is fermenting to see the readings on the batch chart.
Troubleshooting#
Nothing appears and the iSpindel reports
401: the token is missing or mistyped. Copy it again from the device page.404: check that Path / URI is exactly/ingest/ispindel.Readings are refused or gravity looks wrong: check that the device name starts with
[SG]and that the iSpindel is calibrated to output SG.429on Cloud Hosted: raise the sending interval to at least your plan’s reporting interval.502,503or504: check Server Address. It must be the ingest host, not the address you use to open the app, and must not include a scheme.
For every status code and what to do about it, see Ingest error codes.
Limitations#
Gravity must be sent in specific gravity (SG). A device whose name does not
start with [SG], or that reports Plato, is not accepted yet.