openhab-addons/bundles/org.openhab.persistence.mongodb
ulbi 956b8e47d5
[mongodb] Upgrade DB driver, add more type handlings, fix QuantityType handling (#16333)
* #16308 #16310 Upgraded MongoDB driver, added initial unit tests
* #16308 #16310 Refactored the MongoDBPersistence adding helper, fixing type handling for HSBType, RawType and QuantityType
* #16308 Added backwardcompatibility for the old way of writting the data where possible
* #16308 Added test for larger ImageItems and the limit of 16 MB

Signed-off-by: René Ulbricht <rene_ulbricht@outlook.com>
2024-02-17 10:58:14 +01:00
..
src [mongodb] Upgrade DB driver, add more type handlings, fix QuantityType handling (#16333) 2024-02-17 10:58:14 +01:00
NOTICE Codebase as of c53e4aed26 as an initial commit for the shrunk repo 2020-09-20 23:57:58 +02:00
pom.xml [mongodb] Upgrade DB driver, add more type handlings, fix QuantityType handling (#16333) 2024-02-17 10:58:14 +01:00
README.md Fix http -> https where applyable. (#10573) 2021-04-24 20:39:51 +02:00

MongoDB Persistence

This service allows you to persist state updates using the MongoDB database. It supports writing information to a MongoDB document store, as well as querying from it.

Configuration

This service can be configured in the file services/mongodb.cfg.

Property Default Required Description
url Yes connection URL to address MongoDB. For example, mongodb://localhost:27017
database Yes database name
collection Yes set collection to "" if it shall generate a collection per item

If you have a username and password it looks like this: url = mongodb://[username]:[password]@[localhost]:27017/[database] The database is required: https://mongodb.github.io/mongo-java-driver/3.9/javadoc/com/mongodb/MongoClientURI.html

All item and event related configuration is done in the file persistence/mongodb.persist.