Return a list of consumption values for half-hour periods for a given meter-point and meter.
Unit of measurement:
Electricity meters: kWh
SMETS1 Secure gas meters: kWh
SMETS2 gas meters: m^3
Parsing dates
To return dates properly parsed lubridate is
required. Use the 'tz' parameter to specify a time zone
e.g. tz = "UTC", the default (tz = NULL) will return the dates
unparsed, as characters.
Arguments
- meter_type
Type of meter-point, electricity or gas
- mpan_mprn
The electricity meter-point's MPAN or gas meter-point’s MPRN.
- serial_number
The meter's serial number.
- direction
For electricity meters, specify "import", "export", or NULL (default). When NULL, uses the legacy single MPAN storage.
- api_key
Your API key. If you are an Octopus Energy customer, you can generate an API key on the developer dashboard.
- period_from
Show consumption from the given datetime (inclusive). This parameter can be provided on its own.
- period_to
Show consumption to the given datetime (exclusive). This parameter also requires providing the 'period_from' parameter to create a range.
- tz
a character string that specifies which time zone to parse the date with. The string must be a time zone that is recognized by the user's OS.
- order_by
Ordering of results returned. Default is that results are returned in reverse order from latest available figure. Valid values:
'period', to give results ordered forward.
'-period', (default), to give results ordered from most recent backwards.
- page_size
The number of results to return per page. This is intended for internal testing and may be removed in a future release.
- group_by
Aggregates consumption over a specified time period. A day is considered to start and end at midnight in the server's time zone. The default is that consumption is returned in half-hour periods. Accepted values are:
'hour'
'day'
'week'
'month'
'quarter'
Value
a tibble of the requested consumption data.