We run into some confusion with Calculated FIelds and Transforms since they share the same field(s)
Issues arise when we check Calculated Field when we are not creating a calculated field.
What’s the difference?
Transform: used to transform an existing sensor’s value into another. Say the sensor records temperature in Degrees C but you work in Degrees F. By adding a transform to a sensor we can accomplish this by entering val*1.8+32 into the Transform or Calculated Field Function Name field
note: Calculated Field is NOT checked
dev note: once the transform is saved, all future data recorded in the database for this sensor will be it’s transformed value
Calculated Field: When Calculated Field is checked, a new sensor table is created in the BMON database. This option is used for one of two purposes:
- to add sensor readings gathered from the Internet.
- to create new sensor readings calculated from other readings that are in the sensor database.
Here, we are acquiring via getInternetTemp the temperature data from Internet weather services for stnCode PANV adding it as a new sensor because we checked Calculated Field.
Here, we are creating a new sensor manor_snw1_run by calculating the runtimeFromOnOff of a Monnit sensor 29631 that we already have reporting to BMON by using onOffID: 29631 and checking Calculated Field. additional information here