Skip to content

feat(schema): ElectricityCredential v1.1 — unified energyResources, multi-meter topology, ConsumptionProfile#345

Open
ameetdesh wants to merge 9 commits into
mainfrom
deg-343-allow-multiple-meters-in-electricity-cred
Open

feat(schema): ElectricityCredential v1.1 — unified energyResources, multi-meter topology, ConsumptionProfile#345
ameetdesh wants to merge 9 commits into
mainfrom
deg-343-allow-multiple-meters-in-electricity-cred

Conversation

@ameetdesh
Copy link
Copy Markdown
Collaborator

@ameetdesh ameetdesh commented May 22, 2026

Summary

  • ElectricityCredential v1.1 replaces the three separate v1.0 profile arrays (consumptionProfiles, generationProfiles, storageProfiles) with a single customerProfile.energyResources[] using EnergyResource/v2.0 as the canonical asset class. No v1.0 field is lost — every field maps to an EnergyResource id, type, or attributes property.
  • ConsumptionProfile links tariff/load data (sanctionedLoadKW, tariffCategoryCode) to a specific meter via meterId. Kept separate from physical asset data because tariff info is administrative and changes independently.
  • Multi-topology support: a single customerNumber can have multiple METER entries (different premises, sub-meters, parallel meters). DERs link to their parent meter via parentResources[]; consumption profiles link via meterId.
  • EnergyResource/v2.0 updated: fields renamed (resourceId → id, resourceType → type, resourceAttributes → attributes); CommonResourceAttributes (make, model, ratedPowerKw, energyCapacityKwh, telemetryProvider) extracted as a component nested inside the attributes bag. type promoted to a closed enum — grid infrastructure types DT, BUS, FEEDER added alongside generation, storage and load types. Stale vocab.jsonld entries (sourceType, meterId) removed.
  • PII isolation: fullName exclusively in customerDetails — never in profile entries.

EnergyResource.type enum

Category Values
Grid infrastructure METER, DT, BUS, FEEDER
Generation DERs SOLAR, SOLAR_PV, WIND, HYDRO, BIOGAS, CHP, FUEL_CELL
Storage BATTERY, BESS
Flexible loads EV_CHARGER, EV_V2G, SMART_HVAC, SMART_WATER_HEATER, CONTROLLABLE_LOAD
System MICROGRID

EnergyResource structure

EnergyResource
├── id                — stable identifier (meter serial number for METER)
├── type              — enum (see table above)
├── attributes        — open bag; CommonResourceAttributes + type-specific fields
│   ├── make, model, ratedPowerKw, energyCapacityKwh, telemetryProvider
│   └── meterType, gps, location, feeder, bus / commissioningDate / storageType / …
├── subResources[]    — child resource ids or inline objects
└── parentResources[] — parent resource ids (e.g. DT id for a meter)

Files changed

File Change
ElectricityCredential/v1.1/attributes.yaml New — ElectricityCredential, CustomerProfile, ConsumptionProfile, CustomerDetails
ElectricityCredential/v1.1/schema.json New — self-contained bundled JSON Schema
ElectricityCredential/v1.1/context.jsonld New — JSON-LD context
ElectricityCredential/v1.1/vocab.jsonld New — RDF vocabulary
ElectricityCredential/v1.1/README.md New — full documentation
ElectricityCredential/v1.1/examples/example.json Single meter (parentResources → DT) + 2 generation + 2 storage DERs
ElectricityCredential/v1.1/examples/example-submetering.json Building main meter + 2 tenant sub-meters + solar DER
ElectricityCredential/v1.1/examples/example-parallel-metering.json Dual parallel meters (import/export) + solar DER + FIT tariff
EnergyResource/v2.0/attributes.yaml Rename id/type/attributes; add CommonResourceAttributes; type → enum with DT/BUS/FEEDER
EnergyResource/v2.0/context.jsonld Updated for new field names and attributes nested context
EnergyResource/v2.0/vocab.jsonld Rewrite: fix stale entries, add CommonResourceAttributes class and properties
EnergyResource/v2.0/README.md Add CommonResourceAttributes section, type enum table, updated examples

v1.0 → v1.1 field mapping

