Note This service is deprecated and will be removed in the future. Please use /config/var instead.
This service provides the ability to store arbitrary name/value pairs on the meter. This is called server-side storage.
The service implements a hierarchical name-space, with hierarchy
levels separated by slash characters (/
). The top-level is
called a section, intermediate levels are called paragraphs, and
leaves are called variables. For example, the path
global/default/currency_code
refers to variable currency_code
in section global
, paragraph default
.
Variables may also be stored at the section level. The last
character of a URL determines whether the URL refers to a
section-level variable or a paragraph. If the URL ends with a
slash character (/
), it refers to a paragraph, otherwise, it refers
to a section-level variable.
Names may contain lower- and upper-case ASCII letters, digits,
dashes (-
), underscores (_
), and percent signs (%
).
Variable values may contain any UTF-8 codes except ASCII control codes (codes less than 0x20). Some variables may be defined as storing JSON-encoded values. For those, the value is limited to characters permissible by the JSON grammar.
What distinguishes server-storage variables from configuration settings is that the former are generally not used by the meter firmware. In other words, server-storage variables are used primarily by users of the WebAPI. There are a few exceptions however:
global/billing/start_day
: The meter firmware interprets this
as the day of the month on which the utility company reads the
utility meter. The assumption is that the meter is read at
noon on that day. The value must be a decimal integer string
in the range from 1-31. If the billing day number is greater
than the number of days in a particular month, it is assumed
that utility meter is read on the last day of that month.
The meter-firmware uses this, for example, to implement the
sob
time point.
global/billing/tariff_uri
: If not an empty string, this is
interpreted as the URL from which to fetch a Lua
script that calculates energy
cost. The meter will periodically poll this URL and download
any available updates to the script.
global/default/currency_symbol
: This is interpreted as the
symbol to use for currency values. This may be a single
Unicode symbol such as $
(Dollar) or €
(Euro), or it may
be a multi character string, such as CHF
for Swiss Franc.
The meter firmware uses the value of this variable when
outputting the unit of monetary values.
{- "name": "global/",
- "content": {
- "billing/start_day": "6",
- "billing/contract_demand": "10",
- "billing/bill_contracted_demand": "false",
- "billing/schedule": "R%20Residential%20General",
- "billing/surcharges": "0%2E07",
- "billing/taxes": "8%2E2",
- "billing/tariff_uri": "https%3A%2F%2Fapi%2Eegauge%2Enet%2Fv1%2Ftariffs%2F2%2Elua",
- "billing/provider": "Xcel%20Colorado"
}
}
Update or delete a server-storage section according to the contents of the request body.
Store update response.
Unauthorized response.
{- "test/delete_me": null,
- "prefs/color": "cyan"
}
{- "status": "OK",
- "error": "Error message (present if an error occurred)."
}
Store variable response.
Unauthorized response.
{- "name": "dash/dashCfg-default",
- "content": {
- "": "{\"name\":\"default\",\"changed\":false,\"dashlets\":[{\"tag\":\"flow\",\"id\":1,\"cfg\":{\"nodes\":[{\"pos\":[0,0],\"icon\":\"house\",\"reg\":\"use\"},{\"pos\":[0,1],\"icon\":\"solar\",\"reg\":\"gen\"},{\"pos\":[1,0],\"icon\":\"battery\",\"reg\":\"bat\"},{\"pos\":[0,-1],\"icon\":\"grid\",\"reg\":\"Grid\",\"costsMoney\":true}]}}],\"layouts\":[{\"designWidth\":0,\"designHeight\":0,\"pages\":[{\"locs\":[{\"id\":1,\"x\":0,\"y\":0,\"w\":10,\"h\":10}]}]}]}"
}
}
Update or delete a section variable according to the contents of the request body.
Delete section variable response.
Unauthorized response.
{- "": "{\"name\":\"default\",\"changed\":false,\"dashlets\":[{\"tag\":\"flow\",\"id\":1,\"cfg\":{\"nodes\":[{\"pos\":[0,0],\"icon\":\"house\",\"reg\":\"use\"},{\"pos\":[0,1],\"icon\":\"solar\",\"reg\":\"gen\"},{\"pos\":[1,0],\"icon\":\"battery\",\"reg\":\"bat\"},{\"pos\":[0,-1],\"icon\":\"grid\",\"reg\":\"Grid\",\"costsMoney\":true}]}}],\"layouts\":[{\"designWidth\":0,\"designHeight\":0,\"pages\":[{\"locs\":[{\"id\":1,\"x\":0,\"y\":0,\"w\":10,\"h\":10}]}]}]}"
}
{- "status": "OK",
- "error": "Error message (present if an error occurred)."
}
Store paragraph response.
Unauthorized response.
{- "name": "global/billing/",
- "content": {
- "start_day": "6",
- "contract_demand": "10",
- "bill_contracted_demand": "false",
- "schedule": "R%20Residential%20General",
- "surcharges": "0%2E07",
- "taxes": "8%2E2",
- "tariff_uri": "https%3A%2F%2Fapi%2Eegauge%2Enet%2Fv1%2Ftariffs%2F2%2Elua",
- "provider": "Xcel%20Colorado"
}
}
Update or delete a paragraph according to the contents of the request body.
Store update response.
Unauthorized response.
{- "start_day": "7",
- "taxes": null
}
{- "status": "OK",
- "error": "Error message (present if an error occurred)."
}
Update or delete a variable according to the contents of the request body.
Store update response.
Unauthorized response.
{- "": "7"
}
{- "status": "OK",
- "error": "Error message (present if an error occurred)."
}