Giter Club home page Giter Club logo

python-volkszaehler's Introduction

python-volkszaehler

Python API for interacting with Volkszaehler. At the moment only the consumption of data is supported. Sorry, uploading is not possible.

This module is not official, developed, supported or endorsed by Volkzaehler.

Installation

The module is available from the Python Package Index.

$ pip3 install volkszaehler

On a Fedora-based system or a CentOS/RHEL host with EPEL.

$ sudo dnf -y install python3-volkszaehler

For Nix or NixOS users is a package available. Keep in mind that the lastest releases might only be present in the unstable channel.

$ nix-env -iA nixos.python39Packages.volkszaehler

Usage

The file example.py contains an example about how to use this module.

Basically it's just a wrapper to get the JSON data from a given UUID which represents the device.

$ http https://demo.volkszaehler.org/middleware.php/data/57acbef0-88a9-11e4-934f-6b0f9ecd95a8.json
[...]
{
    "data": {
        "average": 0.01,
        "consumption": 38.099,
        "from": 1584390593336,
        "max": [
            1597701600000,
            0.01
        ],
        "min": [
            1597701600000,
            0.01
        ],
        "rows": 3,
        "to": 1598106085887,
        "tuples": [
            [
                1597701600000,
                0.01,
                1
            ],
            [
                1598106085887,
                0.01,
                1
            ]
        ],
        "uuid": "57acbef0-88a9-11e4-934f-6b0f9ecd95a8"
    },
    "version": "0.3"
}

License

python-volkszaehler is licensed under MIT, for more details check LICENSE.

python-volkszaehler's People

Contributors

bbr111 avatar bdraco avatar fabaff avatar seraphimserapis avatar

Stargazers

 avatar

Watchers

 avatar  avatar

python-volkszaehler's Issues

Allow paths without middleware.php

_RESOURCE = "{schema}://{host}:{port}/middleware.php/data/{uuid}.json"

The docker version of volkszaehler (and probably a few other ways to run volkszaehler) simply have middleware.php listening on a certain port (e.g., localhost:8080). This behaviour causes issues when calling any URL with /middleware.php, as that path doesn't exist anymore. Thew newish path would be http://localhost:8089/data/{uuid}.json?from={ts}&to={ts} instead.

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.