Giter VIP home page Giter VIP logo

kostal-dataexporter's Introduction

Kostal Piko Dataexporter

This Python scripts grabs content of the REST API of a Kostal PIKO 7.0 and exports the data either to PostgreSQL Database, InfluxDB v1 or InfluxDB v2).

Setup

  • PostgreSQL: Import the init.sql into your Database
  • InfluxDB: Create Database (eg pv)
  • Set environment variables with the relevant details
  • KOSTAL_USERNAME
  • KOSTAL_PASSWORD
  • KOSTAL_HOST
  • For PostgreSQL:
    • DB_HOST
    • DB_PORT
    • DB_NAME
    • DB_USER
    • DB_PASSWORD
  • For InfluxDB (1.x):
    • INFLUXDB_HOST
    • INFLUXDB_PORT
    • INFLUXDB_NAME
    • INFLUXDB_USER
    • INFLUXDB_PASSWORD
  • For InfluxDB (2.x):
    • INFLUXDB_ORG
    • INFLUXDB_BUCKET
    • INFLUXDB_URL
    • INFLUXDB_TOKEN
  • Run python kostal-piko-dataexport.py
    • --influx 1 (on, optional) or --influx 0 (off, optional)
    • --influx2 1 (on, default) or --influx 0 (off, optional)
    • --postgres 1 (on, optional) or --postgres 0 (off, default)
    • --interval {seconds} Scrape interval (default: 30)
    • --oneshot Scrape data, print to stdout and exit

There's also a Docker Image available on Docker Hub.

Grafana

By logging the data with this script it's easily possible to create a nice Grafana Dashboard to display some of the interesting data:

My dashboard on a sunny day in Germany

You can import the dashboard-postgresql.json for PostgreSQL, dashboard-influx.json for influxdb v1 or dashboard-influxdb2.json to use it in your Grafana instance.

Note

This is just a quick-and-dirty script to grab to content of the REST-API of my Kostal Piko 7.0 Inverter. This might be usable on other Inverters aswell.

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.