Custom Keg Monitor
Last updated
Was this helpful?
Last updated
Was this helpful?
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 âž•
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.
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
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.
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
POST
https://europe-west1-barhelper-app.cloudfunctions.net/api/customKegMon
Content-Type
string
application/json
authorization
string
Bar Helper API Key
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
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. 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
Url: 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}
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.