Internal InfluxDB

Each Heisenware Workspace is equipped with its own dedicated InfluxDB time-series database. This database is utilized to store sequences of data points over time, enabling future retrieval, processing, and visualization. Because the database is shared at the Workspace level, multiple apps can access and contribute to the same data streams.

If you have your own external InfluxDB instance, you can use the InfluxDB Connector to connect to it.

Writing Data (Recording)

The primary way to write data to the internal InfluxDB is by using the Recorder function extension. You can attach a Recorder to any function output or modifier in the Flow Builder.

Whenever the function it is attached to is triggered and successfully produces an output, the Recorder saves that output data along with a timestamp. This works in both build-time test mode and at the live runtime of your app. The data is stored as a value-timestamp pair; the value can be any data type, but the Recorder is optimized for numeric data.

Retention Policy

A retention policy specifies how long data points are stored before being overwritten. To modify it, right-click on the Recorder icon. Policies range from hourly (H) to forever (F), which is the default.

Reading Data

You can retrieve recorded data to visualize it in widgets like the Data Grid, Chart, or Sparkline.

The read Function

The read function is the primary tool for retrieving data from InfluxDB.

Input

  • Bucket: The retention policy to read from (H, D, W, M, A, or F).

  • Measurement: The name of the data stream, as defined in the Recorder.

  • Filters and Aggregators (Optional): An object to refine your query with parameters like:

    • tail: The number of latest values to read.

    • start / stop: A time range for the results (e.g., -1h).

    • every / func: An aggregation window and function (e.g., mean, min, max).

Output

The function outputs an array of objects, where each object contains a date and value key.

Recorder Shortcut

To quickly add a pre-configured read function, click the database icon on any Recorder in your Flow Builder. This will add a read function for that measurement, set to retrieve the last 100 values.

The query Function (Advanced)

The query function provides raw access to the InfluxDB, allowing you to write your own custom queries using the Flux language. This is an advanced feature. For a full guide on Flux, please consult the official InfluxDB documentation.

Last updated