Commit Graph

622 Commits

Author SHA1 Message Date
Markus Rathgeb
fefbef50f5 UID: allow to encode arbitrary string (+decode) (#864)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-06-19 22:42:27 +02:00
Wouter Born
0f1c1bbb2d Fix Ephemeris ClassNotFoundException (#869)
Fixes #868

Also-by: Markus Rathgeb <maggu2810@gmail.com>
Signed-off-by: Wouter Born <github@maindrain.net>
2019-06-13 20:03:16 +02:00
Hakan Tandogan
3e3cbeac60 [ephemeris] upgrade jollyday library to the latest released version (#870)
Signed-off-by: Hakan Tandogan <hakan@tandogan.com>
2019-06-13 10:27:01 +02:00
Wouter Born
f3ced23830 Fix serial ports missing when ports are added to system property (#866)
* Get all serial port identifiers by calling RXTX with and without using the gnu.io.rxtx.SerialPorts property
* Filter getSerialPortIdentifiers() stream on distinct port names
* Fix thread safety issues by saving getPortIdentifiers() Enumeration result to new list

Fixes #805

Signed-off-by: Wouter Born <github@maindrain.net>
2019-06-12 08:58:41 +02:00
Kai Kreuzer
d0dfbe3f44 Ephemeris service (#506)
Also-by: Gaël L'hopital <gael@lhopital.org>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2019-06-11 10:20:04 +02:00
Wouter Born
7f5ceefa26 Upgrade Karaf tooling to 4.2.6 (#859)
For Karaf 4.2.5 release notes, see:
  https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12311140&version=12345153

For Karaf 4.2.6 release notes, see:
  https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12311140&version=12345365

Signed-off-by: Wouter Born <github@maindrain.net>
2019-06-10 19:15:43 +02:00
Markus Rathgeb
849753befe small improvements of hexutils API and impl. (#862)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-06-10 17:07:04 +02:00
Markus Rathgeb
5977002c5f workaround for #597 (#863)
Fixes: #597

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-06-10 11:28:09 +02:00
Markus Rathgeb
3b74ea1dad use separate class for named thread factory (#860)
... to make it usable for others

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-06-09 20:32:01 +02:00
Markus Rathgeb
9018e9ae80 move event logging for better analyze options (#856)
* move event logging for better analyze options
* add another optional event handling logging

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-06-09 10:33:42 +02:00
Christoph Weitkamp
1f20e8277a model: Use constructor injection to simplify lifecycle (#857)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-06-09 10:33:22 +02:00
Wouter Born
b99c439d77 Fix Jetty warnings by excluding weak cipher suites (#858)
Newer Jetty versions log warnings when weak cipher suites are configured.
This occurs when using Karaf 4.2.6 with Jetty 9.4.18.v20190429.

See also: https://github.com/eclipse/jetty.project/pull/3050

Signed-off-by: Wouter Born <github@maindrain.net>
2019-06-09 10:32:46 +02:00
Christoph Weitkamp
306165dcfb Added 'RefreshType.REFRESH' and 'BinaryPrefix' to imports (#854)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-06-05 13:41:33 +02:00
Christoph Weitkamp
edd148f3f6 automation: Refactoring of 'DefaultScriptScopeProvider' (#851)
* automation: Use constructor injection to simplify lifecycle
* Refactoring of 'DefaultScriptScopeProvider' class

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-06-03 20:47:22 +02:00
Christoph Weitkamp
5d7a19541f model: Refactoring of 'RuleEngineImpl' (#853)
* Refactoring of 'RuleEngineImpl'
* Use 'EventType' type instead of the FQCN

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-06-03 16:11:18 +02:00
Christoph Weitkamp
e2e53cb5c2 Fixed JavaDoc to get rid of the Quartz includes (#852)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-06-03 14:49:09 +02:00
Christoph Weitkamp
64a466ff7d Added nullness annotations (#850)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-06-03 14:05:33 +02:00
Christoph Weitkamp
7f0d61d6a6 thing: Use constructor injection to simplify lifecycle (#849)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-06-03 13:14:41 +02:00
Christoph Weitkamp
59ffc98b23 model: Use constructor injection to simplify lifecycle (#840)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-06-02 15:55:53 +02:00
Wouter Born
ddc0ae467c
Add shields and fix broken links in README.md
Signed-off-by: Wouter Born <github@maindrain.net>
2019-06-01 22:35:47 +02:00
Wouter Born
7f5b8ca339 Use bnd for including resources to workaround infinite Eclipse builds (#842)
When "Build Automatically" is enabled in Eclipse, the build never ends.
It seems there is a bnd issue with the way resources are defined in the reactor POM.
The workaround seems to be to include all resources using bnd.

See also:

* https://github.com/bndtools/bnd/issues/3220
* https://github.com/openhab/openhab2-addons/issues/5554

Signed-off-by: Wouter Born <github@maindrain.net>
2019-06-01 12:54:24 +02:00
Patrick Fink
7d374a951f Carve out infrastructure stuff into an openHAB Super POM (#555)
* Inherit from openHAB Super POM

Signed-off-by: Patrick Fink <mail@pfink.de>
2019-05-29 08:16:46 +02:00
Markus Rathgeb
e9418cb4c1 split between activation logic (#836)
If a component should be activated an instance is constructed and that
object is activated.
Let's split the construction and activation logic also if constructor
injection is used.

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-28 21:36:33 +02:00
Christoph Weitkamp
eef779e91a Added nullness annotations (#837)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-28 17:56:48 +02:00
Christoph Weitkamp
3ab9bab2f4 rest/sse: Use constructor injection to simplify lifecycle (#838)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-28 17:46:20 +02:00
Christoph Weitkamp
8b59505145 discovery: use constructor injection to simplify lifecycle (#835)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-27 22:47:03 +02:00
Wouter Born
060530a8e4 Use nrjavaserial 3.15.0.OH2 in runtime BOM (#833)
When debugging openHAB in Eclipse I ran into serial port locking issues again on Ubuntu 18.04.2.
We resolved these in the distro by using 3.15.0.OH2 which doesn't use liblockdev.

Errors similar to the one below may show after stopping/restarting openHAB when using serial ports on certain distros:

RXTX fhs_lock() Error: opening lock file: /var/lock/LCK..ttyUSB0: File exists. It is mine

testRead() Lock file failed

See also:
    https://github.com/openhab/openhab-core/pull/761

Signed-off-by: Wouter Born <github@maindrain.net>
2019-05-27 14:18:00 +02:00
maniac103
36ae91856c Always send correct 'item' member in SSE events (#691)
* Make sure to always send the correct 'item' member in SSE events.

If a change to item A causes visibility changes to item B, we previously
sent an SSE event for B including the new visibility for B, but included
item and state of A. This leads to client confusion, as it'll update its
internal state for the widget belonging to B with the item state of A.
Make sure to always send the item for B and to omit state in that case.

Closes #690

Signed-off-by: Danny Baumann <dannybaumann@web.de>
2019-05-25 10:12:11 +02:00
Christoph Weitkamp
0d736a700e Use correct profile builder (#831)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-24 19:41:55 +02:00
J-N-K
d35665c201 partly reverts #795 as it creates runtime exceptions (#828)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2019-05-19 18:18:44 +02:00
Markus Rathgeb
c547414003 set http context ID for smarthome HTTP context (#818)
The Pax Web Extender is much more happy if this property is present.
Let's make it happy...

Fixes: https://github.com/openhab/openhab-distro/issues/891

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-18 00:25:38 +02:00
Markus Rathgeb
7780d0d133 Travis CI: check POM convention (#795)
* Travis CI: check POM convention

We could use Travis CI to execute some checks in front of the normal
build.

This change adds a check if the POM files follow our POM conventions.

If something fails, it show which files violates the convention and the
command that should be executed to fix the situation.

For example if the base POM file breaks the convention:

    At least one POM file breaks the convention, please use sortpom to fix the POM file(s).
    	modified:   pom.xml
    You should run the following command in the root directory of your working copy:
        mvn com.github.ekryd.sortpom:sortpom-maven-plugin:sort -Dsort.keepBlankLines=true -Dsort.createBackupFile=false -Dsort.predefinedSortOrder=recommended_2008_06

* add sortpom plugin to verify phase
* do not use dependency reduced pom (use scope)

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-18 00:07:14 +02:00
Christoph Weitkamp
2ace118b92 [archetype] Fixed generation of binding skeletons (#817)
* Fixed generation of binding skeletons
* [archetype] Include feature.xml in archetype-metadata.xml (#1)

Also-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-17 08:35:36 +02:00
Markus Rathgeb
0aaad726ff persistent inbox: ensure all members have been set before usage (#826)
Fixes #823

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-16 14:20:50 +02:00
Markus Rathgeb
457df1e853 rule engine should not depend on specific registry implementation (#819)
The current rule registry implementation provides a configuration for
the "rule reinitialization delay". That configuration is not used by the
rule registry itself but used by the rule engine implementation.
This required the rule engine implementation to contain a special code
path that checks if the injected rule registry is an instance of that
special implementation to access that configuration parameter.
As the configuration is not used by the registry itself, it does not
make sense that it is a configuration of that component.
If the rule engine (at least this special implementation) would like to
use a configurable parameter, it should be part of that specific
component implementation.

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-15 23:03:05 +02:00
Markus Rathgeb
ccd66f1491 use constructor injection to simplify lifecycle (#822)
Fixes #811

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-15 20:05:22 +02:00
Markus Rathgeb
d55d59d3b5 MQTT: disable https hostname verification (#820)
After the bump of Paho from 1.2.0 to 1.2.1 the library enables the https
hostname verification.
This breaks compatibility with current consumers.
Connections cannot be established anymore.

We disable the https hostname verification to keep the old behaviour.
We should add an API so the hostname verification can be enabled if
desired.

This also makes the version 1.2.1 the lower version limit as we need to
use the API to disable the verification internally.

Related to: https://github.com/openhab/openhab-core/issues/815

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-15 17:57:49 +02:00
Markus Rathgeb
dc5ddba83c [model] don't require to download antlr generator on build time (#810)
The antlr generator has been downloaded by a specific download maven
plugin at build time.
Instead of calling the plugin goals it would be much simpler to add the
downloaded file to the repository (I assume it has been not possible on
the Eclipse repository before).
Another benefit would be the IDE integration as the IDE does not need to
know if the plugin needs to be executed or not...

The provided antlr generator has been taken from:
http://download.itemis.com/antlr-generator-3.2.0-patch.jar

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-14 09:04:35 +02:00
Markus Rathgeb
4480e04137 persistent inbox: do not use incomplete initialized object (#813)
Fixes: https://github.com/openhab/openhab-core/issues/812

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-10 09:00:41 +02:00
Christoph Weitkamp
0f74348f51 Factored out 'LocalizedKey' into separate class (#808)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-09 11:57:40 +02:00
Markus Rathgeb
bba6df5372 add printf for console (#793)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-09 08:29:56 +02:00
Christoph Weitkamp
2a9485bc3b Improvements for 'DefaultSystemChannelTypeProvider' (#807)
* Use constructor dependency injection
* Added nullness annotations

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-09 07:51:56 +02:00
Christoph Weitkamp
b5f33d341d Added i18n feature for profiles (#785)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-09 07:50:55 +02:00
Markus Rathgeb
1996f69e6f [automation] Fix activation of rules (#796)
Related to: https://github.com/openhab/openhab-core/issues/722
Related to: https://github.com/openhab/openhab-core/issues/783

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-08 15:18:21 +02:00
David Gräff
efdcf79300 Update paho to 1.2.1 service release (#784)
Fixes unreleased resources, disconnecting problems and many more

Signed-off-by: David Gräff <david.graeff@web.de>
2019-05-08 10:10:47 +02:00
Kai Kreuzer
9f4ad2880f removed classpath entries of non-existent folders in order to solve compilation errors in IDE (#806)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2019-05-07 23:29:07 +02:00
Markus Rathgeb
d19ee33be9 [audio] audio servlet: don't change map while used by interation (#801)
We should not remove entries (so keys) from the map while we are using
the key set (a view) of that map (see JavaDoc: otherwise "results of the
iteration undefined").

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-07 21:26:04 +02:00
Christoph Weitkamp
81423aa22e Separate i18n infrastructure for 'ChannelGroup' (#804)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-07 19:32:11 +02:00
Markus Rathgeb
c359347ada allow to use "Pure Annotation-Driven Bundle Development" (#803)
Bump the OSGi annotation to allow a pure annotation-driven bundle
development.

Related to: https://virtual.osgiusers.org/2018/10/pure-annotation-driven-dev

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-06 23:10:32 +02:00
Markus Rathgeb
0d996e74a2 audio servlet test: harden against slow test systems (#802)
The test suite for the audio servlet contains a test that will fail on
systems under heavy load (or just imperformant systems).

An audio stream should be added for 1 (streamTimeout) second.
The stream is requested and it is tested that it can be accessed.
After that the test waits until the stream is no more available (this
will be the cause after "streamTimeout").

If the "add stream" and "get request for stream" operations already
exceed the "streamTimeout" limit, the test will fail.
This can be handled in the test case itself if we check the timespan we
need to get the stream and if we know that the stream is allowed to be
non present already, we continue with the next step without failing.

Fixes: https://github.com/openhab/openhab-core/issues/799

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-06 22:42:41 +02:00