v1.0 v1.1
customerProfile.meterNumber energyResources[METER].id
customerProfile.meterType energyResources[METER].attributes.meterType
consumptionProfiles[].sanctionedLoadKW consumptionProfiles[].sanctionedLoadKW
consumptionProfiles[].tariffCategoryCode consumptionProfiles[].tariffCategoryCode
generationProfiles[].assetId energyResources[DER].id
generationProfiles[].capacityKW energyResources[DER].attributes.ratedPowerKw
generationProfiles[].manufacturer energyResources[DER].attributes.make
generationProfiles[].commissioningDate energyResources[DER].attributes.commissioningDate
storageProfiles[].storageCapacityKWh energyResources[DER].attributes.energyCapacityKwh
storageProfiles[].storageType energyResources[DER].attributes.storageType
fullName (duplicated per entry) customerDetails.fullName (once)

Test plan

  • Validate examples/example.json against schema.json
  • Validate examples/example-submetering.json against schema.json
  • Validate examples/example-parallel-metering.json against schema.json
  • Confirm all v1.0 credential fields have a documented v1.1 destination (mapping table above)

🤖 Generated with Claude Code

ameetdesh and others added 9 commits May 23, 2026 01:42
… and multi-meter topology

- Add ElectricityCredential/v1.1: customerProfile holds only non-PII
  identity (customerNumber, idRef) plus energyResources[] and
  consumptionProfiles[]. The three separate v1.0 profile arrays
  (consumptionProfiles, generationProfiles, storageProfiles) are
  superseded; all v1.0 fields are preserved via EnergyResource/v2.0.

- energyResources[] uses EnergyResource/v2.0 as the canonical asset
  class. METER entries use resourceId = bare meter serial number.
  DERs link to their meter via parentResources[]. Supports arbitrary
  topologies: multiple meters, multiple premises, shared DERs.

- consumptionProfiles[] is a lightweight array (meterId, sanctionedLoadKW,
  tariffCategoryCode) linking tariff/load data to a specific meter.
  Kept separate from MeterAttributes because tariff data is administrative.

- fullName is PII and appears only in customerDetails — removed from
  all resource entries.

- Contribute MeterAttributes back to EnergyResource/v2.0: resourceAttributes
  shape for resourceType = "METER" (meterType, gps, location, feeder, bus —
  all optional, open-ended). resourceId of a METER IS the meter serial number.
  Also fix stale vocab.jsonld (removed pre-v2.0 sourceType/meterId entries).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… for ElectricityCredential v1.1

- example-submetering.json: apartment building with one utility main
  meter (MET-BLDG-001) and two tenant sub-meters (MET-UNIT-101/102).
  Sub-meters declare parentResources → main meter. Tenant 101 has
  rooftop solar behind their sub-meter. Each sub-meter has its own
  consumption profile and tariff code.

- example-parallel-metering.json: dual-meter arrangement at one
  premises — a Forward/AMI import meter and a Reverse export meter
  (gross metering / feed-in tariff). Both are siblings; solar DER
  sits behind the export meter. Each meter has its own consumption
  profile (import uses DS-I tariff; export uses FIT-SOLAR-01).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tributes in attributes bag

EnergyResource/v2.0:
- resourceId → id, resourceType → type, resourceAttributes → attributes
- CommonResourceAttributes extracted as component, nested inside attributes bag
- attributes is an open bag (additionalProperties: true) with documented
  well-known fields (meterType, gps, feeder, bus, commissioningDate, storageType)
- No URI scheme language on id — any stable scheme works

ElectricityCredential/v1.1:
- energyResources[].attributes.meterType (confirmed Meter.attributes.meterType path)
- Updated all examples, context.jsonld, schema.json, vocab.jsonld, README

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n example

- EnergyResource.type promoted to enum: METER, DT, BUS, FEEDER, SOLAR, SOLAR_PV,
  WIND, HYDRO, BIOGAS, CHP, FUEL_CELL, BATTERY, BESS, EV_CHARGER, EV_V2G,
  SMART_HVAC, SMART_WATER_HEATER, CONTROLLABLE_LOAD, MICROGRID
- example.json: adds DT-FEEDER-A1-001 (DT) as parent of the METER entry;
  feeder/bus moved to DT attributes, meter retains only gps
- READMEs updated with enum table and category grouping

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ources entry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…a parentResources

Grid topology (feeder, bus, DT) belongs in parentResources[], not as inline
string attributes on the meter. Removed feeder and bus from the documented
EnergyResource.attributes properties. Updated all three examples and both
READMEs to show parentResources referencing FEEDER/DT ids instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Captures the maximum demand contracted with the utility (kW) — used for
demand-charge billing and flex-program eligibility checks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ptionProfile

Sits alongside sanctionedLoadKW as a tariff/billing field, not a physical
meter attribute.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ries

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant