Giter VIP home page Giter VIP logo

energylogging's Introduction

Energy logging (P1 meter and solar)

The following code is very quick and dirty, but works fine for my purposes.

Only PR's are accepted. I won't be answering to issues

Database

Everything is saved in a PostgreSQL database. The database scheme used can be found in database.sql.

Analytics

The analytics are based on database views which can be found in views:

All aggregations are in a 15 minute resolution

  • electricity_out.sql aggregates the overcapacity of solar energy delivered back.
  • electricity_in.sql aggregates the consumed electricity from the supplier.
  • solar_in.sql aggregates the generated solar energy.
  • solar_total.sql aggregates the average solar panel performance in watt peak.
  • gas.sql aggregates the gas usage.

Additionally:

  • electricity_saldo.sql aggregates the saldo of the solar energy and consumed electricity per day.
  • week.sql aggregates everything on week level.

Frontend

The web frontend can be found in the web folder. The frontend is a quick and dirty HTML / PHP solution to show various highcharts.

Make sure to change the database settings in the PHP files.

Logging clients

To actually log the information from the p1 meter and the solar panels, the scripts in the clients folder are used. Make sure to change the various settings in the python files.

  • p1read.py runs as a daemon reading the Raspberry Pi serial interface.

  • solar.py runs as a daemon reading the Solar inverter Omnik API.

  • pgsql.py should be run periodically to fill the database with the cached queries.

Final result

Final result

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.