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. It has to be POST, because a GET webhook has no body, so the reading never reaches us.
  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 you type this body by hand, we’re more lenient about what we accept here than for any other device. We accept 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. So if you make a typo in the portal, you get a gap in the chart instead of two weeks with no readings at all.

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. We always answer the portal with a 200, so it never sees a failure and never needs to retry. If readings have stopped, the Pill itself has stopped reporting, so 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.