Commit Graph

1298 Commits

Author SHA1 Message Date
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
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
lolodomo
6eee84661f
[inbox] Approval with newThingId: only one segment allowed (#2338)
* [inbox] Approval with newThingId: only one segment allowed

Build of the new thing UID corrected in case newThingId is provided

Fix #2331

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2021-05-04 19:11:25 +02:00
Christoph Weitkamp
141e73c85f
Added nullness annotations to Thing events (#2341)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-04 17:04:58 +02:00
Thomas Weißschuh
9663060943
[automation] match on complete channel UID (#2337)
Matching only on "topic.contains(channelUID)" will lead to false
positivies.

This was reported for the linuxinput binding, where pressing the "left"
key would also trigger rules for the "l" key.

The channels for these are
`linuxinput:input-device:test:keypresses#KEY_L` and
`linuxinput:input-device:test:keypresses#KEY_LEFT`

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2021-05-04 10:49:44 +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
pravussum
da05f8e9fa
[metering] Fix dependency issue in io.monitor bundle (#2288) (#2289)
Signed-off-by: Robert Bach <openhab@mortalsilence.net>
2021-04-28 08:01:16 +02:00
Sönke Küper
cb36eb57e7
[rest] Added default values for rule simulation start and end dates and restricted the max. duration to < 180 days to prevent an denial-of-service. (#2296)
Fixes #2285 

Signed-off-by: Sönke Küper <soenkekueper@gmx.de>
2021-04-27 21:21:00 +02:00
Wouter Born
f164be385d
Fix typo in DefaultSystemChannels (#2325)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-27 21:18:57 +02:00
Christoph Weitkamp
e4f77f7992
[REST] Added editable flag for ItemChannelLinks by introducing an EnrichedItemChannelLinkDTO (#2318)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-27 11:03:41 +02:00
Wouter Born
3b878114c9
Fix build (#2324)
The test now fails because of the updated translations.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-27 07:29:39 +02:00
openhab-bot
90ffaffa15
New Crowdin updates (#2323)
* New translations DefaultSystemChannels.properties (Hungarian)
* New translations SystemProfiles.properties (Dutch)
* New translations SystemProfiles.properties (Hungarian)
* New translations tags.properties (French)
* New translations tags.properties (French)
2021-04-26 23:04:56 +02:00
openhab-bot
38d2e6538b
New Crowdin updates (#2308)
* New translations DefaultSystemChannels.properties (Dutch)
* New translations DefaultSystemChannels.properties (Spanish)
* New translations DefaultSystemChannels.properties (Ukrainian)
* New translations firmware.properties (Ukrainian)
* New translations LanguageSupport.properties (Dutch)
* New translations LanguageSupport.properties (French)
* New translations LanguageSupport.properties (Ukrainian)
* New translations messages.properties (Bulgarian)
* New translations messages.properties (German)
* New translations SystemProfiles.properties (Spanish)
* New translations SystemProfiles.properties (Ukrainian)
* New translations tags.properties (German)
* New translations tags.properties (Japanese)
* New translations tags.properties (Ukrainian)
* New translations units.properties (Bulgarian)
* New translations units.properties (Czech)
* New translations units.properties (French)
* New translations units.properties (Ukrainian)
* New translations validation.properties (French)
* New translations validation.properties (Ukrainian)
2021-04-26 13:46:18 +02:00
Christoph Weitkamp
a1d086c116
Filter duplicate broadcast addresses for service configuration if multiple network interfaces are available (#2307)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-26 12:11:04 +02:00
Björn Lange
6258268031
Ignore illegal thing status updates from REMOVING (#2313)
* Ignore illegal thing status updates from REMOVING

Ignore illegal thing status transitions from REMOVING instead of throwing IllegalArgumentException

Signed-off-by: Björn Lange <blange@itemis.com>
2021-04-26 08:42:16 +02:00
Sami Salonen
872dacfe7c
[modbus] jamod modbus library update 1.3.3.OH (#2315)
Modbus TCP client to read the full modbus message, even if
fragmented/segmented.

Serial/RTU to error more clearly if all bytes are not received as
expected.

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2021-04-24 11:54:46 +02:00
openhab-bot
62c85a3214
New Crowdin updates (#2305)
* New translations firmware.properties (Czech)
* New translations firmware.properties (Dutch)
* New translations firmware.properties (French)
* New translations firmware.properties (Hebrew)
* New translations firmware.properties (Hungarian)
* New translations firmware.properties (Japanese)
* New translations firmware.properties (Norwegian)
* New translations firmware.properties (Portuguese, Brazilian)
* New translations firmware.properties (Spanish)
* New translations messages.properties (Dutch)
* New translations messages.properties (French)
* New translations tags.properties (Portuguese, Brazilian)
* New translations tags.properties (Spanish)
* New translations validation.properties (Bulgarian)
* New translations validation.properties (Romanian)
2021-04-21 00:04:44 +02:00
Christoph Weitkamp
c80719fefa
Renamed Yahoo to ACME (#2304)
* Rename Yahoo to ACME
* Remove Paper UI references

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-20 22:31:32 +02:00
openhab-bot
6d9fd2283c
New Crowdin updates (#2301)
* New translations firmware.properties (Dutch)
* New translations firmware.properties (Hebrew)
* New translations firmware.properties (Japanese)
* New translations firmware.properties (Spanish)
* New translations LanguageSupport.properties (Hebrew)
* New translations LanguageSupport.properties (Norwegian)
* New translations LanguageSupport.properties (Spanish)
* New translations messages.properties (Hebrew)
* New translations messages.properties (Italian)
* New translations messages.properties (Japanese)
* New translations messages.properties (Spanish)
* New translations messages.properties (Ukrainian)
* New translations tags.properties (Dutch)
* New translations tags.properties (Norwegian)
* New translations tags.properties (Spanish)
* New translations units.properties (Dutch)
* New translations units.properties (Hebrew)
* New translations units.properties (Hungarian)
* New translations units.properties (Italian)
* New translations units.properties (Japanese)
* New translations units.properties (Luxembourgish)
* New translations units.properties (Norwegian)
* New translations units.properties (Portuguese, Brazilian)
* New translations units.properties (Spanish)
* New translations validation.properties (Dutch)
* New translations validation.properties (Hebrew)
* New translations validation.properties (Luxembourgish)
* New translations validation.properties (Norwegian)
* New translations validation.properties (Spanish)
* Fix file names
2021-04-20 16:25:11 +02:00
Wouter Born
c5db042c20
Remove trailing space from update-canceled in firmware.properties (#2300)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-20 16:05:40 +02:00
Wouter Born
94b69e2ccb
Switch properties files encoding from ISO-8859-1 to UTF-8 (#2298)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-19 20:04:23 +02:00
openhab-bot
4afbf93270
New Crowdin updates (#2293)
* New translations DefaultSystemChannels.properties (Finnish)
* New translations DefaultSystemChannels.properties (French)
* New translations DefaultSystemChannels.properties (German)
* New translations DefaultSystemChannels.properties (Hebrew)
* New translations DefaultSystemChannels.properties (Portuguese, Brazilian)
* New translations firmware.properties (Czech)
* New translations firmware.properties (French)
* New translations firmware.properties (German)
* New translations firmware.properties (Hungarian)
* New translations LanguageSupport.properties (Czech)
* New translations LanguageSupport.properties (German)
* New translations LanguageSupport.properties (Hungarian)
* New translations LanguageSupport.properties (Japanese)
* New translations LanguageSupport.properties (Portuguese, Brazilian)
* New translations messages.properties (Czech)
* New translations messages.properties (French)
* New translations messages.properties (German)
* New translations messages.properties (Hungarian)
* New translations messages.properties (Portuguese, Brazilian)
* New translations SystemProfiles.properties (Finnish)
* New translations SystemProfiles.properties (Italian)
* New translations SystemProfiles.properties (Portuguese, Brazilian)
* New translations tags.properties (Hungarian)
* New translations tags.properties (Portuguese, Brazilian)
* New translations units.properties (Czech)
* New translations units.properties (French)
* New translations units.properties (German)
* New translations units.properties (Hungarian)
* New translations validation.properties (Czech)
* New translations validation.properties (German)
* New translations validation.properties (Hungarian)
* New translations validation.properties (Japanese)
2021-04-19 18:43:26 +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
lolodomo
469613e15a
French translation added for signal strength options (#2294)
- French translation added for signal strength options

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2021-04-17 19:42:28 +02:00
Denis Denisov
221970567a
Upgrade jamod (to get rid of case with fragmented packets) (#2284)
Signed-off-by: Denis Denisov <ftc.denis@gmail.com>
2021-04-15 18:23:27 +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
Sami Salonen
b1b58436f2
[modbus] Workaround for nrjavaserial issues: do not disconnect serial (#2272)
Workaround for https://github.com/openhab/openhab-core/issues/1842.
Typically serial connections are disconnected and reconnected on IO
errors. This has turned out to be problematic with the recent
nrjavaserial updates brought by OH3 (locking behaviour of nrjavaserial
seems to be prone to deadlocks).

We workaround the issues by trying to keep the serial connection open
as long as possible.

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2021-04-07 20:46:36 +02:00
Wouter Born
ef1b86c1d1
Upgrade to OSGi R7 and Karaf 4.3.1 (#2264)
* Aligns compile dependencies with OSGi R7
* Aligns runtime dependencies with Karaf 4.3.1
* Fixes issues due to dependency changes:
  * AudioServletTest never ending due to Jetty upgrade
  * Feature resolution failing due to Karaf activation-api no longer visible
* Uses Pax Logging as runtime dependency instead of Felix Log
  This dependency change makes itests and Demo App behave more like the actual distro
  To change the log level in itests, change the value of org.ops4j.pax.logging.DefaultServiceLog.level in itest-include.bndrun
* Adds --add-opens and nashorn.args in itest-include.bndrun to prevent some warnings being logged in itests

Related to openhab/openhab-distro#1167

Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-02 13:39:54 +02:00
spacemanspiff2007
4964b51160
Add cache for Basic Authentication (#2101)
Also-by: Sebastian Gerber <github@sgerber.de>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-03-30 22:55:26 +02:00
Kai Kreuzer
6568dc1478
Merged semantics packages in order to make API consistent (#2263)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-03-30 20:35:06 +02:00
Wouter Born
b64c84e8b9
Fix wrong/missing OpenAPI ApiResponse content (#2258)
This fixes some issues where the response content is missing or wrong in the generated OpenAPI spec.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-27 13:28:47 +01:00
Jonathan Gilbert
6961db74d0
[automation] Correctly unload script before reload. (#2254)
- Correctly unload script before reload.

Fixes #2246

Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2021-03-26 09:48:55 +01:00
Wouter Born
db11cfda51
Add null annotations to org.openhab.core.voice (#2255)
Allows for using null annotations with the voice TTS add-ons.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-25 20:19:11 +01: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
Kai Kreuzer
ee1d3f3a73
Removed outdated basic auth classes (#2245)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-03-20 12:46:30 +01:00
Wouter Born
4bf156ffc0
Upgrade Gson to 2.8.6 (#2244)
* Upgrade Gson to 2.8.6

Upgrades Gson from 2.8.2 to 2.8.6.

See change log: https://github.com/google/gson/blob/master/CHANGELOG.md#version-286

Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-17 19:18:17 +01:00
Björn Brings
c2498f5c74
Sort members of groups by labe in sitemaps (#2123)
* Sort group members by label 

Signed-off-by: bjoernbrings <bjoernbrings@web.de>
2021-03-16 15:13:51 +01:00
Jonathan Gilbert
115d39ff35
Removed Jetbrains @NonNull annotations (#2241)
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2021-03-15 00:15:21 +01:00
Jonathan Gilbert
635b700c72
[automation] Added optional per-script StartLevels (#2222)
Allows scripts to specify per-script start levels which differ from the start level for the ScriptFileWatcher itself. Also extracted some functionality from ScriptFileWatcher into distinct components & added unit tests to cover all script loading functionality.

Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2021-03-14 22:30:12 +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
Arjan Mels
e20348e8d6
[channel] Fix createChannelBuilders not using overriden label/description (#2229)
* Use channelDefinition in createChannelBuilder

Closes #2225 

Signed-off-by: Arjan Mels <github@mels.email>
2021-03-12 17:54:05 +01:00
Christoph Weitkamp
11c59ccc87
Audiosink might be null (#2224)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-03-06 16:49:44 +01:00
Kai Kreuzer
62c74da0c0 Applied spotless fix
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-03-02 21:38:34 +01:00
boc-tothefuture
89796e79c0
Provide Script Names to Script Engines (#1885)
Signed-off-by: Brian O'Connell <broconne@gmail.com>
2021-03-02 21:36:07 +01:00
stedon81
361e985c1c
io transport mqtt sets wrong QoS levels to hiveMQ #2145 (#2208)
Signed-off-by: Stefan Donath <donath.stefan@mail.donath-productions.ipactive.de>
2021-02-27 11:25:33 +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
191a629e68
Added Sematics actions for Rules (#2088)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-02-27 10:33:32 +01:00
Christoph Weitkamp
9c0302ec26
[profiles] Added 'Range' profile (#2046)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-02-27 10:28:09 +01:00
Mark Hilbush
7de57f9ffe
[automation] Fixed memory leak caused by invalid UI DSL rule (#2212)
Signed-off-by: Mark Hilbush <mark@hilbush.com>
2021-02-20 19:53:44 +01:00
bigbasec
c7b7390c91
Fix sitemap proxy URL provided by Rest API (#2203)
Signed-off-by: Brian Homeyer <bhomeyer@gmail.com>
2021-02-19 20:27:12 +01:00
pravussum
0292806830
[metering] tag rule metric with human readable rule name in addition to the rule id (#2194)
Signed-off-by: Robert Bach <openhab@mortalsilence.net>
2021-02-14 18:07:54 +01:00
Sami Salonen
ebda155b47
[modbus] Modbus poolconfig handling (#2199)
* [modbus] More strict nullness annotations
Taking into consideration that we always have default
EndpointPoolConfiguration
* [modbus] Utilize default pool configuration consistently
* [modbus] Make (internal) ModbusCommunicationInterfaceImpl constr private
* [modbus] Handle null config of modbus comm when detecting open conns
* [modbus] default connection timeout of 10s with default pool config

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2021-02-14 17:14:43 +01:00
pravussum
f061512dd5
Integrated micrometer metering #774 (#2133)
Signed-off-by: Robert Bach <openhab@mortalsilence.net>
2021-02-11 21:12:58 +01:00
Wouter Born
5a4e04cb2c
Add profile to generate semantics classes with groovy-maven-plugin (#2188)
* Add profile to generate semantics classes with groovy-maven-plugin

This way you can generate the classes with Maven when adding -DgenerateTagClasses to your build command.
I.e. you no longer need to have Groovy locally installed for this.
Also properly sorts the generated imports so they match the Spotless configuration.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-02-10 17:23:16 +01:00
Christoph Weitkamp
76e0cfdb81
[voice] Changed annotation of getPreferredVoice method to allow null results (#2186)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-02-09 19:26:49 +01:00
Kai Kreuzer
44c280e249
Make absolute color temperature channel type advanced (#2183)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-02-08 20:13:16 +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
Sönke Küper
65218f81fc
Added rule condition for not a holiday (#2043)
Signed-off-by: Sönke Küper <soenkekueper@gmx.de>
2021-02-06 16:37:29 +01:00
bigbasec
74c4c2386f
Support sitemaps created through UI in proxy (#2178)
* Add site provider lookup in proxy

Third attempt at this PR, but this very simply allows for the proxy to find the sitemaps for both file based as well as gui generated.

Fixes #2154
Fixes openhab/openhab-webui#763
Fixes openhab/openhab-webui#745

Also-by: Kai Kreuzer <kai@openhab.org>
Signed-off-by: Brian Homeyer <bhomeyer@gmail.com>
2021-02-06 16:26:58 +01:00
Kai Kreuzer
87211d2439
[REST] Prevent internal server error on invalid link requests on REST API (#2179)
Closes https://github.com/openhab/openhab-webui/issues/878

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-02-06 11:27:58 +01:00
Andrew Fiddian-Green
b99aa444a0
[discovery.upnp] Devices may apply a grace period for removal from the Inbox (#2144)
* [discovery.upnp] delay removing devices from Inbox

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2021-02-06 11:16:41 +01:00
Andrew Fiddian-Green
023f373b20
[transport.modbus] Remove dependencies on deprecated libraries (#2127)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2021-02-04 23:27:06 +01:00
Christian Bandowski
d48646d8c6
Fix changing temperature via BasicUI (#2091) (#2165)
Signed-off-by: Christian Bandowski <christian@myvm.de>
2021-01-30 22:50:58 +01:00
Sami Salonen
de61ce1ead
[modbus] equals and hashcode implementation for ModbusRegisterArray (#2164)
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2021-01-30 21:02:59 +01:00
Wouter Born
46666eb169
Fix deprecations (#2163)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-30 12:22:31 +01:00
Wouter Born
49e148ad7d
Fix headers (#2161)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-27 23:43:44 +01:00
Jonathan Gilbert
f1a3d824ac
Add ability for scripts to create unmanaged rules (#1897)
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2021-01-26 22:25:09 +01:00
Jonathan Gilbert
f0c9a8434d
Added ability for ScriptEngines to allow script dependencies to be tracked and changes to trigger script reloading (#1884)
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2021-01-26 22:23:31 +01:00
jimtng
b55933d769
[timer] fix to allow timer reschedule after termination (#2153)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2021-01-26 17:21:41 +01:00
jimtng
6de92ec6ef
[timer] Add Timer.getExecutionTime() (#2147)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2021-01-26 17:17:40 +01:00
Mike Major
86a447c23a
[jsondb] Restore zero byte files from backup (#2155)
* Restore zero byte files from backup
* Also handle zero byte backup files

Signed-off-by: Mike Major <mike_j_major@hotmail.com>
2021-01-26 17:12:46 +01:00
Christoph Weitkamp
12659595a6
Added system default channel type to control color temperature in Kelvin (#2157)
* Added system default channel type for controling color temperature in Kelvin

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-01-26 08:13:04 +01:00
Wouter Born
d50ea56da8
Stop commons-net proliferation (#2151)
* Exclude commons-net from core dependencies so it is no longer automatically a transitive compile dependency
* Update nrjavaserial compile dependency to a version that no longer includes commons-net packages
* Define and use commons.net.version property
* Rework features so commons-net is only installed when required

Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-24 21:43:08 +01:00
Michael Parment
3df98da080
Changed modbus polling logging level to warning when retrying (#2135)
https://community.openhab.org/t/modbus-errors/114602

Signed-off-by: Michael Parment <michael.parment@gmail.com>
2021-01-21 14:16:40 +01:00
Fabian Wolter
0a2450c919
Add message and preserve cause when throwing PortInUseException (#2126)
Signed-off-by: Fabian Wolter <fw@skytender.de>
2021-01-21 11:12:55 +01:00
Andrew Fiddian-Green
127724c0e3
[executeCommandLine] should return STDERR if STDOUT is empty (#2114)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2021-01-16 22:20:09 +01:00
Kai Kreuzer
a0d58006e8
Also return command line execution result in case of error return code (#2104)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-01-12 10:54:12 +01:00
Christoph Weitkamp
c2702d0dfe
Moved NumberExtensionsTest from itest to pure unit test and merged redundant calsses (#2087)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-01-08 23:17:28 +01:00
Christoph Weitkamp
90a460dd03
Added unit tests for check if persistence extension returns QuantityType if persistence service returns QuantityType (#2029)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-01-08 22:53:35 +01:00
Paul van den Berg
eee30b0c57
Improved error logging when adding rules (#2053)
Improved error logging for adding rules

Signed-off-by: Paul van den Berg <prj.vandenberg@gmail.com>
2021-01-06 23:23:17 +01:00
Kai Kreuzer
97e2782875
[automation] Avoid disappearing rules by correctly checking the model and its type (#2077)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-01-06 14:29:49 +01:00
Vita
0026d89caf
Extended serial port implementation (#2050)
Signed-off-by: docbender <vita.tucek@seznam.cz>
2021-01-06 08:48:16 +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
64f444cf6e
Update Mockito, JUnit and use MockitoExtensions in itests (#2075)
* Updates Mockito to 3.7.0
* Updates JUnit to 5.7.0
* Use MockitoExtensions where possible

Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-05 22:58:58 +01:00
Christoph Weitkamp
88253c8676
Add category for system channel type 'power'; Changed category for system channe type 'low-battery' (#2069)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-01-05 22:53:58 +01:00
Yannick Schaus
fcaf251bd0
Fix parsing integer & booleans parameters in UI component based sitemaps (#2072)
* Fix parsing integer & booleans parameters in UI component based sitemaps

Also catch remaining exceptions and log a warning/ignore the parameter
instead of making the whole sitemap building process fail.

Fix wrong feature ID for the video widget URL.

Fixes #2047.
Fixes #1987.
Fixes #1898.
Fixes #1875.
Fixes https://github.com/openhab/openhab-webui/issues/745.

Signed-off-by: Yannick Schaus <github@schaus.net>
2021-01-05 22:42:31 +01:00
Kai Kreuzer
531a478a45
Cache parsed script in order to improve performance (#2057)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-01-03 13:18:53 +01:00
Kai Kreuzer
d11ec3ef64
Include group label in warn log message (#2059)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-01-03 13:17:53 +01:00
Christoph Weitkamp
2cf9babfab
Added method to read all files with specific extensions in 'transform/' folder (#2052)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-01-03 10:01:09 +01:00
Kai Kreuzer
4b8546b599
Prevent errors in log when client closes the HTTP connection (#2049)
Fixes openhab/openhab-distro#1188

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-01-02 09:04:05 +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
Sami Salonen
afd03df07f
[transport.modbus] Support dimensionless QuantityType commands. (#1984)
In additions, command->registers tests have been once made more
readable, covering all the corner cases with integers.

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2020-12-31 10:13:43 +01:00
Mark Hilbush
890e767d0a
[persistence] Fix varianceSince and deviationSince (#2036)
Signed-off-by: Mark Hilbush <mark@hilbush.com>
2020-12-30 22:55:41 +01:00
Kai Kreuzer
1c3e4318df
Correctly handle file extension when looking up script (#2020)
Fixes #1990

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-12-29 10:50:31 +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
Andrew Fiddian-Green
acb0cd5e9b
[transport.modbus] Added support for RTU encoding over TCP (#1965)
* [modbus] add support for rtu encoding over tcp

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2020-12-26 18:10:06 +01:00
Leon Kiefer
49a17a5f5e
[automation] Updated rule dsl filename to rule uid mapping (#2003)
use full filename without extension as uid for rules provided by DSL files
fix bug where rule filenames with common prefix and "." resulted in same uid

Signed-off-by: Leon Kiefer <leon.k97@gmx.de>
2020-12-25 13:58:31 +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
Christoph Weitkamp
19daef5d09
Harden ChartServlet against NPEs when no 'period' parameter is given (#1992)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-12-23 12:57:27 +01:00
Christoph Weitkamp
0af74400d2
Added nullness annotations to ThingHandlerHelper (#1993)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-12-23 12:56:15 +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
Christoph Weitkamp
7ce96ac06a
Fixed NPE in ScriptError if INode is empty (#1985)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-12-22 20:34:49 +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
Christoph Weitkamp
f83fc07c6a
[automation] Added ItemStateUpdate action (#1970)
* Added ItemUpdate action

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-12-20 13:53:09 +01:00
Holger Hees
7f3de9ae02
fix spelling of german tag synonyms (#1971) 2020-12-20 13:50:24 +01:00
Yannick Schaus
150ced7012
[auth] Don't allow creating API tokens with no name (#1969)
Fixes https://github.com/openhab/openhab-webui/issues/674.

Remove unnecessary checks and fix exception message.
Add Norwegian messages for auth pages.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-12-20 12:48:46 +01:00