GravityMon Gateway#
Self Hosted Cloud Hosted: WiFi devices only; BLE coming soon
The GravityMon Gateway receives readings from GravityMon devices and forwards them to BrewGraph. This page shows how to point the Gateway at BrewGraph and how device tokens are handled when readings pass through it.
What you need#
Each source device added in BrewGraph under Devices as a Gravitymon device. Do not add the Gateway itself as a device. BrewGraph shows each device’s token on its device page.
A GravityMon Gateway that can reach the ingest host.
Configure the Gateway#
The Gateway forwards readings with its push targets, the same way a GravityMon pushes to BrewGraph. The settings are described in the Gateway’s own documentation, configuration and services.
Under Push targets, Settings:
Field |
Value |
|---|---|
Token |
A shared value the data format can use as |
Push timeout |
10 to 60 seconds |
Push minimum resend time |
|
For a target (HTTP POST #1 or #2):
Field |
Value |
|---|---|
HTTP URL |
The complete endpoint URL including |
HTTP Header #1 |
|
HTTP Header #2 |
Leave empty |
Skip interval |
|
Data format (gravity) |
Turn on its Enable switch and use the same template as on the GravityMon page, GravityMon. Predefined formats and Preview format help you fill it in. |
Use Run push gravity test to send sample data. The test does not prove that BrewGraph stores the result, so check the reading in BrewGraph afterwards.
Sources#
Wi-Fi: under Device, set Wi-Fi SSID #1 and Password #1.
BLE: under Device, Hardware, turn on Enable Bluetooth. Set Scan Mode to Passive for GravityMon iBeacon or PressureMon iBeacon, or Active for GravityMon Eddystone, which needs BLE 5.0 such as an ESP32-S3.
Scheduled forwarding applies only to GravityMon and PressureMon measurements.
How tokens are handled#
If a source device sends a token, the Gateway forwards that token. Set the token in each GravityMon as described in GravityMon.
The Gateway uses its own configured token only when the source sends none.
BrewGraph requires one token per device. Sources without their own token all report under the Gateway’s token, so they land on the same BrewGraph device. The reporting interval is checked per device, so a reading that arrives inside the interval after another is answered
429and is not stored. On the Cloud Hosted free beta the interval is about900seconds.A source with a token BrewGraph does not know, for example one registered on another environment, is forwarded as is and answered
401. There is no fallback to the Gateway’s token.
See Device Tokens for more about tokens.
Check that it works#
Save the configuration and wait for each source to report once.
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#
401: the token the source sent is not known to BrewGraph. Check that it was copied from the device page on the same environment you forward to.429: more than one source is reporting under the same token, or the interval is shorter than your plan allows. Give each source its own token.404: check that the forwarding URL ends exactly in/ingest/gravitymon.502,503or504: check that the host in the URL is the ingest host, not the address you use to open the app.
For every status code and what to do about it, see Ingest error codes.
Requirements#
On Cloud Hosted, Wi-Fi devices work today. BLE devices do not send a token, so they report under the Gateway’s token and share one BrewGraph device; BLE support through the Gateway is coming soon. The payload is described under GravityMon in Device Ingest API.