Commit Graph

2046 Commits

Author SHA1 Message Date
Jacob Laursen
3bacc4bb5d
Change icon for channel type system.mute (#4245)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-05-25 18:53:15 +02:00
openhab-bot
08b5dd1ba0
New translations systemprofiles.properties (Danish) (#4250) 2024-05-25 18:38:13 +02:00
Holger Friedrich
43b57eb9e9
String translations for IP add-on finder (#4232)
Translate backslash sequences in requestPlain.
See String.translateEscapes().

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-05-23 19:10:45 +02:00
openhab-bot
945900b52a
New Crowdin updates (#4243)
* New translations chart.properties (Hebrew)

* New translations voice.properties (Hebrew)

* New translations magic.properties (Hebrew)

* New translations jsr223.properties (Hebrew)

* New translations defaultsystemchannels.properties (Hebrew)

* New translations languagesupport.properties (Portuguese)

* New translations languagesupport.properties (Portuguese, Brazilian)
2024-05-23 15:39:11 +02:00
openhab-bot
dcc3842386
New Crowdin updates (#4236)
* New translations addons.properties (Hungarian)

* New translations scriptprofile.properties (Hungarian)

* New translations systemprofiles.properties (Hungarian)

* New translations chart.properties (Hungarian)

* New translations voice.properties (Hungarian)

* New translations magic.properties (Hungarian)

* New translations jsr223.properties (Hungarian)

* New translations defaultsystemchannels.properties (Danish)
2024-05-22 21:27:54 +02:00
Timotheos Constambeys
83bd5fff2e
Fix brightness in generic ColorChannelHandler (#4242)
Signed-off-by: Timotheos Constambeys <timo0190@gmail.com>
2024-05-22 18:08:34 +02:00
Holger Friedrich
873bb53cbc
Upgrade Karaf from 4.4.5 to 4.4.6 (#4181)
* Upgrade Karaf from 4.4.5 to 4.4.6

* Sync runtime dependencies with Karaf 4.4.6, most notably:
  * Jetty 9.4.54.v20240208, addresses CVE-2024-22201
  * Pax Logging 2.2.7
  * Pax Web 8.0.27
  * ASM 9.7
  * BouncyCastle 1.77
* Upgrade xtext to 2.35.0.M1
* Resolve itest runbundles

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-05-20 17:42:04 +02:00
Gaël L'hopital
6887db3b89
Adding UV Index system channel (#3878)
* Adding UV Index system channel

Signed-off-by: clinique <gael@lhopital.org>
2024-05-20 12:09:52 +02:00
Mark Herwege
c40b82f16e
Fix exception in WindowsUsbSerialDiscovery (#4235)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-20 10:20:08 +02:00
J-N-K
895dcbb087
Enable spotless for schema XSD (#4218)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-05-18 19:23:21 +02:00
Holger Friedrich
352dbf2aaa
Update i18n property files (#4229)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-05-18 18:43:53 +02:00
Mark Herwege
6b5eed782c
fix QuantityType dimensionless one and time formatting (#4169)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-18 14:54:18 +02:00
lolodomo
3b9a97101b
[sitemap] Buttongrid as container for new Button elements (#4223)
Related to #4173

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-18 14:51:39 +02:00
J-N-K
73f4722b91
Align I18nProviderImpl and thing description XSD (#4233)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-05-18 13:08:22 +02:00
J-N-K
88c5a0849f
Improve thing description XSD (#4217)
* Improve thing description XSD

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-05-17 23:17:13 +02:00
lolodomo
965e7311eb
[sitemap] Do not try to convert item state into OnOffType for Switch widget if item has options (#4226)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-13 22:20:59 +02:00
Jacob Laursen
3b2757a25e
Add IP broadcast add-on finder for suggestions (#4036)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-05-12 16:14:46 +02:00
GiviMAD
e14b0a8d0d
[audio|voice] Add console commands to troubleshoot audio sources and speech-to-text services (#4202)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2024-05-12 12:25:46 +02:00
J-N-K
ec7674752a
Fix resolver errors during bundle add-on installation (#4224)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-05-11 19:15:31 +02:00
jimtng
6eeb9dd7c9
Fix a typo in PersistenceExtensions log message (#4221)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-05-07 08:09:36 +02:00
Mark Herwege
03a9708b6c
Persistence extensions: allow null serviceId (#4213)
* allow null serviceId

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-06 11:28:57 +02:00
jimtng
456d5d3dd0
Fix textual things not updating on the first change (#4219)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-05-06 09:24:04 +02:00
Mark Herwege
d083a5379c
Support press and release buttons in sitemap generator (#4204)
* handle quoted arguments
* press and release mapping

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-05 22:16:36 +02:00
lolodomo
b40e6db514
Extend sitemap syntax for switch to support press & release buttons (#4183)
* Extend sitemap syntax for switch to support press & release buttons

Mappings attribute for switch element now accepts one or two commands for each button.
If only one command is provided, the button is a click button, the command is sent to the item when the button is clicked.
If two commands are provided (separated by ":"), the button is a press & release button, the first command is sent to the item when the button is pressed and the second when the button is released.

Syntax example for a click button: Switch item=DemoSwitch mappings=[ ON="ON" ]
Syntax example for a press & release button: Switch item=DemoSwitch mappings=[ ON:OFF="ON" ]

Related to #3822

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-05 09:45:24 +02:00
joerg1985
6aed435c77
Prevent potential incorrect cache lookup due to hash collisions (#4214)
* Prevent potential incorrect cache lookup due to hash collisions
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-05-05 09:39:34 +02:00
joerg1985
7efdd44197
Reuse existing BigDecimals in rules while converting types (#4198)
* Speed up calculations in rules
* Add test for NumberExtensions.numberToBigDecimal

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Co-authored-by: Holger Friedrich <mail@holger-friedrich.de>
2024-05-04 18:59:29 +02:00
lolodomo
97cedc46e9
SseItemStatesEvent displayState: priority to transform over options (#4193)
Fix #2283
Fix #4050

This PR is fixing two things in the computation of the displayState:
- If a transformation is present in the state pattern, it has now priority over options provided by the state description
- If no transformation is present in state pattern but options are provided by the state description, the provided state pattern is applied to the matching option

Also remove a deprecated call to transform.

If there is no transformation but options are provided without any matching with the current state and there is a pattern provided, then this pattern is used to format the output.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-04 18:38:48 +02:00
Mark Herwege
49cfb20fb5
Fix suggestion finder installation (#4209)
* fix finder installation
* no install/uninstall if no config object

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-04 18:18:50 +02:00
openhab-bot
4dfbfb4995
New translations systemprofiles.properties (French) (#4210) 2024-05-03 20:45:52 +02:00
Mark Herwege
94572aa7c8
PersistenceExtensions: Re-add deprecated evolutionRate variant (#4212)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-03 16:59:19 +02:00
Tassilo Karge
d9685ca9c0
Complete sitemap subscriptions documentation correction (#4207)
* update reference to method / parameter names from documentation
* reflect that subscriptions for a whole page are possible in the documentation
* document that subscriptions to a whole sitemap are possible but discouraged

Signed-off-by: Tassilo Karge <tassilo.karge@web.de>
2024-05-03 16:22:06 +02:00
Holger Friedrich
767cbd93d3
Fix javadoc build (#4208)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-05-02 23:36:34 +02:00
Mark Herwege
1a89b9ede9
Fix suggestion finder installation (#4206)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-02 16:30:57 +02:00
lolodomo
1fb949ba8f
Set a default presentation pattern for String/Number/Datetime items (#4175)
* Set a default presentation pattern for String/Number/Datetime items

A default state pattern was previously provided by ChannelStateDescriptionProvider only for String and Number items linked to a channel.
It is now the class DefaultStateDescriptionFragmentProvider which is responsible for providing the default state pattern for items, whether the item is linked to a channel or not.
This new class is the lowest ranked StateDescriptionFragmentProvider so that all other providers have priority in setting the state pattern.

Default pattern for string item: %s
Default pattern for datetime item or group with datetime state: %1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS
Default pattern for number item or group with number state: %.0f
Default pattern for number+dimension item or group with number+dimension state: %.0f %unit%

Closes #4071
Closes #3835

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-02 16:29:35 +02:00
Mark Herwege
1b503afdbb
Return units in persistence extension commands and support future persisted states (#3736)
* persistence extensions future and QuantityTypes

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-02 11:47:12 +02:00
jimtng
eb2339907f
Fix change detection for textual things (#4076)
* Don't update unchanged things in .things file

There were two problems:
- The old things weren't removed, resulting in accumulation of duplicate things and comparing the new one against the old one resulting in erroneous update
-  Numeric values (usually entered as integer) in a newly loaded Channel Configuration properties are stored as BigDecimal with Scale 0, but subsequent normalization changed it to scale 1. This made equals() return false when it shouldn't. This leads to calling notifyListenersAboutUpdatedElement unnecessarily.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-05-02 11:41:53 +02:00
lolodomo
21186d6168
Use option label when formatting the option label with the provided pattern fails (#4205)
Issue discussed in openhab/openhab-android#3623

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-01 17:33:38 +02:00
Tassilo Karge
c430e6f6e4
Allow subscriptions for complete sitemaps (not limited to a single page) (#3652)
* allow subscriptions for the complete sitemap

Signed-off-by: Tassilo Karge <tassilo.karge@web.de>
2024-05-01 16:16:08 +02:00
J-N-K
551c06b24f
Fix inital loading and improve code for YAML model (#4199)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-05-01 01:21:27 +02:00
joerg1985
c3ada84b77
Conditionally use a thread pool backed sequential executor for DSL rules and events (#3890)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-04-29 09:11:56 +02:00
Simonas Kazlauskas
81f2bd9366
[modbus] reduce log level when modbus slave returns DEVICE_BUSY exception (#3847)
* [modbus] reduce log level when modbus slave returns DEVICE_BUSY exception

This exception is meant to indicate that the request should be retried
shortly, essentially, and at least some of the devices I own seem to be
busy bees. Thus my logs receive significant spam of this warning.

Since the exception is transient and retrying it is the expected course
of action, I think it makes sense to reduce the log level here slightly
and only output an error when the retries get exhausted.

Signed-off-by: Simonas Kazlauskas <git@kazlauskas.me>

* Update bundles/org.openhab.core.io.transport.modbus/src/main/java/org/openhab/core/io/transport/modbus/internal/ModbusManagerImpl.java

Signed-off-by: Simonas Kazlauskas <github@kazlauskas.me>

---------

Signed-off-by: Simonas Kazlauskas <git@kazlauskas.me>
Signed-off-by: Simonas Kazlauskas <github@kazlauskas.me>
2024-04-28 18:04:40 +02:00
openhab-bot
d7f79ce7d4
New Crowdin updates (#4189)
* New translations tags.properties (Italian)

* New translations systemprofiles.properties (Finnish)

* New translations systemprofiles.properties (Hebrew)

* New translations systemprofiles.properties (Polish)

* New translations languagesupport.properties (Portuguese)

* New translations languagesupport.properties (Portuguese, Brazilian)
2024-04-28 18:02:53 +02:00
GiviMAD
8bca481fff
[audio] Fix bitrate calc (#4141)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2024-04-28 17:43:49 +02:00
Holger Friedrich
fa9cff6be9
GsonBuilder: Explicitly set date format (#4185)
Between Java 17 and Java 21, serialization of DateTime has changed due to
CLDR 42 which uses a narrow non-breaking space.
To ease switching JDK versions, the seralization format is explicitly
set to the Java 17 format.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-28 17:11:54 +02:00
Sami Salonen
bad043ff12
[persistence] TestPersistenceService w/ paging (#4200)
Previously it was not supporting paging. This validated correct
behaviour with historicState & lastUpdate & previousState
that have the pageSize defined.

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2024-04-28 17:10:23 +02:00
Mark Herwege
7cedb1257b
Use FeatureInstaller for suggestion finder installation (#4188)
* use FeatureInstaller

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-04-28 11:39:27 +02:00
Holger Friedrich
c316b07c47
Update plugins (#4197)
* set minimum Maven version to 3.6.3
* build-helper-maven-plugin, 3.4.0 to 3.5.0, see
  https://github.com/mojohaus/build-helper-maven-plugin/releases/tag/3.5.0
* jvnet maven-jaxb2-plugin, 0.15.2 to 0.15.3
* license-maven-plugin, 4.2 to 4.3
* maven-archetype-plugin, 3.0.1 to 3.2.1
* maven-assembly-plugin, 3.4.2 to 3.7.1, see https://github.com/apache/maven-assembly-plugin/releases
* maven-clean-plugin, 3.3.1 to 3.3.2, see https://github.com/apache/maven-clean-plugin/releases
* maven-dependency-plugin, 3.6.0/3.3.0/3.1.1 to 3.6.1, see
  https://github.com/apache/maven-dependency-plugin/releases/tag/maven-dependency-plugin-3.6.1
* maven-jar-plugin, 3.3.0 to 3.4.1, see https://github.com/apache/maven-jar-plugin/releases
* maven-javadoc-plugin, 3.6.2 to 3.6.3, see https://github.com/apache/maven-javadoc-plugin/releases
* maven-plugin-plugin, 3.11.0 to 3.12.0, see
  https://github.com/apache/maven-plugin-tools/releases/tag/maven-plugin-tools-3.12.0
* maven-shade-pluginm 3.5.2 to 3.5.3
* maven-source-plugin, 3.3.0 to 3.3.1
* maven-surefire-plugin, 3.1.2 to 3.2.5, see https://github.com/apache/maven-surefire/releases
* sortpom-maven-plugin, 3.3.0 to 3.4.1, see https://github.com/Ekryd/sortpom/releases
* spotless-maven-plugin, 2.38.0 to 2.43.0, see
  https://github.com/diffplug/spotless/blob/main/plugin-maven/CHANGES.md
* openhab 18n-maven-plugin, 4.0.2 to 4.1.2

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-27 09:34:39 +02:00
Andrew Fiddian-Green
a3bfcf5b2f
ColorUtil bug fixes and improvements (#4124)
* ColorUtil improvements

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2024-04-27 09:32:11 +02:00
Holger Friedrich
b563f1577a
More instanceof pattern matching (#4191)
* More instanceof pattern matching

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-21 21:22:37 +02:00
joerg1985
ba463dd7e6
[persistence] improve building the ItemHistoryDTO (#4194)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-04-21 21:21:03 +02:00
Florian Hotze
b9940d6687
[automation] Improve logging in ScriptConditionHandler (#4192)
Fixes #4179.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-21 10:16:03 +02:00
Holger Friedrich
a79a9c651b
Reduce SAT warnings (#4187)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-20 19:17:47 +02:00
Holger Friedrich
0db45fa168
Use flatMap to simplify map operations (#4190)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-20 19:15:06 +02:00
Wouter Born
dc17296e07
Upgrade Jollyday to 0.27.0 (#4178)
Upgrades Jollyday from 0.23.2 to 0.27.0.

For release notes, see:

https://github.com/focus-shift/jollyday/releases

Signed-off-by: Wouter Born <github@maindrain.net>
2024-04-14 22:20:55 +02:00
Martin
846877e598
Do not create new BigDecimals if a given object is already BigDecimal (#4177)
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
2024-04-14 16:13:14 +02:00
J-N-K
3a435ec1e7
Fix marketplace showing incompatible add-ons by default (#4182)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-04-14 16:11:38 +02:00
openhab-bot
0eeff02fcc
New translations systemprofiles.properties (Italian) (#4176) 2024-04-13 11:59:29 +02:00
Denis Tarasov
cbb458e0c3
Improve description of hysteresis bounds (#4149)
* doc: improve description of hysteresis bounds

Signed-off-by: Denis Tarasov <dstarasov@skbkontur.ru>
2024-04-07 10:54:42 +02:00
Jacob Laursen
258b0991d8
Provide unit hint for system channel type atmospheric-humidity (#4170)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-04-07 10:53:47 +02:00
lolodomo
619762a297
[sitemap] Extend chart periods to cover past and future (#4172)
* [sitemap] Extend chart periods to cover past and future

Closes openhab/openhab-webui#2518

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-04-07 10:51:24 +02:00
Mark Herwege
c2cbefe55c
Unit hint in thing channels (#4079) 2024-04-06 14:21:42 +02:00
lsiepel
f18c50f299
Add abbreviate method (#4164)
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
2024-04-06 14:14:20 +02:00
Holger Friedrich
875ebaaef7
[rest] Fix Java 21 build (#4171)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-05 20:40:06 +02:00
lolodomo
dcfadaede6
Move to JUPnP v3.0.1 (#4165)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-04-02 18:21:57 +02:00
Holger Friedrich
9f5a60d6fa
Allow for compiling with Java 21 (#4161)
* Support Java 17 and 21, default compilation to Java 17 class files,
  use maven.compiler.release instead of source and target
* Add profile "j21" to compile to Java 21 class files
* Upgrade SAT to 0.16.0, adapt code which breaks build with new SAT
  checks
* Use model-specific-profile to pin xtend to Java 17

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-01 13:46:57 +02:00
Florian Hotze
be9cbf2649
[automation] Avoid memory leak on script loading failure (#4162)
Core part of the fix for https://github.com/openhab/openhab-addons/issues/16462.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-27 22:32:20 +01:00
Florian Hotze
e871dcfa47
[rest] TokenResource: Set SameSite attribute for session id cookie (#4160)
* [rest] TokenResource: Properly set SameSite attribute for session id cookie

Fixes #4159.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-27 22:31:29 +01:00
Florian Hotze
7f47d825a0
[rest] Add caching for add-on resource (#4107)
* [rest] Introduce a CACHE_CONTROL constant
* [rest] Add caching for add-ons endpoint

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-27 19:37:36 +01:00
Arne Seime
bf8b131701
Add REST call to get orphan links (#4115)
* Add REST call to get orphan links

Signed-off-by: Arne Seime <arne.seime@gmail.com>
Co-authored-by: Jan N. Klug <github@klug.nrw>
2024-03-23 23:02:14 +01:00
Mark Herwege
2daf94d7fc
REST response default persistence strategy when no persistence configuration (#4137)
* default persistence strategy in REST response

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-03-23 18:11:34 +01:00
Jacob Laursen
b3047c675a
[oauth] Fix exception wrapping (#4150)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-03-23 16:25:44 +01:00
Florian Hotze
c9ee992047
[automation] Allow empty script for script action & script condition (#4148)
* Script action: Allow script to be empty
* Short evaluate to reasonable defaults when script is empty

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-17 20:31:51 +01:00
Holger Friedrich
3850599163
Upgrade to Karaf 4.4.5 and Xtext 2.34 (#4133)
* Upgrade to Karaf 4.4.5 and Xtext 2.34

Upgrade Karaf from 4.4.4 to 4.4.5:
* Sync runtime dependencies with Karaf 4.4.5, most notably:
  * Jetty 9.4.53.v20231009
  * JNA 5.14.0
  * Pax Logging 2.2.6
  * Pax Web 8.0.24
  * ASM 9.6
* Resolve itest runbundles

Upgrade Xtext from 2.32 to 2.34
* Sync depencencies, most notably:
  * Guava 33.0.0
  * classgraph 4.8.165 changing provider to io.github.classgraph
* Migrate old Xtext generator xtext.generator to xtext.xtext.generator
  as xtext.generator has been removed from Xtext, affecting
  org.openhab.core.model.lazygen

* resolve runbundles
* Remove org.openhab.core.model.lazygen
  No longer in use since 2017, see eclipse-archived/smarthome#4122.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-03-17 09:41:15 +01:00
Holger Friedrich
cf7bff88ee
Bump maven-shade-plugin to 3.5.2 (#4152)
Allow for compiling with Java 21

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-03-17 09:24:36 +01:00
Arne Seime
137cc5eb49
[rest] Allow skipping ignored things in inbox (#4108)
* Allow skipping ignored things in inbox

Signed-off-by: Arne Seime <arne.seime@gmail.com>
2024-03-15 15:51:36 +01:00
joerg1985
12a6742189
[rest] special handling for StreamingOutput (#4145)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-03-12 18:58:31 +01:00
joerg1985
3d83c70184
[rest] refactored the Stream2JSONInputStream to simplify the logic (#4099)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-03-10 17:24:01 +01:00
Florian Hotze
977fa0329a
[rest] Enable filters for cacheable items list (#4119)
This allows the usage of filters when using `staticDataOnly=true`.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-10 11:41:52 +01:00
Mark Herwege
eeb69197c6
unitSymbol for GroupItem (#4106)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-03-10 10:07:52 +01:00
Florian Hotze
38b73bf989
[auth] Set doctype for auth page (#4129)
Fixes https://github.com/openhab/openhab-webui/issues/2443.

See https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-10 09:59:38 +01:00
joerg1985
094e4a6e04
[rest] stream json without starting a new thread (#4136)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-03-10 09:46:39 +01:00
openhab-bot
942929973d
New Crowdin updates (#4138)
* New translations addons.properties (French)

* New translations addons.properties (Finnish)

* New translations addons.properties (Hebrew)

* New translations units.properties (Finnish)

* New translations scriptprofile.properties (Hebrew)

* New translations units.properties (Hebrew)

* New translations addons.properties (Polish)

* New translations voice.properties (Polish)

* New translations units.properties (Polish)

* New translations addons.properties (Russian)

* New translations marketplace.properties (Russian)

* New translations units.properties (Russian)

* New translations addons.properties (Ukrainian)

* New translations validation.properties (Danish)

* New translations languagesupport.properties (Portuguese)

* New translations languagesupport.properties (Portuguese, Brazilian)

* New translations addons.properties (Danish)

* New translations scriptprofile.properties (Italian)
2024-03-10 09:41:35 +01:00
Florian Hotze
f4d6089eb0
Call, Contact, Image items: Don't create command descr from state descr (#4097)
* Contact item: Fix command descriptions provided even though commands are not accepted

If a state description is set on a contact item, currently a command description is automatically created as well.
This is wrong as contact items do not accept commands (except refresh) and caused the UI to display a control for the default (list) widget for these contacts.

* Also fix Call and Image items & Allow explicitly setting command description

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-03 13:20:10 +01:00
Holger Friedrich
bca1010c0e
Relax test to accept files with CRLF line endings (#4126)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-03-03 13:05:16 +01:00
Florian Hotze
81805ae6d9
[rest] Set editable for members of an item (#4118)
* [rest] Set editable for members of an item

Required by the UI.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-03 10:14:32 +01:00
Florian Hotze
d26aa080ab
Script profile: Fix deprecation warning (#4110)
Refs #4058.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-02 10:46:28 +01:00
GiviMAD
a94dd51cd3
[net] Expose Jetty EndPoint in http requests (#4092)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2024-03-02 09:08:48 +01:00
jimtng
97d64a156b
Add numericState and unit to StateDTO (#4123)
* Add numericState to StateDTO

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-01 18:43:02 +01:00
Gwendal Roulleau
06ee46dff6
Audio parsing : Fix byte / bit confusion (#4116)
Fix two errors for calculating bitrate and duration of sound.
In AudioSinkUtilsImpl : confusion between byte / bite
In AudioWaveUtils : confusion between byte / bite AND with the defintion of framesize (framesize already includes channels number)

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2024-03-01 18:06:04 +01:00
jimtng
b64e9723a9
Include StartLevelEvent in start level triggers (#4093)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-18 22:23:27 +01:00
Wouter Born
e628f75d7b
Upgrade jUPnP to 3.0.0 (#4098)
* Upgrades jUPnP from 2.7.1 to 3.0.0.
* Uses a custom OSGiUpnpServiceConfiguration for JDK-8301341 workaround

For release notes, see:

https://github.com/jupnp/jupnp/releases/tag/3.0.0

Signed-off-by: Wouter Born <github@maindrain.net>
2024-02-18 21:27:44 +01:00
Holger Friedrich
40e6202c5f
Minor extension to generic ip discovery (#3943)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-02-14 18:53:41 +01:00
J-N-K
d3fa049532
[persistence] Fix forecast for externally changed data (#4089)
Data added from the REST API is immediately stored in the selected persistence service, bypassing the `PersistenceManager`. Because of that the future values are not correctly "restored".

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-02-13 21:59:22 +01:00
lolodomo
a906d09b40
[sitemap] Add releaseOnly parameter to Slider sitemap element (#4084)
Related to #3430

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-02-12 20:12:19 +01:00
jimtng
0efaf23d4e
Fix the recursive group membership check (#4088)
Allow a group to be a member of its direct parent and also its parent's ancestors without raising an error.

Looping membership is still detected and prevented as before, thus Stack Overflow is still avoided.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-12 17:21:55 +01:00
J-N-K
d806771364
Fix CME in ReadyService (#4086)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-02-11 22:44:18 +01:00
Florian Hotze
6be00bd585
Script profile: Separate toHandlerScript for commands and states (#4058)
* Script profile: Separate toHandlerScript for commands and states

This allows much more fine-grained control for the script profile.
E.g. it is now possible to mimic the behaviour of the `system:follow` profile, but apply a script transformation to the forwarded state.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-06 21:29:19 +01:00
Wouter Born
f4e83693fb
Simplify Map operations using computeIfAbsent (#4020)
If the specified key is not already associated with a value (or is mapped to null), the given mapping function computes the value.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-02-06 20:34:05 +01:00
Jacob Laursen
823f993f56
Add dimension for emission intensity (#4069)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-02-06 20:20:55 +01:00
jimtng
c929e7dfe2
Fix reloading channel config changes in .items file (#4075)
* Apply channel config changes in .items file

Changes in channel config weren't applied because ItemChannelLink.equals() include the link configurations in the comparison. This caused the new link not being found in the set lookup, which leads to erroneously calling notifyListenersAboutAddedElement, when it should've called notifyListenersAboutUpdatedElement instead.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-04 11:23:10 +01:00
Wouter Born
85056d9d7b
Some more code cleanup (#4021)
This cleanup includes:

* Use enhanced for loops
* Use text blocks
* Use Objects.equals
* Fix some typos
* Remove redundant variable initialization
* Remove redundant null checks with instanceof
* Remove redundant thrown Exceptions
* Remove redundant empty String concatenation

Signed-off-by: Wouter Born <github@maindrain.net>
2024-02-04 11:17:55 +01:00
M Valla
2cca87a026
[transport.serial] add PORT_DISCONNECTED event (#4056)
Signed-off-by: MV <mvcode00@gmail.com>
2024-02-04 10:29:48 +01:00
J-N-K
fe4cbe546e
Improve YAML model repository (#4024)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-02-04 10:29:09 +01:00
Andrew Fiddian-Green
9b5e19e3af
AddonFinderProcess fixes (#4061)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2024-01-31 20:35:23 +01:00
Jacob Laursen
fb7e030ea5
Add command completion (#4063)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-01-27 20:59:34 +01:00
Jacob Laursen
5b9fee7d36
[discovery] Fix warnings (#4065)
* Remove unused imports and reference explicit namespaces in Javadoc links
* Fix potential null pointer access
* Remove redundant null checks and dead code
* Suppress deprecation warnings in tests

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-01-27 18:14:43 +01:00
lolodomo
a9571228d2
Remove state description when loading an item with a removed pattern (#4068)
* Remove state description when loading an item with a removed pattern

Fix openhab/openhab-webui#2251

Signed-off-by: Laurent Garnier <lg.hc@free.fr>

* Extended integration test testSquareBracketsInFormat

Signed-off-by: Laurent Garnier <lg.hc@free.fr>

---------

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-01-27 18:00:56 +01:00
joerg1985
5f8da67983
Use the ChannelUID to retrieve the Channel from a Thing (#4067)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-01-27 17:59:22 +01:00
joerg1985
7ea603c24c
Use precompiled regular expressions to validate the segments of a UID (#4064)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-01-24 21:25:14 +01:00
J-N-K
718839052a
Add console commands to manage add-ons (#4057)
* Add console commands to manage add-ons

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-01-21 19:13:01 +01:00
Matthew Skinner
4905805ea8
[marketplace] Update CommunityUIWidgetAddonHandler.java to give a more helpful error (#4052)
Installing from marketplace gives an Error that is not very helpful.

Couldn’t find the widget in the add-on entry

The cause was missing ```yaml code fence when a normal code fence was used. This used to work in the past so a number of widgets are done this way and will not install. Suggest a more useful message to help guide widget devs.

Signed-off-by: Matthew Skinner <matt@pcmus.com>
2024-01-21 08:41:08 +01:00
lolodomo
5c9f192764
Useful logs added in SitemapResource for REST API calls (#4054)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-01-20 22:25:18 +01:00
Wouter Born
6cf048434b
Replace Markdown backticks with JavaDoc code tags (#4023)
* Replace Markdown backticks with JavaDoc code tags

The proper way to format code with JavaDoc is using code tags and not Markdown backticks.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-20 09:56:41 +01:00
Wouter Born
c2a0739f1f
Fix several compiler warnings (#4041)
* Fix several compiler warnings

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

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-20 09:55:50 +01:00
J-N-K
0b1e1b66ab
Improve RemoteAddonService and fix test (#4049)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-01-17 18:31:29 +01:00
J-N-K
d3d0fe3995
Fix config parsing and version handling in RemoteAddonServices (#4043)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-01-15 22:42:49 +01:00
J-N-K
c82a9e69dc
Fix logging in ChannelCommandDescriptionProvider (#4040)
The class of the the broken provider should be logged, not the class of the command description.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-01-15 22:28:36 +01:00
J-N-K
5cea59bfb1
Improve marketplace add-on handling (#4019)
It has been reported several times that add-ons were not properly installed / missing after an upgrade or the installation of incompatible add-ons resulted in broken installations.

After an upgrade (or clean cache) the `AddonHandler`s try to re-install the add-ons from the download cache (`<userdata>/marketplace`). This happens without checking compatibility. This was needed before OH4, because the cache was the only source providing information about installed add-ons. This is now different, since we store the add-on information in a JSON database, so the UIDs of the add-ons are known.

This PR changes improves the add-on services. It now

1. Reads the information about the installed add-ons from the database and sets the installation status based on information from the handlers.
2. Removes all add-ons that are not installed from the JSON database and remembers their UIDs.
3. Refreshes the remote add-on list (including check for compatibility if not disabled).
4. Tries installation of the add-ons remembered in step 2. Since incompatible add-ons are missing in the add-on list, their installation fails and a warning is logged.

This PR is has two corresponding PR in openhab-distro and openhab-linuxpkg to ensure that the upgrade script and `openhab-cli` also clear the marketplace cache.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-01-14 21:46:53 +01:00
J-N-K
a6401fa4ac
Fix NPE in UpnpIOServiceImpl (#4038)
Fix #4037

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-01-14 19:14:00 +01:00
Wouter Born
6495f4e256
Upgrade Jollyday to 0.23.2 (#4033)
Upgrades Jollyday 0.5.10 (de.jollyday) to 0.23.2 of a more actively maintained fork (de.focus-shift).

* This adds many missing holidays.
* Also removes the workaround for the Danish Great Prayer Day introduced by #3573.

For release notes, see:

https://github.com/focus-shift/jollyday/releases

Fixes #3544

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-14 15:19:15 +01:00
Wouter Born
b77f954848
Improve ThreadPoolManagerTest stability (#4035)
When the CPU load of a system is high these timeouts may not be realistic.

Fixes #3254

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-12 21:42:02 +01:00
Wouter Born
18d9b531ff
Fix wrong class name logged in LocaleServiceImpl (#4034)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-12 21:37:48 +01:00
Jacob Laursen
6867f1e956
[discovery] Fix Instant serialization/deserialization regression (#4029)
* Fix Instant serialization/deserialization regression

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

* Consolidate serialization and deserialization in same type adapter

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

* Simplify deserializer

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

---------

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-01-12 08:39:11 +01:00
Andrew Fiddian-Green
9cb4b9ee1f
UsbSerialDiscovery service based on Windows registry (#3934)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2024-01-11 20:00:04 +01:00
Jacob Laursen
6b2182dec6
Refactor java.util.Date usages to java.time.Instant (#4026)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-01-07 20:51:46 +01:00
GiviMAD
3c61c1d649
[Audio] Add piped audio stream and fix raw PCM streams format (#3960)
* [Audio] Add piped audio stream and fix pcm format usage

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2024-01-07 14:18:50 +01:00
J-N-K
36cafd765f
Fix CurrencyUnit (#4016)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-01-05 18:20:43 +01:00
Wouter Born
8e7d5d880c
Fix JavaDoc build (#4018)
Caused by #3957

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-05 18:00:03 +01:00
Holger Friedrich
7bac24e58f
IpAddonFinder: Skip installed addons (#4013)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-01-04 22:27:18 +01:00
Wouter Born
c757819a15
Fix JavaDoc issues (#4004)
Fixes various issues including wrong parameter names, references, links and dangling JavaDocs.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-04 00:03:48 +01:00
Wouter Born
2babea4c9a
Update license headers to 2024 (#4011)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 21:20:34 +01:00
Wouter Born
6fc7700ea6
Use protected modifier with constructor of abstract classes (#4010)
Abstract classes should not have public constructors.
Constructors of abstract classes can only be called in constructors of their subclasses.
So there is no point in making them public.
The protected modifier should be enough.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 16:17:14 +01:00
Wouter Born
81a91ee9ae
Simplify adding elements to Collections (#4006)
* Simplify adding elements to Collections

This optimizes and simplifies the code that adds elements to Collections.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 14:51:33 +01:00
Wouter Born
afd1d4726c
Iterate using Map entries (#4003)
* Iterate using Map entries

Iteration using Map entries is preferred because it is more efficient and helps preventing NPEs.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 14:50:50 +01:00
Wouter Born
106c8b2270
Remove unnecessary semicolons (#4009)
This helps with stopping the proliferation of unnecessary semicolons.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 13:47:23 +01:00
Wouter Born
d162b82206
Fix String.format argument mismatches (#4008)
These argument mismatches cause wrong messages being logged and thrown in exceptions.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 13:13:53 +01:00
Wouter Born
26a958cd4d
Use static inner classes (#4002)
A static inner class does not keep an implicit reference to its enclosing instance.
This prevents a common cause of memory leaks and uses less memory per instance of the class.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 12:35:26 +01:00
Wouter Born
10c0cf8211
Simplify assertions (#3996)
* Simplify assertions

Using the appropriate assertion methods results in less and easier to read code as well as better error messages when assertions fail.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 12:24:50 +01:00
Wouter Born
564d6e673e
Fix SerialPort.getFlowControlMode() infinite recursion (#4007)
An infinite recursion would occur when calling this method.
I did not find any add-ons using this method but that could be due to this bug.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 12:15:41 +01:00
Wouter Born
58a106d36d
Use diamond operator (#4001)
Often the type can be inferred so the diamond operator can be used to simplify the code.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 08:22:43 +01:00
Wouter Born
dc5f50db63
Fix assertEquals order (#3995)
The first parameter should be the expected value and the second parameter the actual value.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-02 22:27:53 +01:00
Wouter Born
896b05e177
Replace or remove assert statements (#3994)
Java assertions are disabled by default so in this PR they are replaced/removed where applicable.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-02 22:21:42 +01:00
Mark Herwege
dbc3b19a4f
fix empty rule condition (#3993)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-01-02 19:51:11 +01:00
Wouter Born
041e3b5127
Remove redundant modifiers (#4000)
Removes redundant modifiers from the code.
These modifiers redeclare the default modifiers that apply to interfaces, enums etc.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-02 19:29:29 +01:00
Wouter Born
4e76d76088
Remove redundant array creation for calling varargs methods (#3997)
These array creations are unnecessary because arrays are created automatically for methods using varargs.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-02 19:01:34 +01:00
Wouter Born
89b67adbd7
Use isEmpty instead of 0 comparisons (#3999)
`isEmpty()` expresses the intent more clearly and is therefore preferred.
Counting the number of elements can also be an expensive operation e.g. when using linked lists.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-02 18:47:36 +01:00
J-N-K
a5316f920e
Refactor ThingHandlerService to an OSGi component prototype (#3957)
Also-by: Connor Petty <mistercpp2000+gitsignoff@gmail.com>
Signed-off-by: J-N-K <github@klug.nrw>
2024-01-02 13:09:51 +01:00
openhab-bot
1ddbe3180a
New translations addons.properties (Italian) (#3979) 2024-01-02 10:53:10 +01:00
Kai Kreuzer
30ae005956
Fix build number reporting at startup (#3991)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2024-01-02 10:40:02 +01:00
Wouter Born
7d1dcd7937
Add network-interface context (#3981)
This allows for selecting network interface names in configuration parameters.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-12-31 22:17:10 +01:00