Commit Graph

145 Commits

Author SHA1 Message Date
joerg1985
af35487155
Extend HistoricItem to work with Instant instead of ZonedDateTime (#4384)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-10-16 12:29:55 +02:00
Florian Hotze
389f6a3434
[rest] Persistence: Optionally add current Item state to response (#4394)
* [rest] Persistence endpoint: Optionally add current Item state to response

This new optional parameter gives the UI additional possibilities for charts.
E.g. it is now possible to display a bar chart with monthly energy consumption, where the consumption is only persisted at the end of the month, that includes the data from this month.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-10-09 19:32:31 +02:00
J-N-K
53889cdcdb
Add a PersistenceService bundle tracker (#4324)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-09-09 20:06:15 +02:00
Mark Herwege
b63fa473b3
Median action in persistence extensions (#4345)
* median persistence extension

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-08-24 10:55:06 +02:00
Holger Friedrich
fc454883c2
Reduce SAT warnings (#4339)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-08-11 10:04:26 +02:00
jimtng
ea7d61b199
PersistenceExtensions: fix DateTimeException when persisting an empty TimeSeries (#4303)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-07-08 19:53:01 +02:00
Kai Kreuzer
21e605d212
Apply spotless after release, resolve bundles (#4301)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2024-07-07 23:22:27 +02:00
openhab-bot
07e23eac3c [unleash-maven-plugin] Preparation for next development cycle. 2024-07-07 16:05:56 +00:00
Jacob Laursen
340996f971
Fix TimeSeries policy REPLACE not being applied (#4298)
Fixes #4297

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-07-06 20:38:20 +02:00
Mark Herwege
1e53c5235b
Fix persistence extensions for group items and number dimension items with different units (#4257)
* fix persistence extensions for group items

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-07-02 09:27:36 +02:00
Mark Herwege
cb65e41445
Persistence extensions, add lastChange and nextChange (#4259)
* add lastChange and nextChange

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-06-25 13:46:54 +02:00
Florian Hotze
f7f4b7653c
PersistenceExtensions: Support state as string for persist method (#4268)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-05 18:30:36 +02:00
Mark Herwege
d092c517f0
Fix persist with date method (#4267)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-06-05 18:14:52 +02:00
jimtng
6eeb9dd7c9
Fix a typo in PersistenceExtensions log message (#4221)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-05-07 08:09:36 +02:00
Mark Herwege
03a9708b6c
Persistence extensions: allow null serviceId (#4213)
* allow null serviceId

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-06 11:28:57 +02:00
Mark Herwege
94572aa7c8
PersistenceExtensions: Re-add deprecated evolutionRate variant (#4212)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-03 16:59:19 +02:00
Mark Herwege
1b503afdbb
Return units in persistence extension commands and support future persisted states (#3736)
* persistence extensions future and QuantityTypes

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-02 11:47:12 +02:00
Sami Salonen
bad043ff12
[persistence] TestPersistenceService w/ paging (#4200)
Previously it was not supporting paging. This validated correct
behaviour with historicState & lastUpdate & previousState
that have the pageSize defined.

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2024-04-28 17:10:23 +02:00
Holger Friedrich
b563f1577a
More instanceof pattern matching (#4191)
* More instanceof pattern matching

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-21 21:22:37 +02:00
joerg1985
ba463dd7e6
[persistence] improve building the ItemHistoryDTO (#4194)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-04-21 21:21:03 +02:00
J-N-K
d3fa049532
[persistence] Fix forecast for externally changed data (#4089)
Data added from the REST API is immediately stored in the selected persistence service, bypassing the `PersistenceManager`. Because of that the future values are not correctly "restored".

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-02-13 21:59:22 +01:00
Wouter Born
c2a0739f1f
Fix several compiler warnings (#4041)
* Fix several compiler warnings

* Add missing null annotations
* Add missing null checks
* Remove use of deprecated SecurityManager
* Remove redundant null checks
* Remove unused variables
* Fix raw use of parameterized class

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-20 09:55:50 +01:00
Wouter Born
2babea4c9a
Update license headers to 2024 (#4011)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 21:20:34 +01:00
Wouter Born
f376606e92
Simplify boolean expressions (#3971)
Signed-off-by: Wouter Born <github@maindrain.net>
2023-12-28 13:19:01 +01:00
Wouter Born
11e51abb44
Use OnOffType.from to reduce code (#3954)
You can create an `OnOffType` using a boolean nowadays which reduces the amount of code.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-12-23 15:33:07 +01:00
Holger Friedrich
bada23fdb8
Minor code cleanup (#3942)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-23 12:54:29 +01:00
Holger Friedrich
839ba1ab4c
Apply spotless after release, resolve bundles (#3953)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-22 23:14:28 +01:00
openhab-bot
3b279587b1 [unleash-maven-plugin] Preparation for next development cycle. 2023-12-22 11:48:43 +00:00
Holger Friedrich
24b1784d44
Reduce SAT warnings (#3932)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-19 20:37:57 +01:00
Holger Friedrich
9ad2fef549
Fix javadoc warnings (#3870)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-11-15 09:21:07 +01:00
J-N-K
cdbca4dd0a
Allow sending TimeSeries for items (#3597)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-11-07 20:08:41 -08:00
Wouter Born
09b3160a55
Simplify code using Stream.toList (#3831)
Stream.toList was introduced in Java 16 and creates an unmodifiable List so it can be used to simplify code whenever the List is not expected to be modified.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-09 09:20:08 +02:00
Wouter Born
c39d15ade6
Cleanup code (#3787)
This code cleanup fixes various warnings in Eclipse.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-30 22:50:17 +02:00
Florian Hotze
f5a0b37b3d
[persistence] Handle null value for relative & inverted props of filters (#3727)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-25 21:07:24 +02:00
Kai Kreuzer
5692232e2b Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-07-24 01:11:37 +02:00
openhab-bot
fd93f0a766 [unleash-maven-plugin] Preparation for next development cycle. 2023-07-23 17:14:35 +00:00
Florian Hotze
62a83557ae
[persistence] Handle null value for unit field of filters (#3716)
Setting up a treshold filter with the UI, it did not work because the unit field was blank.
I got an NPE from PersistenceTresholdFilter, and the PersistenceIncludeFilter would also throw a NPE in that case.
For PersistenceTimeFilter, defaulting to "s" is just cosmetic.

Picks-up PR #3681 and should be merged for the 4.0 release, because the UI does not prevent the unit field from being null.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-20 17:17:53 +02:00
Wouter Born
3396ff7758
Use Eclipse formatter 4.25 with Spotless (#3710)
Fixes #3515

Signed-off-by: Wouter Born <github@maindrain.net>
2023-07-18 09:03:16 +02:00
J-N-K
35ca7a9a94
Fix NPE in PersistenceManager (#3704)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-15 22:16:32 +02:00
openhab-bot
fb4f45e3e2
New Crowdin updates (#3653)
* New translations scriptprofile.properties (Hungarian)

* New translations validation.properties (Hungarian)

* New translations automation.properties (Hungarian)

* New translations lsp.properties (German)

* New translations persistence.properties (German)
2023-07-11 18:47:44 +02:00
J-N-K
4be95788f1
Remove error logging from PersistenceIncludeFilter (#3682)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-04 07:34:27 +02:00
J-N-K
d64bd3b90b
Improve existing and add new persistence filters (#3642)
* Improve existing and add new persistence filters
* include filter

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-06-18 09:29:49 +02:00
jimtng
6bb15b806c
Add getAllStatesSince() and getAllStatesBetween() to PersistenceExtensions (#3466)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-05-27 21:33:48 +02:00
J-N-K
d87007a585
Fix only first group config considered in persistence manager (#3618)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-18 11:00:45 +02:00
lolodomo
e4e23e3ccb
Fix failed persistence tests (#3601) 2023-05-10 15:56:25 +02:00
J-N-K
9ef076dc6a
[uom] Add unit metadata for NumberItem (#3481)
* Add defaultUnit metadata for NumberItem

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-09 22:42:25 +02:00
J-N-K
2e00efc9bb
Allow managing persistence configurations and enable filters (#2871)
* Allow managing persistence configurations

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-07 20:33:28 +02:00
Holger Friedrich
5e0a4ff25a
Reduce SAT warnings (#3586)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-05-01 09:08:26 +02:00
Holger Friedrich
769aa562a1
Code cleanup: Use Java 17 features (#3522)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-04-16 21:43:59 +02:00
jimtng
7a9b76dfdf
Fix division-by-zero error in Persistence average (#3556)
* Fix division-by-zero error in Persistence average
* Add test

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-04-15 16:03:45 +02:00