Commit Graph

1305 Commits

Author SHA1 Message Date
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
Wouter Born
f201b83c09
Fix "Unable to watch transformation directory" warnings (#1650)
Fixes #1636

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-18 08:54:23 +02:00
Wouter Born
81e82e7d44
Use consistent capitalization with Conditions, Triggers, Actions (#1647)
Fixes #1639

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-15 19:52:35 +02:00
Wouter Born
f5f1e32b9f
Add null annotations to ConfigDescriptionRegistry and ConfigUtil (#1641)
Also added "org.eclipse.jdt.annotation" to the test BOM so we can use "org.eclipse.jdt.annotation.Checks" in itests.
That class has many useful methods that help with writing more readable test code when using the Eclipse JDT null analysis annotations.

After running the resolver on the itests  a lot of bundles were removed from the itest.bndrun files.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-15 17:00:15 +02:00
Fabian Wolter
39d6986df7
[skeleton] Make example logging compliant to Coding Guidelines (#1646)
See https://www.openhab.org/docs/developer/guidelines.html#f-logging point 4
Also give an example for the logging severities, as many binding PRs log to info or error.

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
2020-09-15 15:33:30 +02:00
Kai Kreuzer
57d4487f36
Removed ChannelItemProvider (#1643)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-09-14 09:21:55 +02:00
Christoph Weitkamp
eab9be1410
Removed deprecated constructors and methods from Thing API (#1414)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-09-13 13:53:12 +02:00
Wouter Born
b8a68e7c27
Remove non-existing $HOME/.bnd/cache/ dir from .travis.yml (#1632)
There is no $HOME/.bnd/cache dir after a Travis build.

There is a $HOME/.bnd/urlcache dir, but it contains info about artifacts in '/target' dirs so it's also useless to cache.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-10 11:08:46 +02:00
Wouter Born
5ade1b1239
Upgrade Travis CI to use Ubuntu 20.04 and fix warnings (#1630)
Upgrades the Travis CI build environment to Ubuntu 20.04 (Focal Fossa).

Also fixes the following Travis configuration validation warnings:

* deprecated key sudo (The key `sudo` has no effect anymore.)
* missing os, using the default linux

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-09 20:51:15 +02:00
Yannick Schaus
426bd112b7
[REST/Auth] Always accept tokens in the alt header (#1631)
Currently the AuthFilter will try to find a token in the
X-OPENHAB-TOKEN HTTP header - only when it finds a cookie
named X-OPENHAB-AUTH-HEADER. It can cause problems because
browsers or proxies might block the cookie from being sent
for various reasons (for instance if there's a path set
for it).

There is no downside IMHO to always try to fallback to
checking the X-OPENHAB-TOKEN header for a token, if and
only if it's not already provided in the Authorization
header. It is the responsibility of the client to decide
how it wants to authorize the request among the available
options - by checking a cookie, or something else entirely.

Also removed the '?api_key=' option because Swagger UI
doesn't provide tokens that way anymore.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-09-09 20:48:10 +02:00
Wouter Born
b3880ebe88
Remove deprecated methods from Configuration, UID and ThingHelper (#1629)
Removes the following deprecated methods:

* org.openhab.core.config.core.Configuration.get​(Object)
* org.openhab.core.config.core.Configuration.remove​(Object)
* org.openhab.core.thing.UID.getSegments()
* org.openhab.core.thing.util.ThingHelper.ensureUnique​(Collection<Channel>)

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-09 09:22:27 +02:00
Paul Vogel
695647c7f6
Removes the incorrect use of the encoding header in each JSON response (#1616)
The ResponseBuilder's "encoding()" function sets the http header "Content-Encoding", which is used to compress the media type and not to specify the character encoding.

Signed-off-by: Paul Vogel <pavog@users.noreply.github.com>
2020-09-08 12:00:54 +02:00
Wouter Born
ab8aa9ed3a
FeatureInstaller improvements (#1628)
* Use Streams for filtering, mapping and checking predicates
* Add exception to warnings/errors when debug logging is enabled
* Use final featuresService field so method arguments can be removed

Fixes #1486

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-07 19:45:33 +02:00
Wouter Born
2273f8976f
Fix potential NPE in ProfileCallbackImpl (#1627)
Also annotates ItemChannelLink.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-07 15:13:06 +02:00
Wouter Born
02404b2fa7
Fix null analysis errors/warnings (#1626)
The changes in #1614 caused null analysis errors in CommunicationManager.createCallback and caused unnecessary null check warnings in ProfileCallbackImpl.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-07 12:12:31 +02:00
Kai Kreuzer
b5fd603eed
cleaned up some null handling (#1625)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-09-07 10:45:15 +02:00
Wouter Born
6018348d04
Remove deprecated NetUtil methods (#1622)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-06 22:55:05 +02:00
Wouter Born
aee47e6381
Remove deprecated FilterCriteria methods (#1623)
Also removes "Zoned" from the getters so they follow the naming of the setters.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-06 22:44:40 +02:00
Christoph Weitkamp
f7c8505d7a
Added missing nullness annotations to discovery events (#1621)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-09-04 09:07:54 +02:00
Christoph Weitkamp
72a5afadce
[discovery] Added warning if 'representationProperty' is missing in keys of 'properties' map for 'DiscoveryResult' (#1573)
* Added warning if representationProperty is missing in properties map

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-09-04 09:00:21 +02:00
Christoph Weitkamp
bee8206853
Migrated tests to JUnit 5 (#1619)
* Migrated tests to JUnit 5

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-09-04 08:23:00 +02:00
Christoph Weitkamp
7eb6d39ae0
[discovery] Added validation for relation between ThingUID and BridgeUID (#1481)
* Added validation for relation between ThingUID and BridgeUID

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-09-03 20:38:07 +02:00
Christoph Weitkamp
6ae1ece83d
[persistence] Added methods to calculate variance and standard deviation for persisted items (#1551)
* Added methods to calculate variance and standard deviation for persisted items

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-09-03 20:35:56 +02:00
Łukasz Dywicki
7652d04ff6 Remove dependencies which are not present in the project. (#1592)
These cause build to fail with clean repository.

Signed-off-by: Łukasz Dywicki <luke@code-house.org>
2020-09-03 20:33:32 +02:00
Kai Kreuzer
9070539a1a
Improved add-on installation logic (#1617)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-09-03 12:13:25 +02:00
Christoph Weitkamp
dd04d2eca0
Added unit test for unset thing properties (#1615)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-08-30 17:37:55 +02:00
Christoph Weitkamp
a87318aace
Added missing nullness annotations in profile implementations (#1614)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-08-30 14:02:23 +02:00
Wouter Born
12a5d08691
Allow property value to be updated to null (#1611)
With the changes in #1598 the BaseThingHandler could no longer update property values to null.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-08-26 12:06:53 +02:00
Kai Kreuzer
f069994ab7
added further system information to rest resources (#1610)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-08-25 00:41:17 +02:00
pacive
184366a1a5
Use TypeParser in ProfileCallbackImpl#sendUpdate for StringType state (#1603)
* Use TypeParser in ProfileCallbackImpl#sendUpdate for StringType state

Signed-off-by: Anders Alfredsson <andersb86@gmail.com>
2020-08-24 23:49:19 +02:00
Wouter Born
f095b9a017
Update spotless to 2.0.3 (#1609)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-08-24 15:56:45 +02:00
Kai Kreuzer
bcee357829
[rest] added systeminfo rest resource (#1608)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-08-23 10:48:03 +02:00
Kai Kreuzer
3ada0d0148
cleaned up some remainders (#1607)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-08-23 10:40:04 +02:00
Kai Kreuzer
b06d466774
ensure that DSLScriptContextProvider is injected whenever available (#1606)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-08-22 23:12:38 +02:00
Wouter Born
057604cc2d
Use new Collection API methods (#1598)
Using the new methods there will be less and more readable code.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-08-22 23:04:11 +02:00
pacive
0173e23759
Fix tests failing on windows (#1602)
* Fix tests failing on windows

Signed-off-by: Anders Alfredsson <andersb86@gmail.com>
2020-08-22 23:03:06 +02:00
Kai Kreuzer
0de7ed3f49
fixed reading master volume on macOS (#1605)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-08-22 22:13:36 +02:00
Kai Kreuzer
d426d3b8f1
fixed m3u and pls audio stream support (#1604)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-08-22 22:12:45 +02:00
Kai Kreuzer
c0ad2a4011
[audio] ported audio sinks from addons to core (#1597)
Also-by: Wouter Born <github@maindrain.net>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-08-22 08:10:37 +02:00