Billing

Advanced use

The Billing function utilizes a tariff script built within the Lua scripting interface of the eGauge meter to perform advanced time-of-use and tiered billing calculations.

  • For the Billing calculation to work there must be a valid tariff script in place.  eGauge support does not provide or code tariff scripts. 
 

The settings in the Billing section of the meter setup specifies the tariff script and several other items that will be used in a billing register.  

To utilize one of the pre-defined tariff scripts follow the steps below:

Step 1: Access the Billing setup from the Main Menu by choosing Setup → Billing

 

Step 2: Choose the desired tariff script from the list, fill in the appropriate options if using one of the pre-defined tariff scripts from the eGauge firmware. 

The information in the fields above varies between customers. Contact your utility provider for the correct values.

 

Choose ‘custom’ to add your own tariff script written in Lua. When using a custom tariff script, the only available option will be the day the meter is read. For more information regarding creating and using Lua scripts please refer to: Lua Scripting Overview and Creating and Using Lua Scripts

Step 3: Add a formula register to the meter configuration to calculate the billing cost. 

a. The unit of the formula register should be set to Monetary [${currency}/s] as shown in the example below.

b. The formula entered should make a call to the cost(register, negate, schedule) function that exists in the tariff script in use.

 

register: The value of the register that is metering the main service to be billed. The argument should match exactly to the register name in the eGauge configuration including any capitalization and should be enclosed in double-quotes.

negate: Optional, can be set to true if the register value counts down for power consumption. This should be done if the main service register is reading a negative polarity in the channel checker. If the value is positive, or increasing with power consumption set this argument to false.

schedule: This argument is optional and can be set to a non-default schedule to use when calculating cost. If omitted the default schedule will be used as defined in the tariff script.


Setting Currency Preferences

By default, currency units used in Monetary formula registers are set to USD using the $ symbol. This can be adjusted in the eGauge preferences.

Step 1: Access the eGauge preferences from the Main Menu by choosing Setup → Other settings. Then choose Preferences to the left.

Step 2: Options regarding currency units are found about ⅓ of the way down the page. Enter the currency symbol you would like to use and the currency code for the chosen unit.

Step 3: Save changes by choosing Save at the bottom of the page. The 


Viewing Figures

Aside from viewing the monetary register in the Chart View, billing calculations can be viewed in several additional ways: 

  • CSV Export: When performing a CSV export of eGauge data, the formula register doing the billing calculation will be included as a register in the export.
  • Almanac View: Monetary registers can be viewed in the Almanac like any other cumulative register.
  • Summary Dashlet: a Summary Dashlet can be added to a dashboard layout to display a running total calculation for a the current billing cycle as shown in this example: