Skip to content

Commit

Permalink
valveinstruction
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardHeltec committed Mar 6, 2024
1 parent 5021102 commit 8b43cf0
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 10 deletions.
20 changes: 10 additions & 10 deletions doc/main/general/data_format_document.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ The GXHTC sensor reading error, so the length field is set to 0. However, the ba
| Sensor Name | Parent ID | Data Name | Sub ID | Data Type | Decimal Places | Measurement Range | Unit | Description |
+===============+===========+======================+========+===========+================+===================+===========+===========================================================================================+
| Battery Power | 0X0000 | Battery Percentage | 0X00 | uint8_t | | 0~100 | | |
| | |----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | +----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | | Charging State | 0X01 | uint8_t | | | | 0: uncharged; 1: charging |
+---------------+-----------+----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| RS485 | 0X0001 | | | uint8_t | | | | 485 uploads array data |
Expand All @@ -146,29 +146,29 @@ The GXHTC sensor reading error, so the length field is set to 0. However, the ba
| BH1750 | 0X0003 | Light Intensity | 0X00 | float | 1 | 1 - 65535 | lx | |
+---------------+-----------+----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| GXHTC | 0X0004 | Temperature | 0X00 | float | 2 | –40 to +125 | °C | |
| | |----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | +----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | | Humidity | 0X01 | float | 2 | 0~100 | %RH | |
+---------------+-----------+----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| DA217 | 0X0005 | X-axis Acceleration | 0X00 | float | 2 | ±16 | g | |
| | |----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | +----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | | Y-axis Acceleration | 0X01 | float | 2 | ±16 | g | |
| | |----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | +----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | | Z-axis Acceleration | 0X02 | float | 2 | ±16 | g | |
+---------------+-----------+----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| OUTDOOR_VALVE | 0X0006 | VALVE_0_STATUS | 0X00 | bool | | | | |
| | |----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | +----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | | VALVE_1_STATUS | 0X01 | bool | | | | |
| | |----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | +----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | | PULSE_COUNTER_0 | 0X02 | uint32_t | | | | |
| | |----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | +----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | | PULSE_COUNTER_1 | 0X03 | uint32_t | | | | |
+---------------+-----------+----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| IO | 0X0007 | IO_NUMBER | 0X00 | uint8_t | | | | Number of IOs |
| |-----------+----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | +----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | | IO_EDIT | 0X01 | int16_t | | | | Whether IO mode is adjustable (each bit represents an IO, 0 non-adjustable, 1 adjustable) |
| |-----------+----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | +----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | | IO_MODE | 0X02 | int16_t | | | | IO mode (each bit represents an IO, 0 input, 1 output) |
| |-----------+----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | +----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| | | IO_STATUS | 0X03 | uint16_t | | | | IO status (each bit represents an IO, 0 low, 1 high) |
+---------------+-----------+----------------------+--------+-----------+----------------+-------------------+-----------+-------------------------------------------------------------------------------------------+
| PT100 | 0X0008 | Temperature | 0X00 | float | 1 | | °C | |
Expand Down
85 changes: 85 additions & 0 deletions doc/ready_to_use/hri-3633/source/hri_3633_instruction.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
*************************
Valve control instruction
*************************

{ht_translation}`[简体中文]:[English]`

**This document is still under update, if you have any questions, please contact our official email: support@heltec.cn.**

This document describes the HRI-3633 remote instructions that you can issue on the server.

**The port number is 3.**

1. Check valve status
=====================
+----------------+-------------------+---------------+---------------+
| Description | Instruction type | valve 0 state | valve 1 state |
+================+===================+===============+===============+
| Query | 08 | | |
+----------------+-------------------+---------------+---------------+
| Feedback | 08 | 00 | 01 |
+----------------+-------------------+---------------+---------------+
| Error Feedback | 08 | FF | |
+----------------+-------------------+---------------+---------------+

