# 超簡単！標準アプリ

### 相手端末からの状態通知：ステータス0x81 <a href="#karanosuttasu-0-x81" id="karanosuttasu-0-x81"></a>

#### データフォーマット <a href="#dtafmatto" id="dtafmatto"></a>

```
:78811501C98201015A000391000C2E00810301FFFFFFFFFB
 ^1^2^3^4^5^^^^^^^6^7^^^8^9^^^a^b^c^de1e2e3e4ef^g
```

| 番号 | バイト数 | 意味           | データ例     | 内容                 | 備考                                                                            |
| -- | ---- | ------------ | -------- | ------------------ | ----------------------------------------------------------------------------- |
| 1  | 1    | 送信元の論理デバイスID | 78       | 送信元の論理デバイスIDは0x78  |                                                                               |
| 2  | 1    | コマンドID       | 81       | IO状態の通知            |                                                                               |
| 3  | 1    | パケット識別子      | 15       | ​                  | アプリケーションIDより生成される                                                             |
| 4  | 1    | プロトコルバージョン   | 01       | ​                  | 01 で固定                                                                        |
| 5  | 1    | LQI          | C9       | 201                | 0が最小で255が最大                                                                   |
| 6  | 4    | 送信元のシリアルID   | 8201015A | 送信元のシリアルIDは201015A |                                                                               |
| 7  | 1    | 宛先の論理デバイスID  | 00       | 親機宛                | ​                                                                             |
| 8  | 2    | タイムスタンプ      | 0391     | 約14.3秒             | 1秒で64カウント                                                                     |
| 9  | 1    | 中継フラグ        | 00       | 中継してない             | ※1 参照                                                                         |
| a  | 2    | 電源電圧\[mV]    | 0C2E     | 3118mV             | ​                                                                             |
| b  | 1    | 未使用          | 00       | ​                  | ​                                                                             |
| c  | 1    | DI の状態ビット    | 81       | DI1がON(Low)        | <p>DI1(0x1) DI2(0x2) DI3(0x4) DI4(0x8)。1がOn(Lowレベル)。</p><p>MBSが1だったら定期送信。</p> |
| d  | 1    | DI の変更状態ビット  | 03       | DI1とDI2が変更対象       | DI1(0x1) DI2(0x2) DI3(0x4) DI4(0x8)。1が変更対象。                                   |
| e1 | 1    | AI1の変換値      | 01       | 16mV               | ※2、※3 参照                                                                      |
| e2 | 1    | AI2の変換値      | FF       | 未使用                | ※2、※3 参照                                                                      |
| e3 | 1    | AI3の変換値      | FF       | 未使用                | ※2、※3 参照                                                                      |
| e4 | 1    | AI4の変換値      | FF       | 未使用                | ※2、※3 参照                                                                      |
| ef | 1    | AI1～AI4の補正値  | FF       | 未使用                | <p>LSBから順に２ビットずつ補正値、LSB側が AI1、MSB側が AI4</p><p>※2、※3 参照</p>                    |
| g  | 1    | チェックサム       | FB       |                    | ​                                                                             |

※1 中継フラグは中継の回数を意味します。中継をしていない時は０になります。 ※2 AD値の復元には以下のように計算します。

> AI1\[mV] = (e1 \* 4 + ef1) \* 4 AI2\[mV] = (e2 \* 4 + ef2) \* 4 AI3\[mV] = (e3 \* 4 + ef3) \* 4 AI4\[mV] = (e4 \* 4 + ef4) \* 4

※3 AI は未使用(VCC接続) の場合、対応する e1 ～ e4 値は 0xFF です。‌

### 任意データの送受信：コマンド0x01 <a href="#dtanokomando-0-x01" id="dtanokomando-0-x01"></a>

#### データフォーマット <a href="#dtafmatto-1" id="dtafmatto-1"></a>

```
:780100112233AABBCCDD13
 ^1^2^^^^^^^^^^^^^^^3^4
```

| 番号 | バイト数 | 意味           | データ例             | 内容                | 備考 |
| -- | ---- | ------------ | ---------------- | ----------------- | -- |
| 1  | 1    | 送信元の論理デバイスID | 78               | 送信元の論理デバイスIDは0x78 | ​  |
| 2  | 1    | コマンドID       | 01               | 任意データの送受信         |    |
| 3  | N    | データ          | 00112233AABBCCDD | ​                 |    |
| 4  | 1    | チェックサム       | 13               |                   |    |


---

# Agent Instructions: 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:

```
GET https://wings.twelite.info/how-to-use/parent-mode/receive-message/app_twelite.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
