The WebAPI documentation may be found at egauge.net/support/webapi.
The eGauge WebAPI is a JSON-based API framework that allows for automated meter configuration, recorded data retrieval, status information, and more.
Getting Started With Python
To make it easy to get started, eGauge provides an open source Python package. It can be installed with the command:
pip install egauge-python
With this package installed, accessing an eGauge meter becomes very simple. For example, to fetch the hostname of the meter, you could use:
from egauge import webapi
URI = "https://DEV.egaug.es" # replace DEV with meter name
USR = "USER" # replace USER with user name
PWD = "PASS" # replace PASS with password
dev = webapi.device.Device(URI, webapi.JWTAuth(USR,PWD))
print("hostname is " + dev.get("/config/net/hostname")["result"])
The package also contains various convenience classes to read meter data, capture waveform samples, convert between physical units, and so on.
Getting started without the eGauge Python library
Check out the support library page on WebAPI Authentication for examples on authentication.
Common WebAPI service descriptions
See the WebAPI documentation for full details and all service endpoints available. The endpoints below are only several commonly accessed endpoints that retrieve data and configuration.
Service used to obtain or invalidate a JSON web token used for authenticating with the WebAPI.
/config service allows you to read and write configuration to the meter.
/register service provides instantanoues and historical register data that is recorded
on the meter.
/local service provides instantaneous information derived from configured channel inputs,
including RMS value, mean value, frequency value and instantanoues power and energy values if
power registers are configured.
For historical or newly generated register data, use the
Other WebAPI service descriptions
Below are the additional service endpoints not listed above. See the WebAPI documentation for full details and all service endpoints available.
/capture service is used for obtaining raw waveform data from the inputs. To obtain normal
RMS, mean or frequency from the sensors directly, use the
/local service. For obtaining stored or
newly generated register data, use the
Service used to send commands to the meter such as reboot or firmware upgrade.
Service used to read or configure CTid sensors from a meter or flash the LED on the sensor (EG4xxx only).
Service used for controlling supported remote devices, such as the PRM3 relay module.
Service used to access syslog or kernel logs. Syslog must be enabled through the
Service used for managing Lua scripts on the meter.
Service used for obtaining information about third-party providers that support meter services such as push data sharing, push alerts, and tariffs.
Service used for storing and retrieving preferences and other settings typically used in the user's web browser interface.
Service used for configuring remote devices on the meter.
Service used to obtain system information such as firmware version, uptime, serial number, meter model, and more.