Skip to content
kdebrab edited this page Jun 16, 2015 · 12 revisions

Opengrid consists of several classes and software packages. I propose to use this page as a general overview of the intended functionality of these components and the interactions between the components.

Python Classes

Library

found in root/library

Fluksoapi.py

This module allows to pull data from the flukso servers.

houseprint.py

This module contains functions for fetching (all) sensor data / metadata from a google spreadsheet using gspread.

storetimeseriesdata.py

This module stores timeseries data in a more disk space efficient way then fluksoapi.py. For each sensor a separate datafile and metafile are created. This module also provides functions for fetching data from the stored files. Usage:

tsd= TimeSeriesData(sensorid)

tsd.getAllData() -> returns a dictionary with two lists: one list containing timestamps and one list containing the measurements (stored as floats).

Scripts

Contains jobs and (interactive) scripts.

Jobs are tailored scripts to run on the opengrid virtual machine on a regular basis through a crontab job. Therefore, jobs can have absolute path settings and functionality that is only useful on this server. Every job has a filename starting with job_. Most jobs will be normal python files (no ipython notebooks).

Scripts are pieces of code with a specific goal, like one type of data analysis. They should be programmed in such a way that they can run on any computer configured with opengrid code. Often, scripts are work in progress, and have the ambition to evolve into a job.

Web server

We have three virtual servers:

Public

http://95.85.34.168/
root = /var/www/public

Private

http://95.85.34.168:8080/
root = /var/www/private

Website

http://95.85.34.168:5000 root = /usr/local/src/website

Sensor type naming conventions

<system><metric><direction>[<tariff<]

<system> = site | grid | pv | chp | solar | wind | hydro | boiler | compressed | heatpump | car | bike | geo | rain | circuit

<metric> = Elec | Heat | Air | Gas | Fuel | Coal | BioMass | Water | Distance | Comfort | Garbage

<direction> = Cons=Export | Prod=Import | Inductive | Capacitive | Net

<tariff> = Day | Night | ExclusiveNight

Sensor categories for electricity sensors. See also issue 54

Examples:

  • gridElecExport : metering of electricity export via grid connection
  • pvElecProd: electricity generation of PV-system
  • gridElecImport: metering of electricity import via grid connection (non-reversible)
  • gridElecNet: net metering of grid connection (reversible meter)
  • siteElecCons: total electricity consumpion after grid connection, including self-consumed PV-generation
  • gridWaterImport: metering of total drinking water import
  • CircuitElecCons: submeter of gridCons
  • gridGasImport: metering of total natural gas import
  • boilerHeatProd: heat generation of a boiler (via calorific meter)

Om de siteverbruiken te kennen werk je met een 'metric' die 'meterdata' aggregeert:

  • siteElecCons = siteElecCons or (sum(ElecProd) + gridElecNet or (gridElecImport - gridElecExport))