Commit Graph

1243 Commits

Author SHA1 Message Date
Wouter Born
b2c045d0fe
Fix build by wrapping lines (#1729)
Caused by #1713

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-19 11:42:26 +02:00
Yannick Schaus
e26c49b9bf
Allow basic authentication to authorize API access (#1713)
* Allow basic authentication to authorize API access

Closes #1699.

Note, this opens a minor security issue that allows an attacker
to brute force passwords by making calls to the API - contrary to
the authorization page, the credentials parsing for the REST API
is stateless & doesn't have a lock mechanism to lock user accounts
after too many failed login attempts.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-10-18 20:59:51 +02:00
Wouter Born
4c31c0b3ff
Fix issues with configuration PIDs (#1727)
* Fixes warnings about "using different service PIDs"
* Fixes missing default values

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-18 18:02:13 +02:00
Wouter Born
3d88e91952
Open ProviderTracker asynchronously when activating AbstractRegistry (#1719)
* Open ProviderTracker asynchronously when activating AbstractRegistry

Fixes #890

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-18 00:31:13 +02:00
Christoph Weitkamp
4ba70778d1
Added validation for relation between ThingUID and BridgeUID (#1704)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-10-17 17:59:34 +02:00
Wouter Born
605c1c238c
Add Automation extension type (#1722)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-17 15:08:53 +02:00
Wouter Born
a70dd39a6b
Fix JSR223 JavaScript files not loading (#1725)
This adds a missing feature required for being able to load JSR223 JavaScript rules out of the box.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-17 15:03:36 +02:00
Kai Kreuzer
8a3d438c4f
upgraded JmDNS to version 3.5.6 (#1721)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-10-16 12:52:25 +02:00
Kai Kreuzer
5d830d64f0
Fixed missing item resolution of DSL scripts created through the UI (#1720)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-10-15 23:04:30 +02:00
Kai Kreuzer
70fed5a9c2
Fixed initialization of group items with aggregation functions (#1718)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-10-15 23:03:22 +02:00
Kai Kreuzer
e9ffff9f01
Fixed name of measurement systems (#1717)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-10-14 22:46:55 +02:00
Wouter Born
0d1a15ef34
Update ActionService and ThingActions classes in Xtext cache (#1714)
Xtext uses a cache for looking up classes when rules are run.
It also adds a null class value to this cache when a class is not found.

Once a value has entered the cache it will not be updated.
This causes the cache to return the wrong class (or the null value) when
calling static methods on ActionService and ThingActions classes that
were added/updated.

With the changes in this PR Xtext will be configured to use a custom cache
that updates the ActionService and ThingActions class references.

The PR also has a fix for the AnnotatedThingActionModuleTypeProvider not
properly sending ModuleType removed events when all ThingActions
registrations have been removed.

Fixes #1265
Fixes #1694

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-13 23:17:57 +02:00
Wouter Born
7d8126e89f
Fix ScriptEngine parameter option removal (#1716)
When one of the engines is unset the ScriptModuleTypeProvider clears all parameter options instead of only those that apply to that engine.
This fixes the Nashorn engine missing from the parameter options on the first openHAB startup.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-13 23:13:30 +02:00
Connor Petty
a29490a545
Fix and cleanup logging in ExecUtil (#1705)
* Fix and cleanup logging in ExecUtil

Signed-off-by: Connor Petty <mistercpp2000+gitsignoff@gmail.com>
2020-10-11 22:19:42 +02:00
Wouter Born
ab1fa65aa1
Improve JwtHelper exception handling (#1712)
Catch specific exceptions and don't log errors but instead add an appropriate message and preserve the stacktrace.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-11 10:03:39 +02:00
Wouter Born
23e8f18e7f
Use openhab-addons-deps Maven repository for all Xtext Orbit bundle dependencies (#1711)
Fixes #960

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-11 09:58:51 +02:00
Kai Kreuzer
351fcb1852
Include measurement system in REST root resource (#1710)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-10-10 20:04:25 +02:00
Wouter Born
76f51026aa
Simplify core features to prevent unnecessary bundle refreshes (#1709)
It seems that when multiple features install the same bundle it may cause Karaf to refresh bundles when (un)installing features.
When the (redundant) openhab-core-automation feature is removed and the serial dependencies are merged into the openhab-transport-serial feature these restarts due these bundle refreshes no longer occur.

Fixes #1322, #1354

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-10 18:24:13 +02:00
Wouter Born
159aefffa5
Remove unused DBus Transport (#1708)
Related to #960

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-10 08:08:22 +02:00
Connor Petty
0dfda1e7f6
Make ExecUtil more robust (#1700)
Signed-off-by: Connor Petty <mistercpp2000+gitsignoff@gmail.com>
2020-10-08 18:38:04 +02:00
Christoph Weitkamp
c4b76a0ad1
Added action for 'isBankHoliday(<file>)' (#1703)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-10-07 22:03:15 +02:00
Wouter Born
1edf25b4f9
Prevent IllegalStateException when closing SSE sink (#1698)
* Prevent IllegalStateException when closing SSE sink
* Simplify code and log exceptions on debug

There seem to be no issues anymore with the exception handling when SSE clients disconnect so simplify the exception handling.
Suppressing exceptions based on error message is also likely to break when new exceptions are added or messages change.
There are also still exceptions that get logged with "failure" but from which the code seems to recover without any issues.

Fixes #1499

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-07 20:20:52 +02:00
Wouter Born
44b1823e97
Fix two typos (#1691)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-05 09:03:27 +02:00
Yannick Schaus
b7a764f358
Remove actions from available add-on types (#1690)
Since there are no more action add-ons in the distribution, I'd suggest to remove these from the `KarafAddonService` so they won't appear in the UI menus.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-10-04 22:38:42 +02:00
Wouter Born
6a55834c63
Remove Jackson 1.x compile dependency (#1689)
It doesn't seem to be used by anything and it is also not part of the target platform.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-04 21:19:38 +02:00
Wouter Born
d1629e50f3
Upgrade to XStream 1.4.13 (#1688)
* Fixes bugs (vulnerabilities/performance issues)
* Supports OSGi better
* Prevents illegal reflective access warnings on newer Java versions
* Supports java.time converters

For XStream release notes see: https://x-stream.github.io/changes.html

The XmlDocumentReader which uses XStream has also been modified to configure XStream security to prevent "Security framework of XStream not initialized, XStream is probably vulnerable" warnings.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-04 19:56:44 +02:00
Wouter Born
abd2630777
Upgrade Xtext/Xtend to 2.23.0 and LSP 0.9.0 (#1685)
Upgrades to:

* Xtext 2.23.0
* Xtend 2.23.0
* LSP 0.9.0

For Xtext release notes see: https://www.eclipse.org/Xtext/releasenotes.html#/releasenotes/2020/09/01/version-2-23-0

The Xtext dependencies are now managed using their BOM which makes it easier to keep them in sync.

Because Xtext depends on a newer ASM version some runtime dependencies were also upgraded:

* ASM 8.0.1
* Pax Web 7.2.15
* XBean 4.17.0

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-04 12:27:58 +02:00
Hilbrand Bouwkamp
11935a8ad8
Removed obsolete guava dependencies from feature files (#1682)
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2020-10-03 12:37:23 +02:00
Wouter Born
af266b5d9f
Upgrade to Jollyday 0.5.10 (#1684)
With some excludes and the upgraded JAXB I got the most recent Jollyday version working.
The integration tests also succeed again on Java 11.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-03 11:04:25 +02:00
Wouter Born
3bf2f4934d
Upgrade Maven compiler and fix/upgrade some TP dependencies (#1683)
Upgrades the compiler and its dependencies so the compiler results of Maven builds are more similar to those generated in recent Eclipse versions.

To fix compilation issues in Eclipse for add-ons using classes from javax.xml.stream several dependencies were upgraded/excluded.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-02 23:36:37 +02:00
Wouter Born
3b16f2ce7c
Filter empty i18n config parameter options (#1680)
* Filter empty i18n config parameter options

There are many locales that do not have a country resulting in these empty parameter options.

Related to #1662

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-02 14:25:52 +02:00
Wouter Born
b62d494bf0
Sort Ephemeris config parameter options (#1681)
Fixes #1663

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-02 08:19:02 +02:00
Wouter Born
9739271b52
Fix sitemap subscription cleanup (#1679)
* Add listener to SseBroadcaster so sseEventSinkRemoved events are handled
* Use Instant instead of long for tracking subscription creation times
* Run cleanup every 2 minutes instead of every 5 minutes

Fixes #1674

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-02 08:11:31 +02:00
Wouter Born
369e678a63
Remove remaining deprecated MQTT transport code (#1671)
This removes the remaining deprecated MQTT transport code which was not part of #1668.

Related to #1408

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-24 19:36:11 +02:00
Wouter Born
245a692705
Remove deprecated MQTT transport code (#1668)
Related to #1408

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-24 14:57:01 +02:00
Wouter Born
6b97328189
Fix ConfigurableService deprecations (#1666)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-24 14:55:50 +02:00
Wouter Born
c5541a0391
Remove deprecated handleUpdate from ThingHandler (#1669)
The handleUpdate method was deprecated when profiles were introduced (see eclipse-archived/smarthome#4108).
Instead the "follow profile" can be used which forwards item updates as commands to handlers.
This profile works with any binding instead of only those that implement the handleUpdate method.

Related to #1408

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-24 14:53:33 +02:00
Wouter Born
de5654d5d5
Exclude transitive JAXB 2.3 dependencies (#1670)
The add-ons still depend on JAXB 2.2 so it for instance caused the avmfritz itest to fail.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-24 14:50:49 +02:00
Wouter Born
2dd1a03abd
Fix item channel links not properly initialized (#1634)
* Fix item channel links not properly initialized
* Add ChannelLinkNotifierOSGiTest
* Send at most one channelLinked event per linked thing channel when activating ChannelLinkNotifier
* Send channelUnlinked event only if all items are unlinked
* Use Registry stream instead of getAll

Fixes #1596

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-24 08:41:05 +02:00
Wouter Born
d33598ae54
Remove deprecated default methods (#1667)
Removes:

* ConfigOptionProvider.getParameterOptions(URI, String, Locale) (see also #1541)
* DiscoveryListener.removeOlderResults(DiscoveryService, long, Collection<ThingTypeUID>)

Related to #1408

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-23 19:06:29 +02:00
Wouter Born
f845772ab0
Remove deprecated BaseThingHandler.initialize() (#1665)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-23 13:33:05 +02:00
Wouter Born
fb83864eb9
Fix transformation file path with locale specific files (#1661)
The path is incorrect because a bug was introduced in #1650.
This results in the MapTransformationServiceTest failing so it was disabled in openhab/openhab-addons#8519.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-22 08:20:11 +02:00
Wouter Born
fabf6808ec
Remove deprecated ConfigConstants (#1659)
Related to #1408

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-21 22:57:23 +02:00
Wouter Born
289ad31afd
Remove Eclipse project files from binding archetype (#1660)
Related to openhab/openhab-addons#8451

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-21 22:49:13 +02:00
Wouter Born
979e80ee9e
Fix callback not added to new PageChangeListener (#1658)
Fixes #1655

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-20 14:28:06 +02:00
Christoph Weitkamp
fc65deca01
Reduced logging level to warn (#1657)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-09-19 16:00:37 +02:00
Wouter Born
d12c30dfcf
Upgrade Aries JAX-RS Whiteboard to 1.0.9 (#1656)
This version uses CXF 3.2.13 which has some SSE fixes.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-19 15:59:48 +02:00
HoLLe
5ab248c158
[REST API] fixed small typo (#1654) 2020-09-19 13:02:56 +02:00
Kai Kreuzer
fa18610d77
[core] Make logger in QuantityType transient (#1652)
This makes QuantityType serialisable

Fixes #1651

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-09-19 09:57:42 +02:00
Wouter Born
5919f923d5
Increase StartlevelEvent delay to 15 seconds (#1649)
The rules are often not instantiated within 5 seconds.
On a Raspberry Pi 3B it can take 12 seconds before rules are instantiated.
The code has also been improved with proper null annotations.

Related to #1637

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-18 23:27:56 +02:00