1. Home
  2. Docs
  3. SmartConfig
  4. Formulas
  5. Getting started

Getting started

Purpose:
Allows user-defined mathematical expressions to process incoming sensor data.

๐Ÿ”ง Syntax (in user defined code)

F14,<formula>,<A_pos>,<B_pos>,<C_pos>,<D_pos>

<formula>: A math expression using placeholders (A, B, C, D, R, X, Y, Z)

<A_pos> to <D_pos>: Indexes referring to the values in the sensorString, starting after the timestamp

๐Ÿ“Œ Placeholders

PlaceholderDescription
Aโ€“DValues from the sensorString
RResult from the previous F14 calculation
Xโ€“ZInternal counters (can be used or updated later)

The result of each calculation is stored in R, which can be used in subsequent formulas.

๐Ÿงช Example

Configuration line:

F14,A*1,2,0,0,0

Incoming sensor string:

2025/06/23 09:46:50,12453,0,22.3

After skipping the timestamp:

  • Index 0 โ†’ 12453
  • Index 1 โ†’ 0
  • Index 2 โ†’ 22.3

A = 22.3

Formula: A * 1

Result: R = 22.3

โš  Notes

  • Comma-separated sensorString values are indexed starting at 0 (after timestamp).
  • Only available in User-Defined Mode
  • Avoid invalid math operations (e.g., division by zero).
  • Useful for scaling, offsetting, combining, or converting raw values on-device.

How can we help?