> 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-ht-+-pir-lite/ht-+-pir-lite-device-communication-protocol/pir-motion-sensor.md).

# PIR (Motion sensor)

## PIR State

This commands allow you to set/get the PIR state - whether it's enabled or disabled at all. By default, the PIR is enabled.

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

<table data-header-hidden><thead><tr><th width="131"></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>36 – The command code.</td></tr><tr><td>1</td><td><p>00 – Disable the PIR sensor; </p><p>01 – Enable the PIR sensor. <strong>Default state.</strong></p></td></tr></tbody></table>

**Example downlink:** 0x3600 – Disable the PIR sensor.
{% endtab %}

{% tab title="GET" %}

<table data-header-hidden><thead><tr><th width="143.99999999999997"></th><th width="193"></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>37 – Command code</td><td>37 – Command code</td></tr><tr><td>1</td><td> </td><td>00 - The PIR sensor is disabled.<br>01 - The PIR sensor is enabled.</td></tr></tbody></table>

**Example command:** 0x37

**Example response:** 0x3700 – The PIR sensor is disabled.
{% endtab %}
{% endtabs %}

## Occupancy timeout

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

<table data-header-hidden><thead><tr><th width="140"></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>38 – The command code.</td></tr><tr><td>1</td><td>XX –  Occupancy timeout data, bits 15:8;</td></tr><tr><td>2</td><td>XX – Occupancy timeout data, bits 7:0. <strong>Default value is 5min.</strong></td></tr></tbody></table>

**Example command:** 0x38003C – Set the occupancy timeout to 1min.
{% endtab %}

{% tab title="GET" %}

<table data-header-hidden><thead><tr><th width="143.99999999999997"></th><th width="193"></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>39 – Command code</td><td>39 – Command code</td></tr><tr><td>1</td><td> </td><td>XX - Occupancy timeout - bits 15:8</td></tr><tr><td>2</td><td></td><td>XX - Occupancy timeout - bits 7:0</td></tr></tbody></table>

**Example command:** 0x39

**Example response:** 0x39003C –  The occupancy timeout is 1min.
{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Note:** Acceptable values: 15...65535sec. (1sec. resolution).
{% endhint %}

## PIR Sensitivity

The PIR sensitivity can be set from 12 to 255. The minimum value we advise setting is 12 or 0x0C - the sensor will be super sensitive to movements.

{% hint style="warning" %}
The higher the value, the less sensitive the PIR sensor is to movement.&#x20;

Minimum = 12 - very sensitive

Maximum = 255 - less sensitive
{% endhint %}

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

<table data-header-hidden><thead><tr><th width="131"></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>3Е – The command code.</td></tr><tr><td>1</td><td>XX - PIR sensor sensitivity. <strong>Default value is 20.</strong></td></tr></tbody></table>

**Example command:** 0x3E1E – Set PIR sensor sensitivity to 30.
{% endtab %}

{% tab title="GET" %}

<table data-header-hidden><thead><tr><th width="143.99999999999997"></th><th width="193"></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>3F – Command code</td><td>3F – Command code</td></tr><tr><td>1</td><td> </td><td>XX - The sensitivity of the PIR sensor</td></tr></tbody></table>

**Example command:** 0x3F

**Example response:** 0x3F1E – The sensitivity of the PIR sensor is 0x1E => converted to decimal => 30.
{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Note:** Acceptable values: 12...255.
{% 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-ht-+-pir-lite/ht-+-pir-lite-device-communication-protocol/pir-motion-sensor.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
