Coder Social home page Coder Social logo

ekzexport's People

Contributors

mensi avatar

Stargazers

 avatar

Watchers

 avatar

ekzexport's Issues

No Issue, Question (Home Assistant)

hi mensi, zwei fragen..

  1. weisst du, ob man neben dem 15-min-verbrauch auch andere daten direkt auslesen kann, z.b. total von tag/monat/jahr?

gibt es für den link andere typen neben PK_VERB_15MIN?

https://my.ekz.ch/api/portal-services/consumption-view/v1/consumption-data?installationId=XXXXXX&from=2024-06-12&to=2024-06-12&type=PK_VERB_15MIN

  1. gerne würde ich in home assistant die daten von my.ekz auslesen. knackpunkt ist wohl das notwendige login.
    kann man deine variante in hass nutzen, z.b. mit pyscript integration? oder kennst du eine andere möglicheit?

vielen dank und liebe grüsse

grafana dashboard for ekzexport

Thanks for the great package! Do you happen to have a grafana dashboard to visualise the data by any chance?
This is my first time using influxdb and I'm not sure how to best do the queries. I came up with the following to visualise the daily consumption with "Niedertarif" and without but the query is extremely slow:

niedertarif_true = from(bucket: "ekzexport")
  |> range(start: 0, stop: now())
  |> filter(fn: (r) => r["_measurement"] == "ekz_energy" and r["_field"] == "niedertarif" and r["_value"] == true)
  |> keep(columns: ["_time", "_measurement", "_field"])

energy_data = from(bucket: "ekzexport")
  |> range(start: 0, stop: now())
  |> filter(fn: (r) => r["_measurement"] == "ekz_energy" and r["_field"] == "energy_15min")

join(tables: {niedertarif: niedertarif_true, energy: energy_data}, on: ["_time", "_measurement"])
  |> keep(columns: ["_time", "_value"])
  |> aggregateWindow(every: 1d, fn: sum, createEmpty: false)
  |> map(fn: (r) => ({ r with value_nt: r._value }))
  |> drop(columns: ["_value"])
  |> yield(name: "daily_sum_nt")


and:

niedertarif_true = from(bucket: "ekzexport")
  |> range(start: 0, stop: now())
  |> filter(fn: (r) => r["_measurement"] == "ekz_energy" and r["_field"] == "niedertarif" and r["_value"] == false)
  |> keep(columns: ["_time", "_measurement", "_field"])

energy_data = from(bucket: "ekzexport")
  |> range(start: 0, stop: now())
  |> filter(fn: (r) => r["_measurement"] == "ekz_energy" and r["_field"] == "energy_15min")

join(tables: {niedertarif: niedertarif_true, energy: energy_data}, on: ["_time", "_measurement"])
  |> keep(columns: ["_time", "_value"])
  |> aggregateWindow(every: 1d, fn: sum, createEmpty: false)
  |> map(fn: (r) => ({ r with value: r._value }))
  |> drop(columns: ["_value"])
  |> yield(name: "daily_sum")

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.