Skip to content

InfluxDB Persistence

Jens Erat edited this page Aug 2, 2015 · 3 revisions

Documentation of the InfluxDB Persistence Service

Introduction

This service allows you to persist and query states using the time series database InfluxDB.

The InfluxDB binding does not support InfluxDB 0.9 yet.

Features

The InfluxDB persistence service persists item values using the the InfluxDB time series database. The persisted values can be queried from within openHAB. There also are nice tools on the web for visualizing InfluxDB time series.

Database Structure

The states of an item are persisted in time series with names equal to the name of the item. All values are stored in a field called "value" using integers or doubles, OnOffType and OpenClosedType values are stored using 0 or 1. The times for the entries are calculated by InfluxDB.

An example entry for an item with the name "AmbientLight" would look like this:

time sequence_number value
1402243200072 79370001 6

Installation and Configuration

Database Setup

First of all you have to setup and run a InfluxDB server. This is very easy and you will find good documentation on it on the InfluxDB web site.

Then database and the user must be created. This can be done using the influxdb admin web interface. If you want to use the defaults then create a database called openhab and a user with write access on the database called openhab. Choose a password and remember it.

openhab.cfg

After this the persistence service needs some configuration in the "InfluxDB Persistence Service" section in openhab.cfg.

The defaults for the database name, the database user and the database url are "openhab", "openhab" and "http://127.0.0.1:8086" respectively. If you took this defaults for the database setup you only have to add the password value to the influxdb:password= variable.

variable description default
influxdb:url the database URL http://127.0.0.1:8086
influxdb:user the name of the database user openhab
influxdb:db the name of the database openhab
influxdb:password the password of the database user no default

Installation

For installation of this persistence package please follow the same steps as if you would install a binding.

Now place a persistence configuration file called influxdb.persist in the ${openhab.home}/configuration/persistence folder. This has the standard format as described in Persistence.

Installation

###Linux / OS X

###Windows


##Configuration

User Interfaces


Community

(link to openHAB forum)

Development



Misc


Samples

A good source of inspiration and tips from users gathered over the years. Be aware that things may have changed since they were written and some examples might not work correctly.

Please update the wiki if you do come across any out of date information.

Collections of Rules on a single page

Single Rules

Scripts


Release Notes

Clone this wiki locally