Giter VIP home page Giter VIP logo

Comments (7)

farmio avatar farmio commented on July 29, 2024

Hi 👋!
Yes, it is possible to adjust that in the integration configurations "communication settings" menu.

The data is stored in memory.
Since 2023.8 it's also written to a file, but only when the integration unloads - to be able to restore history data after eg. a restart.

from knx-frontend.

chrisch80 avatar chrisch80 commented on July 29, 2024

Cool, thanks
Do you have some proposal how to store it in a db or could this be added as feature in the future?

from knx-frontend.

farmio avatar farmio commented on July 29, 2024

There are no plans to do so currently. What would be the usecase for that?

It was initially built to only write to disk on shutdown - with RaspberryPi SD-Card installations in mind. This feature should not stress these cards more than necessary.

from knx-frontend.

chrisch80 avatar chrisch80 commented on July 29, 2024

I would like to montior the KNX-BUS with own scripts, but maybe it is better to fully integrate it in HomeAssistant.

from knx-frontend.

farmio avatar farmio commented on July 29, 2024

Aha. Tbh this sounds a little bit out of scope for the HA KNX integration.

But anyway, I don't think you'd need a database for that. You can just use the same websocket endpoint we use for the group monitor to get live data and process it in your script. See https://github.com/home-assistant/core/blob/f0abea48a6aef5c8f35770f36df5a47488ed3df6/homeassistant/components/knx/websocket.py#L163
Be aware, that this is not considered a public API currently and may be subject of change in future releases.

You could of course also just use an xknx instance in your script and have a separate connection providing callbacks to your logic.

From Home Assistant it may be doable using HA Events (knx_event) - depending on what you actually want to monitor.

from knx-frontend.

chrisch80 avatar chrisch80 commented on July 29, 2024

cool thx

from knx-frontend.

rvk avatar rvk commented on July 29, 2024

+1 for this feature, and I'll provide a standard use case.

Many visualization products for KNX have the data logging feature. It's used to diagnose intermittent problems that can't be reproduced while integrator is on-site.

For this, data survivability is critical, but timing of the writes is not. I think good solution for both considerations would be to have default behaviour as it is, but to add disk writing frequency as configurable option. Could you consider adding this?

from knx-frontend.

Related Issues (20)

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.