Skip to content

EnergyPlus simulation data visualization with Grafana

License

Notifications You must be signed in to change notification settings

airboxlab/grafener

Repository files navigation

GrafEner

badge

Plotting EnergyPlus data made easy

Setup

Using docker

Build docker image:

docker build -t grafener -f docker/Dockerfile .

Using docker-compose

Build the image:

docker-compose -f ./docker/docker-compose.yml build grafener

Docker compose configuration provided here brings several benefits:

  • GrafEner configuration is persisted (not lost when container is stopped)
  • docker configuration is centralized in a file (see docker/docker-compose.yml)
  • datasources are automatically provisioned (see docker/provisioning to configure yours)

Run

Using docker

docker run --rm \
  -p 3000:3000 \
  --env "SIM_YEAR=2020" \
  -v /path/to/energyplus/output/folder/:/tmp/eplus_data:ro \
  --name grafener \
  grafener

With:

  • --env "SIM_YEAR=2020" allows to pin simulation year (not provided by default in Date/Time column of EnergyPlus CSV output). Default is current year.
  • -v /tmp/energyplus:/tmp/eplus_data:ro mounts a directory where EnergyPlus csv output is located ( typically eplusout.csv) with read-only permission. Data will be available inside the container at /tmp/eplus_data

Using docker-compose

docker-compose -f ./docker/docker-compose.yml up

Use

Basic usage

Run an EnergyPlus experiment using CSV output.

Example:

energyplus -r -x -d /tmp/energyplus -w /path/to/weather.epw /path/to/model.idf

Configure a new Simple JSON DataSource

Open your browser at http://localhost:3000 to configure your first datasource (note: default user is admin, same for password).

Example: datasource configuration

Notes:

  • URL must be http://localhost:8900
  • Add a source HTTP header that will point to eplusout.csv file. In present example, it will be at /tmp/eplus_data/eplusout.csv
  • optionally, you can add a sim_year header with the simulation year you want to set for this data source. It will override SIM_YEAR environment variable.

Enjoy!

Create a new dashboard, add a panel and start browsing EnergyPlus data. All CSV columns are now Grafana metrics

transform

Using multiple sources

It can be useful to compare results of different EnergyPlus simulations. To visualize more than one simulation output:

Configure more than 1 datasource

Using a friendly but unique identifer in URL path. For instance, if you have 2 sources:

  • Datasource 1 URL: http://localhost:8900/myXp1
  • Datasource 2 URL: http://localhost:8900/myXp2

Use -- Mixed -- datasource type

In a new panel, use the -- Mixed -- datasource type, then start adding metrics: Grafana will ask you to provide the datasource first, so you can choose between myXp1 and myXp2

Visualize and compare

In this mode, metric names have their respective datasource name as a prefix. It allows to identify them, and apply post-processing (like series overriding)

Example:

mixed

Working with S3

source HTTP header can point to a S3 object identified by its URI. Example: s3://my-bucket/path/to/eplusout.csv[.gz]

To access your bucket content, make sure that either:

  • AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_DEFAULT_REGION environment variables are set
  • or this process is running on an AWS EC2/ECS instance with appropriate S3 permissions (e.g. IAM instance role)

Roadmap

  • add support for more remote sources (http, ...)
  • cache large data frames on disk rather than memory
  • use pyenergyplus Python bindings to start EnergyPlus simulation and plot live
  • add support for annotations

About

EnergyPlus simulation data visualization with Grafana

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published