![None](https://petrio-live-044155178e134c3d857c4566204-f60f814.aldryn-media.io/filer_public_thumbnails/filer_public/58/a3/58a3ca78-418e-4b45-b7c4-630b65c04942/openhabmongo.png__800x480_subsampling-2.png)
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