Commit Graph

1409 Commits

Author SHA1 Message Date
Wouter Born
92a6c1c283
Fix trigger channels not found (#2833)
Trigger channel types failed to load because the item type became required with the changes in #2775.
Also adds a unit test for the ThingDescriptionReader to prevent future regressions.

Fixes #2831

Signed-off-by: Wouter Born <github@maindrain.net>
2022-03-12 21:49:25 +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
openhab-bot
b2d3cdba1e
New Crowdin updates (#2816)
* New translations validation.properties (Hungarian)

* New translations voice.properties (Hungarian)

* New translations SystemThingStatusInfos.properties (Hungarian)
2022-03-09 09:07:36 +01:00
lolodomo
23d43604ca
[voice] New optional arguments for console command voice startdialog (#2823)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2022-03-09 09:07:06 +01:00
lolodomo
dab0a59b87
[standardinterpreter] Update french syntax (#2827)
Use "imperatif" grammatical mode for commands

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2022-03-09 09:03:39 +01:00
GiviMAD
f0664b3a0c
[standardinterpreter] spanish: fix text tokenization and on/off rule (#2826)
Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
2022-03-09 09:02:06 +01:00
J-N-K
11c0ed53d0
Fix PersistentInbox tries to updated unmanaged things (#2824)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-03-09 08:59:33 +01:00
lolodomo
379287690e
[voice] New console commands to list the voice services (#2822)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2022-03-07 13:15:46 +01:00
Wouter Born
44f9baff18
Upgrade Xtext/Xtend to 2.26.0, LSP4J to 0.12.0 (#2786)
For release notes, see:

https://www.eclipse.org/Xtext/releasenotes.html#/releasenotes/2022/02/28/version-2-26-0

This release adds initial support for Java 17.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-03-05 11:28:56 +01:00
dalgwen
7f2edc6f93
[Voice] fix checklocale with RuleHumanLanguageInterpreter (#2813)
Check for  emptyness and not for null. No service returns null.
But RuleHumanLanguageInterpreter returns an empty set to tell it has no locale preference.

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2022-03-03 15:55:48 +01:00
GiviMAD
b4a5cd331a
[Voice] Fix "best match" format resolution and language check for services involved in dialog (#2809)
Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
2022-02-28 09:10:41 +01:00
Wouter Born
738149d44b
Remove unused local variable (#2807)
Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-27 11:10:41 +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
J-N-K
c267e8f876
Fix missing feature (#2804)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-26 12:51:56 +01:00
J-N-K
0ba4de3594
Fix deadlock when removing ScriptEngine (#2785)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-26 10:29:38 +01:00
J-N-K
013e317b6b
Log the remote address of failed login attempts (#2800)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-26 10:00:00 +01:00
GiviMAD
b57a8c3beb
[Voice] restore getBestMatch method (#2802)
Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
2022-02-26 09:32:06 +01:00
J-N-K
7c3f49ab42
Fix proxy can't handle requests with forwarded host list (#2799)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-25 18:20:50 +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
openhab-bot
03d8489ddd
New Crowdin updates (#2783)
* New translations validation.properties (Czech)

* New translations voice.properties (Czech)

* New translations SystemThingStatusInfos.properties (Czech)
2022-02-24 21:22:02 +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
J-N-K
e420cf1647
Make ConfigDescription for thing and channels available to ThingHandler (#2773)
* Make ConfigDescription for thing and channels available to ThingHandler

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-24 21:18:55 +01:00
GiviMAD
534be1d3ad
[Voice] get audio format refactor (#2795)
Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
2022-02-23 22:17:00 +01:00
lolodomo
c0b5f09c2b
[rule] New actions to start/stop dialog processing (#2791)
* [rule] New actions to start/stop dialog processing

Related to #2688

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2022-02-23 22:15:30 +01:00
J-N-K
192e4a2347
Add a profile for linking trigger channels to String items (#2769)
* Add a profile for linking trigger channels to String items

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-23 21:17:11 +01:00
James Melville
e94de3f860
Rename Thing status variables to be more explicit (#2796)
Signed-off-by: James Melville <jamesmelville@gmail.com>
2022-02-23 21:09:46 +01:00
lolodomo
473198f964
[audio] Add missing method getSource with sourceId as parameter (#2792)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2022-02-20 20:45:12 +01:00
Wouter Born
2e0b242099
Fix rules stay uninitialized when using Java 17 (#2787)
On Java 17 there is no Nashorn scripting engine so it takes a bit longer before ScriptEngines are available.
Rules would stay uninitialized forever because the ScriptModuleTypeProvider did not notify its listeners whenever script.ScriptAction, script.ScriptCondition became available.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-20 20:42:32 +01:00
Christoph Weitkamp
355c1345ea
[rest] Improve metadata query parameter description (#2790)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-02-20 17:48:01 +01:00
lolodomo
79ec0396b3
[voice] Check that the provided locale is supported by KS/STT/HLI services (#2789)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2022-02-20 15:47:28 +01:00
GiviMAD
417098e1ad
[DialogProcessor] fix race condition (#2761)
Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
2022-02-20 14:35:41 +01:00
Christoph Weitkamp
7997e2636a
Prevent errors in log when client closes the HTTP connection (#2781)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-02-20 11:18:32 +01:00
GiviMAD
0e0adcbb8f
[DialogProcessor] update say method nullability (#2780)
Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
2022-02-19 14:01:41 +01:00
Wouter Born
f411561b70
Flush old JsonStorage to file before recreating a new one (#2778)
Fixes #2774

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-17 21:41:41 +01:00
J-N-K
dd537c21cb
Fix dispose is called on handlers for disabled things (#2762)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-17 21:36:03 +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
Christoph Weitkamp
9bf181bf0a
Fixed config validation message for parameter options (#2777)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-02-17 20:33:37 +01:00
J-N-K
69069270a9
Fix context being re-used for next execution (#2760)
Trigger information is inserted in the execution context. This information is changed to the new information each time the context is updated with the same keys. If the context of the next execution does not contain values for each key, the old key is re-used, leading e.g. to wrong event information in the context.

The solution is to re-set the individual context after each execution.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-17 20:32:58 +01:00
Christoph Weitkamp
44da7a4e0e
Avoid URISyntaxException in tests (#2770)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-02-15 17:33:59 +01:00
Wouter Born
69c63703c3
Stop catching Throwables in DefaultMetricsRegistration (#2767)
Looks like this workaround introduced in #2480 is unnecessary nowadays because #2484 addressed the root cause.
This fixes the AvoidCatchingThrowable SAT findings.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-15 16:38:10 +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
J-N-K
8f5d703ceb
Improve log message for invalid configuration updates by handler (#2766)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-15 12:31:18 +01:00
Wouter Born
3d7be0ffa7
Avoid throwing raw exception types (#2747)
* Avoid throwing raw exception types

This fixes all 36 AvoidThrowingRawExceptionTypes SAT findings.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-14 16:14:25 +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
lolodomo
999dab5fb2
[voice] New REST API to start/stop dialog processing (#2731)
Related to #2688

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2022-02-13 20:44:17 +01:00
James Melville
805f223fa9
Add triggeringThing name to DSL rules (#2756)
* Add triggeringThing name to DSL rules
* Include previous and new statuses

Signed-off-by: James Melville <jamesmelville@gmail.com>
2022-02-13 10:34:08 +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
9a9217eab8
Expose three classes used as bindings in JSR-223 rules as interfaces (#2723)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-13 09:57:22 +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
openhab-bot
cc11e0ccd6
New Crowdin updates (#2743)
* New translations validation.properties (German)

* New translations validation.properties (Finnish)

* New translations validation.properties (Italian)

* New translations validation.properties (Hebrew)

* New translations SystemProfiles.properties (French)

* New translations validation.properties (French)
2022-02-12 09:56:54 +01:00
Wouter Born
b36f292dcd
Prevent JsonStorage backup corruption when disk is full (#2746)
Fixes #2267

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-10 19:27:56 +01:00
Christoph Weitkamp
9cda2c8de8
[config] Add config validator for parameter options (#2691)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-02-09 09:00:36 +01:00
GiviMAD
9b438d7e12
[javasound/dialogprocessor] Not share mic ref on javasound + close audio streams and use RecognitionStartEvent on dialogprocessor (#2732)
* [javasound] not share targetdataline

Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
2022-02-08 19:27:43 +01:00
GiviMAD
75252cf4aa
[voice] remove unused stt events (#2741)
Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
2022-02-08 16:36:12 +01:00
J-N-K
d6f63e7500
[thing] Fix removal of thing properties (single and bulk) (#2735)
* fix removal of thing properties (single and bulk)

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-07 19:32:22 +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
J-N-K
e1962843d5
fix recursive membership throws StackOverflowException on REST API call (#2736)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-06 21:19:36 +01:00
GiviMAD
d48bdf4260
[StandardInterpreter] Add Spanish language (#2728)
Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
2022-02-06 21:17:54 +01:00
Christoph Weitkamp
87ecfade74
[config] Add nullness annotations to config validation (#2690)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-02-06 20:30:20 +01:00
openhab-bot
5a4b6fedce
New Crowdin updates (#2725)
* New translations validation.properties (German)

* New translations validation.properties (Italian)

* New translations voice.properties (French)

* New translations hli.properties (French)

* New translations validation.properties (French)

* New translations validation.properties (Italian)

* New translations SystemThingStatusInfos.properties (French)

* New translations validation.properties (Hebrew)

* New translations validation.properties (Finnish)
2022-02-06 12:47:43 +01:00
J-N-K
c4e1b14d00
[addonservices] allow uninstalling of removed addons and fix other issues (#2607)
* [addonservices] allow uninstalling of removed addons

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-06 09:48:55 +01:00
lolodomo
3e94dd6e30
[voice] Minor changes requested during review of PR #2693 (#2729)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2022-02-03 20:25:32 +01:00
J-N-K
8c16cb6e93
[config] Enable missing validations (#2720)
* enable validation for multipleLimit
* remove unused validation messages

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-01 16:41:56 +01:00
openhab-bot
dec2d7c296
New Crowdin updates (#2717)
* New translations validation.properties (Italian)

* New translations validation.properties (Finnish)

* New translations validation.properties (German)

* New translations validation.properties (Hebrew)

* New translations voice.properties (Italian)

* New translations validation.properties (Luxembourgish)

* New translations voice.properties (German)

* New translations voice.properties (Finnish)

* New translations voice.properties (Hebrew)
2022-02-01 10:14:46 +01:00
J-N-K
61f5e7f57d
[config] Enable config validation for updates by handler (#2712)
* Enable config validation for updates by handler

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-01 10:10:37 +01:00
Christoph Weitkamp
9520bfdfe7
Do not throw CertificateParsingException all the time, fixed pinned certificate creation (#2695)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-02-01 09:21:26 +01:00
lolodomo
8f0dd94343
[voice] Update dialog processing (#2693)
Related to #2688

Updated methods startDialog
New method stopDialog
Null annotations added to the class DialogProcessor

Allow translation of sentences "said" by the dialog processor in case of error

2 console commands added to start and stop a dialog

Enhanced integration tests

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2022-01-30 18:27:51 +01:00
Christoph Weitkamp
6edc413640
Fixed NPE and exceptiion while parsing config value (#2718)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-30 13:20:11 +01:00
J-N-K
6193aa966e
[config] improve type validation message (#2713)
* [config] improve type validation message

The message did not contain the detected wrong type which makes it harder to define what the actual error is.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-01-30 09:42:31 +01:00
Jonathan Gilbert
290ad08107
[automation] ScriptFileWatcher Initial import now only processes dir (#2708)
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2022-01-29 23:53:56 +01:00
lolodomo
a4c39d5ba0
[voice] Fix wrong check for defaultSTT (#2714)
Fix #2696

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2022-01-29 23:43:49 +01:00
Christoph Weitkamp
16bc9321f1
Allow String values for other Types (#2699)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-29 14:01:16 +01:00
J-N-K
fd16210ee6
[config] Added log message with validation errors for things (#2711)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-01-29 10:57:31 +01:00
openhab-bot
265c0be444
New Crowdin updates (#2701)
* New translations SystemThingStatusInfos.properties (Italian)

* New translations SystemThingStatusInfos.properties (German)

* New translations SystemThingStatusInfos.properties (Hebrew)

* New translations SystemThingStatusInfos.properties (Finnish)

* New translations marketplace.properties (Czech)

* New translations voice.properties (French)

* New translations sitemap.properties (French)
2022-01-27 14:20:27 +01:00
Christoph Weitkamp
b849dd144a
Fixed wrong openAPI schema for /inbox (#2709)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-26 12:01:26 +01:00
J-N-K
5a067ec55b
[config] make configuration value parser available for export (#2703)
* Refactor and expose `ConfigMapper` to `ConfigParser`

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-01-26 08:27:25 +01:00
Jonathan Gilbert
59bc10a2af
Script Engines now removed from manager when closed (#2706)
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2022-01-25 09:12:02 +01:00
J-N-K
1fff165cb0
[thing] Enable config validation for thing creation and update (#2682)
* Enable config validation for thing creation and update

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-01-20 10:20:16 +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
Flole998
b6bac8d3d1
Implement new "System reached start level XX"-Trigger for DSL-rules (#2658)
Signed-off-by: Flole <flole@flole.de>
2022-01-17 23:28:57 +01:00
Christoph Weitkamp
0dbc2b2ef4
[rest] Do not reuse FilterCriteria instance for more than one query (#2668)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-15 17:07:25 +01:00
Christoph Weitkamp
0709933061
[automation] Log warning for equals condition for DecimalTypes and QuantityTypes (#2653)
* Allow equals comparison for DecimalTypes and QuantityTypes

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-15 15:39:51 +01:00
J-N-K
dff5fde979
Fix broken config validation for required parameters (#2683)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-01-15 14:25:04 +01:00
Jonathan Gilbert
22c28595ab
Script engines now unloaded if replaced, and closed if AutoCloseable (#2681)
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2022-01-15 13:15:46 +01:00
Christoph Weitkamp
d693302190
[config] Added nullness annotations and suppress 'ConfigStatusInfoEvent' if list of 'ConfigStatusMessage's is empty (#2680)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-14 11:47:52 +01:00
Wouter Born
029151d787
Update org.openhab.core.io.http.auth .classpath (#2679)
This prevents local changes whenever you update this Maven project in Eclipse.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-01-11 07:46:00 +01:00
Kai Kreuzer
a8126bc886
Fix NPE of AddonServices during startup (#2678)
* Fix NPE of JSONAddonService during startup
* Add same fix for CommunityMarketplaceAddonService

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2022-01-10 11:05:44 +01:00
dalgwen
fa029b265c
[audio] Remove 'clac' noise when playing wave (javasound) (#2670)
* [audio] Remove 'clac' noise when playing wav (javasound)

A 'clac' can be heard at the beginning of a wav file when playing on the javasound sink.

Close #2669
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2022-01-10 08:56:38 +01:00
Wouter Born
0a778df0ad
Update groovy license headers to 2022 (#2675)
* Update groovy license headers to 2022
* Reuse existing header file and use Groovy 3.0.9

Updates the year in a few groovy file headers that were missed in #2671.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-01-08 17:03:39 +01:00
Jonathan Gilbert
89aae83b64
[automation] ScriptFileWatcher subdirectory loading upon startup no longer hardcoded to true (#2664)
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2022-01-08 10:19:38 +01:00
openhab-bot
dbb1382f65
New Crowdin updates (#2667)
* New translations marketplace.properties (Finnish)

* New translations addons.properties (German)

* New translations marketplace.properties (German)
2022-01-08 10:18:15 +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
dalgwen
c240c6f4f8
[audio] Fix hardcoded value for WAV file (#2650)
* Fix hardcoded value for WAV file (#2649)

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2022-01-06 14:06:06 +01:00
Christoph Weitkamp
824c0bb77c
Align parsing of startlevel config (#2661)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-04 21:03:16 +01:00
Christoph Weitkamp
378aacbbdd
Do not log a warning if QuantityState has unit AbstractUnit.ONE (#2662)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-04 21:01:17 +01:00
Yannick Schaus
96e8d3648b
Force English locale to parse marketplace UI components timestamp (#2663)
Related to https://community.openhab.org/t/error-installing-widgets-from-community-in-user-interfaces/128729/16

When the locale is not English the timestamp might fail to be deserialized into a Date:

```
2022-01-02 21:01:42.260 [ERROR] [munity.CommunityUIWidgetAddonHandler] - Unable to parse YAML: Cannot deserialize value of type `java.util.Date` from String "Oct 2, 2021, 9:24:59 PM": not a valid representation (error: Failed to parse Date value 'Oct 2, 2021, 9:24:59 PM': Unparseable date: "Oct 2, 2021, 9:24:59 PM")

 at [Source: (StringReader); line: 36, column: 12] (through reference chain: org.openhab.core.ui.components.RootUIComponent["timestamp"])

2022-01-02 21:01:42.261 [ERROR] [munity.CommunityUIWidgetAddonHandler] - Widget from marketplace is invalid: Unable to parse YAML
```

Signed-off-by: Yannick Schaus <github@schaus.net>
2022-01-04 12:25:15 +01:00
Wouter Born
0bdaeef789
[persistence] Use ZonedDateTime instead of Date in ModifiablePersistenceService interface (#2660)
If PRs are created to implement this interface, it would be better if we can prevent the propagation of old APIs like Date.

Related to:

* https://github.com/openhab/openhab-addons/pull/11922
* https://github.com/openhab/openhab-addons/pull/11923
* https://github.com/openhab/openhab-core/issues/2618#issuecomment-1003544762

Signed-off-by: Wouter Born <github@maindrain.net>
2022-01-02 20:45:10 +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
J-N-K
d420bee30e
[addonservices] allow offline mode (#2633)
* allow offline mode

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2022-01-01 11:43:26 +01:00
Benjamin Lafois
842eaa5981
allows the use of an HTTP proxy (#2641)
Signed-off-by: LAFOIS Benjamin <mrs.blafois@cma-cgm.com>
2021-12-30 23:18:29 +01:00
Christoph Weitkamp
adde43c311
Prevent errors in log when client closes the HTTP connection (#2655)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-30 11:37:00 +01:00
Christoph Weitkamp
33f6651972
[mdns] Cancel removal task on manual scan (#2647)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-30 10:18:13 +01:00
Christoph Weitkamp
646640094a
Prevent errors in log when there is a connection timeout (#2654)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-30 10:10:38 +01:00
Kai Kreuzer
e61db5a11a
[rest] Make SSEResource robust against missing parameters (#2652)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-29 16:35:51 +01:00
Christoph Weitkamp
9609ffb9b6
[tls] Add a PEMTrustManager to deal with different PEM files (e.g. self-signed or global CA certificates) (#2622)
* Added a PEMTrustManager to deal with different PEM files (e.g.
self-signed or global CA certificates)

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-29 09:45:40 +01:00
openhab-bot
670c64b5c4
New Crowdin updates (#2639)
* New translations units.properties (Romanian)

* New translations ephemeris.properties (Romanian)
2021-12-27 07:20:13 +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
8074ea7dfe
Replaced Runnable by lambda expression (#2642)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-23 09:44:14 +01:00
Christoph Weitkamp
5b7227c35e
Use constructor injection (#2643)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-23 09:39:44 +01:00
Andrew Fiddian-Green
459dac9702
[discovery.mdns] Devices may apply a grace period for removal from the Inbox (#2635)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2021-12-22 20:24:48 +01:00
Jacob Laursen
68ff739a50
Fix parameter description. (#2638)
Signed-off-by: Jacob Laursen <jacob@vindvejr.dk>
2021-12-22 07:14:00 +01:00
Christoph Weitkamp
9963d02048
Added nullness annotations to io.net.http (#2621)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-21 22:29:36 +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
Jacob Laursen
e72de44351
Fix wrong argument name in javadoc (#2637)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2021-12-21 22:12:27 +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
Yannick Schaus
fa682c551e
Improve logic to choose a script engine preferred MIME type (#2629)
As discussed in https://github.com/openhab/openhab-addons/issues/11818.
This should select `application/x-python` for Jython (instead of `application/python` currently)
and allow other script engines to advertise their MIME type:
- JRuby: `application/x-ruby`
- Groovy: `application/x-groovy`

Signed-off-by: Yannick Schaus <github@schaus.net>
2021-12-19 20:01:48 +01:00
openhab-bot
13d2596998
New translations DefaultSystemChannels.properties (French) (#2627) 2021-12-19 12:14:07 +01:00
J-N-K
ece54ae81f
[addonservices] fix JsonAddonService (#2626)
* [addonservices] fix JsonAddonService

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2021-12-18 19:48:44 +01: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
J-N-K
f0c5aac29f
[marketplace] fix re-installation of marketplace addons (#2615)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2021-12-15 14:05:17 +01:00
Dan Cunningham
eb3f1e92cc
Use the mime types provided by the ScriptEngineFactory (#2595)
* Use the mime types provided by the ScriptEngineFactory and not the underlying script engines they provide. This allows mutliple versions of script engines to co-exist, like Nashorn and GraalVM .

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2021-12-13 07:13:04 +01:00
Michael Rossner
3b2d2ad4cc
[semantics] Fix typo (#2597)
* Update SemanticTags.csv

fix typo proches -- porches

Signed-off-by: Schrotti <Schrott.Micha@web.de>
2021-12-12 22:09:11 +01:00
Yannick Schaus
198e2eb405
Change the syntax for references in automation modules configuration (#2606)
Fixes #2510.

This changes the placeholder syntax used by the reference resolver notably
used in rule templates from `${reference}` to `{{reference}}`.

The former syntax is also used by other languages, notably JavaScript's
template strings, and therefore writing rule templates including JavaScript
code with template strings wouldn't behave as expected.

This also fixes a bug identified in #2510 where you couldn't have a
single closing brace before the start of the first placeholder - which
could more easily happen than having two closing braces.

Signed-off-by: Yannick Schaus <github@schaus.net>
2021-12-12 19:20:19 +01:00
Jonathan Gilbert
2883dfbc3e
Made script file watchers reusable in preparation for language-specific versions (#2593)
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2021-12-12 13:48:38 +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
J-N-K
8a29b07855
[marketplace] add a 3rd Party marketplace (#2592)
* [marketplace] add a 3rd Party compatible marketplace

This adds a new marketplace addon provider which allows to add marketplaces maintained by 3rd party organizations (similar to alternative app stores on your smartphone). The configuration allows one or multiple marketplaces which provide their addons via JSON files (instead of a topic in the community forum).

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2021-12-11 16:15:45 +01:00
Christoph Weitkamp
793ced6286
Added basic time-related classes for usage in script and ruled (#2587)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-10 23:41:08 +01:00
Yannick Schaus
f641d1d6ec
[marketplace] Add add-on handler for block libraries (#2598)
Related to https://github.com/openhab/openhab-webui/pull/1225.

This add-on handler supports installing block libraries in the
UIComponentRegistry, `ui:blocks` namespace.

It is very similar to the CommunityUIWidgetAddonHandler, as the format
is the same, so are the features and implementation, the only
differences being:

- Supported content type: `application/vnd.openhab.uicomponent;type=blocks`
  (vs. `application/vnd.openhab.uicomponent;type=widget`)
- Discourse category nb.: 76 (vs. 75)
- Inferred Add-on type: "automation" (vs. "ui")

Signed-off-by: Yannick Schaus <github@schaus.net>
2021-12-10 23:35:25 +01:00
Wouter Born
69043bea74
Use Accept-Language header for locale in ConfigurableServiceResource (#2602)
Most RESTResources already use the LocaleService to get the locale based on the Accept-Language header and use the system locale only as fallback.
Because the ConfigurableServiceResource does not do this, it results in mixed up languages whenever your browser locale is not the same as the configured system locale.

See:

* https://community.openhab.org/t/language-support-question-regional-settings-language-vs-browser-language/128010
* https://github.com/openhab/openhab-webui/issues/1083

Signed-off-by: Wouter Born <github@maindrain.net>
2021-12-10 23:33:13 +01:00
Christoph Weitkamp
f30beb5aeb
Added item name to error message (#2594)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-07 17:06:19 +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
eb982f430d
Fixed nullness anotations for TriggerHandlerCallback (#2589)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-04 17:48:18 +01:00
Christoph Weitkamp
3493c85e19
Added nullness anotations to TimerImpl and synchronize reschedule method (#2588)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-03 14:33:04 +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
Christoph Weitkamp
674db6c744
Added variable 'triggeringChannel' to DSL rules (#2567)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-02 22:08:17 +01:00
Wouter Born
8c1fe60abc
Fix IllegalStateException in IconServlet (#2577)
Fixes #2529

Signed-off-by: Wouter Born <github@maindrain.net>
2021-11-28 22:01:00 +01:00
Wouter Born
bb97d85d3b
Fix ConcurrentModificationException in ExpiringUserSecurityContextCache (#2579)
The issue occurs when expired entries are removed from the cache.
Also adds some unit tests in which the same issue could be reproduced.

Fixes #2528

Signed-off-by: Wouter Born <github@maindrain.net>
2021-11-26 23:06:34 +01:00
jimtng
a4b737c401
Add Timer.isCancelled() method (#2570)
Signed-off-by: Jimmy Tanagra <jimmy@tanagra.id.au>
2021-11-23 21:51:51 +01:00
J-N-K
3e8b664085
[marketplace] avoid collisions with multiple AddonProviders (#2564)
* [marketplace] avoid collisions with multiple AddonProviders

The current implementation could result in collision of file-path and failed in determining the installation status if other AddonProviders re-use the marketplace addon handlers.

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2021-11-23 21:49:35 +01:00
openhab-bot
598245b919
New Crowdin updates (#2566)
* New translations audio.properties (Hungarian)
* New translations DefaultSystemChannels.properties (German)
* New translations inbox.properties (Hungarian)
* New translations magic.properties (Hebrew)
* New translations magic.properties (Hungarian)
* New translations magic.properties (Italian)
* New translations marketplace.properties (Hungarian)
* New translations sitemap.properties (Hungarian)

* Fixed unit tests

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-11-21 13:06:09 +01:00
Christoph Weitkamp
fea3615109
Added Magic Button triggering some events every 5 seconds (#2569)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-11-18 16:03:06 +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
Wouter Born
917e268e68
[discovery] Add ser2net mDNS USB serial discovery (#2519)
* Add ser2net mDNS USB serial discovery

* Add support for using multiple UsbSerialDiscovery services
* Add Ser2NetUsbSerialDiscovery that can use mDNS to discover ser2net RFC2217 serial ports
* Use discovered USB ports in SerialConfigOptionProvider

mDNS discovery is supported in ser2net 4.3.0 and newer.
E.g. you can install a ser2net version that provides this using APT in Ubuntu 21.04 and Debian 11.

Example ser2net YAML configuration that allows a serial port to be discovered using mDNS discovery:

%YAML 1.1
---
connection: &con01
  accepter: telnet(rfc2217),tcp,2222
  connector: serialdev,/dev/ttyUSB0
  options:
    mdns: true
    mdns-sysattrs: true
    mdns-name: devicename

Closes #1511

Signed-off-by: Wouter Born <github@maindrain.net>
2021-11-12 23:27:50 +01:00
jimtng
5d5b7665b4
[automation] Make LifecycleScriptExtensionProvider and its Disposable interface public (#2565)
Signed-off-by: Jimmy Tanagra <jimmy@tanagra.id.au>
2021-11-12 21:02:27 +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
openhab-bot
85b0910ef1
New translations marketplace.properties (French) (#2559) 2021-11-05 19:24:21 +01:00
lolodomo
089b9d22ce
mDNS / UPnP discovery internationalization (#2547)
* mDNS / UPnP discovery internationalization

Related to #2546

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2021-11-03 21:35:13 +01:00
Wouter Born
c4837b2c8b
WebClientFactoryImpl deprecation and blocking test fixes (#2551)
Update the WebClientFactoryImpl so it no longer uses a deprecated WebSocketClient constructor.
Use a workaround so WebClientFactoryImplTest.tearDown() cannot block forever when the commonWebSocketClient is stopped when it has not yet been fully started.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-11-03 21:17:58 +01:00
Christoph Weitkamp
70555c5020
Removed failing offset test (#2555)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-11-03 15:33:43 +01:00
spacemanspiff2007
abb17c1658
[rest] Align item endpoint with items endpoint (#2533)
Add option to skip members, e.g. if the goal of the request to just get the metadata of a group item

Signed-off-by: spacemanspiff2007 <git@sgerber.de>
2021-11-02 08:25:18 +01:00
openhab-bot
4ef1255e02
New Crowdin updates (#2545)
* New translations brokerConnectionInstance.properties (Portuguese, Brazilian)

* New translations sitemap.properties (Portuguese, Brazilian)

* New translations marketplace.properties (Portuguese, Brazilian)
2021-10-30 23:58:54 +02: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
openhab-bot
40e23e23ca
New translations brokerConnectionInstance.properties (Russian) (#2523) 2021-10-27 22:39:05 +02:00
Christoph Weitkamp
f694535598
Log item name in warnings of ItemStateConditionHandler (#2540)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-10-25 22:14:06 +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
Yannick Schaus
9d9dc70d89
Add image_link field to community marketplace invididual add-ons (#2521)
When I ported over the code from the HABPanel gallery which was also
based on Discourse topics, the image_link field that was present on
topic lists wasn't replicated on single topic entries, but now it is:

See
https://meta.discourse.org/t/single-topic-api-endpoint-should-contain-image-url/131020
3201613f13

I have confirmed the field is present on community.openhab.org.
So this should help moving the "primary image" to the place where
the logo should be in the UI.

We can prevent the same image from being displayed twice with some
measures on the Discourse posts themselves
(like have it between <details></details>).

Signed-off-by: Yannick Schaus <github@schaus.net>
2021-10-15 17:47:54 +02:00
openhab-bot
cffdcd04b3
New Crowdin updates (#2515)
* New translations brokerConnectionInstance.properties (Russian)
* New translations DefaultSystemChannels.properties (Russian)
* New translations firmware.properties (Russian)
* New translations inbox.properties (Russian)
* New translations LanguageSupport.properties (Russian)
* New translations restauth.properties (Russian)
* New translations SystemProfiles.properties (Russian)
* New translations tags.properties (Russian)
* New translations voice.properties (Russian)
2021-10-12 19:01:49 +02:00
Wouter Born
fa92c20bb1
Prevent Marketplace NPE on last page without topics (#2518)
Fixes #2505

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-12 09:04:42 +02:00
Wouter Born
875ca0602e
Remove deprecated XStream.setupDefaultSecurity call (#2516)
The XStream.setupDefaultSecurity method is deprecated since XStream 1.4.18.
It no longer does anything, because this is the default in newer XStream versions.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-10 20:36:25 +02:00
Wouter Born
ac842063aa
ChartServlet bug fixes and improvements (#2502)
* Improve exception handling
* Add transparent themes
* Add null annotations
* Use java.time classes instead of Date and magic numbers
* Upgrade XChart to 3.1.0
* Fix buggy legend position logic:
  Reinitialize counter to 0. So it does not work on legend position counter values of previously created charts.
  Use a local variable for the position counter instead of a field. This prevents issues when creating multiple charts simultanuously.

For XChart release notes see:

https://knowm.org/open-source/xchart/xchart-change-log/

On newer XChart versions there is an issue when using customized grid lines:

https://github.com/knowm/XChart/issues/628

Fixes #1183
Related to #2501
Supersedes #2415

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-09 18:39:17 +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
Wouter Born
5afa5fe8e9
Fix add-on type inconsistencies (#2508)
* Fix add-on type inconsistencies

This makes the CommunityMarketplaceAddonService return the same add-on type responses as the KarafAddonService.
This allows for add-ons tagged with "io" in the Marketplace to show up in the UI.

Fixes #2507

* Update "io" tag to "misc"

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-08 18:01:49 +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
1d17166c79
add item name to ScriptBusEvent log messages (#2503)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2021-10-03 22:15:18 +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
Sami Salonen
33703532e8
[modbus] Improved error messages, fixed typos (#2492)
When modbus slave responds with explicit error code, we communicate the
user what it means. E.g. error code 2 refers to "Illegal Data Access".

In addition, fixed some simple typos discussed in
https://github.com/openhab/openhab-addons/issues/8973#issuecomment-922232756

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2021-09-25 20:23:01 +02:00
Wouter Born
641b92324d
Prevent NSEE when there is no AddonService (#2493)
The code was already prepared for a nullable default service and then returns a 404 not found.

Fixes #2491

Signed-off-by: Wouter Born <github@maindrain.net>
2021-09-25 20:21:53 +02:00
Wouter Born
cfabfbcf48
Fix null analysis errors in marketplace bundle (#2495)
These changes resolve all the null analysis errors found in this bundle.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-09-25 10:54:54 +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
Yannick Schaus
0ef477e81f
[Marketplace] Add option to include unpublished entries (#2488)
Add a config parameter to bypass the filtering of Dicourse topics
to include those which don't have the "published" tag.

Set the API key parameter as advanced (irrelevant to most users).

Signed-off-by: Yannick Schaus <github@schaus.net>
2021-09-16 08:02:30 +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
Wouter Born
14bbbb6a92
Help OpenAPI to infer EnrichedThingDTO model channels type as a list of EnrichedChannelDTOs (#2487)
Fixes #2461

Signed-off-by: Wouter Born <github@maindrain.net>
2021-09-15 22:30:52 +02:00
openhab-bot
75bddf4143
New Crowdin updates (#2485)
* New translations addons.properties (Russian)
* New translations chart.properties (Russian)
* New translations hli.properties (Russian)
* New translations jsonStorage.properties (Russian)
* New translations lsp.properties (Russian)
* New translations marketplace.properties (Finnish)
* New translations marketplace.properties (German)
* New translations marketplace.properties (Hebrew)
* New translations marketplace.properties (Italian)
* New translations marketplace.properties (Russian)
* New translations messages.properties (Russian)
* New translations sitemap.properties (Russian)
* New translations units.properties (Russian)
* New translations validation.properties (Russian)
2021-09-15 19:35:01 +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
Kai Kreuzer
4f8f7254e0
Import javax.management package (#2484)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-09-14 14:40:07 +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
Fabian Wolter
c2a41549c0
[metrics] Catch any Throwable during initialization (#2480)
Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
2021-09-11 15:20:49 +02:00
Yannick Schaus
ff2f90684f
Rework system:restauth config parameters (#2477)
Following the discussion in #2476, I believe the order and "advanced" status of config parameters in API Security (`system:restauth`) should be changed.
This promotes "Implicit User Role" to a non-advanced option (even if it can break some clients, it is clearly stated in the description), and demotes "Allow Basic Authentication" to an advanced option (API Tokens can be used to authenticate to the API as a better alternative to Basic).

Signed-off-by: Yannick Schaus <github@schaus.net>
2021-09-06 08:34:33 +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
lolodomo
b128b2b4ec
[REST] Handle IP v6 in X-Forwarded-Host header (#2470)
Fix #2468

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2021-08-29 20:15:40 +02:00
lolodomo
57459ff306
[REST] Fix few content types (#2469)
Fix #2464

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2021-08-29 20:06:04 +02:00
Guillaume Nodet
43330c4d92
Use exec:exec instead of exec:java goal to avoid classloaders leak (#2432) (#2432)
Signed-off-by: Guillaume Nodet <gnodet@gmail.com>
2021-08-23 21:55:57 +02:00
J-N-K
b02dfdc067
[automation] implement a listener for ScriptEngineFactory changes (#2459)
* implement a listener for ScriptEngineFactory changes

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2021-08-22 12:15:23 +02:00
J-N-K
d11a72272e
make ScriptLibraryWatcher accessible for other languages (#2456)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2021-08-19 14:00:40 +02:00
Sami Salonen
4bcf48662a
Consistent ordering of entries in jsondb (#2437)
* Consistent ordering of entries in jsondb

Resolves #2436.

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2021-08-08 16:05:38 +02:00
J-N-K
638356c943
fix missing configuration in Rules (#2448)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2021-08-08 15:13:30 +02:00
Christoph Weitkamp
66847ebef9
[automation] Allow UoM in 'ItemStateCondition' (#2435)
* Allow UoM in ItemStateConditions

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-07-31 19:17:57 +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
lolodomo
e5e62d15a3
[semantics] Add semantics to default system channel types (#2428)
* Add semantics to default system channel types

Fix #2427

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2021-07-19 13:52:11 +02:00
openhab-bot
aad04cf94b
New Crowdin updates (#2420)
* New translations sitemap.properties (Finnish)

* New translations hli.properties (Swedish)

* New translations lsp.properties (Swedish)

* New translations sitemap.properties (Dutch)
2021-07-19 13:48:51 +02:00
Paul Vogel
621d6eac1a
OpenApiResource: Remove name from OAuth SecurityScheme (#2422)
Signed-off-by: Paul Vogel <github@paulvogel.me>
2021-07-05 23:10:53 +02:00
Paul Vogel
7e5bf34d9e
RuleResource: Add schema specification for "Location" header (#2421)
Signed-off-by: Paul Vogel <github@paulvogel.me>
2021-07-05 23:09:17 +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
openhab-bot
fc4b562896
New Crowdin updates (#2418)
* New translations sitemap.properties (German)

* New translations sitemap.properties (Italian)

* New translations sitemap.properties (Polish)

* New translations sitemap.properties (Hebrew)
2021-06-27 11:53:58 +02:00
lolodomo
3f102c5e13
Add a system setting to define how to sort group members (#2417)
* Add a system setting to define how to sort group members

Related to #2123

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2021-06-26 22:14:41 +02:00
Kai Kreuzer
6a6e201ac7
Revert "Ignore relative library directories for scripts (#2408)" (#2414)
This reverts commit 241a4f6ebf.
2021-06-25 11:11:18 +02:00
Jonathan Gilbert
241a4f6ebf
Ignore relative library directories for scripts (#2408)
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2021-06-25 09:45:18 +02:00
lolodomo
2d71afe5bd
[sitemap] Enhanced sitemap SSE event with a new boolean field informing if the (#2413)
item state or command description has been updated

Listen to the new ChannelDescriptionChangedEvent

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2021-06-25 07:17:54 +02: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
dbffd38234
Added method to publish whole StateDescriptionFragment (#2410)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-06-22 21:15:49 +02:00
Christoph Weitkamp
556d3498c1
Added 'ChannelDescriptionChangedEvent' (#1505)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-06-21 13:03:37 +02:00
Paul Vogel
1f2beea19e
[REST][Docs] Corrects the docs for security requirement for the ThingResource (in the openapi specification) (#2404)
* Add @SecurityRequirement annotation to ThingResource::getAll function

Signed-off-by: Paul Vogel <github@paulvogel.me>
2021-06-21 13:00:01 +02:00
Paul Vogel
5cc76378a0
Add @SecurityRequirement annotation to PersistenceResource::httpPutPersistenceItemData function (#2406)
Signed-off-by: Paul Vogel <github@paulvogel.me>
2021-06-21 12:59:24 +02:00
Kai Kreuzer
f58fce3500
[rest] Make UUID available to users (#2402)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-06-14 22:19:51 +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
Kai Kreuzer
3cac330c5f
[rest] Fix links to group members in REST response (#2399)
* Fix links for to group members in REST response

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-06-08 21:41:51 +02:00
Stewart Cossey
08632596b3
[automation] Fix offset for ephemeris condition (#2398)
Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
2021-06-06 09:40:36 +02:00
Fabian Wolter
e007307796
[automation] Expose TriggerHandlerCallback scheduler (#2388)
* [automation] Expose TriggerHandlerCallback scheduler

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
2021-05-31 10:04:21 +02:00
Christoph Weitkamp
585e870183
[config] Changed 'ConfigDescriptionParameterDTO' field serialization 'defaultValue' -> 'default' (#2383)
* Changed ConfigParameterDTO field serialization 'defaultValue' -> 'default'

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-30 18:27:35 +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
Kai Kreuzer
0343f44601
[automation] add tags to item modules (#2378)
* add tags to item modules
* made state/command configuration optional

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-05-25 16:39:31 +02:00
Christoph Weitkamp
d43106c016
Added "timestamp-trigger" Profile (#2364)
* Added Timestamp on Trigger Profile

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-23 22:43:27 +02:00
openhab-bot
37d88a41fd
New Crowdin updates (#2366)
* New translations SystemProfiles.properties (German)

* New translations SystemProfiles.properties (Hebrew)

* New translations SystemProfiles.properties (Dutch)

* New translations SystemProfiles.properties (Italian)

* New translations SystemProfiles.properties (Finnish)

* New translations SystemProfiles.properties (Hebrew)

* New translations SystemProfiles.properties (Italian)

* New translations SystemProfiles.properties (Dutch)
2021-05-21 15:36:52 +02:00
Yannick Schaus
66149659ca
[automation] Remove readOnly flag on script type parameter (#2373)
Not sure if there's a good rationale behind it being read-only (maybe because it's not supposed to change after having been set) but removing it will fix https://github.com/openhab/openhab-webui/issues/1061.

Signed-off-by: Yannick Schaus <github@schaus.net>
2021-05-20 20:39:32 +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
0c3f8c6105
[profiles] Log warning if profile cannot be created (#2368)
* Log warning if profile cannot be created e.g. if there is a spelling mistake

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-18 16:10:04 +02:00
Christoph Weitkamp
4309fb2d53
Remove update of timestamp on Change/Update for Item update (#2353)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-18 11:05:06 +02:00
Sami Salonen
763cda0ba4
[modbus] more clear error messages (#2330)
Bumping jamod to 1.3.4.OH

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2021-05-17 22:14:27 +02:00
lolodomo
a3d5f3e8dc
[REST] inbox/approve: new response code 400 (#2343)
Related to openhab/openhab-webui#1035

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2021-05-17 21:13:40 +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
Christoph Weitkamp
66525afce6
Expose Channel Type UIDs of default System Channel Types (#2361)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-14 12:21:27 +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
Brian Warner
a8f469e5e7
Display raw item state when formatting fails (#2349)
* Display raw item state when formatting fails

With the addition of Profiles, there are situations where a Channel sends format information that
does not match the type. For example, "Timestamp on update" always sends a DateTime, but the channel
may specify a different format (e.g., if it is a battery level, "%.0f %%"). In such a case, we
attempt to format the DateTime according to the pattern, it (predictably and correctly) fails, and
this results in an error in the UI and a warning in the log.

While this is an expected error if a user uses an incorrect format code in an Item's metadata (user
error), it is somewhat unexpected if a user is choosing an option as presented in the UI. Because
this is purely a formatting issue, one solution is to direct users to add a formatting code if they
see an error. However, the disadvantage of this approach is that it doesn't work "out of the box."

This patch attempts to address the issue by displaying the raw Item state when formatting fails
instead of displaying "Err". This should provide a more balanced approach with a predictable
outcome. In addition, when a user is intentionally changing the pattern via metadata and gets it
wrong, they should still see info in the log that helps them get to the root of the problem, but
I've changed it from warn to info so it will be a little less noisy for those who choose to ignore
it.

This solution was discussed in https://github.com/openhab/openhab-core/issues/2037 and
https://community.openhab.org/t/timestamps-not-rendering-consistently-in-ui-3-0-2/121891/2

Thank you to @Rossko57 and @cweitkamp for their help in figuring it out, and in suggesting the
solution.

Signed-off-by: Brian Warner <brian@bdwarner.com>
2021-05-13 09:44:51 +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
e124ad4fec
Fix unstable MqttBrokerConnectionTests (#2358)
The timeoutWhenNotReachable test often fails on systems with a lot of load.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-11 19:53:47 +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
Mark Herwege
527f2c3565
Implement hostnameValidated flag for secure MQTT connections (#2348)
Fixes #2346

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2021-05-10 11:19:52 +02:00
Christoph Weitkamp
aa48f5990e
Added Channel of DateTimeType (#2347)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-06 22:11:30 +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
a82d3effb7
Added missing properties for HLI, LSP and MQTT (#2334)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-05 01:20:22 +02:00