This service provides access to the values directly measured or derived from the sensors attached to the meter. Values obtained from other, remote, devices are not accessible through this service. Similarly, only the most recent (current) values are available. Use the /register service for accessing values stored in the database of the meter.
Derived values are called energy and apparent energy and are calculated from a pair of sensors. Specifically, energy values are calculated by numerically integrating over time the product of two sensor values. Similarly, apparent energy is calculated as the product of the normal (RMS) values of a pair of sensors. For example, if one sensor value measures an electrical current and the other a voltage, these calculate the real electric energy and apparent electric energy of the measured current/voltage pair, respectively.
This service guarantees to return an atomic snapshot of the measurements as of the time indicated by the timestamp in the response. Various query parameters can be used to select the exact data that is to be returned.
In particular, query parameters values
, energy
, apparent
, or
stats
can be used to select which sections to include in
the response. If none of these are specified, only the values
section is returned by default.
Query parameters rate
, cumul
, or type
can be used to select
the metrics to return for each sensor. If none of these are
specified, the rate
and type
metrics are returned by default.
Within the rate and cumulative metrics, query parameters normal
,
mean
, or freq
select what measurements to return. If none of
these are specified, all measurements are returned by default.
Finally, the env
, l
, and s
query parameters can be used to
select which sensors to include in the response. If none of these
are specified, all sensors are included in the response by
default.
A Python program illustrating the use of this service can be found
here.
This program takes advantage of class egauge.webapi.device.Local
to handle the details of encoding the HTTP requests and decoding
the responses.
values | boolean If present, the sensor values are returned in member |
energy | boolean If present, the calculated (real) energy values are returned
in member |
apparent | boolean If present, the calculate apparent energy values are returned
in member |
stats | boolean If present, statistics about the internal operation of the
meter are returned in member |
rate | boolean If present, the rate metrics of each sensor are included in
the response (members |
cumul | boolean If present, the cumulative metrics of each sensor are included
in the response (members |
type | boolean If present, the type code (physical
unit) of each sensor is included in the response (members
|
normal | boolean If present, the normal value of each sensor is included in the response. For most sensor types, this is the RMS value of the sensor signal but for some, this may be the average value (e.g., for temperature sensors) or a count (e.g., for pulse sensors). |
mean | boolean If present, the mean (average) value of each sensor is included in the response. |
freq | boolean If present, the frequency (in hertz) of each sensor signal is included in the response. It is calculated as the number of times the signal crosses zero per second. For some sensor types (e.g., temperature sensors), frequency is not calculated and the returned value is always zero. |
env | Array of strings If present, this parameter specifies a comma-separated list of built-in environmental sensors whose measurements should be included in the response. The list may contain the following strings (case-insensitive):
Note Environmental sensors have only rate metrics, no cumulative metrics, and only have a normal value, no mean or frequency. |
l | Array of strings If present, this parameter specifies a comma-separated list of voltages whose metrics should be included in the response. The following voltage names may be specified (case-insensitve):
It is also possible to specify a range of voltages by using a
colon to separate the first and the last voltage to be
included in the range. For example, |
s | Array of strings If present, this parameter specifies a comma-separated list of sensors whose metrics should be included in the response. The following sensor names may be specified (case-insensitve):
|
Local response.
Unauthorized response.
{- "ts": "1579893622.000132",
- "values": {
- "L1": {
- "rate": {
- "n": 125.01754,
- "f": 60.0079803
}
}, - "L3-L1": {
- "rate": {
- "n": 0.631658375,
- "f": 59.9902229
}
}, - "S15": {
- "rate": {
- "n": 0.554819047,
- "f": 0
}
}, - "S5": {
- "rate": {
- "n": 3.87214255,
- "f": 0
}
}
}, - "energy": {
- "S1*L1": {
- "rate": -145.436066
}, - "S15*(L3-L1)": {
- "rate": -0.000681963167
}, - "-S5*L1": {
- "rate": -0.846870422
}
}
}