Ubidots provides a way to easily add a scaling factor and an offset to incoming data, before it is saved. This avoids having to use synthetic variables for simple operations.
The scaling function allows you to apply linear transformation to the data by following the next equation:
y = mx + b
Where:
y
: resulting valuem
: slopex
: raw datab
: offset
It's worth noting that this feature is a real-time engine, which means that the scaling function is applied to the data as soon as it becomes available.
Requirements
An active Ubidots account.
1. How to Apply the Scaling function to your data?
The scaling function feature is available on your raw variables. Follow the next steps to learn how to apply it to your variable’s data:
Step 1: Go to Devices
Step 2: Select a device and open a raw variable from the variables list
Step 3: Go to the Scaling function section in the configurations panel.
Step 4: Enter the values for the slope and offset.
In contrast to synthetic variables, which apply the synthetic expression to historical data, the scaling function will only affect new incoming data once the scaling function's values have been specified.