|
@@ -1,35 +1,147 @@
|
|
|
-| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 |
|
|
|
-| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
|
|
+## 水系统-外机控制器项目
|
|
|
|
|
|
-# _Sample project_
|
|
|
+### 1.云端接入文档
|
|
|
|
|
|
-(See the README.md file in the upper level 'examples' directory for more information about examples.)
|
|
|
+#### 1.1 运行状态上报
|
|
|
|
|
|
-This is the simplest buildable example. The example is used by command `idf.py create-project`
|
|
|
-that copies the project to user specified path and set it's name. For more information follow the [docs page](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html#start-a-new-project)
|
|
|
+_线控器向云端上报的自己的运行状态_
|
|
|
|
|
|
+* 标识符: `status`
|
|
|
+* 参数:
|
|
|
+
|
|
|
+```json
|
|
|
+{
|
|
|
+ "action": "devSend",
|
|
|
+ "msgId": 0,
|
|
|
+ "deviceCode": "84FCE66AA534",
|
|
|
+ "subDeviceId": "",
|
|
|
+ "timestamp": 1747633694000,
|
|
|
+ "data": {
|
|
|
+ "cmd": "status",
|
|
|
+ "params": {
|
|
|
+ "power": 1,
|
|
|
+ "set_water_temp": 25,
|
|
|
+ "mode": 1,
|
|
|
+ "fjsq_exist": 0,
|
|
|
+ "fjsq_status": 8
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+* 参数说明:
|
|
|
+
|
|
|
+| 字段 | 读写类型 | 类型 | 说明 |
|
|
|
+|----------------|------|-----|-----------------------------------------------------|
|
|
|
+| power | W/R | int | 电源状态(0:关,1:开) |
|
|
|
+| set_water_temp | W/R | int | 设定水温 |
|
|
|
+| mode | R | int | 模式(1:制冷2:制热) |
|
|
|
+| fjsq_exist | R | int | 是否存在分集水器,1:存在,0:不存在 |
|
|
|
+| fjsq_status | R | int | 分集水器状态,1-8个bit表示分集水器的运行状态,如0011 0011表示1,2,5,6路为开启状态 |
|
|
|
|
|
|
|
|
|
-## How to use example
|
|
|
-We encourage the users to use the example as a template for the new projects.
|
|
|
-A recommended way is to follow the instructions on a [docs page](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html#start-a-new-project).
|
|
|
|
|
|
-## Example folder contents
|
|
|
+#### 1.2 电源开关
|
|
|
|
|
|
-The project **sample_project** contains one source file in C language [main.c](main/main.c). The file is located in folder [main](main).
|
|
|
+* 标识符:`setPower`
|
|
|
+* 参数:
|
|
|
|
|
|
-ESP-IDF projects are built using CMake. The project build configuration is contained in `CMakeLists.txt`
|
|
|
-files that provide set of directives and instructions describing the project's source files and targets
|
|
|
-(executable, library, or both).
|
|
|
+| 字段 | 类型 | 说明 |
|
|
|
+|-------|-----|-----------|
|
|
|
+| value | int | 1:开关,0:关机 |
|
|
|
|
|
|
-Below is short explanation of remaining files in the project folder.
|
|
|
+* 示例:
|
|
|
|
|
|
+```json
|
|
|
+{
|
|
|
+ "cmd": "setPower",
|
|
|
+ "params": {
|
|
|
+ "value": 1
|
|
|
+ }
|
|
|
+}
|
|
|
```
|
|
|
-├── CMakeLists.txt
|
|
|
-├── main
|
|
|
-│ ├── CMakeLists.txt
|
|
|
-│ └── main.c
|
|
|
-└── README.md This is the file you are currently reading
|
|
|
+
|
|
|
+#### 1.3 设定模式
|
|
|
+
|
|
|
+* 标识符:`setMode`
|
|
|
+* 参数:
|
|
|
+
|
|
|
+| 字段 | 类型 | 说明 |
|
|
|
+|-------|-----|-----------|
|
|
|
+| value | int | 1:制冷,2:制热 |
|
|
|
+
|
|
|
+* 示例:
|
|
|
+
|
|
|
+```json
|
|
|
+{
|
|
|
+ "cmd": "setMode",
|
|
|
+ "params": {
|
|
|
+ "value": 1
|
|
|
+ }
|
|
|
+}
|
|
|
```
|
|
|
-Additionally, the sample project contains Makefile and component.mk files, used for the legacy Make based build system.
|
|
|
-They are not used or needed when building with CMake and idf.py.
|
|
|
+
|
|
|
+#### 1.4 设定水温
|
|
|
+
|
|
|
+* 标识符:`setWaterTemp`
|
|
|
+* 参数:
|
|
|
+
|
|
|
+| 字段 | 类型 | 说明 |
|
|
|
+|-------|-----|--------|
|
|
|
+| value | int | 12-55℃ |
|
|
|
+
|
|
|
+* 示例:
|
|
|
+
|
|
|
+```json
|
|
|
+{
|
|
|
+ "cmd": "setWaterTemp",
|
|
|
+ "params": {
|
|
|
+ "value": 13
|
|
|
+ }
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+#### 1.5 分集水器分路开关
|
|
|
+
|
|
|
+* 标识符:`setIO`
|
|
|
+* 参数:
|
|
|
+
|
|
|
+| 字段 | 类型 | 说明 |
|
|
|
+|-------|-----|----------------|
|
|
|
+| no | int | 代表分路序号,取值范围1-8 |
|
|
|
+| value | int | 1:打开,0:关闭 |
|
|
|
+
|
|
|
+* 示例:
|
|
|
+
|
|
|
+```json
|
|
|
+{
|
|
|
+ "cmd": "setWaterTemp",
|
|
|
+ "params": {
|
|
|
+ "no": 1,
|
|
|
+ "value": 1
|
|
|
+ }
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+#### 1.6 联动开关
|
|
|
+
|
|
|
+**用于设置外机是否与内机联动,如果打开,当用户开启任意内机且模式为制热或制冷的的情况下,外机会自动开机运行;如果关闭则由用户自行开机
|
|
|
+**
|
|
|
+
|
|
|
+* 标识符:`setLinkage`
|
|
|
+* 参数:
|
|
|
+
|
|
|
+| 字段 | 类型 | 说明 |
|
|
|
+|-------|-----|---------------|
|
|
|
+| value | int | 1:开启联动,0:关闭联动 |
|
|
|
+
|
|
|
+* 示例:
|
|
|
+
|
|
|
+```json
|
|
|
+{
|
|
|
+ "cmd": "setLinkage",
|
|
|
+ "params": {
|
|
|
+ "value": 1
|
|
|
+ }
|
|
|
+}
|
|
|
+```
|