Commit Graph

2663 Commits

Author SHA1 Message Date
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
Holger Friedrich
593681a681
Harmonize library versions (#4228)
* Use jdt.annotation 2.2.100 (i18n tool)
* Use gson 2.10.1 (i18n tool, upgrade tool)
* Use logback 1.3.14 (test)

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-05-14 20:56:00 +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
Holger Friedrich
10a20af50c
[CI] Add Java 21 compiling to J17 and native J21 (#4186)
* [CI] Add Java 21 compiling to J17 and native J21

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-21 11:47:40 +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