feat(schema): ElectricityCredential v1.1 — unified energyResources, multi-meter topology, ConsumptionProfile#345
Open
ameetdesh wants to merge 9 commits into
Open
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
consumptionProfiles,generationProfiles,storageProfiles) with a singlecustomerProfile.energyResources[]usingEnergyResource/v2.0as the canonical asset class. No v1.0 field is lost — every field maps to an EnergyResourceid,type, orattributesproperty.ConsumptionProfilelinks tariff/load data (sanctionedLoadKW,tariffCategoryCode) to a specific meter viameterId. Kept separate from physical asset data because tariff info is administrative and changes independently.customerNumbercan have multipleMETERentries (different premises, sub-meters, parallel meters). DERs link to their parent meter viaparentResources[]; consumption profiles link viameterId.EnergyResource/v2.0updated: fields renamed (resourceId → id,resourceType → type,resourceAttributes → attributes);CommonResourceAttributes(make, model, ratedPowerKw, energyCapacityKwh, telemetryProvider) extracted as a component nested inside theattributesbag.typepromoted to a closed enum — grid infrastructure typesDT,BUS,FEEDERadded alongside generation, storage and load types. Stalevocab.jsonldentries (sourceType,meterId) removed.fullNameexclusively incustomerDetails— never in profile entries.EnergyResource.typeenumMETER,DT,BUS,FEEDERSOLAR,SOLAR_PV,WIND,HYDRO,BIOGAS,CHP,FUEL_CELLBATTERY,BESSEV_CHARGER,EV_V2G,SMART_HVAC,SMART_WATER_HEATER,CONTROLLABLE_LOADMICROGRIDEnergyResourcestructureFiles changed
ElectricityCredential/v1.1/attributes.yamlElectricityCredential/v1.1/schema.jsonElectricityCredential/v1.1/context.jsonldElectricityCredential/v1.1/vocab.jsonldElectricityCredential/v1.1/README.mdElectricityCredential/v1.1/examples/example.jsonElectricityCredential/v1.1/examples/example-submetering.jsonElectricityCredential/v1.1/examples/example-parallel-metering.jsonEnergyResource/v2.0/attributes.yamlEnergyResource/v2.0/context.jsonldEnergyResource/v2.0/vocab.jsonldEnergyResource/v2.0/README.mdv1.0 → v1.1 field mapping
customerProfile.meterNumberenergyResources[METER].idcustomerProfile.meterTypeenergyResources[METER].attributes.meterTypeconsumptionProfiles[].sanctionedLoadKWconsumptionProfiles[].sanctionedLoadKWconsumptionProfiles[].tariffCategoryCodeconsumptionProfiles[].tariffCategoryCodegenerationProfiles[].assetIdenergyResources[DER].idgenerationProfiles[].capacityKWenergyResources[DER].attributes.ratedPowerKwgenerationProfiles[].manufacturerenergyResources[DER].attributes.makegenerationProfiles[].commissioningDateenergyResources[DER].attributes.commissioningDatestorageProfiles[].storageCapacityKWhenergyResources[DER].attributes.energyCapacityKwhstorageProfiles[].storageTypeenergyResources[DER].attributes.storageTypefullName(duplicated per entry)customerDetails.fullName(once)Test plan
examples/example.jsonagainstschema.jsonexamples/example-submetering.jsonagainstschema.jsonexamples/example-parallel-metering.jsonagainstschema.json🤖 Generated with Claude Code