MongoDB with OpenHAB
This part describes how I configured my OpenHAB instance to use MongoDB as persistence backend. For configuration of MongoDB on my FreeNAS machine, see my previous post.
- Connect to the server and create openhab database with sensors collection (or any names you choose – just make sure you reflect your naming in further steps.
- Install mongodb bundle (from
snapshot
most likely), Add openhab persistence config:
Note the mongodb:// in the address – needs to be there!################ MongoDB Persistence Service ####################### # the database url mongodb:url=mongodb://192.168.2.118:27017 # the database name mongodb:database=openhab # the collection name mongodb:collection=sensors
- That’s it! After restart and adding persistence info, it should all work and you should have a nice place to store all your data