> For the complete documentation index, see [llms.txt](https://docs.dnt.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dnt.de/dnt-lw-wsci/kommunikationsprotokoll/3.-geratezeit.md).

# 3. Gerätezeit

## 3.1 Gerätezeit

{% tabs %}
{% tab title="GET DEVICE TIME" %}
Fragt die lokale Uhrzeit des Produkts ab (nicht die UTC)

**Downlink**

| Byte | Bit(s) |        Value        |
| :--: | :----: | :-----------------: |
|   0  |   6:0  | `0x08` (Command ID) |

**Uplink**

|     Byte     | Bit(s) |           Value           |
| :----------: | :----: | :-----------------------: |
|       0      |   7:0  |    `0x08` (Command ID)    |
|       1      |   7:6  |            Res.           |
|       1      |   5:0  |   `ID_LOCAL_TIME_SECOND`  |
|       2      |   7:2  |   `ID_LOCAL_TIME_MINUTE`  |
|       2      |   1:0  | `ID_LOCAL_TIME_HOUR[4:3]` |
|       3      |   7:5  | `ID_LOCAL_TIME_HOUR[2:0]` |
|       3      |   4:0  |    `ID_LOCAL_TIME_DAY`    |
|       4      |    7   |    `ID_LOCAL_TIME_DST`    |
|       4      |   6:4  |  `ID_LOCAL_TIME_WEEKDAY`  |
|       4      |   3:0  |   `ID_LOCAL_TIME_MONTH`   |
|       5      |   7:0  |    `ID_LOCAL_TIME_YEAR`   |
|       6      |   7:0  |   `ID_UTC(_DST)_OFFSET`   |
| {% endtab %} |        |                           |

{% tab title="SET DEVICE TIME" %}
Der Parameter ID\_AUTO\_TIME\_SYNC\_EN muss deaktiviert, also auf 0 gesetzt sein.

**Beispiel**

```
0x09 00 61 05 1A = 01.06.2026, 12:00 Uhr in UTC+0
```

|      Byte     | Bit(s) |          Value          |
| :-----------: | :----: | :---------------------: |
|       0       |   7:0  |   `0x09` (Command ID)   |
|       1       |   7:2  | `ID_GLOBAL_TIME_MINUTE` |
|       1       |   1:0  |  `ID_GLOBAL_TIME_HOUR`  |
|       2       |   7:5  |  `ID_GLOBAL_TIME_HOUR`  |
|       2       |   4:0  |   `ID_GLOBAL_TIME_DAY`  |
|       3       |   7:4  |           Res.          |
|       3       |   3:0  |  `ID_GLOBAL_TIME_MONTH` |
|       4       |   7:0  |  `ID_GLOBAL_TIME_YEAR`  |
|  {% endtab %} |        |                         |
| {% endtabs %} |        |                         |

<details>

<summary>ID_LOCAL_TIME_SECOND</summary>

<table><thead><tr><th width="343" align="center">Eigenschaft</th><th align="center">Wert</th></tr></thead><tbody><tr><td align="center">Beschreibung</td><td align="center">Lokale Zeit des Gerätes — Sekunden.</td></tr><tr><td align="center">Größe</td><td align="center">6 Bit</td></tr><tr><td align="center">Wertebereich</td><td align="center">0–59</td></tr><tr><td align="center">Standardwert</td><td align="center">-</td></tr><tr><td align="center">Interpretation</td><td align="center"><p><code>y = x</code> </p><p><code>[y] = s</code></p></td></tr></tbody></table>

</details>

<details>

<summary>ID_LOCAL_TIME_MINUTE</summary>

|   Eigenschaft  |                           Wert                           |
| :------------: | :------------------------------------------------------: |
|  Beschreibung  |             Lokale Zeit des Geräts — Minuten.            |
|      Größe     |                           6 Bit                          |
|  Wertebereich  |                           0–59                           |
|  Standardwert  |                             -                            |
| Interpretation | <p><code>y = x</code> </p><p><code>\[y] = min</code></p> |

</details>

<details>

<summary>ID_LOCAL_TIME_HOUR</summary>

|   Eigenschaft  |                          Wert                          |
| :------------: | :----------------------------------------------------: |
|  Beschreibung  |            Lokale Zeit des Geräts — Stunden            |
|      Größe     |                          5 Bit                         |
|  Wertebereich  |                          0–23                          |
|  Standardwert  |                            -                           |
| Interpretation | <p><code>y = x</code> </p><p><code>\[y] = h</code></p> |

</details>

<details>

<summary>ID_LOCAL_TIME_DAY</summary>

|   Eigenschaft  |                          Wert                          |
| :------------: | :----------------------------------------------------: |
|  Beschreibung  |              Lokale Zeit des Gerätes — Tag             |
|      Größe     |                          5 Bit                         |
|  Wertebereich  |                          1–31                          |
|  Standardwert  |                            -                           |
| Interpretation | <p><code>y = x</code> </p><p><code>\[y] = d</code></p> |

</details>

<details>

<summary>ID_LOCAL_TIME_DST</summary>

<table><thead><tr><th align="center">Eigenschaft</th><th width="344" align="center">Wert</th></tr></thead><tbody><tr><td align="center">Beschreibung</td><td align="center">Lokale Zeit des Geräts — Sommer-/Winterzeit</td></tr><tr><td align="center">Größe</td><td align="center">1 Bit</td></tr><tr><td align="center">Wertebereich</td><td align="center">0–1</td></tr><tr><td align="center">Standardwert</td><td align="center">-</td></tr><tr><td align="center">Interpretation</td><td align="center"><p><code>0</code> = Winterzeit</p><p><code>1</code> = Sommerzeit</p></td></tr></tbody></table>

</details>

<details>

<summary>ID_LOCAL_TIME_WEEKDAY</summary>

|   Eigenschaft  |                                                                    Wert                                                                   |
| :------------: | :---------------------------------------------------------------------------------------------------------------------------------------: |
|  Beschreibung  |                                                    Lokale Zeit des Gerätes — Wochentag.                                                   |
|      Größe     |                                                                   3 Bit                                                                   |
|  Wertebereich  |                                                                    0–6                                                                    |
|  Standardwert  |                                                                     -                                                                     |
| Interpretation | <p>0 →  Montag</p><p>1 →  Dienstag</p><p>2 →  Mittwoch</p><p>3 →  Donnerstag</p><p>4 →  Freitag</p><p>5 →  Samstag</p><p>6 →  Sonntag</p> |
|                |                                                                                                                                           |

</details>

<details>

<summary>ID_LOCAL_TIME_MONTH</summary>

|   Eigenschaft  |                              Wert                              |
| :------------: | :------------------------------------------------------------: |
|  Beschreibung  |                 Lokale Zeit des Geräts — Monat                 |
|      Größe     |                              4 Bit                             |
|  Wertebereich  |                              0–11                              |
|  Standardwert  |                                -                               |
| Interpretation | <p><code>y = x + 1</code> </p><p><code>\[y] = Monat</code></p> |

</details>

<details>

<summary>ID_LOCAL_TIME_YEAR</summary>

|   Eigenschaft  |                              Wert                             |
| :------------: | :-----------------------------------------------------------: |
|  Beschreibung  |                 Lokale Zeit des Geräts — Jahr                 |
|      Größe     |                             8 Bit                             |
|  Wertebereich  |                              0–37                             |
|  Standardwert  |                               -                               |
| Interpretation | <p><code>y = x + 2000</code> </p><p><code>\[y] = a</code></p> |

</details>

<details>

<summary>ID_UTC(_DST)_OFFSET</summary>

|   Eigenschaft  |                                 Wert                                 |
| :------------: | :------------------------------------------------------------------: |
|  Beschreibung  |                  Aktiver UTC-Offset der lokalen Zeit                 |
|      Größe     |                                 7 Bit                                |
|  Wertebereich  |                                 0–96                                 |
|  Standardwert  |                                   -                                  |
| Interpretation | <p><code>y = x \* 0,25h - 12h</code></p><p><code>\[y] = h</code></p> |
|     Hinweis    |    Bei aktiver Sommerzeit entspricht der Wert `ID_UTC_DST_OFFSET`.   |

</details>

<details>

<summary>ID_GLOBAL_TIME_MINUTE</summary>

<table><thead><tr><th width="343" align="center">Eigenschaft</th><th align="center">Wert</th></tr></thead><tbody><tr><td align="center">Beschreibung</td><td align="center">Minute der koordinierten Weltzeit zum Setzen der Gerätezeit.</td></tr><tr><td align="center">Größe</td><td align="center">6 Bit</td></tr><tr><td align="center">Wertebereich</td><td align="center">0–59</td></tr><tr><td align="center">Standardwert</td><td align="center">-</td></tr><tr><td align="center">Interpretation</td><td align="center"><code>y = x [y] = min</code></td></tr></tbody></table>

</details>

<details>

<summary>ID_GLOBAL_TIME_HOUR</summary>

|   Eigenschaft  |                             Wert                             |
| :------------: | :----------------------------------------------------------: |
|  Beschreibung  | Stunde der koordinierten Weltzeit zum Setzen der Gerätezeit. |
|      Größe     |                             5 Bit                            |
|  Wertebereich  |                             0–23                             |
|  Standardwert  |                               -                              |
| Interpretation |    <p><code>y = x</code> </p><p><code>\[y] = h</code></p>    |

</details>

<details>

<summary>ID_GLOBAL_TIME_DAY</summary>

|   Eigenschaft  |                            Wert                           |
| :------------: | :-------------------------------------------------------: |
|  Beschreibung  | Tag der koordinierten Weltzeit zum Setzen der Gerätezeit. |
|      Größe     |                           5 Bit                           |
|  Wertebereich  |                            1–31                           |
|  Standardwert  |                             -                             |
| Interpretation |   <p><code>y = x</code></p><p><code>\[y] = d</code></p>   |

</details>

<details>

<summary>ID_GLOBAL_TIME_MONTH</summary>

|   Eigenschaft  |                             Wert                            |
| :------------: | :---------------------------------------------------------: |
|  Beschreibung  | Monat der koordinierten Weltzeit zum Setzen der Gerätezeit. |
|      Größe     |                            4 Bit                            |
|  Wertebereich  |                             0–11                            |
|  Standardwert  |                              -                              |
| Interpretation |                   `y = x + 1 [y] = Monat`                   |

</details>

<details>

<summary>ID_GLOBAL_TIME_YEAR</summary>

|   Eigenschaft  |                             Wert                             |
| :------------: | :----------------------------------------------------------: |
|  Beschreibung  |  Jahr der koordinierten Weltzeit zum Setzen der Gerätezeit.  |
|      Größe     |                             8 Bit                            |
|  Wertebereich  |                             0–37                             |
|  Standardwert  |                               -                              |
| Interpretation | <p><code>y = x + 2000</code></p><p><code>\[y] = a</code></p> |

</details>

## 2.3 Gerätezeit-Konfiguration

{% tabs %}
{% tab title="GET DEVICE TIME CONFIG" %}
Die Abfrage beinhaltet den Beginn und das Ende der Sommerzeit sowie die\
UTC-Abweichung.

**Downlink**

| Byte | Bit(s) |        Value        |
| :--: | :----: | :-----------------: |
|   0  |   7:0  | `0x0A` (Command ID) |

**Uplink**

|     Byte     | Bit(s) |               Value              |
| :----------: | :----: | :------------------------------: |
|       0      |    7   |               Res.               |
|       0      |   6:0  |        `0x0A` (Command ID)       |
|       1      |   7:0  |      `ID_AUTO_TIME_SYNC_EN`      |
|       1      |   6:0  |          `ID_UTC_OFFSET`         |
|       2      |    7   |               Res.               |
|       2      |   6:4  | `ID_UTC_DST_START_WEEK_OF_MONTH` |
|       2      |   3:0  |     `ID_UTC_DST_START_MONTH`     |
|       3      |   7:5  |    `ID_UTC_DST_START_WEEKDAY`    |
|       3      |   4:0  |      `ID_UTC_DST_START_HOUR`     |
|       4      |   7:0  |               Res.               |
|       4      |   6:0  |        `ID_UTC_DST_OFFSET`       |
|       5      |   7:0  |               Res.               |
|       5      |   6:4  |  `ID_UTC_DST_STOP_WEEK_OF_MONTH` |
|       5      |   3:0  |      `ID_UTC_DST_STOP_MONTH`     |
|       6      |   7:5  |     `ID_UTC_DST_STOP_WEEKDAY`    |
|       6      |   4:0  |      `ID_UTC_DST_STOP_HOUR`      |
|       7      |   7:4  |     `ID_UTC_DST_START_MINUTE`    |
|       7      |   3:0  |     `ID_UTC_DST_STOP_MINUTE`     |
| {% endtab %} |        |                                  |

{% tab title="SET DEVICE TIME CONFIG" %}
Dieser Befehl konfiguriert den Beginn und das Ende der Sommerzeit sowie die&#x20;UTC-Abweichung des Produkts.

**Beispiel**

```
0x0B 34 A2 02 38 A9 03 00 = CET/CEST mit UTC+1 im Winter und UTC+2 im Sommer
```

**Downlink**

|      Byte     | Bit(s) |               Value              |
| :-----------: | :----: | :------------------------------: |
|       0       |    7   |               Res.               |
|       0       |   6:0  |        `0x0B` (Command ID)       |
|       1       |    7   |      `ID_AUTO_TIME_SYNC_EN`      |
|       1       |   6:0  |          `ID_UTC_OFFSET`         |
|       2       |    7   |               Res.               |
|       2       |   6:4  | `ID_UTC_DST_START_WEEK_OF_MONTH` |
|       2       |   3:0  |     `ID_UTC_DST_START_MONTH`     |
|       3       |   7:5  |    `ID_UTC_DST_START_WEEKDAY`    |
|       3       |   4:0  |      `ID_UTC_DST_START_HOUR`     |
|       4       |    7   |               Res.               |
|       4       |   6:0  |        `ID_UTC_DST_OFFSET`       |
|       5       |    7   |               Res.               |
|       5       |   6:4  |  `ID_UTC_DST_STOP_WEEK_OF_MONTH` |
|       5       |   3:0  |      `ID_UTC_DST_STOP_MONTH`     |
|       6       |   7:5  |     `ID_UTC_DST_STOP_WEEKDAY`    |
|       6       |   4:0  |      `ID_UTC_DST_STOP_HOUR`      |
|       7       |   7:4  |     `ID_UTC_DST_START_MINUTE`    |
|       7       |   3:0  |     `ID_UTC_DST_STOP_MINUTE`     |
|  {% endtab %} |        |                                  |
| {% endtabs %} |        |                                  |

<details>

<summary>ID_AUTO_TIME_SYNC_EN</summary>

<table><thead><tr><th width="343" align="center">Eigenschaft</th><th align="center">Wert</th></tr></thead><tbody><tr><td align="center">Beschreibung</td><td align="center">Aktiviert / Deaktiviert die automatische Zeitsynchronisation</td></tr><tr><td align="center">Größe</td><td align="center">1 Bit</td></tr><tr><td align="center">Wertebereich</td><td align="center">0–1</td></tr><tr><td align="center">Standardwert</td><td align="center">1</td></tr><tr><td align="center">Interpretation</td><td align="center"><p><code>0</code> = deaktiviert</p><p><code>1</code> = aktiviert</p></td></tr></tbody></table>

</details>

<details>

<summary>ID_UTC_OFFSET</summary>

|   Eigenschaft  |           Wert           |
| :------------: | :----------------------: |
|  Beschreibung  | Zeitzone relativ zu UTC. |
|      Größe     |           7 Bit          |
|  Wertebereich  |           0–96           |
|  Standardwert  |            52            |
| Interpretation |  `[h] = x * 0,25h - 12h` |

</details>

<details>

<summary>ID_UTC_DST_OFFSET</summary>

|   Eigenschaft  |               Wert               |
| :------------: | :------------------------------: |
|  Beschreibung  | Zeitzone während der Sommerzeit. |
|      Größe     |               7 Bit              |
|  Wertebereich  |               0–96               |
|  Standardwert  |                56                |
| Interpretation |      \[h] = x \* 0,25h - 12h     |

</details>

<details>

<summary>ID_UTC_DST_START_WEEK_OF_MONTH</summary>

|   Eigenschaft  |                                                                                                                       Wert                                                                                                                       |
| :------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|  Beschreibung  |                                                                                                    Woche des Monats für Beginn der Sommerzeit.                                                                                                   |
|      Größe     |                                                                                                                       3 Bit                                                                                                                      |
|  Wertebereich  |                                                                                                                        1–5                                                                                                                       |
|  Standardwert  |                                                                                                                         5                                                                                                                        |
| Interpretation | <p><code>1</code> = 1. Wochentag des Monats</p><p><code>2</code> = 2. Wochentag des Monats</p><p><code>3</code> = 3. Wochentag des Monats</p><p><code>4</code> = 4. Wochentag des Montas</p><p><code>5</code> = letzter Wochentag des Monats</p> |

</details>

<details>

<summary>ID_UTC_DST_START_MONTH</summary>

|   Eigenschaft  |             Wert             |
| :------------: | :--------------------------: |
|  Beschreibung  | Monat des Sommerzeitbeginns. |
|      Größe     |             4 Bit            |
|  Wertebereich  |             0–11             |
|  Standardwert  |               2              |
| Interpretation |       `[month] = x + 1`      |

</details>

<details>

<summary>ID_UTC_DST_START_WEEKDAY</summary>

<table><thead><tr><th width="343" align="center">Eigenschaft</th><th align="center">Wert</th></tr></thead><tbody><tr><td align="center">Beschreibung</td><td align="center">Gibt den Wochentag an, an dem die Sommerzeit beginnt.</td></tr><tr><td align="center">Größe</td><td align="center">3 Bit</td></tr><tr><td align="center">Wertebereich</td><td align="center">0–6</td></tr><tr><td align="center">Standardwert</td><td align="center">0</td></tr><tr><td align="center">Interpretation</td><td align="center"><p><code>0</code> = Sonntag</p><p><code>1</code> = Montag</p><p><code>2</code> = Dienstag</p><p><code>3</code> = Mittwoch</p><p><code>4</code> = Donnerstag</p><p><code>5</code> = Freitag</p><p><code>6</code> = Samstag</p></td></tr></tbody></table>

</details>

<details>

<summary>ID_UTC_DST_START_HOUR</summary>

|   Eigenschaft  |                                                   Wert                                                   |
| :------------: | :------------------------------------------------------------------------------------------------------: |
|  Beschreibung  | Gibt die Stunde an, an der die Sommerzeit beginnt - bezogen auf UTC+ID\_UTC\_OFFSET (lokale Winterzeit). |
|      Größe     |                                                   5 Bit                                                  |
|  Wertebereich  |                                                   0–23                                                   |
|  Standardwert  |                                                     2                                                    |
| Interpretation |                                               `[hours] = x`                                              |

</details>

<details>

<summary>ID_UTC_DST_STOP_WEEK_OF_MONTH</summary>

|   Eigenschaft  |                                                                                                                       Wert                                                                                                                       |
| :------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|  Beschreibung  |                                                                                                     Woche des Monats für Ende der Sommerzeit.                                                                                                    |
|      Größe     |                                                                                                                       3 Bit                                                                                                                      |
|  Wertebereich  |                                                                                                                        1–5                                                                                                                       |
|  Standardwert  |                                                                                                                         5                                                                                                                        |
| Interpretation | <p><code>1</code> = 1. Wochentag des Monats</p><p><code>2</code> = 2. Wochentag des Monats</p><p><code>3</code> = 3. Wochentag des Monats</p><p><code>4</code> = 4. Wochentag des Monats</p><p><code>5</code> = letzter Wochentag des Monats</p> |

</details>

<details>

<summary>ID_UTC_DST_STOP_MONTH</summary>

|   Eigenschaft  |            Wert            |
| :------------: | :------------------------: |
|  Beschreibung  | Monat des Sommerzeitendes. |
|      Größe     |            4 Bit           |
|  Wertebereich  |            0–11            |
|  Standardwert  |              2             |
| Interpretation |      `[month] = x + 1`     |

</details>

<details>

<summary>ID_UTC_DST_STOP_WEEKDAY</summary>

|   Eigenschaft  |                                                                                                              Wert                                                                                                             |
| :------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|  Beschreibung  |                                                                                                 Wochentag des Sommerzeitendes.                                                                                                |
|      Größe     |                                                                                                            `3 Bit`                                                                                                            |
|  Wertebereich  |                                                                                                             `0–6`                                                                                                             |
|  Standardwert  |                                                                                                              `0`                                                                                                              |
| Interpretation | <p><code>0</code> = Sonntag</p><p><code>1</code> = Montag</p><p><code>2</code> = Dienstag</p><p><code>3</code> = Mittwoch</p><p><code>4</code> = Donnerstag</p><p><code>5</code> = Freitag</p><p><code>6</code> = Samstag</p> |

</details>

<details>

<summary>ID_UTC_DST_STOP_HOUR</summary>

|   Eigenschaft  |                            Wert                           |
| :------------: | :-------------------------------------------------------: |
|  Beschreibung  | Stunde des Sommerzeitendes bezogen auf lokale Sommerzeit. |
|      Größe     |                           5 Bit                           |
|  Wertebereich  |                            0–23                           |
|  Standardwert  |                             3                             |
| Interpretation |                       `[hours] = x`                       |

</details>

<details>

<summary>ID_UTC_DST_START_MINUTE</summary>

|   Eigenschaft  |                         Wert                         |
| :------------: | :--------------------------------------------------: |
|  Beschreibung  | Minute des Sommerzeitbeginns in 5-Minuten-Schritten. |
|      Größe     |                         5 Bit                        |
|  Wertebereich  |                         0–11                         |
|  Standardwert  |                           0                          |
| Interpretation |                  `[minutes] = x * 5`                 |

</details>

<details>

<summary>ID_UTC_DST_STOP_MINUTE</summary>

|   Eigenschaft  |                        Wert                        |
| :------------: | :------------------------------------------------: |
|  Beschreibung  | Minute des Sommerzeitendes in 5-Minuten-Schritten. |
|      Größe     |                        5 Bit                       |
|  Wertebereich  |                        0–11                        |
|  Standardwert  |                          0                         |
| Interpretation |                 `[minutes] = x * 5`                |

</details>


---

# 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.dnt.de/dnt-lw-wsci/kommunikationsprotokoll/3.-geratezeit.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.
