GithubHelp home page GithubHelp logo

ralfogit / libgoecharger Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 201 KB

A C++ library to access settings of a go-eCharger wallbox

License: MIT License

CMake 0.77% C++ 69.94% C 29.29%
go-echarger goecharger wallbox

libgoecharger's Introduction

libgoecharger

A C++ library to access settings of a go-eCharger wallbox.

It provides methods to query and set all defined properties/settings from a go-eCharger wallbox via the local http network api.

Warning: The go-eCharger wallbox uses eeprom memory as non-volatile storage. This kind of memory supports only a limited number of write-cycles. You can modify properties/settings like the app is doing, but you must NOT repetitively call any of the set accessor methods a large number of times.

The software comes as is. No warrantees whatsoever are given and no responsibility is assumed in case of failure or damage being caused to your wallbox.

The API is coded in class GoEChargerAPI. The wallbox provides properties/settings as a block of data values. Therefore the implementation queries the full block of data values and stores it into an in-memory key-value map. Get accessor methods retrieve data from the in-memory map. A refresh method is provided to update the in-memory map if needed. Set accessor methods change individual properties/settings in the wallbox. The http response to a set accessor method contains the full block of data values; i.e. the in-memory key-value map is updated with each call to a set accessor method.

Usage is rather straightforward:

    GoEChargerAPI api("http://192.168.178.19/");

    // send http status request
    if (api.refreshMap() == true) {
        std::string version = api.getVersion();
        std::string date = api.getDateTime();
        uint32_t rbc = api.getRebootCounter();
        uint32_t rbt = api.getRebootTimer();
        uint8_t  car = api.getVehicleState();
        uint8_t  amp = api.getMaximumChargeCurrent();
        uint8_t  amt = api.getMaximumChargeCurrentTemperatureLimited();
        uint8_t  err = api.getError();
        uint8_t  ast = api.getAccessState();
        uint8_t  alw = api.getAllowChargingState();
        ...
        
        uint8_t amx = 3;
        bool success = api.setVolatileMaximumChargeCurrent(amx);
    }

It relies on the very small footprint json parser written by James McLaughlin: https://github.com/udp/json-parser.

The source code contains doxygen comments, so that you can generate documentation for the library.

The code has been tested against the following environment:

    OS: CentOS 8(TM), IDE: VSCode (TM)
    OS: Windows 10(TM), IDE: Visual Studio Community Edition 2019 (TM)

Writable and readable properties of the go-eCharger wallbox are documented here:

libgoecharger's People

Contributors

ralfogit avatar

Watchers

 avatar

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.