Custom Keg Monitor

Custom Keg Monitor is a system for keeping track of your keg content. The way this works is by registering the amount that has been tapped, and the system will automatically save this in Bar Helper.

To add a Custom Keg Monitor:

1) Click on Settings 2) Click on ➕

To add a Custom Keg Monitor, clisk on Settings, then on the Plus

First enter a name for the monitor. This is the name displayed inside Bar Helper. The Id Number is the one used inside the API call 1) Enter the name, this will be displayed inside Bar Helper when you connect a Tap 2) Enter a Id Number, this will be used inside the "name" field inside the API call.

Name will be used to display the monitor inside Bar Helper, Id is used for the API call.

Custom Keg monitor works via a REST Api call. That is, we send information to Bar Helper via HTTPS POST, so the system that will send information to Bar Helper must support this.

The first thing we need to do is generate an API key. This should be used when we call Bar Helper. 1) Click on Settings 2) Click on Bar settings

1) Click on Generate API Key

1) Copy the API Key

Once you have copied the API key, keep it in a safe place. It will not be possible to see this key several again, if you lose it, you will have to delete it and generate a new one. When we run the REST call, a monitor with the name you have chosen in the call will be created automatically. In the video below you can see that it is created automatically. https://www.loom.com/share/93b54836abe24e948a12c0d07ee6d8ce Now that we have the key, we can set up the REST call. This can be done in many ways, here we have shown it via cUrl

curl --location --request POST 'https://europe-west1-barhelper-app.cloudfunctions.net/api/customKegMon' \
--header 'authorization: THlGekhVlCZDpISzVRYlBDb0xBSHM4VGNwQVpzeWVLd25sYWI2UFZBNw==' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "custom-1",
    "amount": 460,
    "type": "ml"
}'

If the monitor exists, then it will use it, so you can either add a new custom name for the montior, or you can use the one added under "Id Number" if you created the monitors beforehand.

curl --location --request POST 'https://europe-west1-barhelper-app.cloudfunctions.net/api/customKegMon' \
--header 'authorization: THlGekhVlCZDpISzVRYlBDb0xBSHM4VGNwQVpzeWVLd25sYWI2UFZBNw==' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Custom Keg Monitor by Volume",
    "volume": 12.1,
    "type": "l"
}'

Type is the init type you are using in your monitor. Here you can choose from: 'mm3' | 'cm3' | 'ml' | 'l' | 'kl' | 'm3' | 'km3' | 'cl' | 'dl' | 'krm' | 'tsk' | 'msk' | 'kkp' | 'glas' | 'kanna' | 'tsp' | 'Tbs' | 'in3' | 'fl-oz' | 'cup' | 'pnt' | 'qt' | 'gal' | 'ft3' | 'yd3'

This request returns a JSON object with data and message

{
"volume: 12.1"
"prevKegAmount": 14,
"newKegAmount": 12.1,
"success": true,
"message": "Keg Monitor updated successfully"
}

eller 

{
"amount: 0.46"
"prevKegAmount": 14000,
"newKegAmount": 13540,
"success": true,
"message": "Keg Monitor updated successfully"
}

Url: https://europe-west1-barhelper-app.cloudfunctions.net/api/customKegMon Method: POST Headers: authorization: BarHelper API key Content-Type: application/json Body format: json Body: { "name": "The name of your monitor", amout: amout-in-milliliters}

POST https://europe-west1-barhelper-app.cloudfunctions.net/api/customKegMon

Headers

Name
Type
Description

Content-Type

string

application/json

authorization

string

Bar Helper API Key

Request Body

Name
Type
Description

object

JSON: name and amount in milliliters

1) Here we run the cUrl command 2) Here you see the new monitor showing up

Now that we have the monitor, we can connect it to a tap tower in the usual way. 1) Click on Tap, then + in the bottom right corner 2) Select Custom Keg monitor

1) Choose your monitor

You have now created a Custom Keg Monitor and are ready to use it. Here is an example of how it works when mapped to a tap tower. https://www.loom.com/share/c5a080f9591c46c1b9c286ce0efcb6ea

Last updated

Was this helpful?