Commit Graph

453 Commits

Author SHA1 Message Date
Wouter Born
7888da1684
Fix some recently introduced SAT and NPE issues (#3251)
Signed-off-by: Wouter Born <github@maindrain.net>
2022-12-22 15:11:49 +01:00
Wouter Born
687688db7e
Update Eclipse .classpath files (#3250)
Also adds some missing files for recently added projects.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-12-22 14:14:35 +01:00
Дилян Палаузов
d48ac20377
typo: successful (#3236) 2022-12-19 15:45:17 +01:00
J-N-K
5a9fb679ef
Remove redundant ctor in DecimalType (#3240)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-19 15:44:18 +01:00
J-N-K
3fc4d23734
Fix spotless and resolve itests (#3239)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-19 11:09:31 +01:00
openhab-bot
35254b3a0a [unleash-maven-plugin] Preparation for next development cycle. 2022-12-18 23:08:22 +00:00
J-N-K
08d7d13c9b
Fix default unit for Energy (#3213)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-11 12:06:49 +01:00
J-N-K
94b8c2a540
Fix DataAmount dimension units (#3208)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-11 11:00:50 +01:00
J-N-K
1b8280812b
Fix AVG calculation in GroupFunction (#3202)
Reported on the forum. Due to selection of the `RoundingMode` instead of a `MathContext` the average calculation is returning unexpected results: 19.0 °C / 19.5 °C results in 19.3 °C (instead of 19.25 °C) which might be acceptable, but 19.5 °C / 19.5 °C results in 20 °C (instead of 19.5 °C) which is obviously not what we want or expect. Setting the `MathContext` fixes this problem. I also corrected the same calculation for non-dimensional groups.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-10 16:02:35 +01:00
J-N-K
d10cae0631
Improve UoM handling (#3201)
Also-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-07 15:55:02 +01:00
Дилян Палаузов
f64874e226
Fix a/an typos (#3184) 2022-11-30 21:16:18 +01:00
Дилян Палаузов
e556fdf81b
Fix a/an typos (#3181)
* Typos a/an
* Fix typo generation in generateTagClasses.groovy

Signed-off-by: Wouter Born <github@maindrain.net>
2022-11-29 20:57:48 +01:00
Cody Cutrer
af3738487c
add QuantityType.toUnitRelative (#3177)
this is a useful helper that can eliminate some complicated code elsewhere.
starting in SystemOffsetProfile. then I also want to use it in the homekit
addon.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-11-27 10:09:52 +01:00
lolodomo
27b847f40c
Define format method for HSBType (#3165)
Pattern %s will match <hue>,<saturation>,<brightness>
Pattern %hsb% will match <hue>,<saturation>,<brightness>
Pattern %rgb% will match <red>,<green>,<blue>

Related to discussion in openhab/openhab-webui#427

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2022-11-26 16:00:54 +01:00
J-N-K
d00d14d9fc
Add default units for all dimensions (#3143)
* Add default units for all dimensions

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-11-19 23:10:38 +01:00
J-N-K
4f35d474fc
Strip unit if NumberItem has no dimension (#3153)
* Strip unit if NumberItem has no dimension

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-11-19 23:05:55 +01:00
J-N-K
2bceba6954
Fix missing stateDescriptionProvider in Group items (#3144)
* Fix missing stateDescriptionProvider in Group items

The stateDescriptionProvider was not properly passed to the base item. Because of that units set in the state description were not properly used when setting the group state after calculating aggregation functions.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-11-06 20:50:05 +01:00
Cody Cutrer
a7d912d1e9
Fix invertible unit conversions when sent via a binding or uses in ItemUIRegistry (#3134)
* fix invertible unit conversions when sent via a binding
* do invertible unit conversion in ItemUIRegistry

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-27 20:26:27 +02:00
Cody Cutrer
ccdf2c5573
Allow sending IncreaseDecreaseType directly to DimmerItem (#3116)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-17 08:05:02 +02:00
Cody Cutrer
3659542bae
Support mired units (#3108)
* Support mired units

Mired are fairly common to describe the color temperature of
lightbulbs (slightly less common than Kelvin), but are very
useful for various calculations when adjusting the color
temperature, as well as being necessary for various integerations
that require mired units.

This commit makes them a well-known unit (previously they were
still usable, using "MK^-1"), as well as making them easier to
work with on QuantityType. The hiccup is that Mireds aren't
technically a Temperature dimension, because they're a reciprocal.
So add a `inverse` method that delegates to javax.measure's
same method, and then use it as necessary when doing unit
conversions and comparisons. Unfortunately, because the
dimension changes, the return value of a conversion won't
necessarily be the same type, an additional method is added
for callers that are willing to handle the change in
dimension. This is implemented for all callers that can use
it in core.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-16 13:50:46 +02:00
Cody Cutrer
7f38d419c6
Allow sending QuantityType to NumberItem (#3115)
NumberItems always accept QuantityType

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-15 09:31:30 +02:00
openhab-bot
07be655b0e
New Crowdin updates (#3109)
* New translations automation.properties (Italian)
* New translations restauth.properties (German)
* New translations restauth.properties (Italian)
* New translations addons.properties (Italian)
* New translations restauth.properties (Danish)
* New translations restauth.properties (Finnish)
* New translations restauth.properties (Hungarian)
* New translations restauth.properties (Polish)
2022-10-15 09:27:02 +02:00
Cody Cutrer
065e33f5ab
Fix StartLevelService "hanging" if config is changed. (#3092)
Unregistered trackers aren't clear, so then we never register new trackers,
and thus never get notified of any changes.

Signed-off-by: Cody Cutrer <cody@cutrer.us>

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-09-25 09:44:57 +02:00
J-N-K
e3b90e32ce
Normalize Metadata configuration from managed provider (#2958)
* Normalize Metadata configuration from managed provider

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-09-20 21:20:27 +02:00
Jacob Laursen
9bb88a1b7b
[oauth] Migrate usage of LocalDateTime to Instant (#3066)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-08-22 08:13:52 +02:00
openhab-bot
c4f0ab44df
New Crowdin updates (#3054)
* New translations units.properties (Portuguese)

* New translations units.properties (Portuguese, Brazilian)

* New translations firmware.properties (Slovenian)

* New translations units.properties (Slovenian)

* New translations validation.properties (Slovenian)

* New translations messages.properties (Slovenian)

* New translations tags.properties (Danish)

* New translations tags.properties (Slovenian)

* New translations DefaultSystemChannels.properties (Slovenian)

* New translations LanguageSupport.properties (Slovenian)

* New translations SystemProfiles.properties (Slovenian)

* New translations jsonStorage.properties (Slovenian)

* New translations network.properties (Slovenian)

* New translations i18n.properties (Slovenian)

* New translations voice.properties (Slovenian)

* New translations chart.properties (Slovenian)

* New translations persistence.properties (Slovenian)

* New translations addons.properties (Slovenian)

* New translations restauth.properties (Slovenian)

* New translations ephemeris.properties (Slovenian)

* New translations inbox.properties (Slovenian)

* New translations audio.properties (Slovenian)

* New translations hli.properties (Slovenian)

* New translations lsp.properties (Slovenian)

* New translations marketplace.properties (Slovenian)

* New translations sitemap.properties (Slovenian)

* New translations SystemThingStatusInfos.properties (Slovenian)

* New translations magic.properties (Slovenian)

* New translations automation.properties (Hebrew)

* New translations automation.properties (Slovenian)
2022-08-03 18:03:28 +02:00
openhab-bot
f84d72d449
New Crowdin updates (#3043)
* New translations messages.properties (Danish)

* New translations audio.properties (Danish)

* New translations inbox.properties (Danish)

* New translations addons.properties (Danish)

* New translations persistence.properties (Danish)

* New translations lsp.properties (Danish)

* New translations sitemap.properties (Danish)

* New translations SystemThingStatusInfos.properties (Danish)
2022-07-15 19:16:14 +02:00
openhab-bot
d92a2c6945
New Crowdin updates (#3028)
* New translations units.properties (Portuguese)

* New translations DefaultSystemChannels.properties (Norwegian)

* New translations tags.properties (Norwegian)

* New translations SystemProfiles.properties (Norwegian)

* New translations audio.properties (Norwegian)

* New translations voice.properties (Norwegian)

* New translations ephemeris.properties (Norwegian)

* New translations inbox.properties (Norwegian)

* New translations restauth.properties (Norwegian)

* New translations addons.properties (Norwegian)

* New translations persistence.properties (Norwegian)

* New translations jsonStorage.properties (Norwegian)

* New translations chart.properties (Norwegian)

* New translations i18n.properties (Norwegian)

* New translations network.properties (Norwegian)

* New translations lsp.properties (Norwegian)

* New translations sitemap.properties (Norwegian)

* New translations hli.properties (Norwegian)

* New translations marketplace.properties (Norwegian)

* New translations magic.properties (Norwegian)

* New translations validation.properties (Norwegian)

* New translations SystemThingStatusInfos.properties (Norwegian)

* New translations units.properties (Portuguese, Brazilian)
2022-07-04 15:31:54 +02:00
J-N-K
f79f8c348e
Improve UID error message (#3022)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-06-29 21:54:31 +02:00
Kai Kreuzer
61fd47c853
Apply spotless and resolver (#3018)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2022-06-27 13:41:28 +02:00
openhab-bot
8944bdbbe4 [unleash-maven-plugin] Preparation for next development cycle. 2022-06-26 16:37:00 +00:00
Kai Kreuzer
2cf875fdd8
Fix ConcurrentModificationException in WatchQueueReader (#3016)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2022-06-26 17:14:51 +02:00
openhab-bot
cdeda77322
New Crowdin updates (#3013) 2022-06-24 18:19:02 +02:00
J-N-K
c2ec97cfaf
Add ability to name timers / scheduled jobs (#2911)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-06-18 15:04:35 +02:00
J-N-K
344a9ae018
Fix log levels and duplicate implementation warning in tests (#2982)
* Fix log levels and duplicate implementation warning in tests

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-05-26 23:33:08 +02:00
J-N-K
792b7511bf
Fix item name checking in ItemUtil (#2941)
* Fix item name checking in ItemUtil

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-05-21 09:29:42 +02:00
Sami Salonen
09b9b33cc0
[expire] Allow ignoring commands (#2954)
* [expiry] [expire] bool configuration parameters parsing as util method
* [expiry] [expire] extend ExpiryManager to allow ignoring commands

Similar to ignoreStateUpdates parameter, this introduces new optional
parameter ignoreCommands.

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2022-05-11 18:30:53 +02:00
openhab-bot
bb634b9189
New Crowdin updates (#2930)
* New translations DefaultSystemChannels.properties (Italian)

* New translations DefaultSystemChannels.properties (Dutch)

* New translations DefaultSystemChannels.properties (Polish)

* New translations DefaultSystemChannels.properties (Finnish)

* New translations DefaultSystemChannels.properties (Hebrew)

* New translations DefaultSystemChannels.properties (German)

* New translations DefaultSystemChannels.properties (Hungarian)

* New translations addons.properties (Hungarian)

* New translations marketplace.properties (Hungarian)
2022-04-26 17:25:51 +02:00
J-N-K
b331066ea9
Allow changing watched directory of a WatchService (#2894)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-04-24 19:01:33 +02:00
J-N-K
ca94fd57b0
Add new module DateTimeTrigger for triggering on a DateTime state (#2923)
* Add DateTimeTrigger

This adds a new module that triggers at the time given by the state of an item.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-04-24 11:29:55 +02:00
J-N-K
ee7095d96d
Improve SaferCallerImplTest (#2922)
Failed to to unnecessary stubbing exception in https://ci.openhab.org/job/PR-openHAB-Core/4556/

Also removes unnecessary code.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-04-22 10:52:28 +02:00
J-N-K
0e7e7a37b7
Improve SchedulerImplTest (#2919)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-04-20 10:06:39 +02:00
J-N-K
7e641e12f8
Fix Metadata can't be deserialized (#2921)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-04-18 22:06:29 +02:00
Wouter Born
05fdc81b27
Improve test stability and OS compatibility (#2878)
This fixes the build being broken when building on Windows.
It also contains many fixes for timing issues which seem to impact macOS and Windows more than Linux.

* Fix .gitattributes and add *.xml_gen to fix line ending issues on Windows
* Derive fork count from CPU details in org.openhab.core tests for more stable tests on machines with fewer cores
* Adjust SafeCallerImplTest timings
* Increase ExecUtilTest timeout
* Increase SchedulerImplTest timeouts
* Increase AudioConsoleTest serveStream timeout
* Increase AudioServletTest serveStream timeout
* Increase SchedulerImplTest test timeouts
* Increase ExpireManagerTest timeout used for checking published events
* Increase PeriodicSchedulerImplTest max allowed delta
* Increase SchedulerImplTest timeouts
* Fix BundleInfoReader file stream not closed causing temp dir deletion issues on Windows
* Fix GenerateDefaultTranslationsMojoTest Windows line endings issues
* Fix GenerateDefaultTranslationsMojoTest Windows temp dir deletion problem
* Fix GenericItemProviderTest tearDown sometimes fails because of queued events
* Fix ChannelLinkNotifierOSGiTest wait for channel link events
* Fix ChannelCommandDescriptionProviderOSGiTest fails if provider not immediately registered
* Fix ChannelStateDescriptionProviderOSGiTest fails if provider not immediately registered
* Fix GenericItemChannelLinkProviderTest not waiting for async updated state to become true
* Fix GenericThingProviderTest failing due to events of previous test
* Fix InboxOSGiTest sometimes fails because of queued events
* Fix ScriptEngineOSGiTest failing because items are not yet added to registry
* Fix ThingManagerOSGiTest failing due to async handleRemoval call

Signed-off-by: Wouter Born <github@maindrain.net>
2022-04-14 23:00:33 +02:00
Wouter Born
a4353ee5ca
Fix UnitUtils.getDimensionName returns Angle instead of Dimensionless (#2895)
An Angle is also Dimensionless and because it is the first compatible unit it is always returned instead of any other Dimensionless unit.
With these changes `getDimensionName` will prefer the dimension of equal units over those of compatible units.

Fixes #2880

Signed-off-by: Wouter Born <github@maindrain.net>
2022-04-14 22:57:18 +02:00
J-N-K
4fbd4c5960
Do not allow empty last segment in UID (#2901)
* Fix empty segment in UID

Segments are not allowed to be empty. Also adds tests for UID construction.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-04-14 22:55:19 +02:00
openhab-bot
661fa00e46
New Crowdin updates (#2903)
* New translations marketplace.properties (Greek)

* New translations validation.properties (Greek)

* New translations SystemThingStatusInfos.properties (Greek)

* New translations DefaultSystemChannels.properties (Greek)

* New translations addons.properties (Greek)

* New translations voice.properties (Greek)
2022-04-09 08:57:11 +02:00
J-N-K
2a3e2e5567
Reduce Mockito warnings (#2893)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-04-03 22:36:55 +02:00
openhab-bot
f5aeba0ad7
New Crowdin updates (#2873)
* New translations DefaultSystemChannels.properties (Finnish)

* New translations DefaultSystemChannels.properties (Dutch)

* New translations marketplace.properties (Polish)

* New translations SystemThingStatusInfos.properties (Polish)

* New translations validation.properties (Polish)

* New translations voice.properties (Polish)

* New translations DefaultSystemChannels.properties (Italian)

* New translations DefaultSystemChannels.properties (Polish)

* New translations DefaultSystemChannels.properties (Hebrew)

* New translations DefaultSystemChannels.properties (German)

* New translations marketplace.properties (French)

* New translations DefaultSystemChannels.properties (French)

* New translations addons.properties (French)

* New translations marketplace.properties (French)
2022-03-27 23:22:39 +02:00
openhab-bot
22c39fb54d
New Crowdin updates (#2869)
* New translations addons.properties (Dutch)
* New translations addons.properties (Finnish)
* New translations addons.properties (German)
* New translations addons.properties (Hebrew)
* New translations addons.properties (Italian)
* New translations addons.properties (Polish)
* New translations marketplace.properties (Dutch)
* New translations marketplace.properties (Finnish)
* New translations marketplace.properties (German)
* New translations marketplace.properties (Hebrew)
* New translations marketplace.properties (Italian)
* New translations SystemThingStatusInfos.properties (Bulgarian)
* New translations units.properties (Catalan)
2022-03-25 18:44:31 +01:00
Wouter Born
b5e0ccfa6a
Add missing default translations for add-ons/marketplace configuration options (#2868)
This makes it possible to use Crowdin for translating the new configuration options introduced in #2811.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-03-23 17:45:23 +01:00
openhab-bot
7e13f7f4bd
New Crowdin updates (#2863)
* New translations addons.properties (Chinese Simplified)
* New translations addons.properties (Czech)
* New translations addons.properties (Dutch)
* New translations addons.properties (Finnish)
* New translations addons.properties (French)
* New translations addons.properties (German)
* New translations addons.properties (Greek)
* New translations addons.properties (Hebrew)
* New translations addons.properties (Hungarian)
* New translations addons.properties (Italian)
* New translations addons.properties (Polish)
* New translations addons.properties (Portuguese, Brazilian)
* New translations addons.properties (Russian)
* New translations addons.properties (Spanish)
* New translations addons.properties (Ukrainian)
* New translations i18n.properties (Danish)
* New translations magic.properties (Dutch)
* New translations marketplace.properties (Dutch)
* New translations marketplace.properties (Hebrew)
* New translations marketplace.properties (Hungarian)
* New translations marketplace.properties (Italian)
* New translations network.properties (Danish)
* New translations SystemThingStatusInfos.properties (Dutch)
* New translations units.properties (Danish)
* New translations validation.properties (Danish)
* New translations validation.properties (Dutch)
* New translations voice.properties (Dutch)
2022-03-22 21:27:45 +01:00
J-N-K
41abd57161
Increase allowed deviation in PeriodicSchedulerImplTest (#2867)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-03-22 20:46:50 +01:00
J-N-K
4577562f08
[addonservices] Add version filtering (#2811)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-03-20 18:43:07 +01:00
J-N-K
3d17049d52
Improve PeridodicSchedulerImplTest (#2856)
* Improve PeridodicSchedulerImplTest

The old implementation truncated timestamps to 1/10 s. Under some circumstances this could result in a failed tests:

offset = 201 -> truncatedOffset = 2
200ms delay expected, adjustment calculation results in an actual delay of 198ms
time = 399 -> truncatedTime = 3

expected: truncatedOffset + expected => 2 + 2 = 4
actual: truncatedTime = 3

The new implementation allows for an error of +/- 10ms which is far more than needed.

* increase tolerance
* fix consecutive executions build up errors

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-03-19 21:07:08 +01:00
Wouter Born
ba4e73ccf4
Run org.openhab.core tests in forks to reduce build time (#2837)
This saves about 1 minute when building this bundle.
Most bundles depend on org.openhab.core so cores would stay idle until this bundle is build in a parallel builds.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-03-13 12:11:11 +01:00
Wouter Born
e6ddeccd78
Add more null annotations to XML processing classes (#2775)
This adds null annotations to many XML processing classes and a few others.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-03-10 19:57:31 +01:00
J-N-K
c7aec15290
Fix missing STARTLEVEL_COMPLETE ReadyMarker (#2755)
Since no requirements are defined for `STARTLEVEL_COMPLETE´ no `ReadyMarker` was added to the map of `ReadyMarker`s.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-03-09 22:05:30 +01:00
J-N-K
f79d85da87
Re-introduce removed DecimalType ctors to maintain compatibility (#2803)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-26 13:30:56 +01:00
Wouter Born
9ff7ad43b9
Add more null annotations to automation bundles (#2763)
* Add more null annotations to automation bundles. This adds null annotations to many classes in the automation bundles and a few dimension classes.
* Further cleanup AutomationCommandExport
* Remove null from RuleStatusInfo JavaDocs. This should be clear from how the class is now annotated.
* Validate deserialized RuleStatusInfo
* Allow TriggerHandlerCallback to be triggered without providing a context

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-25 16:40:02 +01:00
J-N-K
44f7b00c45
[rest] Add ability to change loggers and expose package names of addons (#2772)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-25 16:34:37 +01:00
kippAndMost
9e721dca36
[openhab.core] DecimalType-ctor with Number argument (#2596)
The expectation is, that when a `DecimalType` was constructed with a
`float` value, the precision of its `doubleValue()`, `floatValue()`,
`toBigDecimal()` and `toString()` is preserved. But there are `float`
values like `4.2f` or `37.1f` that cannot directly converted to `double`
without precision loss.

This commit replaces all the numerical constructors of `DecimalType`
with a single constructor with a `Number` argument, so that all `float`
values can be used without precision loss.

NOTE: There is some special handling needed for `QuantityType` and
`HSBType` because these types has a special none convential `toString`
implementation.

Signed-off-by: Ringo Frischmann <ringo.frischmann@kiwigrid.com>
2022-02-24 21:27:45 +01:00
J-N-K
2565b5cbe4
[expiry] extend ExpiryManager to allow ignoring state updates (#2739)
* [expiry] extend ExpiryManager to allow ignoring state updates

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-24 21:21:23 +01:00
Wouter Born
92917946d4
Add even more null annotations (#2752)
This PR adds even more missing null annotations which did not fit in #2742 as it grew too big.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-17 21:30:51 +01:00
Wouter Born
fb6ef20cd9
Move Java only tests from org.openhab.core.tests to org.openhab.core (#2768)
These tests only require Java and not OSGi.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-15 16:34:14 +01:00
Wouter Born
ad936cd83f
Add more null annotations (#2742)
* Add more null annotations
* Fix mock name

Adds null annotations to most of the tests as well as a few other classes.
Also fixes a few other SAT findings.
Fixes ~300 SAT findings in total.


Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-14 11:33:50 +01:00
James Melville
b594d0a8b7
Add new Imperial Pressure unit psi (#2758)
Signed-off-by: James Melville <jamesmelville@gmail.com>
2022-02-13 10:02:37 +01:00
James Melville
92679aa6fd
Add bearingTo method for PointType (#2757)
Signed-off-by: James Melville <jamesmelville@gmail.com>
2022-02-13 10:01:21 +01:00
J-N-K
c0b033b95c
Fix WatchQueueReader cancelling jobs too early (#2745)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-12 10:10:23 +01:00
J-N-K
719f66835e
[rest] show start level in /systeminfo (#2749)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-12 10:08:36 +01:00
J-N-K
ea6f21f74d
allow multiple listeners for same directory in WatchService (#2724)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-07 10:14:41 +01:00
Cody Cutrer
57ed7ef5a7
Include full exception when WatchQueueReader thread dies (#2538)
See #2537

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-01-18 13:46:36 +01:00
Christoph Weitkamp
cabb3f7315
Update license headers to 2022 (#2671)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-07 13:16:42 +01:00
Christoph Weitkamp
33a553fa4d
[core] Added nullness annotations and suppress warning for 'AuthenticationException' (#2659)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-02 11:33:16 +01:00
Kai Kreuzer
e3b07782b4
pom reference update from http to https (#2644)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-23 22:55:20 +01:00
Christoph Weitkamp
2d79990d53
Use static BigDecimal values (#2620)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-21 22:13:22 +01:00
Kai Kreuzer
1ebf7395d9 Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-20 06:59:22 +01:00
openhab-bot
5ac05c4968 [unleash-maven-plugin] Preparation for next development cycle. 2021-12-19 21:49:34 +00:00
openhab-bot
de7b176dc4
New Crowdin updates (#2609)
* New translations addons.properties (Italian)
* New translations brokerConnectionInstance.properties (Italian)
* New translations i18n.properties (Italian)
* New translations inbox.properties (Italian)
* New translations marketplace.properties (German)
* New translations marketplace.properties (Hebrew)
* New translations marketplace.properties (Hungarian)
* New translations marketplace.properties (Italian)
* New translations restauth.properties (Italian)
* New translations tags.properties (Italian)
* New translations tags.properties (Polish)
* New translations validation.properties (Italian)
2021-12-15 22:14:37 +01:00
Christoph Weitkamp
8f23e2f04a
Added nullness annotations to Addon related classes (#2605)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-12 10:07:05 +01:00
Wouter Born
044aad891e
Remove unnecessary executable permissions (#2591)
These files are marked as executable for no good reason at all.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-12-05 19:58:23 +01:00
Christoph Weitkamp
07ee8e6ffc
Added nullness anotations to ChannelEventTriggerHandler (#2586)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-03 14:32:05 +01:00
Jan Vybíral
a32844358b
Prevent shutdown of shared thread pool (#760) (#2531)
Fixes #760

Signed-off-by: Jan Vybíral <jan.vybiral1@gmail.com>
2021-11-15 21:13:31 +01:00
Yannick Schaus
d4f62ed024
Add compilation errors & SAT GitHub annotations (#2543)
Signed-off-by: Yannick Schaus <github@schaus.net>
2021-11-13 22:13:28 +01:00
lolodomo
998ce26ef5
[core] Added basic exception classes which supports internationalization (#2549)
* New exception class that incorporates support for internationalization
* Add ConnectionException, CommunicationException and ConfigurationException

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2021-11-12 20:58:53 +01:00
jimtng
8343703406
Fix NPE on WatchQueueReader (#2563)
Signed-off-by: Jimmy Tanagra <jimmy@tanagra.id.au>
2021-11-11 09:43:24 +01:00
Wouter Born
bf81eaa1c2
Fix/suppress PMD CompareObjectsWithEquals findings (#2548)
Newer PMD versions discover more CompareObjectsWithEquals findings.

Related to https://github.com/openhab/static-code-analysis/pull/423

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-30 19:37:34 +02:00
Wouter Born
569dddd046
Exclude JUnit 4 from Whiteboard and update imports to JUnit 5 (#2534)
* Exclude JUnit 4 from Whiteboard and update imports to JUnit 5

Excludes the transitive JUnit 4 dependency from the Aries JAX-RS Whiteboard.
The Whiteboard should not have a compile scope dependency on JUnit so I've created https://github.com/apache/aries-jax-rs-whiteboard/pull/135 to fix this.
The wrong scope has resulted in some tests using JUnit 4 imports which is also fixed in this PR.

Signed-off-by: Wouter Born <github@maindrain.net>

* Add commonly used JUnit 4 classes to forbidden packages

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-24 10:35:28 +02:00
openhab-bot
fb8308a7a0
New Crowdin updates (#2511)
* New translations chart.properties (Russian)

* New translations hli.properties (Russian)

* New translations jsonStorage.properties (Russian)

* New translations network.properties (Russian)

* New translations audio.properties (Russian)

* New translations ephemeris.properties (Russian)

* New translations persistence.properties (Russian)
2021-10-08 18:02:58 +02:00
openhab-bot
11a96d87d6
New Crowdin updates (#2506)
* New translations addons.properties (Czech)
* New translations audio.properties (Czech)
* New translations brokerConnectionInstance.properties (Czech)
* New translations chart.properties (Czech)
* New translations DefaultSystemChannels.properties (Czech)
* New translations ephemeris.properties (Czech)
* New translations hli.properties (Czech)
* New translations i18n.properties (Czech)
* New translations inbox.properties (Czech)
* New translations jsonStorage.properties (Czech)
* New translations lsp.properties (Czech)
* New translations marketplace.properties (Czech)
* New translations marketplace.properties (Dutch)
* New translations marketplace.properties (Ukrainian)
* New translations network.properties (Czech)
* New translations persistence.properties (Czech)
* New translations restauth.properties (Czech)
* New translations sitemap.properties (Czech)
* New translations SystemProfiles.properties (Czech)
* New translations tags.properties (Czech)
* New translations voice.properties (Czech)
2021-10-05 22:49:21 +02:00
J-N-K
06f8107430
replace multi-parameter constructor with builder on org.openhab.core.Addon (#2499)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2021-09-29 20:28:15 +02:00
Wouter Born
ba6386d83b
Use CoreItemFactory item type constants in tests (#2497)
This prevents typos and using the constants makes it easier to find out what other items types are accepted.
It also makes it easier to see that these values are item types and not labels or descriptions.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-09-27 07:34:58 +02:00
J-N-K
4569eea519
Extend marketplace to accept kar and some improvements (#2490)
Also-by: Wouter Born <github@maindrain.net>
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2021-09-23 17:07:34 +02:00
Wouter Born
41a535bf1c
Metrics improvements and fixes (#2486)
* Fix StringIndexOutOfBoundsException when using rules file name that starts with 'state' (Constant Warnings in RuleMetric #2472)
* Null annotations fixes/improvements
* Add transitive com.codahale.metrics dependency which is used by io.micrometer.core.instrument.dropwizard.DropwizardMeterRegistry. This fixes a NoClassDefFoundError when implementing metrics exporters that use a MeterRegistry extending DropwizardMeterRegistry (e.g. JmxMeterRegistry).
* Prevent ConcurrentModificationException in ThreadPoolMetric at startup:

java.util.ConcurrentModificationException: null
	at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:807) ~[?:?]
	at java.util.WeakHashMap$KeyIterator.next(WeakHashMap.java:840) ~[?:?]
	at java.lang.Iterable.forEach(Iterable.java:74) ~[?:?]
	at org.openhab.core.io.monitor.internal.metrics.ThreadPoolMetric.bindTo(ThreadPoolMetric.java:55) ~[?:?]
	at org.openhab.core.io.monitor.internal.DefaultMetricsRegistration.lambda$0(DefaultMetricsRegistration.java:97) ~[?:?]
	at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
	at org.openhab.core.io.monitor.internal.DefaultMetricsRegistration.registerMeters(DefaultMetricsRegistration.java:97) ~[?:?]
	at org.openhab.core.io.monitor.internal.DefaultMetricsRegistration.onReadyMarkerAdded(DefaultMetricsRegistration.java:115) ~[?:?]
	at org.openhab.core.internal.service.ReadyServiceImpl.lambda$0(ReadyServiceImpl.java:52) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) ~[?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) ~[?:?]
	at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1746) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) ~[?:?]
	at org.openhab.core.internal.service.ReadyServiceImpl.notifyTrackers(ReadyServiceImpl.java:79) ~[?:?]
	at org.openhab.core.internal.service.ReadyServiceImpl.markReady(ReadyServiceImpl.java:52) ~[?:?]
	at org.openhab.core.service.StartLevelService.setStartLevel(StartLevelService.java:248) ~[?:?]
	at org.openhab.core.service.StartLevelService.lambda$0(StartLevelService.java:125) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]

Most likely another issue is that the ThreadPoolMetric does not add metrics for thread pools that are created on demand.

Fixes #2472

Signed-off-by: Wouter Born <github@maindrain.net>
2021-09-15 22:32:53 +02:00
Fabian Wolter
ea26451f66
[StartLevel] Use wrapped scheduler to make swallowed exceptions visible (#2481)
Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
2021-09-15 19:33:21 +02:00
Yannick Schaus
2663a3fc7e
Community Marketplace Add-on Service - initial contribution (#2405)
Signed-off-by: Yannick Schaus <github@schaus.net>
2021-09-14 09:04:04 +02:00
openhab-bot
95da7021d9
New Crowdin updates (#2431)
* New translations tags.properties (German)

* New translations sitemap.properties (Ukrainian)

* New translations network.properties (Italian)

* New translations hli.properties (Greek)

* New translations lsp.properties (Greek)

* New translations validation.properties (Greek)

* New translations units.properties (Greek)

* New translations messages.properties (Greek)

* New translations firmware.properties (Greek)

* New translations i18n.properties (Greek)

* New translations jsonStorage.properties (Greek)

* New translations persistence.properties (Greek)

* New translations addons.properties (Greek)

* New translations restauth.properties (Greek)

* New translations ephemeris.properties (Greek)

* New translations inbox.properties (Greek)

* New translations audio.properties (Greek)

* New translations sitemap.properties (Greek)

* New translations tags.properties (Greek)

* New translations DefaultSystemChannels.properties (Greek)

* New translations chart.properties (Greek)

* New translations network.properties (Greek)

* New translations voice.properties (Greek)

* New translations brokerConnectionInstance.properties (Greek)

* New translations LanguageSupport.properties (Greek)

* New translations SystemProfiles.properties (Greek)
2021-08-31 22:29:06 +02:00
J-N-K
67d9bf5f0e
fix filename stripping (#2442)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2021-07-31 19:07:24 +02:00
Carmine Gianni
7d5f95c078
Corrected a typo (#2444)
Signed-off-by: Carmine Gianni <carmixdev@gmail.com>
2021-07-31 19:04:08 +02:00
Kai Kreuzer
5a667cc868 applied spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-06-27 23:22:02 +02:00
jenkins
b8d2077805 [unleash-maven-plugin] Preparation for next development cycle. 2021-06-27 15:50:02 +00:00
Christoph Weitkamp
57c716bf80
Create a deep copy of the first found fragment before merging other fragments into it (#2412)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-06-24 18:34:24 +02:00
openhab-bot
8e3f87a212
New Crowdin updates (#2403)
* New translations network.properties (Swedish)

* New translations i18n.properties (Swedish)

* New translations inbox.properties (Swedish)

* New translations i18n.properties (Russian)

* New translations chart.properties (Swedish)

* New translations ephemeris.properties (Swedish)

* New translations DefaultSystemChannels.properties (Swedish)

* New translations firmware.properties (Swedish)

* New translations restauth.properties (Swedish)

* New translations jsonStorage.properties (Swedish)

* New translations voice.properties (Swedish)

* New translations LanguageSupport.properties (Swedish)

* New translations validation.properties (Swedish)

* New translations SystemProfiles.properties (Swedish)

* New translations hli.properties (Portuguese, Brazilian)

* New translations lsp.properties (Portuguese, Brazilian)

* New translations SystemProfiles.properties (Portuguese, Brazilian)

* New translations addons.properties (Portuguese, Brazilian)

* New translations persistence.properties (Portuguese, Brazilian)

* New translations jsonStorage.properties (Portuguese, Brazilian)

* New translations chart.properties (Portuguese, Brazilian)

* New translations voice.properties (Portuguese, Brazilian)

* New translations brokerConnectionInstance.properties (German)
2021-06-23 16:45:11 +02:00
Christoph Weitkamp
556d3498c1
Added 'ChannelDescriptionChangedEvent' (#1505)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-06-21 13:03:37 +02:00
openhab-bot
8dbed1c553
New Crowdin updates (#2395)
* New translations validation.properties (Arabic)

* New translations units.properties (Turkish)

* New translations network.properties (Chinese Simplified)

* New translations i18n.properties (Chinese Simplified)

* New translations audio.properties (Chinese Simplified)

* New translations validation.properties (Turkish)

* New translations persistence.properties (Chinese Simplified)

* New translations voice.properties (Chinese Simplified)

* New translations chart.properties (Chinese Simplified)

* New translations jsonStorage.properties (Chinese Simplified)

* New translations addons.properties (Chinese Simplified)

* New translations restauth.properties (Chinese Simplified)

* New translations ephemeris.properties (Chinese Simplified)

* New translations inbox.properties (Chinese Simplified)

* New translations brokerConnectionInstance.properties (Chinese Simplified)

* New translations lsp.properties (Chinese Simplified)

* New translations hli.properties (Chinese Simplified)

* New translations DefaultSystemChannels.properties (Chinese Simplified)

* New translations LanguageSupport.properties (Chinese Simplified)

* New translations messages.properties (Chinese Simplified)

* New translations validation.properties (Chinese Simplified)

* New translations units.properties (Chinese Simplified)

* New translations units.properties (Arabic)

* New translations firmware.properties (Chinese Simplified)

* New translations SystemProfiles.properties (Chinese Simplified)

* New translations ephemeris.properties (Spanish)

* New translations i18n.properties (Spanish)

* New translations voice.properties (Spanish)

* New translations addons.properties (Spanish)

* New translations tags.properties (Chinese Simplified)

* New translations units.properties (Swedish)

* New translations audio.properties (Swedish)

* New translations brokerConnectionInstance.properties (Ukrainian)

* New translations SystemProfiles.properties (Ukrainian)
2021-06-09 22:09:51 +02:00
jsjames
c033741b29
[UoM] Added SQUARE_INCH, CUBIC_INCH, GALLON_LIQUID_US and GALLON_PER_MINUTE (#2401)
Added SQUARE_INCH, CUBIC_INCH, GALLON_LIQUID_US and GALLON_PER_MINUTE
Corrected type for of SQUARE_FOOT and CUBIC_FOOT to be Unit<Area> and Unit<Volume>, respectively

Signed-off-by: Jeff James <jeff@james-online.com>
2021-06-08 21:45:39 +02:00
Christoph Weitkamp
8acaa8994f
Added nullness annotations to Item events (#2384)
* Added nullness annotations to Item events
* Added nullness annotations to tests

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-30 18:27:15 +02:00
openhab-bot
a52bb42481
New Crowdin updates (#2390)
* New translations network.properties (French)

* New translations restauth.properties (French)
2021-05-30 10:15:05 +02:00
openhab-bot
0ffb5aad72
New Crowdin updates (#2387)
* New translations restauth.properties (French)

* New translations i18n.properties (French)

* New translations network.properties (French)
2021-05-30 08:10:24 +02:00
openhab-bot
e2511cd894
New Crowdin updates (#2375)
* New translations persistence.properties (French)

* New translations lsp.properties (French)

* New translations jsonStorage.properties (French)

* New translations chart.properties (French)

* New translations SystemProfiles.properties (Hebrew)

* New translations SystemProfiles.properties (Italian)

* New translations SystemProfiles.properties (German)

* Update source file SystemProfiles.properties

* New translations SystemProfiles.properties (German)

* New translations SystemProfiles.properties (Dutch)

* New translations SystemProfiles.properties (Finnish)

* New translations audio.properties (Polish)

* New translations lsp.properties (Polish)

* New translations hli.properties (Polish)

* New translations persistence.properties (Polish)

* New translations network.properties (Polish)

* New translations i18n.properties (Polish)

* New translations chart.properties (Polish)

* New translations jsonStorage.properties (Polish)

* New translations addons.properties (Polish)

* New translations restauth.properties (Polish)

* New translations ephemeris.properties (Polish)

* New translations voice.properties (Polish)

* New translations inbox.properties (Polish)

* New translations inbox.properties (Hungarian)

* New translations ephemeris.properties (Hungarian)

* New translations restauth.properties (Hungarian)

* New translations addons.properties (Hungarian)

* New translations jsonStorage.properties (Hungarian)

* New translations voice.properties (Hungarian)

* New translations i18n.properties (Hungarian)

* New translations lsp.properties (Hungarian)

* New translations brokerConnectionInstance.properties (Hungarian)

* New translations hli.properties (Hungarian)

* New translations inbox.properties (French)

* New translations addons.properties (French)

* New translations audio.properties (French)

* New translations SystemProfiles.properties (Hungarian)

* New translations SystemProfiles.properties (Polish)

* New translations ephemeris.properties (French)
2021-05-27 17:44:29 +02:00
Wouter Born
696ebacdc7
Rework thrown exceptions for DecimalType, PercentType and QuantityType (#2374)
Throw NumberFormatException when numbers are invalid and cannot be parsed to BigDecimals.
Add JavaDocs to document when which exception is thrown.
Add more unit tests to cover the thrown exceptions.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-20 20:37:46 +02:00
Wouter Born
3c30177269
Support parsing localized strings with DecimalType, PercentType and QuantityType (#2365)
Adds constructors with a Locale parameter for parsing localized string to DecimalType, PercentType and QuantityType.
This allows for parsing locale specific group and decimal seperators in strings.

Also fixes:
* IllegalArgumentException not being thrown if numbers in strings are only partially parsed as QuantityType
* MeasurementParseException not caught and rethrown as IllegalArgumentException

Several new unit tests cover the new functionality and fixed regressions.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-19 21:21:22 +02:00
Christoph Weitkamp
22cbc9a08a
Catch MeasurementParseException in UnitUtils.parseUnit(String) method (#2367)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-16 19:43:58 +02:00
Christoph Weitkamp
ba53e8a08d
[profiles] Added "timestamp-offset" Profile (#2351)
* Added timestamp-offset Profile
* Fix RAWBUTTON_TOGGLE_ROLLERSHUTTER Profile

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-15 19:39:24 +02:00
Wouter Born
568881a678
Fix decimal separator issues when creating QuantityType from String (#2362)
* Fix decimal separator issues when creating QuantityType from String

Fixes #2360

Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-14 09:11:25 +02:00
openhab-bot
ff1d702f5d
New Crowdin updates (#2352)
* New translations audio.properties (Hungarian)
* New translations audio.properties (Portuguese, Brazilian)
* New translations brokerConnectionInstance.properties (Dutch)
* New translations brokerConnectionInstance.properties (Finnish)
* New translations brokerConnectionInstance.properties (Hebrew)
* New translations brokerConnectionInstance.properties (Italian)
* New translations brokerConnectionInstance.properties (Ukrainian)
* New translations chart.properties (Hungarian)
* New translations ephemeris.properties (Portuguese, Brazilian)
* New translations hli.properties (Ukrainian)
* New translations i18n.properties (Portuguese, Brazilian)
* New translations inbox.properties (Portuguese, Brazilian)
* New translations lsp.properties (Ukrainian)
* New translations network.properties (Hungarian)
* New translations network.properties (Portuguese, Brazilian)
* New translations persistence.properties (Hungarian)
* New translations restauth.properties (Portuguese, Brazilian)
2021-05-12 18:59:30 +02:00
Wouter Born
0e9cecc29b
Fix unstable CronSchedulerImplTest (#2354)
This test would often fail when the system is under load.

Fixes #1242

Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-11 19:54:33 +02:00
Wouter Born
91307993ad
Upgrade Units of Measurement dependencies (#2319)
Upgrades UoM dependencies to:

* javax.measure 2.1.2
* si-units 2.0.1
* indriya 2.1.2

An openHAB OSGi-ified si-units bundle is used as runtime dependency, because the latest si-units release is still missing proper OSGi manifest headers.

Notable changes:

* Quantity not longer implements an `equals` method, so the unit tests had to be adjusted. This should have any impact outside of the unit tests though since the rest of openHAB should be using QuantityType instead.
* RationalConverter is not package private, so instances of it much be created through the MultiplyConverter static functions.
* Quantities.getQuantity can no longer parse values without units like `100`. A workaround has been implemented.
* The unicode greek `mu` letter is now returned for unit prefixes instead of the unicode `micro` character. These characters are visually identical but the unit tests had to be adjusted. The new library seems to parse both types just fine.

Also-by: Connor Petty <mistercpp2000+gitsignoff@gmail.com>
Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-10 20:54:25 +02:00
openhab-bot
305683ac6a
New Crowdin updates (#2339)
* New translations restauth.properties (Hebrew)

* New translations addons.properties (Hebrew)

* New translations jsonStorage.properties (Hebrew)

* New translations chart.properties (Hebrew)

* New translations DefaultSystemChannels.properties (Polish)

* New translations LanguageSupport.properties (Polish)

* New translations audio.properties (Polish)

* New translations voice.properties (Polish)

* New translations SystemProfiles.properties (Polish)

* New translations units.properties (Polish)

* New translations validation.properties (Polish)

* New translations validation.properties (Finnish)

* New translations messages.properties (Polish)

* New translations tags.properties (Polish)

* New translations firmware.properties (Polish)

* New translations chart.properties (Polish)

* New translations inbox.properties (Polish)

* New translations ephemeris.properties (Polish)

* New translations restauth.properties (Polish)

* New translations addons.properties (Polish)

* New translations persistence.properties (Polish)

* New translations jsonStorage.properties (Polish)

* New translations network.properties (Polish)

* New translations i18n.properties (Polish)

* New translations jsonStorage.properties (Finnish)

* New translations i18n.properties (Finnish)

* New translations network.properties (Finnish)

* New translations voice.properties (Dutch)

* New translations persistence.properties (Dutch)

* New translations addons.properties (Dutch)

* New translations restauth.properties (Dutch)

* New translations ephemeris.properties (Dutch)

* New translations inbox.properties (Dutch)

* New translations audio.properties (Dutch)

* New translations hli.properties (Dutch)

* New translations brokerConnectionInstance.properties (Dutch)

* New translations lsp.properties (Dutch)

* New translations jsonStorage.properties (Dutch)

* New translations chart.properties (Dutch)

* New translations i18n.properties (Dutch)

* New translations network.properties (Dutch)

* New translations DefaultSystemChannels.properties (Italian)

* New translations audio.properties (Ukrainian)

* New translations inbox.properties (Ukrainian)

* New translations restauth.properties (Ukrainian)

* New translations addons.properties (Ukrainian)

* New translations i18n.properties (Ukrainian)

* New translations network.properties (Ukrainian)

* New translations lsp.properties (Italian)

* New translations lsp.properties (German)

* New translations lsp.properties (Finnish)

* New translations lsp.properties (Hebrew)

* New translations hli.properties (German)

* New translations hli.properties (Finnish)

* New translations hli.properties (Hebrew)

* New translations hli.properties (Italian)

* New translations brokerConnectionInstance.properties (Italian)

* New translations brokerConnectionInstance.properties (Hebrew)

* New translations brokerConnectionInstance.properties (Finnish)

* New translations jsonStorage.properties (German)

* New translations jsonStorage.properties (Spanish)

* New translations network.properties (Spanish)

* New translations tags.properties (Italian)

* New translations voice.properties (Hebrew)

* New translations i18n.properties (Hebrew)

* New translations network.properties (Hebrew)

* New translations jsonStorage.properties (Hebrew)

* New translations chart.properties (Hebrew)

* New translations persistence.properties (Hebrew)

* New translations inbox.properties (Italian)

* New translations jsonStorage.properties (Finnish)

* New translations audio.properties (Finnish)

* New translations inbox.properties (Finnish)

* New translations ephemeris.properties (Finnish)

* New translations restauth.properties (Finnish)

* New translations addons.properties (Finnish)

* New translations persistence.properties (Finnish)

* New translations chart.properties (Finnish)

* New translations addons.properties (Hebrew)

* New translations voice.properties (Finnish)

* New translations i18n.properties (Finnish)

* New translations network.properties (Finnish)

* New translations audio.properties (Hebrew)

* New translations inbox.properties (Hebrew)

* New translations ephemeris.properties (Hebrew)

* New translations restauth.properties (Hebrew)

* New translations audio.properties (Italian)

* New translations ephemeris.properties (Italian)

* New translations restauth.properties (Italian)

* New translations network.properties (Italian)

* New translations addons.properties (Italian)

* New translations persistence.properties (Italian)

* New translations jsonStorage.properties (Italian)

* New translations chart.properties (Italian)

* New translations voice.properties (Italian)

* New translations i18n.properties (Italian)

* New translations i18n.properties (German)

* New translations restauth.properties (German)

* New translations addons.properties (German)

* New translations persistence.properties (German)

* New translations chart.properties (German)

* New translations voice.properties (German)

* New translations network.properties (German)

* New translations inbox.properties (German)

* New translations ephemeris.properties (German)

* New translations audio.properties (German)

* New translations voice.properties (Ukrainian)

* New translations ephemeris.properties (Ukrainian)

* New translations chart.properties (Ukrainian)

* New translations jsonStorage.properties (Ukrainian)

* New translations persistence.properties (Ukrainian)

* New translations voice.properties (German)
2021-05-05 21:09:31 +02:00
Wouter Born
7579aa4d31
Fix more SAT findings and add a few suppressions (#2335)
* Fix more SAT findings and add a few suppressions

Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-05 20:59:59 +02:00
Christoph Weitkamp
31494c0d8a
Added i18n feature for ConfigurableServices (#2333)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-05 01:19:23 +02:00
openhab-bot
0972ad5ede
New Crowdin updates (#2336)
* New translations addons.properties (French)
* New translations audio.properties (Hebrew)
* New translations audio.properties (Hungarian)
* New translations chart.properties (Finnish)
* New translations chart.properties (French)
* New translations ephemeris.properties (Hebrew)
* New translations firmware.properties (Finnish)
* New translations i18n.properties (Hebrew)
* New translations inbox.properties (Hebrew)
* New translations jsonStorage.properties (French)
* New translations LanguageSupport.properties (Finnish)
* New translations network.properties (Hebrew)
* New translations persistence.properties (French)
* New translations persistence.properties (Hebrew)
* New translations SystemProfiles.properties (Hebrew)
* New translations tags.properties (Hebrew)
* New translations voice.properties (Hebrew)
2021-05-02 11:40:36 +02:00
openhab-bot
f2bf0a26c9
New Crowdin updates (#2326)
* New translations DefaultSystemChannels.properties (Hebrew)

* New translations addons.properties (German)

* New translations voice.properties (German)

* New translations chart.properties (German)

* New translations persistence.properties (German)

* New translations ephemeris.properties (German)

* New translations inbox.properties (German)

* New translations audio.properties (German)

* New translations DefaultSystemChannels.properties (Portuguese, Brazilian)

* New translations voice.properties (German)

* New translations messages.properties (Ukrainian)

* New translations addons.properties (Ukrainian)

* New translations restauth.properties (Ukrainian)

* New translations ephemeris.properties (Ukrainian)

* New translations inbox.properties (Ukrainian)

* New translations audio.properties (Ukrainian)

* New translations jsonStorage.properties (Ukrainian)

* New translations persistence.properties (Ukrainian)

* New translations chart.properties (Ukrainian)

* New translations i18n.properties (Ukrainian)

* New translations network.properties (Ukrainian)

* New translations audio.properties (Dutch)

* New translations inbox.properties (Dutch)

* New translations ephemeris.properties (Dutch)

* New translations restauth.properties (Dutch)

* New translations addons.properties (Dutch)

* New translations persistence.properties (Dutch)

* New translations chart.properties (Dutch)

* New translations jsonStorage.properties (Dutch)

* New translations voice.properties (Dutch)

* New translations voice.properties (Ukrainian)

* New translations i18n.properties (Dutch)

* New translations network.properties (Dutch)

* New translations persistence.properties (Finnish)

* New translations addons.properties (Finnish)

* New translations ephemeris.properties (Finnish)

* New translations audio.properties (Italian)

* New translations inbox.properties (Italian)

* New translations ephemeris.properties (Italian)

* New translations voice.properties (Italian)

* New translations addons.properties (Italian)

* New translations restauth.properties (Italian)

* New translations firmware.properties (Luxembourgish)

* New translations firmware.properties (Italian)

* New translations messages.properties (Luxembourgish)

* New translations tags.properties (Finnish)

* New translations units.properties (Finnish)

* New translations validation.properties (Italian)

* New translations LanguageSupport.properties (Italian)

* New translations persistence.properties (Italian)

* New translations chart.properties (Italian)

* New translations jsonStorage.properties (Italian)

* New translations network.properties (Italian)

* New translations i18n.properties (Italian)

* New translations i18n.properties (Portuguese, Brazilian)

* New translations network.properties (Portuguese, Brazilian)

* New translations voice.properties (Portuguese, Brazilian)

* New translations chart.properties (Portuguese, Brazilian)

* New translations jsonStorage.properties (Portuguese, Brazilian)

* New translations persistence.properties (Portuguese, Brazilian)

* New translations restauth.properties (Portuguese, Brazilian)

* New translations addons.properties (Portuguese, Brazilian)

* New translations ephemeris.properties (Portuguese, Brazilian)

* New translations inbox.properties (Portuguese, Brazilian)

* New translations audio.properties (Portuguese, Brazilian)

* New translations i18n.properties (German)

* New translations network.properties (German)

* New translations jsonStorage.properties (German)

* New translations restauth.properties (German)
2021-04-30 18:19:50 +02:00
Christoph Weitkamp
93d7973b56
[i18n] Translation of configurable services (#2306)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-29 15:20:55 +02:00
Christoph Weitkamp
c9cdf5d0e8
Added i18n propertie files for DefaultSystemChannels and Profiles (#2297)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-19 17:06:42 +02:00
Wouter Born
05b7ec86f1
Fix new SAT findings (#2291)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-14 18:41:07 +02:00
Sönke Küper
db488d861e
[automation] Added rule rest endpoint and backend operation for rule execution simulation (#2125)
* Added marker interface for TriggerHandler to indicate if they are time based and thus can be used to simulate execution times.
* Added marker interface for ConditionHandler to indicate, if they are time based and thus can be checked during rule execution for a certain time.
* Moved CronAdjuster to common, so it can be used for the rule simulation
* Created RuleExecutionSimulator that allows simulation of rules
* Added method in RuleManger to create simulation
* Added rest endpoint for rule simulation.
* Changed marker interface to return TemporalAdjuster instead of cron expression. This better hides the internals of the TriggerHandler (i.e. the cron expression) and is more clear and flexible for other handlers to implement

Fixes #2044
Fixes #2266

Signed-off-by: Sönke Küper <soenkekueper@gmx.de>
2021-04-11 09:31:48 +02:00
Wouter Born
07b95ca668
Fix SAT findings (#2256)
Fixes 65 SAT findings.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-25 20:18:08 +01:00
Christoph Weitkamp
26e9a8ed9c
Added nullness annotations to fix NPE in HttpServiceUtil (#2234)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-03-12 22:12:03 +01:00
Hilbrand Bouwkamp
7fef42c6c8
[scheduler] Mitigation fix for earlier triggers #1976 (#2190)
Some users reported the scheduler to be run to earlier.
It actual is known the Java scheduler can drift.
To handle this problem 2 changes have been made:
1. If the scheduler triggers > 2 sec before expected end time it will
reschedule.
2. The scheduler keeps track of the timestamp the job should run. For
recurring schedulers, like cron, when the next job is run it offsets of
the calculated time, and not the actual time. This guaranties that the
next scheduled time is actual the next scheduled time and not the same
end time in case the scheduler would trigger to early.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2021-02-27 11:21:10 +01:00
Christoph Weitkamp
7907f48735
Added nullness annotations to TypeParser (#2181)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-02-07 09:47:27 +01:00
Wouter Born
46666eb169
Fix deprecations (#2163)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-30 12:22:31 +01:00
pravussum
75f52ac3ee
add getPoolNames method to ThreadPoolManager (#2065)
Signed-off-by: Robert Bach <openhab@mortalsilence.net>
2021-01-05 23:27:35 +01:00
Wouter Born
774b9d607b
Update license headers to 2021 (#2041)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-01 16:43:46 +01:00
Kai Kreuzer
a91f8c657b Align all threads to naming convention (#2018)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-12-28 09:22:13 +01:00
t2000
caaf1c7281
Expire group item states (#2009)
Fixes #1989

Signed-off-by: Stefan Triller <github@stefantriller.de>
2020-12-26 22:53:26 +01:00
Wouter Born
ce95ed191e
Hide StateDescription constructor (#1995)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-23 21:43:38 +01:00
Gaël L'hopital
f7e03397fb
[OAuth] Added capability for custom deserializer (#1891)
* Added capability for custom deserializer

Closes #1888

Signed-off-by: clinique <gael@lhopital.org>
2020-12-23 15:40:54 +01:00
Hilbrand Bouwkamp
df2013805b
Fix for invalid day of week max check (#1986)
Closes #1813

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2020-12-22 20:42:37 +01:00
Wouter Born
bf14e1077f
Apply Spotless, resolve itest runbundles for 3.1.0 (#1982)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-22 10:01:42 +01:00
jenkins
965531696b [unleash-maven-plugin] Preparation for next development cycle. 2020-12-20 22:24:39 +00:00
Kai Kreuzer
0dd4cc97fe
Let StartLevelService only start once its configuration is available (#1942)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-12-16 12:47:03 +01:00
Kai Kreuzer
1a2c81d9e2
Improved startup logging and avoid scripts being loaded in start level service thread (#1919)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-12-13 09:31:09 +01:00
Kai Kreuzer
076ac3fe15
Implemented start level service (#1914)
Fixes #1637
Fixes #1777
Fixes #1734
Fixes #1823
Fixes #1808

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-12-12 14:34:37 +01:00
Wouter Born
fea6237153
Improve ChannelLinkNotifier.removed and AbstractUID.getAsString performance (#1909)
Fixes #1908

Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-10 10:20:35 +01:00
Wouter Born
0dabc63423
Update "o.e.sh" references (#1910)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-10 10:15:48 +01:00
Markus Rathgeb
406f83cbb6
HexUtils: fix empty string handling (#1907)
Fixes #1903

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2020-12-09 09:57:39 +01:00
Wouter Born
0abf1aa987
Remove SmartHome leftovers (#1901)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-08 12:49:06 +01:00
Wouter Born
13c2d7bf2b
Rename classes with "SmartHome" in their name (#1896)
* Rename SmartHomeUnits to Units
* Rename SmartHome Servlets and HTTP Context

Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-06 23:35:37 +01:00
Kai Kreuzer
c5f133b3e9
[automation] Provide triggering item name in the rule context (#1770)
* introduced implicit variable "triggeringItemName"

Fixes #1768

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-12-01 20:29:50 +01:00