openhab-docs/_addons_persistences/mapdb
Thomas Dietrich 7c2579f335 Rename io and peristence folders
Signed-off-by: Thomas Dietrich <thomas.dietrich@tu-ilmenau.de>
2017-10-18 17:04:23 +02:00
..
readme.md Rename io and peristence folders 2017-10-18 17:04:23 +02:00

readme.md

id label title type description source since install
mapdb mapdb mapdb - Persistence persistence The [mapdb](http://www.mapdb.org/) Persistence Service is based on simple key-value store that only saves the last value. The intention is to use this for `restoreOnStartup` items because all other persistence options have their drawbacks if values are only needed for reload. They: https://github.com/openhab/openhab1-addons/blob/master/bundles/persistence/org.openhab.persistence.mapdb/README.md 1x auto

{% include base.html %}

mapdb Persistence

The mapdb Persistence Service is based on simple key-value store that only saves the last value. The intention is to use this for restoreOnStartup items because all other persistence options have their drawbacks if values are only needed for reload. They:

  • grow in time
  • require complex installs (mysql, influxdb, ...)
  • rrd4j can't store all item types (only numeric types)

Querying the mapdb persistence service for historic values other than the last value make no sense since the persistence service can only store one value per item.

Configuration

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

Property Default Required Description
commitinterval 5 No commit interval in seconds
commitsamestate false No set to true to issue a commit even if the state did not change

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

To configure this service as the default persistence service for openHAB 2, add or change the line

org.eclipse.smarthome.persistence:default=mapdb

in the file services/runtime.cfg.

Troubleshooting

Restore of items after startup is taking some time. Rules are already started in parallel. Especially in rules that are started via System started trigger, it may happen that the restore is not completed resulting in undefined items. In these cases the use of restored items has to be delayed by a couple of seconds. This delay has to be determined experimentally.