* Changed default color mode for color commands to XY
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Incorporated comments from review
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* [MongoDB Persistence] Rename connectToDatabase to tryConnectToDatabase.
Currently, the implementation throws a RuntimeException.
This fails horribly in query() and store(), because the exception is never caught and connection reestablishment won't happen.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Fix JavaDoc
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Fix Bundle name
The correct database name is "MongoDB" without a space.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Also check for connection validity in isConnected()
When the connection was established successfully once, and the server goes down (e. g. a restart of the DB server), the connection still seems to be OK.
This would throw an exception later on, which is not caught and connection reestablishment won't happen.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Disconnect from database before reconnecting to database.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Disconnect from database when connection procedure fails.
When, for example, the creation of the index fails (disk full, ...), the connection is still there, but the collection isn't created with it's appropriate indices.
Thus, disconnect when the procedure fails to ensure no database connection remains valid.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Fix logic
Create the shared collection with its indices when collectionPerItem is disabled, not enabled.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Access database via getDatabase()
Preparation for synchronization.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Remove global mongoCollection variable.
This allows to easify implementing necessary multithreading locks.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Codestyle improvements.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Move isConnected-Check into tryConnectToDatabase.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Synchronize all connection handling methods.
Though the MongoDB driver is thread-safe, we still need to synchronize connection establishment/closing/...
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Remove all unnecessary @NonNullByDefault attributes.
The given attributes should not be NotNullByDefault, because some may be null, too.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Remove duplicate logging.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Test the db connection after creating the MongoClient.
The mongo always succeeds in creating the connection.
We have to actually force it to test the connection to try to connect to the server.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Fix date query.
Issues:
- Second should have been getEndDate, not getBeginDate
- Send a Date object as the other version wasn't serializable.
- EndDate would have overridden beginDate.
Fixes#10574
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Add debug log for MongoDB query sent to the server.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Reorder index on collections.
The order (Item, Timestamp) makes much more sense and should be better for performance.
All queries are always done with an item, and the dates are optional.
Also, the database server can now execute a range query for the date.
Existing indices are not dropped for backwards compatibility with other systems analyzing the data.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Add @author JavaDoc as per developer guidelines.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Improve logging
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Add @NonNullByDefault
This was removed in 1f8e4525 by mistake.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Do not use isConnected() to test the connection.
The new method throws the real underlying exception instead of a generic one. This allows for detailed logging.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* [MongoDB Persistence] Remove useless @inheritDoc as per code analysis tool.
Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
* Unnecessary NonNull annotations removed
Signed-off-by: Gregor Roth <gregor.roth@web.de>
Signed-off-by: gregor roth <gregor.roth@web.de>
* Bugfix "If network connection is interrupted, WebThing will not be reconnected." Due to the variable webThingURI is unset, re connection fails
Signed-off-by: Gregor Roth <gregor.roth@web.de>
Signed-off-by: gregor roth <gregor.roth@web.de>
* webThingURI will be loaded in a lazy way
Signed-off-by: Gregor Roth <gregor.roth@web.de>
Signed-off-by: gregor roth <gregor.roth@web.de>
* Do not discover on ENTRY_MODIFY
ENTRY_MODIFY is triggered on each keypress multiple times, so we should
not trigger on it.
The usecase for ENTRY_MODIFY triggers where detecting permission changes
of the event nodes.
Inotify does have a dedicate event ("ATTRIB") for that but Java
WatchService normalizes this to a ENTRY_MODIFY event
(See LinuxWatchService.java)
After permission changes users now have to trigger a scan manually.
* Use proper representation property
* Show event node in label
This makes it easier to figure out which thing is which device in the
presence of symlinks or multiple identical devices.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
* Fix broken image & dashboard links in rendered online documentation
* Fix prerequisite version in documentation (do not use milestone version)
Signed-off-by: Robert Bach <openhab@mortalsilence.net>
This change accepts a new message type which is sent by some air ventilation devices durin teach in. This is required for the search feature to detect these devices correctly.
Signed-off-by: David Schumann <david@dev-core.org>
* Accept all Jetty supported http method types
This fixes a number of open issues due to the fact that we were only accepting a limited number of http method types. The effect of this was some functionality like DELETE or HEAD requests would just not work when using the cloud service, which madee our UI look broken in different ways, also it poluted the users log with a lot of messages.
Fixes https://github.com/openhab/openhab-core/issues/2312
Fixes https://github.com/openhab/openhab-cloud/issues/328
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
* Fixed typo for starting sequence
* Added support for "find me" & "test sound" function
* Added clear names for faults
Signed-off-by: Marcel Bossert-Schwab <mbossertschwab@gmx.de>