This guide focuses on conversion functions and impulse‑measuring devices. We will illustrate 3 scenarios where they are used.
The most common use of conversions is assigning a measurement unit to dimensionless variables.
Available conversion units
TapHome supports the following measurement units for conversion:
- Atmospheric pressure [mbar]
- CO [ppm]
- CO₂ [ppm]
- Voltage [V]
- Current [A]
- Energy [kWh]
- Frequency [Hz]
- Noise [dB]
- Light intensity [lux]
- Brightness [%]
- Electricity price per kWh [€/kWh]
- Gas price per kWh [€/kWh]
- Water price per m³ [€/m³]
- Energy content in gas [kWh]
- Operating hours [s]
- NOx [ppm]
- Precipitation [mm]
- Gas power consumption [kW]
- Gas consumption [m³/h]
- Rotational speed [RPM]
- Monetary value [€]
- Percentage [%]
- pH
- Motion
- Water flow [m³/h]
- Airflow [m³/h]
- Wind speed [km/h]
- Snow [mm]
- Gas consumption [m³]
- Water consumption [m³]
- State of charge [%]
- Status contact
- Temperature [°C]
- Session duration [s]
- Angle [°]
- Humidity [%]
- VOC [ppm]
- Water pressure [bar]
- Power [kW]
- Water level [m]
- Battery health [%]
Where conversions are used
Conversions can be applied to:
- Variables (Settings → Variables → Add variable → General variable )
- Analog output values
Linear interpolation
Currently, the only supported conversion is linear interpolation.
Example for converting a variable to current (A):
- 0 → 0 A
- 1 → 1 A
The system automatically interpolates values between these two points.
Measurement unit for variables
We will create a variable that calculates the average temperature from three thermometers using a formula. We will then assign it the measurement unit “Temperature” in degrees Celsius.
Procedure
Create a new variable
- Go to Settings → Variables
- Click Add variable → General variable
- Choose the zone and category
Add a Smart Rule “Formula”
- Add the Smart Rule Formula to the variable
- Use all 3 thermometers as input variables
- Select the variable as the output device
- Formula to calculate the average:
(sensor1 + sensor2 + sensor3) / 3 - After saving, the variable will receive a new calculated value
Define the conversion
- The variable currently displays the value only as a number
- Open the variable’s service settings
- Define the conversion: select Temperature [°C]
- Save
Now, instead of a bare number, the variable displays both the value and the physical quantity we wanted to obtain.
Measurement unit for analog inputs
Conversion functions are also used when working with analog sensors.
As an example, we will show how to configure a pressure sensor in a retention tank which, depending on the water pressure, outputs a voltage from 0 to 10 V.
Configuration steps
Configure the analog input
- Go to Settings → Hardware → TapHome Bus
- Select the module (e.g., UI32)
- Select the input to which the analog sensor is connected
- Set its function to Analog input
- Choose the zone and category
- Save
Set the conversion
- Go to the input’s service settings
- Add a conversion to the device
- For the pressure sensor to measure the water level, select Water level [m]
Define linear interpolation
Set it according to your sensor’s specifications:
Input voltage Pressure Water level 0 V 0 Pa 0 m 10 V 40 kPa 4 m - Save
The system can now automatically convert the value it reads from volts to the unit of your choice.
Impulse‑measuring devices
We will also look at working with an impulse counter and impulse‑based meters. In our example, we will use a rain gauge connected to an impulse counter.
Configuration steps
Configure the impulse counter
- Go to Settings → Hardware → TapHome Bus
- Select the module (e.g., UI32)
- Select the input to which the impulse counter is connected
- Set its function to Impulse Counter
- Choose its zone and category
- Save
Add a rain gauge
- Go to Settings → Virtual Devices
- Add Rain gauge
- Assign a zone and category to the device
- Save
Link the rain gauge to the impulse counter
- Open the rain gauge’s service settings
- Link it to the impulse counter
- Adjust other service settings to match your device’s specifications (e.g., how many mm of rainfall one impulse represents)
- Save
You can now see how the millimeters of measured rainfall increase with the number of impulses.
The same principle applies to pulse‑type electricity meters and other impulse‑measuring devices such as water meters or gas meters.