Commit Graph

1931 Commits

Author SHA1 Message Date
J-N-K
d9bf8f7a15
[rest] add semantics query endpoint to item resource (#2985)
* [rest] add semantics query to item resource

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-10-30 15:50:36 +01:00
J-N-K
c24f0f3c6f
[automation] Fix ItemStateCondition for PercentType values (#3136)
* Fix ItemStateCondition for PercentType values

Dimmer items return their state as PercentType. The code did not properly handle PercentType because PercentType is a subclass of DecimalType. One value was converted by casting the value to DecimalType (which leads to 40 for 40%) while the other one used `.as` (which results in 0.4 for 40%). A comparison than of "state <= 50" with state = 20 is therefore executed as "20 <= 0.5"  which is not what the user would expect.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-10-29 13:17:48 +02:00
Cody Cutrer
a7d912d1e9
Fix invertible unit conversions when sent via a binding or uses in ItemUIRegistry (#3134)
* fix invertible unit conversions when sent via a binding
* do invertible unit conversion in ItemUIRegistry

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-27 20:26:27 +02:00
Cody Cutrer
e86f388a5b
Implement command completion in console for openhab command (#3111)
* Implement command completion in console for openhab command

And subcommands can implement it if they want. At the least the
CommandConsoleExtension's description will now be visible in
tab-completion.

I've also implemented detailed completion for openhab:items,
openhab:status, openhab:send, and openhab:update.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-22 10:52:31 +02:00
openhab-bot
73737e255a
New translations restauth.properties (Hebrew) (#3118) 2022-10-22 10:47:32 +02:00
Cody Cutrer
ccdf2c5573
Allow sending IncreaseDecreaseType directly to DimmerItem (#3116)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-17 08:05:02 +02:00
Cody Cutrer
3659542bae
Support mired units (#3108)
* Support mired units

Mired are fairly common to describe the color temperature of
lightbulbs (slightly less common than Kelvin), but are very
useful for various calculations when adjusting the color
temperature, as well as being necessary for various integerations
that require mired units.

This commit makes them a well-known unit (previously they were
still usable, using "MK^-1"), as well as making them easier to
work with on QuantityType. The hiccup is that Mireds aren't
technically a Temperature dimension, because they're a reciprocal.
So add a `inverse` method that delegates to javax.measure's
same method, and then use it as necessary when doing unit
conversions and comparisons. Unfortunately, because the
dimension changes, the return value of a conversion won't
necessarily be the same type, an additional method is added
for callers that are willing to handle the change in
dimension. This is implemented for all callers that can use
it in core.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-16 13:50:46 +02:00
Cody Cutrer
7f38d419c6
Allow sending QuantityType to NumberItem (#3115)
NumberItems always accept QuantityType

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-15 09:31:30 +02:00
openhab-bot
07be655b0e
New Crowdin updates (#3109)
* New translations automation.properties (Italian)
* New translations restauth.properties (German)
* New translations restauth.properties (Italian)
* New translations addons.properties (Italian)
* New translations restauth.properties (Danish)
* New translations restauth.properties (Finnish)
* New translations restauth.properties (Hungarian)
* New translations restauth.properties (Polish)
2022-10-15 09:27:02 +02:00
Christoph Weitkamp
389979c9da
Add more basic time-related classes for usage in script and rules (#3113)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-10-15 09:26:10 +02:00
J-N-K
ef3b13fce8
Fix AuthFilter crash if trusted network not configured (#3110)
* Fix AuthFilter crash if trusted network not configured

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-10-13 08:09:23 +02:00
GiviMAD
3ba0b8cf6d
[auth] grant implicit user role by network address (#3106)
* [auth] grant implicit user role by network

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2022-10-10 19:57:31 +02:00
openhab-bot
4096df1c64
New translations DefaultSystemChannels.properties (Norwegian) (#3098) 2022-10-05 18:44:21 +02:00
Cody Cutrer
5062ab5fb0
[rulesupport] sort JSR223 scripts by start level before filename (#3099)
The docs say that JSR223 scripts will be loaded in order of start level
(as defined by filename or containing folder). this works (mostly) fine
when you're stepping through start levels sequentially on startup, but if
you're already at SL100, and have scripts located in sl folders, and then
install an addon for those scripts, they were loading in alphabetic
order instead. This ensures they'll still respect start level order
relative to each other.

This should also fix the case of script start levels not matching
start levels OpenHAB actually steps through (which are all multiples
of 10) - i.e. if you define scripts in sl30, sl31, and sl32, when
OpenHAB jumps from 30 to 40, 31 should be executed before 32.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-05 18:43:48 +02:00
Christoph Weitkamp
93a8a214cf
Use Timer identifier when rescheduling the timer (#3095)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-09-29 14:05:09 +02:00
J-N-K
6d6250eb63
[transformation] Add swp to ignored extensions in FileTransformationProvider (#3094)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-09-27 18:32:19 +02:00
Dan Cunningham
b808ea6d13
Add live packet to SSE item state connections (#3086)
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2022-09-26 19:09:33 +02:00
Cody Cutrer
065e33f5ab
Fix StartLevelService "hanging" if config is changed. (#3092)
Unregistered trackers aren't clear, so then we never register new trackers,
and thus never get notified of any changes.

Signed-off-by: Cody Cutrer <cody@cutrer.us>

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-09-25 09:44:57 +02:00
openhab-bot
92105d9a28
New translations DefaultSystemChannels.properties (Italian) (#3088) 2022-09-23 18:16:28 +02:00
Wouter Born
7b0b70ca4a
Improve binding archetype for Crowdin usage (#3089)
With these changes the proper translations file will be created.
The updated comments should prevent review comments and rework.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-09-23 18:15:50 +02:00
Wouter Born
149a9e9ee1
Upgrade Californium to 2.7.3 (#3085)
Upgrades Californium from 2.0.0 to 2.7.3 which has many fixes.

For release notes see:

* https://projects.eclipse.org/projects/iot.californium/governance

Replaces #3061, #3062

Signed-off-by: Wouter Born <github@maindrain.net>
2022-09-21 07:48:58 +02:00
J-N-K
0f82c38eea
Normalize thing configuration before initialization (#3024)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-09-20 22:15:24 +02:00
J-N-K
e3b90e32ce
Normalize Metadata configuration from managed provider (#2958)
* Normalize Metadata configuration from managed provider

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-09-20 21:20:27 +02:00
J-N-K
4a84b80c2c
Fix missing initial thing status event (#3072)
* Fix missing initial thing status event

A thing always has a status. This status is not properly propagated to the event bus when the thing is added. This e.g. leads to a situation where a thing's first status that is received by am event subscriber is "INITIALIZING" instead of "UNINITIALIZED". The status should always be sent so that the thing lifecycle can properly be tracked by event listeners.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-09-20 21:04:52 +02:00
J-N-K
dca8088fb4
Improve FeatureInstaller (#3049)
* Improve FeatureInstaller
* Remove unnecessary synchronized and clean up processing
* Re-add refeshing bundles after all configuratzion changes are processed
* Prevent unnecessary refreshes
* Make JNA part of the tp

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-09-18 10:43:12 +02:00
openhab-bot
8ebc8204c7
New Crowdin updates (#3082)
* New translations units.properties (Portuguese)

* New translations units.properties (Portuguese, Brazilian)

* New translations DefaultSystemChannels.properties (German)

* New translations DefaultSystemChannels.properties (Hungarian)

* New translations units.properties (Portuguese)

* New translations units.properties (Portuguese, Brazilian)

* New translations DefaultSystemChannels.properties (Polish)

* New translations DefaultSystemChannels.properties (Finnish)

* New translations DefaultSystemChannels.properties (Hebrew)

* New translations DefaultSystemChannels.properties (Danish)
2022-09-18 10:11:32 +02:00
Jacob Laursen
27c2887c8f
Fix access token serialization/deserialization (#3083)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-09-15 19:59:46 +02:00
Christoph Weitkamp
cda7b098bd
[thing] Added default channel types for electrical energy (#3079)
* Added default channel types for electrical energy

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-09-11 14:39:36 +02:00
Christoph Weitkamp
f33492d9be
[tls] Rethrow 'IOException' instead of swallowing it (#3078)
* Rethrow IOException instead of swollowing it

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-09-10 20:22:38 +02:00
Christoph Weitkamp
5e72011d91
Check for an existing thing handler before updating config (#3080)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-09-10 20:22:18 +02:00
Mark Herwege
c61ea770a5
Add visibility and color parameters to UI sitemap provider (#3075)
* add visibility and color parameters

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2022-09-06 19:21:02 +02:00
openhab-bot
584e36898a
New translations validation.properties (Luxembourgish) (#3074) 2022-09-03 19:55:46 +02:00
Anders Alfredsson
80794bfdcd
Use configured locale for SSE displayState (#3069)
Signed-off-by: Anders Alfredsson <andersb86@gmail.com>

Signed-off-by: Anders Alfredsson <andersb86@gmail.com>
2022-08-27 19:29:53 +02:00
Wouter Born
f69f6fa618
Add additional MqttBrokerConnectionConfig options (#3068)
Signed-off-by: Wouter Born <github@maindrain.net>
2022-08-25 21:37:31 +02:00
J-N-K
6c9b7676e4
Prevent crash on invalid entry in ManagedThingProvider (#3053)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-08-22 17:40:01 +02:00
Jacob Laursen
9bb88a1b7b
[oauth] Migrate usage of LocalDateTime to Instant (#3066)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-08-22 08:13:52 +02:00
jimtng
8f745b0d3d
Fix timezone handling in DateTimeTrigger (#3060)
* [DateTimeTrigger] Adjust to system timeline
* [DateTimeTrigger] Add tests for DateTimeTriggerHandler

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2022-08-12 08:47:06 +02:00
Flole998
6758aacba5
Add "time only"-Option for DateTimeTrigger in rules (#3051)
Signed-off-by: Flole <flole@flole.de>
2022-08-06 17:26:08 +02:00
openhab-bot
c4f0ab44df
New Crowdin updates (#3054)
* New translations units.properties (Portuguese)

* New translations units.properties (Portuguese, Brazilian)

* New translations firmware.properties (Slovenian)

* New translations units.properties (Slovenian)

* New translations validation.properties (Slovenian)

* New translations messages.properties (Slovenian)

* New translations tags.properties (Danish)

* New translations tags.properties (Slovenian)

* New translations DefaultSystemChannels.properties (Slovenian)

* New translations LanguageSupport.properties (Slovenian)

* New translations SystemProfiles.properties (Slovenian)

* New translations jsonStorage.properties (Slovenian)

* New translations network.properties (Slovenian)

* New translations i18n.properties (Slovenian)

* New translations voice.properties (Slovenian)

* New translations chart.properties (Slovenian)

* New translations persistence.properties (Slovenian)

* New translations addons.properties (Slovenian)

* New translations restauth.properties (Slovenian)

* New translations ephemeris.properties (Slovenian)

* New translations inbox.properties (Slovenian)

* New translations audio.properties (Slovenian)

* New translations hli.properties (Slovenian)

* New translations lsp.properties (Slovenian)

* New translations marketplace.properties (Slovenian)

* New translations sitemap.properties (Slovenian)

* New translations SystemThingStatusInfos.properties (Slovenian)

* New translations magic.properties (Slovenian)

* New translations automation.properties (Hebrew)

* New translations automation.properties (Slovenian)
2022-08-03 18:03:28 +02:00
J-N-K
193da095a8
fix javadoc (#3047)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-07-21 11:27:25 +02:00
J-N-K
1276932c29
Fix build warnings in addons (#3046)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-07-21 11:26:24 +02:00
J-N-K
ae3d7c749c
Add REST support for deleting links and removing orphaned links (#2970)
* add link remove for item to registry

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-07-19 09:24:47 +02:00
J-N-K
b6acaf7887
[rest] Allow bulk deletion of metadata (#2984)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-07-18 08:50:30 +02:00
J-N-K
836ae89489
Wait for thing-type available in PersistentInbox (#2981)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-07-17 21:15:48 +02:00
J-N-K
603988a963
Enrich distribution add-on with configDescriptionURI (#3045)
When changing to addon.xml later, this can be extended to all add-ons. It is necessary to improve the UI code for changing add-on log levels.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-07-17 21:04:25 +02:00
openhab-bot
13beca58ce
New translations hli.properties (Danish) (#3044) 2022-07-17 13:14:47 +02:00
openhab-bot
f84d72d449
New Crowdin updates (#3043)
* New translations messages.properties (Danish)

* New translations audio.properties (Danish)

* New translations inbox.properties (Danish)

* New translations addons.properties (Danish)

* New translations persistence.properties (Danish)

* New translations lsp.properties (Danish)

* New translations sitemap.properties (Danish)

* New translations SystemThingStatusInfos.properties (Danish)
2022-07-15 19:16:14 +02:00
J-N-K
16cf5a8ae1
Fix marketplace add-on uninstall (#3042)
Instead of using the full id (`marketplace:123456`) the id without service prefix was used to lookup installed add-ons. This is not an issue if the network is available because then the information is request from the forum. If no network connection is present it obviously fails.

This also reduces the log level in the case of connection issues. ERROR is to much and the stack trace is not necessary.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-07-14 22:49:37 +02:00
J-N-K
0b7fc242d4
Enhance transformation configuration (#3036)
* Enhance transformation configuration

This is needed to give the users the best experience when editing transformations in UI.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-07-14 21:00:53 +02:00
openhab-bot
2909945998
New Crowdin updates (#3038)
* New translations ephemeris.properties (Danish)

* New translations automation.properties (Hungarian)
2022-07-14 18:10:38 +02:00