Thank you!
We will contact you shortly.
Virtual (abstract) variables in the i3 Engineering system are a powerful tool for building advanced automation logic. They significantly extend the capabilities of standard scenarios without requiring additional hardware.
A virtual variable is a logical or numerical entity that:● is not tied to physical inputs or outputs;● can be created on any controller;● can be used in any automation or scenario;● can be modified by Blockly logic, events, or other devices.
In practice, this is an intermediate logic layer that allows you to:● accumulate values;● record events;● block or allow scenario execution;● build complex control conditions.
● To create a variable, open the i3 Home app. From the main Dashboard screen, go to the Automations section, tap the Plus button, and in the window that opens, select Variable.
● Next, choose What is connected.
● In the list of device types, you will see two options: Integer Variable and Float Variable. For our example, select Integer Variable.
● By tapping the gear icon at the top of the screen, you can access additional settings. This option allows you to set the initial value of the variable after the controller restarts.
● After that, specify the room to which the variable will be assigned. Also, don’t forget to give it a name, for example, Variable 1.
● Save
Now let’s check the variable we created.
● Go to the Dashboard and open the Other tab, where you will see your variable.
● By entering it, you can manually change its value, view usage statistics, see which automations it is involved in, or create a new automation.
It is worth noting that the scenarios presented below represent only a small part of the wide potential of virtual variables. Thanks to their flexibility, you can create unique automation algorithms that go far beyond this list and are tailored to your specific needs.
Reducing the Number of Notifications (CO₂, Alarms)
Let’s look at a real example. Imagine we are measuring the CO₂ level in a room. The controller receives data from the sensor at intervals ranging from 1 second to 10 minutes, depending on the sensor settings. Suppose we set the data update interval to 1 minute. In this case, if the CO₂ level exceeds the norm, the system would send us notifications every minute until the levels return to normal. To prevent this, we can use the additional variable we created.
● The first automation works as follows:
If the CO₂ level exceeds 30 ppm and the variable’s value is 0, the system sends a notification about the elevated CO₂ level and assigns the variable a value of 1.
● The second automation monitors when the CO₂ level decreases below 30 ppm. In this case, the system sends a notification that the CO₂ level is normal, and the variable is set back to 0.
● Automations for controlling the fan have also been created.
If the CO₂ level is high and the variable is 1, the fan turns on.
When the CO₂ level returns to normal and the variable goes back to 0, the fan turns off.
Energy Consumption Counters with Notifications
In commercial facilities or cottage communities, energy consumption monitoring is a common requirement.
Implementation:● a separate variable is created for each house;● the variable value increases according to consumption;● when a predefined threshold is reached, the system sends a notification.
Benefits:● flexible limits for each object;● no need for complex integrations;● easy scalability.
Intermediate Variable for Underfloor Heating Control
In the underfloor heating example, the thermostat does not control the thermal actuator directly. Instead, a virtual variable is used.
What this provides:● ability to apply additional conditions (minimum and maximum temperature limits);● protection against incorrect switching;● logic expansion without changing the physical wiring.
The thermostat changes the value of the variable, and the variable itself determines whether the thermal actuator can be switched on.
Motion Sensor + Manual Switch (Cleaning Mode)
Typical problem: A motion sensor turns the light off while someone is still in the room (for example, during cleaning).
Solution: Using a variable as a “blocker”.
How it works: The wall switch sets the variable to state 1. The motion sensor automation is configured to work only when the variable equals 0. As a result, manually turning on the light blocks the motion sensor logic, and the light remains on continuously.
Event and Alarm Indicators
Virtual variables are convenient for recording the fact of an event:● emergency situations;● door opening;● motion detection;● equipment start.
They can act as a “flag” used later for indication or analysis (warning lights, logs in reports).
Examples:● a “red alarm lamp” in industrial facilities;● recording the time of first motion in a commercial space.
The variable allows the system to retain the state even after the event has ended.
Water Meters Without Modbus
Implementation:A pulse module is installed on the water meter. Through an intermediate relay, it sends pulses to a controller input. Each pulse increases the variable value (1 pulse = X liters).
In Blockly, simple math is applied to convert the number of pulses into cubic meters, without using Modbus or external integrations.
Benefits:● no Modbus required;● minimal hardware;● simplicity and reliability.
“Someone Is Home” Status
For large houses with many motion sensors, it is convenient to use a single presence variable with values 0/1 that indicates whether people are at home.
This variable can be used to trigger heating and lighting scenarios, preventing unnecessary heating or lighting according to a schedule when nobody is present.
“Away Mode” (Presence Simulation)
Based on the same presence variable, an opposite logic can be built for vacation mode. When the status indicates prolonged absence, automation rules randomly turn lights on, open curtains, or raise blinds, creating a presence simulation effect.
Master Variable for Thermostat Control
If a house has many heating zones:● one “master” temperature variable is created;● all thermostats reference this value;● centralized control from a single point is achieved.
Average Room Temperature
For large spaces with different solar exposure (sunny vs shaded sides):● a virtual temperature variable is created;● the average value from several sensors is written into it;● the system uses this variable to decide when to turn radiators or underfloor heating on or off.
This approach helps avoid overheating or underheating individual zones.
Summary
Virtual variables in i3 Engineering are a universal tool for engineers:● they simplify logic;● reduce the amount of hardware;● increase flexibility and reliability of automation.
They enable the creation of professional automation scenarios even in complex commercial and residential projects.
Didn’t find the answer to your question?
You can contact the technical support chatbot.Found a mistake on the site? Help us fix it!