Question/Improvement for not always available database connections

Hi there.

I have a question regarding persistence with JDBC/MySQL.
In my setup, I have a Raspberry PI running openhabian gathering many data from nearby devices. I persist the values using a JDBC connection to a remote database server (internet connection is used).

Sometimes it happens, that this internet connection is not available. Data which should get persisted during this time is lost, because of an offline database connection.

I programmed some small applications where I circumvented this problem with local caching of database INSERTs and writing them to database at the moment it gets available again. So, no data is lost.
Would this be possible in some way with openHAB? Or do you have any other idea how to deal with that?

Using a local database on the RPi is not an option at the moment, because of limited resources and the need of this data flowing into my common database (for further monitoring and other tools using this data).

Thx,

It sounds like you have the perfect skill set to add those programs to the OH persistence core. :wink:

1 Like

I think, my knowledge around the codebase of openHAB is far not good enough for this.

But I can share my code examples, if this could help…