Discovergy v0.1.0 Discovergy.Disaggregation View Source

The Disaggregation endpoint

Link to this section Summary

Functions

Returns the activities recognised for the given meter during the given interval.

Provides the disaggregated energy for the specified meter at 15 minute intervals.

Link to this section Functions

Link to this function

get_activities(client, meter_id, from, to)

View Source

Specs

Returns the activities recognised for the given meter during the given interval.

Examples

iex> Discovergy.Measurements.get_activities(client, meter_id, from, to)
{:ok, [
  %Discovergy.DisaggregationActivity{
    activity_id: 77,
    begin_time: ~U[2019-07-16 02:13:24.000Z],
    end_time: ~U[2019-07-16 22:00:00.000Z],
    device_id: 1,
    device_name: "BASE_LOAD-1",
    device_type: "BASE_LOAD",
    energy: 16414633333
  },
  ...
]}
Link to this function

get_energy_by_device_measurements(client, meter_id, from, to \\ nil)

View Source

Specs

get_energy_by_device_measurements(
  Discovergy.Client.t(),
  Discovergy.Meter.id(),
  DateTime.t(),
  DateTime.t()
) ::
  {:ok, [Discovergy.EnergyByDeviceMeasurement.t()]}
  | {:error, Discovergy.Error.t()}

Provides the disaggregated energy for the specified meter at 15 minute intervals.

Examples

iex> Discovergy.Disaggregation.get_energy_by_device_measurements(
...>  client, meter_id, from
...> )
{:ok, [
  %Discovergy.EnergyByDeviceMeasurement{
    time: ~U[2020-07-01 22:15:00.000Z],
    energy_by_device: %{
      "Backofen-1" => 0,
      "Backofen-2" => 0,
      "Durchlauferhitzer-1" => 0,
      "Durchlauferhitzer-2" => 0,
      "Durchlauferhitzer-3" => 0,
      "Elektromobilität-1" => 0,
      "Grundlast-1" => 232500000,
      "Kühlschrank-1" => 1433333,
      "Kühlschrank-2" => 0,
      "Kühlschrank-3" => 0,
      "Spülmaschine-1" => 0,
      "Waschmaschine-1" => 0
    }
  },
  ...
]}