How to integrate the Shelly TRV device with Ilevia
How to integrate the Shelly TRV thermostatic valve with the Ilevia server via MQTT: web interface configuration and component setup in Ilevia Manager.
Introduction
The Shelly TRV is a remotely controllable thermostatic valve. This guide explains how to configure the device with the MQTT protocol to integrate it with the Ilevia system, reading its values and setting the temperature with a Setpoint component.
Web interface configuration
Step 1:
First, power on your Shelly TRV device and connect to its Wi-Fi network, then enter the default IP address (192.168.33.1) to access its web interface.

Step 2:
To connect the device to your local network, open the “Internet security settings” menu and go to the “Wifi mode client” section.

Step 3:
Enter your local network credentials and click Save. The Shelly device will then try to connect to the network configured in the web interface.

Step 4:
Once the device is connected to your local network, reconnect to its web interface, open the “Internet and security settings” menu, go to the “Advanced developer settings” section, and finally select the “Enable action execution via MQTT” checkbox.

Step 5:
Now that the “Advanced developer settings” are enabled, configure the MQTT settings to allow the Shelly device to communicate and exchange data with the X1 server.
Enter the X1 server IP in the “server IP address” text field, set QoS to 2, and finally click Save.

Topic configuration
Step 6:
Open the Ilevia Manager software and create a new MQTT gateway in the Gateway section, as explained in this guide.
Step 7:
1. Add a new Info component in the “My components” section. 2. Make sure the component is set to the gateway you just created (MQTT broker).

Step 8:
Set the Event topic in the Info component you just added to the project, as shown in the image below. The text <device ID> in the topic must be replaced with your Shelly device ID. For more information on the device ID, see this guide.
Here you can view the topic configuration.


Step 9:
1. Add a new Setpoint component. 2. Make sure it is set to the MQTT protocol.

Step 10:
Set the Write and Event topics as shown in the image below. The text <device ID> in the topic must be replaced with your Shelly device ID; see this guide to learn how to find the device ID. Then add the script.
Here you can view the script configuration.


Step 11:
Add the components to the user interface and upload the project to the server.
