* [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>
* 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>
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>
* 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>
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>
* 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)
* 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>
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>
* [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>
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>
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>
* [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>
* 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>
* 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>
* New exception class that incorporates support for internationalization
* Add ConnectionException, CommunicationException and ConfigurationException
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
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>
* 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>
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/1310203201613f13
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>
* 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)
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>
* 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/628Fixes#1183
Related to #2501
Supersedes #2415
Signed-off-by: Wouter Born <github@maindrain.net>
* 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)
* 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>
* 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)
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>
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>
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>
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>
* 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>
* 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)