EWAI SETUP WALKTHROUGH

The following describes the actions involved in setting up an energy data marketplace. It is anticipated that many of these steps can be automated over time.

  1. An organization wants to setup an energy data marketplace.
  2. They setup an ewc wallet address (did:eth:0x1234...).
  3. They register an EWNS for their org.
  4. They register their org with Switchboard (must contact EW to do this currently).
  5. They create an app in Switchboard for the marketplace under their org (e.g. marketplacename.apps.orgname.iam.ewc. It is this EWNS that uniquely identifies this marketplace (along with it’s EWAI instance)
  6. They create a marketplace admin role with whatever requirements they deem necessary under that app (e.g. admin.roles.marketplacename.apps.orgname.iam.ewc). This could require certain fields on enrollment to be met by admins.
  7. They create a data publisher role with whatever criteria (enrollment fields and sub claims) they deem necessary which someone (a DID) must possess in order to be qualified and approved to create data assets on the marketplace under that app (datapub.roles.marketplacename.apps.orgname.iam.ewc). They also set switchboard up so that users with the admin role created in step 6 are able to issue (approve enrolments) new users into this data publisher role.
  8. They setup an instantiation of EWAI-SERVER. This will need an API URL, as well as an ewc did:eth address with private key. They specify a username/password in the EWAI .env that must be used by the EWAI Listen and Marketplace dApps to connect to it.
  9. They setup the marketplace dApp (e.g. see EWAI-MARKET repo), and make sure it can connect and authenticate to the EWAI instance.
  10. They setup messaging for the EWAI instance. This typically involves using an EW-Messaging server and knowing the role(s) required to do so.

After step 10, the marketplace is setup and running (but empty).

  1. Now a user (hereafter called DataPublisher DP), with their own DID:eth by wallet login, comes to marketplace and wants to create/publish an energy data asset (dataset). Presumably the DP owns, manages and/or operates a set of DERs that will be sending data into the marketplace. EWAI assumes that the DP owns, manages or operates the DERs, and can provision them, etc.
  2. User wants to publish a dataset. They have ETH address. They need datapub role in their EWC Eth Address, they request this via Switchboard.
  3. DP enrolls in the data publisher role setup in step 7, providing whatever fields are needed, and meeting whatever sub-claims are necessary for enrollment.
  4. DP creates an energy data asset (dataset). To do this, they must provide the following: a. EWNS of the data asset (and the DP DID must own this EWNS for the prototype at least). b. The role (whatever it is, may be anything really, and not even related to any role in the marketplace defined in the prior steps) that a DER must possess in order to send its data packets (PTD, Power Telemetry Data) into this data asset. The role is simply a fully qualified Switchboard role string. c. Name of the data asset d. Category of the data asset (solar, wind, hydro, etc.) e. Description of the data asset f. The incoming message format of the data asset (json or text) g. The incoming JSON schema of the data asset (for validation, if and only if json). h. Where the message timestamp field is (Json Path or Regex into text for extraction). i. What output formats are allowed (json, csv, xml only at this time). j. Price (in Ocean of the data asset…getting ahead of ourselves here, but…) k. Some other stuff maybe (metadata, Ocean related fields, etc…)
  5. DP provisions their DER devices to send their message data to some EW Messaging channel.
  6. DER sends out messages to the channel with: a. DID b. Data Asset EWNS c. PTD Data (JSON or TEXT) d. Signature which can be used to validate message integrity.
  7. EWAI assembles packets from DERs into data tables by data asset. Filtering out data that doesn’t validate (schema and signature), and only allowing data into the data asset from DER DIDs which possess the role specified in step 13.b.
  8. A separate user (hereafter called DataConsumer DC), with their own DID:eth:0x1234, by wallet login comes to the marketplace, searches/browses for energy data assets, purchases asset, and consumes/analyzes it