Skip to content

RAPT Pill

A RAPT Pill reports to the RAPT portal over Wi-Fi, and the portal can forward each reading to a webhook you define. The portal asks you to write the JSON body it sends, so we publish one.

  1. In Beerwright, open Settings → Fermentation devices, press Add a device, and copy the device URL.
  2. In the RAPT portal, create a custom webhook for the Pill, set its method to POST, and paste the URL as its address. POST is what we listen for; a GET webhook carries no body and we never see the reading.
  3. Back in Beerwright’s settings, copy the RAPT webhook body and paste it as the webhook’s body.

The body is:

{
"device": "@device_name",
"gravity": @gravity,
"temperature": @temperature,
"battery": @battery
}

The @ names are the portal’s own substitution variables and it replaces them with each reading. Copy them exactly: numbers go in unquoted and the device name goes in quotes, which is how the portal fills them.

Gravity arrives as specific gravity, and temperature arrives in whatever unit the portal is set to, so if yours is in Fahrenheit see the note below.

Because the body is typed by hand, this is the most tolerant of our readers. It accepts sg for the gravity, temp or tempC for the temperature, and name for the device, and it needs only one of gravity or temperature to be a number. A slip in the portal gives you a chart with a gap rather than a fortnight of silence.

A gravity outside 0.980 to 1.200 or a temperature outside −10 to 60 °C is treated as a sensor fault and charted as a gap.

The portal shows the Pill reporting but nothing reaches us. Check the webhook is enabled for that Pill, that its method is POST, and that its address is the full device URL with nothing added or trimmed. Then check the body: a variable spelled wrong is not replaced, so the portal sends the literal @gravity where a number should be. Unquoted, that is not valid JSON and the reading is lost; quoted, we chart it as a gap. Either way the fix is to paste the body again.

Every reading is a gap. The temperature placeholder is in Fahrenheit on some portal setups. Send it as Celsius, or add "temp_units": "F" to the body and we convert.

Readings arrive once, then stop. The portal retries a webhook it thinks failed, and we always answer 200 so that it never does. If it has stopped, the Pill has stopped: check its battery and its Wi-Fi in the portal.

Gaps in the chart. A gravity outside 0.980 to 1.200 is treated as a sensor fault. A Pill reads high through krausen and low when it is stuck to the wall; give it a nudge.

Something wrong on this page? Tell us.