/store

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.

Well-known Variables

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.

Get sectionDeprecated

SecurityApiKey
Request
path Parameters
section
required
string

Name of the server-storage section.

Example: global
Responses
200

Store content response.

401

Unauthorized response.

get/store/{section}
Request samples
Response samples
application/json
{
  • "name": "global/",
  • "content": {
    }
}

Update or delete sectionDeprecated

Update or delete a server-storage section according to the contents of the request body.

SecurityApiKey
Request
path Parameters
section
required
string

Name of the server-storage section.

Example: global
Request Body schema: application/json
One of:
^[-a-zA-Z%_/]*$
pattern property
string or null

The new value of the variable. A null value deletes the variable. Any other value either creates a new variable or updates an existing variable with the specified value.

Interpretation of this value is left to the applications that use it. By convention, this is often a URL-encoded string or a JSON-encoded value.

Responses
200

Store update response.

401

Unauthorized response.

put/store/{section}
Request samples
application/json
{
  • "test/delete_me": null,
  • "prefs/color": "cyan"
}
Response samples
application/json
{
  • "status": "OK",
  • "error": "Error message (present if an error occurred)."
}

Get section variableDeprecated

SecurityApiKey
Request
path Parameters
section
required
string

Name of the server-storage section.

Example: dash
variable
required
string

Name of the section variable.

Example: dashCfg-default
Responses
200

Store variable response.

401

Unauthorized response.

get/store/{section}/{variable}
Request samples
Response samples
application/json
{
  • "name": "dash/dashCfg-default",
  • "content": {
    }
}

Update or delete section variableDeprecated

Update or delete a section variable according to the contents of the request body.

SecurityApiKey
Request
path Parameters
section
required
string

Name of the server-storage section.

Example: dash
variable
required
string

Name of the section variable.

Example: dashCfg-default
Request Body schema: application/json
One of:
string or null

The new value of the variable. A null value deletes the variable. Any other value either creates a new variable or updates an existing variable with the specified value.

Interpretation of this value is left to the applications that use it. By convention, this is often a URL-encoded string or a JSON-encoded value.

Responses
200

Delete section variable response.

401

Unauthorized response.

put/store/{section}/{variable}
Request samples
application/json
{
  • "": "{\"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}]}]}]}"
}
Response samples
application/json
{
  • "status": "OK",
  • "error": "Error message (present if an error occurred)."
}

Get paragraphDeprecated

SecurityApiKey
Request
path Parameters
section
required
string

Name of the server-storage section.

Example: global
paragraph
required
string

Name of the paragraph.

Example: billing
Responses
200

Store paragraph response.

401

Unauthorized response.

get/store/{section}/{paragraph}/
Request samples
Response samples
application/json
{
  • "name": "global/billing/",
  • "content": {
    }
}

Update or delete paragraphDeprecated

Update or delete a paragraph according to the contents of the request body.

SecurityApiKey
Request
path Parameters
section
required
string

Name of the server-storage section.

Example: global
paragraph
required
string

Name of the paragraph.

Example: billing
Request Body schema: application/json
One of:
^[-a-zA-Z%_/]*$
pattern property
string or null

The new value of the variable. A null value deletes the variable. Any other value either creates a new variable or updates an existing variable with the specified value.

Interpretation of this value is left to the applications that use it. By convention, this is often a URL-encoded string or a JSON-encoded value.

Responses
200

Store update response.

401

Unauthorized response.

put/store/{section}/{paragraph}/
Request samples
application/json
{
  • "start_day": "7",
  • "taxes": null
}
Response samples
application/json
{
  • "status": "OK",
  • "error": "Error message (present if an error occurred)."
}

Get variableDeprecated

SecurityApiKey
Request
path Parameters
section
required
string

Name of the server-storage section.

Example: global
paragraph
required
string

Name of the paragraph.

Example: billing
variable
required
string

Name of the variable.

Example: start_day
Responses
200

Store content response.

401

Unauthorized response.

get/store/{section}/{paragraph}/{variable}
Request samples
Response samples
application/json
{
  • "name": "global/billing/start_day",
  • "content": {
    }
}

Update or delete variableDeprecated

Update or delete a variable according to the contents of the request body.

SecurityApiKey
Request
path Parameters
section
required
string

Name of the server-storage section.

Example: global
paragraph
required
string

Name of the paragraph.

Example: billing
variable
required
string

Name of the variable.

Example: start_day
Request Body schema: application/json
One of:
^[-a-zA-Z%_/]*$
pattern property
string or null

The new value of the variable. A null value deletes the variable. Any other value either creates a new variable or updates an existing variable with the specified value.

Interpretation of this value is left to the applications that use it. By convention, this is often a URL-encoded string or a JSON-encoded value.

Responses
200

Store update response.

401

Unauthorized response.

put/store/{section}/{paragraph}/{variable}
Request samples
application/json
{
  • "": "7"
}
Response samples
application/json
{
  • "status": "OK",
  • "error": "Error message (present if an error occurred)."
}