2. Set valve status
===================
+----------------+-------------------+------------------+-------------+
| Description | Instruction type | Valve number(0-1) | valve state |
+================+===================+==================+=============+
| Setting | 09 | 00 | 01 |
+----------------+-------------------+------------------+-------------+
| Feedback | 09 | 00 | 01 |
+----------------+-------------------+------------------+-------------+
| Error Feedback | 09 | FF | |
+----------------+-------------------+------------------+-------------+

3. Query pulse counter
======================
+----------------+-------------------+-------------------+-------------------+
| Description | Instruction type | Counter number | Counter number |
+================+===================+=======================================+
| Query | 0A | (0-2) |
+----------------+-------------------+-------------------+-------------------+
| Feedback | 0A | 4byte (counter_0) | 4byte (counter_1) |
+----------------+-------------------+-------------------+-------------------+
| Error Feedback | 0A | FF | |
+----------------+-------------------+-------------------+-------------------+

**Counter number** : 0=counter_0; 1=counter_1; 2=counter_0 and counter_1

4. Clear pulse counter
======================
+----------------+-------------------+------------------+-----------------+
| Description | Instruction type | Counter_0 4byte | Counter_1 4byte |
+================+===================+==================+=================+
| Clear | 0B | | |
+----------------+-------------------+------------------+-----------------+
| Feedback | 0B | 4byte | 4byte |
+----------------+-------------------+------------------+-----------------+
| Error Feedback | 0B | FF | |
+----------------+-------------------+------------------+-----------------+

5. Query valve timing task instructions
=======================================
+----------------+-------------------+--------------------+--------+--------------+-------------+--------+-----------+-----------------+
| Description | Instruction type | Instruction number | Enable | action valve | action type | timed | timed | The repeat type |
+================+===================+====================+========+==============+=============+========+===========+=================+
| Query | 0C | (01~15) | | | | | | |
+----------------+-------------------+--------------------+--------+--------------+-------------+--------+-----------+-----------------+
| Feedback | 0C | (01~15) | (0-1) | (0-2) | ( 0-1 ) | (hour) | (minutes) | (0x7F) |
+----------------+-------------------+--------------------+--------+--------------+-------------+--------+-----------+-----------------+
| Error Feedback | 0C | FF | | | | | | |
+----------------+-------------------+--------------------+--------+--------------+-------------+--------+-----------+-----------------+

5. Set valve timing task instructions
=====================================
+----------------+-------------------+--------------------+--------+--------------+-------------+--------+-----------+-----------------+
| Description | Instruction type | Instruction number | Enable | action valve | action type | timed | timed | The repeat type |
+================+===================+====================+========+==============+=============+========+===========+=================+
| Set | 0D | (01~15) | (0-1) | (0-2) | ( 0-1 ) | (hour) | (minutes) | (0x7F) |
+----------------+-------------------+--------------------+--------+--------------+-------------+--------+-----------+-----------------+
| Feedback | 0D | (01~15) | (0-1) | (0-2) | ( 0-1 ) | (hour) | (minutes) | (0x7F) |
+----------------+-------------------+--------------------+--------+--------------+-------------+--------+-----------+-----------------+
| Error Feedback | 0D | FF | | | | | | |
+----------------+-------------------+--------------------+--------+--------------+-------------+--------+-----------+-----------------+
2 changes: 2 additions & 0 deletions doc/ready_to_use/hri-3633/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ HRI-3633 Wireless Aggregator — Valve Controller
Quick Start <quick_start>
Connect to SnapEmu App (One-click registration) <connect_to_snapemu>
Connect to LoRaWAN Server <connect_to_lora_server>
Valve Controller Instruction <hri_3633_instruction/rst>
Data Format Description (OUTDOOR_VALVE) <https://docs.heltec.org/general/data_format_document.html#sensors>
OTA Upgrade <ota_upgrade>
Subscribe MQTT Messages from LoRa Server <https://docs.heltec.org/general/subscribe_mqtt_messages.html>
Subscribe MQTT Messages from SnapEmu <https://docs.heltec.org/general/subscribe_mqtt_messages_from_snapemu.html>
Expand Down

0 comments on commit 8b43cf0

Please sign in to comment.