Giter Club home page Giter Club logo

electricity-data-consolidator's Introduction

electricity-data-consolidator

GitHub current branch CI Status

An application that communicates with external APIs to retrieve their data automatically at certain intervals (NOTE: as of now it is not automatic and will happen via a Console interface)

The idea is to get the data and make the accumulated data available in different formats (such as a .csv, .json or .xml file). This can then be used in e.g. an Excel sheet.

This project is still in its infancy and thus only has very limited functionality exposed via a console UI. At the time of writing it can:

  • Automatically fetch new data access tokens (provided an eloverblik api key)
  • Fetch MeterData (electricity usage and generation) from the El Overblik API as .csv file from yesterday
  • Fetch MeterData from the El Overblik API as .csv file in custom period.

Install

This section is split in two:

  1. How to install the application from a distribution .zip file (electricity-data-consolidator-x-distribution.zip)
  2. Making a distribution file from source code

Installation from zip file

  1. Download the .zip file (electricity-data-consolidator-x-distribution.zip) with x being version of the app.
  2. Get API key for ElOverblikAPI for your user account
  3. Open /config folder
  4. Make a file called api-key.conf with content similar to:
     api-key=your.api.key.all.in.one-line
    
    • Alternatively copy the example-api-key.conf and rename it to api-key.conf with your api-key in it.
  5. Now you can go to Usage to find out how to use the app.

Making a Distribution File

Prerequisite: Maven v3.9.2 or later and a Java 17 JDK

The distribution file is made via the maven-assembly-plugin and a custom assembly descriptor located at /src/assembly/custom-maven-assembly-descriptor.xml.

It should be every simple, assuming Maven can fetch dependencies from its default location.

Simply run the below maven command to make the distribution.zip file:

  1. Run mvn clean install -DisMavenSurefireTesting=true

This should make a /target directory, containing the compiled code along with some .jar file and a .zip file. The one we're interested in is called electricity-data-consolidator-{version}-distribution.zip (version comes from pom.xml).

  1. Use the electricity-data-consolidator-{version}-distribution.zip as you want.

Usage

Prerequisites: Java 17 or later.

Simply open the application via start.cmd (if using Windows) or start.sh (on Linux/Mac) and you should see a screen similar to below:

screenshot-of-console-ui.png

Then you simply select an option from the list by writing the associate number in the brackets, e.g. [1] for option 1. and press ENTER to confirm your choice.

Maintainer

@Noitcereon

electricity-data-consolidator's People

Contributors

noitcereon avatar

Watchers

 avatar

electricity-data-consolidator's Issues

[Feature] Allow User Interaction to Fetch Custom Periods of MeterData

Userstory

As a consumer of eloverblik data
I want to be able to get specific periods of meterdata
So that I can analyze the meterdata

Acceptance criteria

  • MeterData in a specific period can be fetched by interacting with the console
  • The fetched MeterData is in a csv format
  • The MeterData contains both data about electricity sold and electricity used.

[Feature] Show Name of File That Was Fetched

Userstory

As a consumer
I want to see the name of the file containing the data I just fetched
So that I can spend less time on figuring out where the file is

Acceptance criteria

  • Console UI displays the location of the file just being created
  • Test suite still passes

Add logging

The system currently uses System.out and System.err.
This needs to be remedied, so it uses a logging framework.

Options:

  • Log4j2
  • Logback
  • SLF4J (with a provider)

[Feature] Fetch all the meterdata since last time I fetched

Userstory

As a consumer
I want to fetch all the meterdata since last time I fetched
So that I don't have to keep track of which period I need to fetch from next time

Acceptance criteria

  • MeterData that has need been fetched (based on last fetch time) is written to csv file.
  • Last fetch time only moves forward in time
  • The fetched MeterData is in a csv format

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.