Skip to content

Add VC schema for timeseries meter data#186

Open
ameetdesh wants to merge 1 commit intomainfrom
issue-185-spec-vc-for-meter-data
Open

Add VC schema for timeseries meter data#186
ameetdesh wants to merge 1 commit intomainfrom
issue-185-spec-vc-for-meter-data

Conversation

@ameetdesh
Copy link
Collaborator

Closes #185

Title: Add Meter Data Verifiable Credential schema (Green Button aligned)

Body:

Summary

  • Adds a new Meter Data Credential for tamper-evident custody of historical
    time-series interval meter readings (e.g., 15-min kWh data)
  • Introduces a reusable Green Button (ESPI/NAESB) reference schema under
    external/schema/green-button/ with human-readable string enums mapped to
    ESPI integer codes
  • Credential is issued by the utility, held by the customer, and presented to
    trading apps for single-meter demand forecasting

New files

File Purpose
external/schema/green-button/attributes.yaml OpenAPI 3.1.1 types: ReadingType, IntervalBlock, IntervalReading, DateTimeInterval, and 5 ESPI enumerations
energy-credentials/meter-data-vc/attributes.yaml MeterDataCredential schema with $ref links to Green Button types
energy-credentials/meter-data-vc/context.jsonld JSON-LD context mapping terms to espi: and schema: namespaces
energy-credentials/meter-data-vc/vocab.jsonld RDF vocabulary (@graph with rdfs:Class and rdf:Property definitions)
energy-credentials/meter-data-vc/example.json W3C VC example with 4 realistic 15-min residential electricity readings
energy-credentials/meter-data-vc/readme.md Field tables, Green Button alignment mapping, usage example

Modified files

  • energy-credentials/readme.md — added credential to table, directory tree, relationship diagram, issuance scenarios

Validation

  • Both YAML files pass openapi-spec-validator (OpenAPI 3.1.1)
  • All 7 $ref paths (4 internal, 3 external) resolve correctly
  • example.json conforms to schema (all required fields, valid enums, consistent intervals)
  • JSON-LD files are valid JSON

Copy link
Contributor

@Anusree-J Anusree-J left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments:

  1. Seems like https://naesb.org/espi/ is not an open URL; schema validation will fail
  2. Terms like serviceKind, intervalBlocks, intervalBlock are mapped to class IRIs (espi:ServiceKind, espi:IntervalBlock) instead of property IRIs. In JSON-LD, context terms must map to properties, not
    classes. Fix mappings to use the correct property IRIs (e.g., meter:serviceKind, meter:intervalBlocks).
  3. Fix coveragePeriod structure mismatch
  • attributes.yaml defines coveragePeriod with start + end
  • vocab.jsonld declares its range as meter:DateTimeInterval
  • But DateTimeInterval (from Green Button) uses start + duration, not start + end
  1. credential subject id is seperate from DID - i think we used customer id in other VCs
  2. intervalBlocks can be moved underreadingType instead of credentialSubject
  3. do we need interval length since we have interval blocks?
  4. Little confused about the reasoning behind keeping value as int and having powerOfTenMultiplier property

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.

Propose VC schema for credentialed customer's meter data

2 participants