Commit Graph

939 Commits

Author SHA1 Message Date
Christoph Weitkamp
259af7aaef
Fix java.lang.UnsupportedOperationException in StateDescriptionFragmentBuilder (#1405)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-05 17:53:48 +02:00
Christoph Weitkamp
86dc92b6c8
Replace unit placeholder in patterns if updated by DecimalType states (#1404)
* Replace unit placeholder in patterns if updated by DecimalType states

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-05 17:52:30 +02:00
Wouter Born
1f825fc529
Fix null analysis errors in Eclipse (#1403)
Without helping the compiler a bit, it will show null analysis errors in Eclipse.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-04 18:09:44 +02:00
Jonathan Gilbert
c9f1bf6d31
[automation] Add script extension to allow scripts to track their disposal (#1264)
* Added script extension to allow scripts to track their disposal

Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2020-03-27 22:25:10 +01:00
Jonathan Gilbert
caf912bc99
[automation] Added API for ScriptEngineFactory implementations to pull presets (#1256)
* Added API for ScriptEngineFactory implementations to pull presets

Existing API only allows engine factory implementors to request presets are pushed into existing scopes, rather than returning them directory, so that they can be bound into module or library systems. This change allows implementors to capture the presets requested (and potentially ignore any pushed), and therefore expose them via idiomatic import mechanisms for the language being implemented

Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2020-03-27 22:22:04 +01:00
Yannick Schaus
15b3b07614
Add the Karaf jaas feature as runtime prerequisite (#1398)
* Add the Karaf jaas feature as runtime prerequisite
* Remove LoginModule reference from ManagedUserRealm

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-03-25 12:40:59 +01:00
Yannick Schaus
d8fce0b8b3
Add auth feature to runtime base (#1396)
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-03-24 08:49:52 +01:00
Yannick Schaus
fe4e276b68
Implementation of a JWT-based OAuth2 flow for the admin API (#1389)
* Initial implementation of a JWT-based OAuth2 flow for the admin API

Implements #1388.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-03-23 22:36:11 +01:00
Christoph Weitkamp
a06eb598d7
[uom] Fixed intensity conversion from W/m² to µW/cm² (#1394)
* Fixed intensity conversion from W/m² to µW/cm²

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-03-22 12:03:01 +01:00
Wouter Born
2681b5d90b
Remove MagicHttpResource (#1390)
For ESH it made sense to use this but nowadays these UIs are no longer part of openhab-core and the demo app used for development is in openhab-distro.
Furthermore it provides links to UIs that are no longer part of OH3, uses ESH logos and the new Default UI is also using / so it throws exceptions.

See: https://github.com/openhab/openhab-distro/pull/1084#issuecomment-596226652

Signed-off-by: Wouter Born <github@maindrain.net>
2020-03-14 23:19:42 +01:00
Kai Kreuzer
427e969ef9
[persistence] Allow persistence services to define default strategies (#1387)
* Allow persistence services to define default strategies
* Added null annotations

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-03-09 21:57:44 +01:00
Kai Kreuzer
857679f66b
removed ThingLinkManager and with it the auto-linking feature and "Simple Mode" (#1385)
* removed ThingLinkManager and with it the auto-linking feature and "Simple Mode"

Signed-off-by: Kai Kreuzer <kai@openhab.org>

* removed feature from REST API as well

Signed-off-by: Kai Kreuzer <kai@openhab.org>

* removed tests

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-03-03 00:23:04 +01:00
Kai Kreuzer
d89fd33472
removed legacy add-on support (#1386)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-03-03 00:19:11 +01:00
Kai Kreuzer
0182ce567d
fixed service pids (#1382)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-03-01 16:40:01 +01:00
Scott Rushworth
5710532b05
[automation] Improve file extension exclusion (#1370)
This change improves the way file extensions are excluded from ScriptFileWatcher. Discussed [here](https://github.com/openhab/openhab-core/pull/1367#discussion_r379914147).

Signed-off-by: Scott Rushworth <openhab@5iver.com>
2020-02-27 12:50:50 +01:00
Kai Kreuzer
2bb50f8255
fixed default service pid and removed esh traces in service configuration (#1380)
* fixed default service pid and removed esh traces in service configuration
* fixed default service.cfg location

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-02-27 12:49:56 +01:00
Christoph Weitkamp
253f9ab6ea
Add implicit import for units to rule models (#1376)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-02-26 19:43:50 +01:00
Yannick Schaus
3f48088f94
Fix NPE with uninitialized state trackers (#1378)
This fixes a NPE which occurs when a ItemStateChangedEvent
is broadcasted by the ItemStatesSseBroadcaster while some
SseStateEventOutputs haven't initialized their list of
tracked items.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-02-26 19:18:43 +01:00
Christoph Weitkamp
4258d87d4a
Small improvements for SmartHomeUnits (#1377)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-02-25 19:48:48 +01:00
Yannick Schaus
4b772cb6b3
Simple dynamic item state updates SSE endpoint & API. (#1364)
* Simple dynamic item state updates SSE endpoint & API.

Implements #1363.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-02-24 18:36:39 +01:00
Roland Rosenfeld
730a8e1e61
[ephemeris] isBankHoliday(offset, filename) now really uses the filename (#1375)
Closes: #1374

Signed-off-by: Roland Rosenfeld <roland@debian.org>
2020-02-24 13:06:08 +01:00
Scott Rushworth
1cb17e1a7d
[automation] Corrected issue where scripts were not starting when OH restarted (#1367)
* Corrected issue where scripts were not starting when OH restarted

Fixes #841

Signed-off-by: Scott Rushworth <openhab@5iver.com>
2020-02-17 13:43:27 +01:00
pali
b15145a078
Added Bq/m³ and ppb units (#1368)
Signed-off-by: Pauli Anttila <pauli.anttila@gmail.com>
2020-02-17 08:50:19 +01:00
Yannick Schaus
60e040c529
Metadata-based state & command description providers (#1362)
* Metadata-based state & command description providers

Implements #1185.

These providers will look into item metadata, which
can be managed by UIs with the API, to set or override
the item's state description (pattern, options, read
only...) or command description.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-02-15 18:08:42 +01:00
Kai Kreuzer
76153dcab0
Revert "Enabled spotless:check by default (#1303)" (#1366)
This reverts commit bb9308d8f5.
2020-02-13 21:41:35 +01:00
Yannick Schaus
eea31e536d
UI component registries initial implementation (#1356)
* UI component registries initial implementation

This is an initial implementation of #1355.
It was simple enough to make to be proposed as
a PR already without waiting for remarks on the RFC.

The SitemapProvider for the `system:sitemap`
namespace as described in #1355 is not part of
this PR.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-02-13 21:36:54 +01:00
Christoph Weitkamp
11fa4fad4a
Removed dependency on 'org.apache.commons.exec' (#1359)
* Removed dependency on 'org.apache.commons.exec'
* Use StringBuilder

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-02-12 13:20:06 +01:00
Mark Hilbush
2cf5931de2
Reenable javadoc generation (#1345)
Signed-off-by: Mark Hilbush <mark@hilbush.com>
2020-02-12 00:13:56 +01:00
Christoph Weitkamp
bb9308d8f5
Enabled spotless:check by default (#1303)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-02-12 00:07:18 +01:00
Christoph Weitkamp
79523d3a99
Removed usage of org.apache.commons.lang.ArrayUtils (#1357)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-02-07 13:42:18 +01:00
silamon
bb3e8694e3
ChannelDTO bugfixes (#1346)
* Fix bug in ChannelDTOMapper
* Add AutoUpdatePolicy to ChannelDTO

Also-by: Christoph Weitkamp <github@christophweitkamp.de>
Signed-off-by: Simon Lamon <simonlamon93@hotmail.com>
2020-02-02 21:56:01 +01:00
Michael Reitler (former Michael Dicke)
e7f49dc462
[ThingManagerImpl] Prevent multiple handler inits on thing enabling (#1353)
When a thing is enabled, the `ThingManagerImpl` takes care of calling `ThingHandler#initialize()`.
That makes totally sense if the thing was disabled before. However, if `setEnabled(thingUID, true)` is called for a thing which was already enabled, it causes an additional initialization.
Since concurrent hanlder initializations may cause trouble, it is safer to prevent this. Therefore enabling a thing (including starting its thing handler) should only be performed if the thing is disabled.

Signed-off-by: Michael Reitler <michael.dicke@smail.inf.h-brs.de>
2020-02-02 21:53:25 +01:00
Nagy Attila Gábor
487db7e7ea
Added and fixed units for reactive and apparent power (#1347)
* var and varh were missing
* var is basically an alternate form of WATT
* kvarh was incorrectly marked as a division between kvar and hour
* Volt-Ampere added to the units

This unit for apparent power in an electrical circuit. Useful for smart meters and solar inverters.

Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
2020-02-01 21:47:19 +01:00
Arne Seime
e63db5f5c5 Added spotless plugin to build/plugins (#1334)
Signed-off-by: Arne Seime <arne.seime@gmail.com>
2020-01-28 16:53:10 +01:00
Christoph Weitkamp
8b8b5fa0b4 [voice] Simplify lifecycle by using constructor injection (#1343)
* [voice] Simplify lifecycle by using constructor injection
* Removed usage of org.apache.commons.lang.ArrayUtils

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-27 17:55:49 +01:00
Christoph Weitkamp
28afe7d866 Remove not needed object array creation for logging (#1344)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-27 09:22:17 +01:00
Christoph Weitkamp
ac537c53d9 Added public method to remove all members from a group (#1283)
* Added public method to remove all members from a group
* Spelling in itest method names
* File encoding

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-26 12:54:37 +01:00
Kai Kreuzer
86899daf1a replaced Joda Time by Java Time (#1342)
* replaced Joda Time by Java Time

Signed-off-by: Kai Kreuzer <kai@openhab.org>

* removed joda from target platform feature

Signed-off-by: Kai Kreuzer <kai@openhab.org>

* updated tests

Signed-off-by: Kai Kreuzer <kai@openhab.org>

* fixed persistence extension tests

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-01-25 22:44:03 +01:00
Kai Kreuzer
32c1978a1a Added hashCode and equals method to StringListType to fix object comparison (#1341)
* Added hashCode and equals method to StringListType to fix object comparison

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-01-25 20:35:24 +01:00
Christoph Weitkamp
7d8296ed81 [persistence] Fixed JavaDoc for persistence extension (#1338)
* Fixed JavaDoc for persistence extension

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-25 20:07:55 +01:00
Christoph Weitkamp
8a9d007e0b Added nullness annotations to 'ThingActions' and 'ThingHandlerService' (#1317)
* Minor code improvements; Added nullness annotations to ThingActions and ThingHandlerService
* Revert renaming of 'thingRegistry' property

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-25 16:21:47 +01:00
Christoph Weitkamp
b30c1da741 Added unit test for persistence extension (#1337)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-25 16:17:18 +01:00
Yannick Schaus
d4b0ecb122 Add filters to some REST getAll endpoints (#1340)
These filters help reduce payloads for UIs which
retrieve ad-hoc information rather than maintaining
a global state.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-01-24 19:25:25 +01:00
Christoph Weitkamp
2c8de49231 Applied spotless formatter (#1335)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-19 14:40:09 +01:00
Kai Kreuzer
9a6a54f113 switched to SAT 0.9.0 (#1331)
* switched to SAT 0.9.0
* added sat extension

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-01-18 11:07:18 +01:00
Mark Hilbush
8121fec350 [oauthclient] Reduce log level to debug for token refresh (#1332)
Signed-off-by: Mark Hilbush <mark@hilbush.com>
2020-01-17 22:44:38 +01:00
Christoph Weitkamp
08da8de5cf Moved "ESH-INF/" folders to "OH-INF/" folders (#1328)
* Moved ESH-INF folders to OH-INF folders

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-17 15:29:18 +01:00
Yannick Schaus
cc702266fe Refactor dashboard tiles into core (#1329)
* Refactor dashboard tiles into core

Move the tile concept from the dashboard UI to the
org.openhab.core.ui bundle, and add a REST resource
(/rest/ui/tiles) to retrieve the list of tiles i.e.
registered UIs.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-01-17 15:28:05 +01:00
Jochen Klein
cc3f1407bd [mqtt] Keep track of retained messages
Closes #1279

Signed-off-by: Jochen Klein <git@jochen.susca.de>
2020-01-15 09:42:27 +01:00
Wouter Born
18d0a52d02 Switch to Java 11 and drop Java 8 support (#1305)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-01-12 22:32:28 +01:00