Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[influxdb] Partial ModifiablePersistenceService support #12935

Closed

Conversation

seime
Copy link
Contributor

@seime seime commented Jun 13, 2022

Signed-off-by: Arne Seime [email protected]

Partial support for persisting values with a specific timestamp by implementing ModifiablePersistenceService instead of QueryablePersistenceService.

By also changing the startlevel to 79 (before bindings), it allows the persistence service to be called from bindings to persist previous (ie offline sensor time series being reported when sensor is offline) or future time series data such as electricity prices or weather forecasts.

A better approach would be to build this into the framework, but this seems to be a larger and quite more complex job unfortunately. See openhab/openhab-core#844

EDIT: Someone just created a PR to handle this properly in core; openhab/openhab-core#3000

@seime seime requested a review from lujop as a code owner June 13, 2022 18:31
@wborn wborn added the enhancement An enhancement or new feature for an existing add-on label Jun 15, 2022
@wborn wborn linked an issue Jun 15, 2022 that may be closed by this pull request
Comment on lines +7 to +9
<bundle start-level="79">mvn:org.openhab.addons.bundles/org.openhab.persistence.influxdb/${project.version}</bundle>
<configfile finalname="${openhab.conf}/services/influxdb.cfg" override="false">mvn:org.openhab.addons.features.karaf/org.openhab.addons.features.karaf.openhab-addons-external/${project.version}/cfg/influxdb
</configfile>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for these changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was to start the persistence service before the bindings so they could make use of it. But the same night another pr with changes to core appeared rendering this change obsolete (when/if accepted)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should in fact all persistence bundles start before level 80?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checked, without exception all persistence bundles start at level 80.

@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/panasonic-comfort-cloud-binding/133848/26

@lolodomo
Copy link
Contributor

lolodomo commented Nov 6, 2022

@seime : you answered to comments but you pushed no change ?

@seime
Copy link
Contributor Author

seime commented Nov 7, 2022

I was hoping this PR would be rendered obsolete by openhab/openhab-core#3000, but that one appears to be stuck :(

@jlaur
Copy link
Contributor

jlaur commented Dec 5, 2022

@seime - would you like to pursue this PR to have a solution until core will be enhanced in this regard?

@seime seime force-pushed the influxdb_modifiablepersistenceservice branch from f071a63 to e5a2288 Compare December 11, 2022 11:23
@seime seime force-pushed the influxdb_modifiablepersistenceservice branch from e5a2288 to 4564854 Compare December 11, 2022 11:25
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/using-persistenceservice-in-binding/143477/10

@jlaur jlaur added the awaiting feedback Awaiting feedback from the pull request author label Feb 22, 2023
@J-N-K J-N-K closed this May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback Awaiting feedback from the pull request author enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[influxdb] Support ModifiablePersistenceService
7 participants