Virtual devices

  • Document number: PO-079-EN
  • Version: 3.0
  • Date of publication: October 2, 2024


Introduction

Virtual devices help to extend the functionalities of the Ampio system by transmitting messages from other types of devices (eg. ZigBee modules).

Configuration in Ampio Designer

To add a virtual device to the project, select the + icon shown in the right-hand side of the DEVICES table.

Click to enlarge and open in a new tab.

Assign the MAC address according to the device you wish to support. Select the functionalities and their number one by one, then press Add.

Click to enlarge and open in a new tab.

Conditions

Conditions are created in the LOGIC tab. From the list of devices in the TRIGGERS column, select the device created in the previous step and create a condition as for traditional modules.

Click to enlarge and open in a new tab.

Example use of virtual devices

Adding a virtual device makes it possible, for example, to integrate with external temperature sensors using Node-RED.

In this section of the guide, you will learn how to send the temperature from an external sensor to the Ampio system’s CAN network using Node-RED and a virtual device created in Ampio Designer.

Requirements

  • Temperature sensor providing an API to retrieve temperature values.
  • Ampio installation with access to Node-RED. You can find a full tutorial on Node-RED here.

Configuration in Node-RED

  1. Launch Node-RED and log into the interface.

  2. Add a sensor reading:

    • Configure an input block that will take data from your temperature sensor.
    • If you do not have a physical sensor, you can use the Inject block to simulate a fixed measurement (e.g. 27°C).
  3. Add the MQTT Out block:

    • Drag the mqtt out block to the work area and link it to the sensor reading block.

Click to enlarge and open in a new tab.

  1. Configure MQTT Out block:

    • Open the settings of the mqtt out block.
    • Select an existing MQTT configuration or create a new one with the details of the MQTT server used by the Ampio system.
    • In the Topic field, type: ampio/to/broadcast/<MAC>/t, where <MAC> is the MAC address selected for the virtual device (in hexadecimal format, between 000 and FFF). Make sure that this address is not already in use in your installation. In our example, we will use the address 030.
    • Click Done to save the settings.
  2. Save and run flow:

    • Click Deploy to save and run the configuration.
    • Check in the Debug tab that the connection has been made and data is being sent correctly.

Use of readings in the Ampio system

Now that the sensor data is available in the system, you can use it in a variety of ways:

  • Displaying the temperature on touch panels or in the mobile app.
  • Controlling heating zones by adding the sensor as a data source for thermostats.
  • Creation of automations that respond to temperature changes, such as triggering ventilation or notifications when certain thresholds are exceeded.
  • Integration with other systems, using sensor data in more complex scenarios.

Sensor readings will not be visible in the Ampio Designer, but if configured correctly, the readings will be on the CAN network, meaning they will work for the conditions created and will be visible in the Ampio UNI application.

Configuration in the Smart Home Configurator*

*from January 2024, the Smart Home Configurator software is no longer being developed. It is recommended to use it only in substantiated instances.

To add a new virtual device, you have to start by running the Ampio Smart Home configurator.

Adding a virtual device

Click to enlarge and open in a new tab.

Picking the type, MAC address and name

Click to enlarge and open in a new tab.

After accepting, you can see the new device on the list.

Click to enlarge and open in a new tab.

A virtual device is on the list of devices only until the first closing of the Ampio Smart Home configurator. Remember to save the project, otherwise you will have to add it from scratch at the next launch.

Conditions

You can create condition from the virtual device but not to the virtual device.

Click to enlarge and open in a new tab.

For example, in the case of Z-Wave you can create a condition from slave inputs using the virtual device, but controlling outputs is done through the function tab of the M-CON-ZWAVE-s module.