> For the complete documentation index, see [llms.txt](https://docs.mclimate.eu/mclimate-lorawan-devices/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/vicki-lorawan-device-communication-protocol/operational-modes-and-temperature-control-algorithm.md).

# Operational modes

## Device operational modes

&#x20;The device has 4 operation modes:

* **Offline** – device is not connected to the network. This means that the device can’t join to the LoRaWAN network or doesn’t receive confirmation on the sent keep-alive commands. In this mode the device uses one of the internal temperature control algorithms to achieve target temperature;
* **Manual control** – device is connected to the network; internal temperature control algorithm is disabled. Motor position is determined by the server. **Default online mode for f.w. <= 3.4**
* **Automatic temperature control** - device is connected to the network; internal temperature control algorithm is enabled; Target temperature is determined by the server. **Default online mode for f.w. >=3.5**
* **Automatic temperature control with external temperature reading** – device is connected to the network; internal temperature control algorithms are enabled; internal temperature sensor is disabled; Target temperature and sensor reading is determined by the server.

{% hint style="danger" %}
In f.w. versions <= 4.0, you MUST use confirmed uplinks in case you want to use Online manual control or Automatic temperature control with external temperature readin&#x67;**.**
{% endhint %}

The offline mode is entered automatically when the device has lost connection with the server. If the device later restores its server connection the mode is changed automatically to the previously selected online mode.&#x20;

{% tabs %}
{% tab title="SET" %}

<table data-header-hidden><thead><tr><th width="137">Byte index</th><th>Hex value - Meaning</th></tr></thead><tbody><tr><td><strong>Byte index</strong></td><td><strong>Hex value - Meaning</strong></td></tr><tr><td>0</td><td>0D – The command code.</td></tr><tr><td>1</td><td><p>00 – Online manual control mode. Default for firmware &#x3C;= 3.4</p><p>01 – Online automatic control mode. Default for firmware >= 3.5</p><p>02 – Online automatic control mode with external temperature reading.</p></td></tr></tbody></table>

**Example command:** `0x0D01`

With the example command, online automatic control mode is chosen.
{% endtab %}

{% tab title="GET" %}
This command is used to get Vicki online operational mode. Server sends the command code and the response is sent from Vicki together with the next keep-alive command. The sent command request and the received command response are described in Table 25. The keep-alive in the response is omitted for clarity.

<table data-header-hidden><thead><tr><th width="132.66666666666666">Byte index</th><th width="149">Sent request</th><th>Received response</th></tr></thead><tbody><tr><td><strong>Byte index</strong></td><td><strong>Sent request</strong></td><td><strong>Received response</strong></td></tr><tr><td>0</td><td>18 – Command code.</td><td>18 – The command code.</td></tr><tr><td>1</td><td></td><td><p>XX – Device online mode value:</p><p>00 – Online manual control mode;</p><p>01 – Online automatic control mode;</p><p>02 – Online automatic control mode with external temperature reading.</p></td></tr></tbody></table>

**Example downlink sent by the server:** `0x18`

**Example command response:** `0x1801` – Vicki works in online automatic control mode.
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
If you are in "02 – Online automatic control mode with external temperature reading" mode the Vicki will use an external temperature reading. This will affect it Open window detection capabilities. It will still use its internal readings to determine whether or not the window has been opened, not the external temperature measurement.
{% endhint %}

This mode is used when the measurements of Vicki's temperature sensor is not reliable - e.g. there's a cover in front of the radiator.

{% hint style="warning" %}
Keep in mind that this command is only available when the device is in operational mode "**Automatic temperature control with external temperature reading".** To set this operational mode, send downlink "`0D02`"
{% endhint %}

{% hint style="success" %}
Since firmware >= 4.2, when in Vicki is in "**Automatic temperature control with external temperature reading"**, Vicki reports the set ext. temp value in each keepalive message.
{% endhint %}

## Set valve openness in percentage

{% hint style="warning" %}
This command only works in [Manual mode](/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/pre-46-vicki-lorawan-device-communication-protocol/operational-modes-and-temperature-control-algorithm.md#set).
{% endhint %}

{% tabs %}
{% tab title="SET" %}

<table data-header-hidden><thead><tr><th width="137">Byte index</th><th>Hex value - Meaning</th></tr></thead><tbody><tr><td><strong>Byte index</strong></td><td><strong>Hex value - Meaning</strong></td></tr><tr><td>0</td><td>4E – The command code.</td></tr><tr><td>1</td><td>XX - Valve openness percentage</td></tr></tbody></table>

**Example command:** `0x4E0A`

`0x0A` = 10 = 10%

The valve will open 10% of its maximum capabilities.
{% endtab %}
{% endtabs %}

## Available temperature control algorithms

There are three available temperature control algorithms:

1. (deprecated) Equal directional control - available for f.w. < 4.2. (removed in 4.2)
2. (deprecated) Proportional control - available and **default** for f.w. versions >= 4.0 (removed in 4.3)
3. Proportional Integral control - available and **default** for f.w. versions >= 4.2 (only available algorithm in >= 4.3)

Once you have selected operational mode "Automatic temperature control", you have the option to set which temperature control algorithm you want to use.

Read more about [Equal directional control algorithm](/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/pre-46-vicki-lorawan-device-communication-protocol/operational-modes-and-temperature-control-algorithm/algorithm-1-equal-directional-control.md).&#x20;

Read more about [Proportional control algorithm](/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/pre-46-vicki-lorawan-device-communication-protocol/operational-modes-and-temperature-control-algorithm/algorithm-2-proportional-control.md).

Read more about [Proportional Integral control algorithm](/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/pre-46-vicki-lorawan-device-communication-protocol/operational-modes-and-temperature-control-algorithm/algorithm-3-proportional-integral.md).

## Temperature control algorithm selection and retrieval

{% hint style="info" %}
This feature is available in firmware >= 4.0
{% endhint %}

{% hint style="warning" %}
The following commands are not supported in firmware >=4.3
{% endhint %}

{% tabs %}
{% tab title="SET" %}

<table data-header-hidden><thead><tr><th width="135"></th><th></th></tr></thead><tbody><tr><td><strong>Byte index</strong></td><td><strong>Hex value - Meaning</strong></td></tr><tr><td>0</td><td>2C – The command code.</td></tr><tr><td>1</td><td><p>XX – Value to set according to the desired temperature control algorithm to be used by the device.</p><p>00: Use the "Proportional control" algorithm (not available in f.w.  >= 4.3)</p><p>01: Use the "Equal directional control" algorithm (not available in f.w. >= 4.2)<br>02: Use the "Proportional Integral control" algorithm.</p></td></tr></tbody></table>

**Example command:** `0x2C02` – Set the device to use the "Proportional Integral control" algorithm.
{% endtab %}

{% tab title="GET" %}

<table data-header-hidden><thead><tr><th width="131.66666666666666"></th><th width="179"></th><th></th></tr></thead><tbody><tr><td><strong>Byte index</strong></td><td><strong>Sent request</strong></td><td><strong>Received response</strong></td></tr><tr><td>0</td><td>2B – The command code.</td><td>2B – The command code.</td></tr><tr><td>1</td><td> </td><td><p>XX – Indicate the currently used algorithm for temperature control.</p><p>00: Proportional control algorithm used. <strong>Default for f.w. >= 4.0</strong></p><p>01: Equal directional control used. (deprecated in f.w. >=4.2)<br>02: For the device to use the "Proportional Integral control" algorithm. <strong>Default for f.w. >= 4.2</strong></p></td></tr></tbody></table>

**Example command:** `0x2B`

**Example response:** `0x2B00` – Currently the Proportional control algorithm is in use.
{% endtab %}
{% endtabs %}

## Device primary operational mode (heating/cooling)

This command is used to change the device primary operational mode. Possible choices are **heating (default for the device)** and **cooling**. Switching from heating to cooling mode is required, when during the summer, cold water flow through the radiator. At the cold radiator water period end, switch to heating mode is required. Note that for both modes device functionalities open window detection and internal temperature control algorithm are available. The command data is described in Table 30. The keep-alive in the response is omitted for clarity.

{% tabs %}
{% tab title="SET" %}

<table><thead><tr><th width="137">Byte index</th><th>Hex Value - Meaning</th></tr></thead><tbody><tr><td><strong>Byte index</strong></td><td><strong>Hex Value - Meaning</strong></td></tr><tr><td>0</td><td>1E - The command code</td></tr><tr><td>1</td><td><p>00 – Vicki operates in heating mode (default for the device);</p><p>01 – Vicki operates in cooling mode.</p></td></tr></tbody></table>

**Example command:** `0x1E00` - set Vicki to operate in heating mode
{% endtab %}

{% tab title="GET" %}

<table data-header-hidden><thead><tr><th width="140">Byte index</th><th width="138.66666666666666">Sent request</th><th>Received response</th></tr></thead><tbody><tr><td><strong>Byte index</strong></td><td><strong>Sent request</strong></td><td><strong>Received response</strong></td></tr><tr><td>0</td><td>1F – Command code.</td><td>1F – The command code.</td></tr><tr><td>1</td><td></td><td><p>00 – Device primary operational mode is heating;</p><p>01 – Device primary operational mode is cooling.</p></td></tr></tbody></table>

**Example command:** `0x1E`

**Example response:** `0x1F01` - Vicki operates in cooling mode
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
When using Cooling mode (`0x01` command parameter), the internal PI algorithms is not utilized. You would have to change to Manual control mode and controll the valve openness directly. Automatic Cooling mode control via the internal PI algorithm is planned to be implemented in a future Firmware version.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/vicki-lorawan-device-communication-protocol/operational-modes-and-temperature-control-algorithm.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
