eGauge Data Source
The eGauge data source reads energy monitoring data from eGauge metering devices by interpreting their XML API data stream. eGauge devices are widely used for power monitoring, energy management, and sub-metering in commercial and residential buildings. This data source supports the v1.32 revision of the eGauge XML API, handling both real-time polling and historical data retrieval with automatic gap detection and backfill.
The data source communicates with eGauge devices over HTTP/HTTPS, reading register values that represent energy consumption, power generation, and other metered quantities. It supports physical registers, computed virtual registers, and rate-of-change (instantaneous power) values.
Overview
| Property | Value |
|---|---|
| Module | mangoAutomation-eGauge |
| Protocol | eGauge XML API |
| Direction | Polling |
| Typical Use | Energy monitoring from eGauge meters |
Prerequisites
- An eGauge device accessible over the network from the Mango server via HTTP or HTTPS.
- The IP address or hostname of the eGauge device.
- Knowledge of which registers the eGauge device is configured to report (e.g., Grid, Solar, HVAC, Lighting).
- Network connectivity between the Mango server and the eGauge device on the configured HTTP/HTTPS port.
Configuration
Data Source Settings
| Setting | Description |
|---|---|
| Name | A descriptive name for the data source. |
| URI | The HTTP path to the eGauge device. Format: https://12.34.56.789:555. Do not include a trailing slash. |
| Update period | How frequently the device is polled for new data. |
| Timeout | Maximum time (in milliseconds) to wait for a response from the eGauge device. |
| Retries | Number of retry attempts when a connection fails. |
Gap Detection and History Backfill
When enabled, the data source automatically detects gaps in the data stream and attempts to retrieve missing data.
| Setting | Description |
|---|---|
| Gap detection | (Enable/disable) When a gap larger than the configured threshold is detected, the data source attempts to retrieve missing data. |
| Gap threshold | The minimum time gap that triggers a backfill request. |
| Backfill resolution | The resolution (time interval) at which missing data is retrieved during backfill. |
| Buffer size | The fixed-size buffer for backfill data. If you receive JAXB exceptions during history queries, increase this value. Large history queries (especially from the History Query tool) may require a larger buffer than normal gap-fill operations. |
API Parameters
| Setting | Description |
|---|---|
| Include totals | When enabled, includes computed total and virtual registers (derived from physical registers) in the response. |
| Exclude sub-devices | When enabled, excludes information collected from devices coordinated by this eGauge. |
| Include sub-device details | Provides additional details about coordinated devices. Note: as of eGauge module version 1.0.0, this feature is not actively used. |
| Include rates | Includes computed rate-of-change values in the returned data. |
| Convert to kWh | Automatically transforms Watt-second (Joule) readings to kilowatt-hours by dividing by 3,600,000 (3.6e6). |
| Calculate power during history query | When enabled, the data source calculates instantaneous power values from stored energy values during historical data retrieval. |
Data Point Configuration
| Setting | Description |
|---|---|
| Register name | The name used to identify register values returned from the eGauge device (e.g., "Grid", "Solar+", "HVAC"). |
| Virtual | A read-only property indicating whether the data point represents a virtual (computed) register. |
| Use rate | When checked, the point uses the instantaneous rate-of-change value rather than the accumulated register value. This is the difference between energy (kWh) and power (kW). |
| Multiplier | A scaling factor applied to each new value before storage. |
| Offset | A value added to each new data point value before storage. |
Both the multiplier and offset are applied after the kWh conversion, if the data source is configured to perform that conversion.
History Query Tool
The History Query tool retrieves historical data from the eGauge device using relative time frames.
| Setting | Description |
|---|---|
| History begins | How far back to start retrieving data (e.g., "9 weeks ago"). |
| Relative end | How far back to stop retrieving data, relative to the start. A value of 0 retrieves up to the current moment. |
| Sequential query | When enabled, breaks large time ranges into one-week increments to keep individual requests small. |
Example: If history begins 9 weeks ago and the relative end is 4 weeks, the last sample will be from 5 weeks ago (9 - 4 = 5 weeks ago).
Querying very long periods can take significant time, especially at high resolution. Use sequential queries to avoid timeouts and manage the load on both the eGauge device and Mango.
Common Patterns
Building Energy Monitoring
Configure the eGauge data source to read all physical registers from a building's main electrical panel. Create points for each register (Grid, Solar, HVAC, Lighting, Plugs, etc.) using the accumulated value mode. Enable Convert to kWh for easy interpretation. Build dashboards showing energy consumption by circuit with trend charts and daily/monthly totals.
Solar Production Tracking
Use the eGauge data source to monitor solar panel output. Create one point for solar production using the accumulated (energy) value and another using the rate-of-change (power) mode. The energy point tracks total production over time, while the power point shows instantaneous generation in kW.
Demand Monitoring
Create rate-of-change points for the main grid register to monitor instantaneous power demand. Configure event detectors to alert when demand exceeds utility-imposed limits, helping avoid demand charges.
Multi-Site Deployment
For buildings with multiple eGauge devices, create a separate eGauge data source for each device. Use consistent register naming across sites to enable cross-site comparison dashboards.
Historical Data Import
When first connecting an eGauge device that has been collecting data for weeks or months, use the History Query Tool to backfill Mango with the historical data. Start with sequential queries to avoid overwhelming either system.
Troubleshooting
Connection Failures
- Verify the eGauge device is accessible from the Mango server by opening the URI in a web browser.
- Check that the URI format is correct -- include the protocol (
http://orhttps://) and port but no trailing slash. - Increase the Timeout value if the device is on a slow or congested network.
- If the eGauge device is behind a firewall, ensure the appropriate port is open.
JAXB Exceptions
- JAXB exceptions typically occur when the XML response from the eGauge device exceeds the configured Buffer size. Increase the buffer size in the data source settings.
- This is most common during large history queries. Use sequential queries to reduce individual response sizes.
Missing or Incorrect Register Data
- Verify the Register name on each data point matches exactly what the eGauge device reports. Register names are case-sensitive.
- If virtual registers are not appearing, enable the Include totals option.
- If rate-of-change values are not available, enable the Include rates option.
kWh Conversion Issues
- The conversion divides raw Watt-second values by 3,600,000. If your eGauge device reports values in units other than Watt-seconds, the conversion will produce incorrect results.
- The Multiplier and Offset are applied after the kWh conversion. If you need to apply scaling before conversion, you will need to adjust the multiplier to account for both operations.
Gap Detection Not Backfilling
- Verify that gap detection is enabled and the gap threshold is appropriate for your polling frequency.
- Check that the eGauge device retains historical data for the gap period -- some devices have limited storage.
- Review the data source events for any errors during backfill operations.
Related Pages
- Data Sources Overview — General data source and data point concepts
- HTTP Retriever Data Source — General-purpose HTTP polling for web-based data sources
- Modbus Data Source — Alternative protocol for energy monitoring devices with Modbus support
- Data Source Performance — Tuning poll intervals for energy monitoring