Git Product home page Git Product logo

adrianghc / hems Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 2.0 19.44 MB

HEMS - Home Energy Management System for a residential solar installation. It enables the user to schedule appliances in a targeted way, increasing energy self-consumption based on energy production predictions via weather forecasts.

License: MIT License

Makefile 0.03% C++ 2.14% C 24.43% Jupyter Notebook 73.27% HTML 0.02% Python 0.11% Shell 0.01%
hems energy energy-management energy-management-system

hems's People

Contributors

adrianghc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hems's Issues

Make sure only Automation and Recommendation Module can set/delete tasks and automation profiles

While the intended flow is for modules to set/delete tasks and automation profiles through the Automation and Recommendation Module (see page 20 in doc/thesis.pdf), this can currently be circumvented by interacting with the Data Storage Module directly. It must be ensured that only the Automation and Recommendation Module can tell the Data Storage Module to set or delete tasks and automation profiles, and that all other modules must refer to the Automation and Recommendation Module for this. This may be a hard-coded special case or alternatively, a generic mechanism to restrict certain message types to certain modules could be introduced.

Add more test cases for settings mechanism

Tests for the settings mechanism should be enhanced with at least two test cases:

  1. The settings initialization process (by testing the SETTINGS_INIT message and/or by testing the settings initialization by the Launcher Module).
  2. The pre_init_whitelist mechanism for messages that are accepted by a module before the settings initialization has finished.

Add two test module types

Currently, tests spawn instances of the Launcher Module and the Data Storage Module to e.g. test communication between modules. It may be cleaner to define two distinct test module types for this purpose instead of misappropriating these existing module classes.

Add timestamps to log messages (MSG_LOG)

Currently, log messages are timestamped and logged by the Launcher Module in the order that they arrive, which does not necessarily reflect the order in which they are sent. To fix this, messages should be timestamped by the modules that send them. In addition, by buffering a fixed number of messages before logging them (instead of logging messages as they arrive), the Launcher Module could sort all messages in the buffer by their timestamp before logging them, but this is an imperfect solution with many caveats. Alternatively, MSG_LOG messages could be sent synchronously instead of asynchronously.

Document message response codes in request datatypes

Currently, message response codes are not documented in the request datatypes in the include/hems/messages headers, but instead as return values for the handler functions for these request messages. This is a very flawed approach from an API documentation standpoint, as a developer wanting to send a message to a module currently needs to look in two places in the code: One to learn the format of the message and a separate place to learn the possible responses. Instead, possible message response codes need to be documented (additionally or exclusively) in the request datatype declarations.

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.