{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/discovergy/json-schema/discovergy-meter-schema.json",
  "title": "Meter",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/discovergy-openapi.json#/components/schemas/Meter",
  "type": "object",
  "properties": {
    "meterId": {
      "type": "string",
      "description": "Unique meterId, used as an identifier"
    },
    "manufacturerId": {
      "type": "string",
      "description": "DLMS manufacturerId"
    },
    "serialNumber": {
      "type": "string",
      "description": "Short serial number of the meter."
    },
    "fullSerialNumber": {
      "type": "string",
      "description": "Full standardized serial number, as it is reported by the meter itself."
    },
    "printedFullSerialNumber": {
      "type": "string",
      "description": "Full standardized serial number, as it is printed on the meter. Note: This might differ from fullSerialNumber only on meters from the manufacturer EMH."
    },
    "location": {
      "$ref": "#/$defs/Address"
    },
    "administrationNumber": {
      "type": "string",
      "description": "Metering location number (MeLo or Zaehlpunktnummer) associated with the meter"
    },
    "type": {
      "type": "string",
      "description": "Device type of the meter"
    },
    "measurementType": {
      "type": "string",
      "description": "Physical quantity being measured by the meter"
    },
    "loadProfileType": {
      "type": "string",
      "description": "Metering load profile type associated with the meter"
    },
    "scalingFactor": {
      "type": "integer",
      "description": "Factor imposed on metered current AND voltage by a transducer",
      "format": "int64"
    },
    "currentScalingFactor": {
      "type": "integer",
      "description": "Factor imposed on metered current by a transducer",
      "format": "int64"
    },
    "voltageScalingFactor": {
      "type": "integer",
      "description": "Factor imposed on metered voltage by a transducer",
      "format": "int64"
    },
    "internalMeters": {
      "type": "integer",
      "description": "Number of individual metering units comprising the meter",
      "format": "int64"
    },
    "firstMeasurementTime": {
      "type": "integer",
      "description": "Time of the first measurement sent by the meter, as a UNIX millisecond timestamp, or -1 if the meter has not sent any measurements",
      "format": "int64"
    },
    "lastMeasurementTime": {
      "type": "integer",
      "description": "Time of the last measurement sent by the meter, as a UNIX millisecond timestamp, or -1 if the meter has not sent any measurements",
      "format": "int64"
    },
    "storageNumbers": {
      "uniqueItems": true,
      "type": "array",
      "description": "The storage numbers that meter has reported",
      "items": {
        "type": "integer",
        "description": "The storage numbers that meter has reported",
        "format": "int32"
      }
    },
    "submeter": {
      "type": "boolean",
      "description": "Is meter part of sub-metering"
    },
    "kWhScalingFactor": {
      "type": "integer",
      "description": "Scaling factor to be used as divisor to convert retrieved values to kWh",
      "format": "int64"
    }
  },
  "$defs": {
    "Address": {
      "type": "object",
      "properties": {
        "street": {
          "type": "string",
          "description": "Name of the street where the meter is located"
        },
        "streetNumber": {
          "type": "string",
          "description": "Number in the street where the meter is located"
        },
        "zip": {
          "type": "string",
          "description": "Postal code where the meter is located"
        },
        "city": {
          "type": "string",
          "description": "City/town where the meter is located"
        },
        "country": {
          "type": "string",
          "description": "Country code where the meter is located"
        }
      }
    }
  }
}