EW Solar Simulator

Overview

Consists of 2 services:

Simulation

Consumer

Simulation

This is a service that simulates API for getting energy data. Based on device configuration it returns mock data for solar devices, based on real data for whole year in 15-mins intervals. Simulation service exposes it's API for HTTP requests that Consumer service is using.

Run:

yarn start-simulation

or from the root of monorepo:

yarn run:simulator:server

Consumer

Queries Simulation service for energy data for configured devices, and if it sees that there are new energy entries, it writes them to Origin blockchain smart-contracts as smart meter reads.

Run:

yarn start-consuming-api

or from the root of monorepo:

yarn run:simulator:consumer

Configuration

To run simulator and consumer services you need to deploy Origin first.

General

Edit .env in the root of the monorepo and configure:

ENERGY_API_BASE_URL - the address on which simulation server is running, by default locally it's http://localhost:3032, in Docker it's http://simulation:3032