diff --git a/docs/Commands.md b/docs/Commands.md index cec2817745..9f23a1701f 100644 --- a/docs/Commands.md +++ b/docs/Commands.md @@ -633,7 +633,7 @@ SetOption156|`1` = (Sen5x) Run in passive SetOption157|`0` = hide NeoPool sensitive data _(default)_
`1` = show NeoPool sensitive data SetOption158|`0` = Disable publish ModbusReceived MQTT messages (`1`), in this case you must use event trigger rules instead SetOption159|Set counting for Counter on falling edge or rising and falling edge
`0` = Counter only reacts on falling edge _(default)_
`1` = Counter reacts on falling and rising edge - +SetOption160|`1` = Disable generate moving event by sensor report - use LD2410 out pin for events ### TuyaMCU diff --git a/docs/HLK-LD2410.md b/docs/HLK-LD2410.md new file mode 100644 index 0000000000..13712b8f94 --- /dev/null +++ b/docs/HLK-LD2410.md @@ -0,0 +1,102 @@ +# HLK-LD2410 24GHz mmWave presence sensor + +??? failure "This feature is not included in precompiled binaries" + + When [compiling your build](Compile-your-build) add the following to `user_config_override.h`: + ```c++ + #ifndef USE_LD2410 + #define USE_LD2410 + #endif + ``` + +!!! warning "This feature is designed only to work with HLK-LD 2410, HLK-LD2410B and HLK-LD2410C modules. To work with the HLK-LD2410S module see [here](HLK-LD2410S.md)." + +![HLK-LD2410(B)](_media/devices/HLK/LD2410/board_2410b.jpg) +![HLK-LD2410C](_media/devices/HLK/LD2410/board_2410c.png) + +## Configuration +### Wiring +![HLK-LD2410-wiring](_media/devices/HLK/LD2410/2410_wiring.png) + +| HLK-LD2410(B,C) | ESP | +|---|---| +|GND |GND +|VCC | 5V +|TX | GPIOx +|RX | GPIOy +|OUT | GPIOz + +!!! Warning "Warning: The power supply voltage of the module is **5V**, and the power supply capacity of the input power supply is required to be greater than 200mA.
**The module IO output level is 3.3V!**" + +### Tasmota Settings +In the **_Configuration -> Configure Module_** page assign: + +- GPIOx to `LD2410 Tx` +- GPIOy to `LD2410 Rx` +- GPIOz to `Switch` or `Button` + +??? example "Settings example" + + +## Usage +Tasmola is ready to read the status packet from the LD2410 module + + + +Console output: +``` +12:52:46.234 RSL: SENSOR = {"Time":"2024-11-09T12:52:46","LD2410":{"Distance":[200.0,181.0,144.0],"Energy":[13,100]}} +``` + +If an object is detected, a report will be sent every second. You can disable sending every second by setting [`SetOption160`](Commands.md#setoption160) to `1` + +### Commands + +Set factory default settings: +``` +LD2410Duration 0 +``` + +Set no-one duration in seconds (default 5): +``` +LD2410Duration 1..65535 +``` + +Set moving distance sensitivity for up to 9 gates (at 0.75 meter interval): +``` +LD2410MovingSens 50,50,40,30,20,15,15,15,15 +``` + +Set static distance sensitivity for up to 9 gates (at 0.75 meter interval): +``` +LD2410StaticSens 0,0,40,40,30,30,20,20,20 +``` +#### Engineering mode +Start/stop engineering mode: +``` +LD2410EngineeringStart +LD2410EngineeringEnd +``` + +Read last sensors received in engineering mode command and output: +``` +LD2410Get +``` +``` +13:40:21.997 RSL: RESULT = {"LD2410":{"Moving energy":[13,12,10,9,9,8,1,4,4],"Static energy":[0,0,100,100,45,32,147,15,5],"Light":103,"Out_pin":1}} +``` + +In engineering mode, the main page additionally displays the obtained values for moving and static targets: + + + +!!! info "Light sensor available if installed on board" + +### Rules + +You can use the LD2410 trigger to create rules, example: +``` +rule1 ON LD2410 DO state ENDON +``` +!!! warning "If [`SetOption160`](Commands.md#setoption160) is set to `1` rules wii be triggered only in log interval. Set [`SetOption160`](Commands.md#setoption160) to `0` for trigger on detected piople" + diff --git a/docs/HLK-LD2410S.md b/docs/HLK-LD2410S.md new file mode 100644 index 0000000000..235d065253 --- /dev/null +++ b/docs/HLK-LD2410S.md @@ -0,0 +1,114 @@ +# HLK-LD2410S Low energy 24GHz mmWave presence sensor + +??? failure "This feature is not included in precompiled binaries" + + When [compiling your build](Compile-your-build) add the following to `user_config_override.h`: + ```c++ + #ifndef USE_LD2410S + #define USE_LD2410S + #endif + ``` + +!!! warning "This feature is designed only to work with HLK-LD 2410S module. To work with the HLK-LD2410(B,C) modules see [here](HLK-LD2410.md)." + + + +## Configuration +### Wiring +![HLK-LD2410S-wiring](_media/devices/HLK/LD2410S/2410S_pinout.png) + +| HLK-LD2410S | ESP | +|---|---| +|GND |GND +|3V3 | 3.3V +|OT1 | GPIOx +|RX | GPIOy +|OT2 | GPIOz + +!!! Warning "Warning: The power supply voltage of the module is **3.3V**" + +### Tasmota Settings +In the **_Configuration -> Configure Module_** page assign: + +- GPIOx to `LD2410S Rx` +- GPIOy to `LD2410S Tx` +- GPIOz to `Switch` or `Button` + +??? example "Settings example" + + +## Usage +Tasmola is ready to read the status packet from the LD2410S module + + + +Console output: +``` +15:46:09.267 RSL: SENSOR = {"Time":"2024-11-09T15:46:09","LD2410S":{"Distance":196.0, "People":2}} +``` +Where **_People_** values: 0/1 - not detected, 2/3 - detected + +### Commands + +- **Reread common, trigger and hold parameters from device (_use this command after change module settings or after `LD2410S_AutoUpdate` command_):** +``` +LD2410S_ReRead +``` +- **Show previously received parameters on startup or after `LD2410S_ReRead` command:** +``` +LD2410S_Parameters +``` +and result: +``` +15:55:56.399 RSL: RESULT = {"LD2410S_Common":{"Near Door": 0,"Far Door":16,"Hold Time":10,"Status freq":10,"Distance freq":10,"Response speed":5},"Trigger values":[47,46,37,35,31,30,31,32,31,30,29,31,30,29,27,29],"Hold values":[45,45,34,32,30,29,30,31,30,29,28,30,29,28,26,28]} +``` +- **Set common parameters: near door, far door, hold_time, status_freq, distance_freq, response_speed (see [manual](https://www.hlktech.net/)):** +``` +LD2410S_SetCommon 0-16,1-16,10-120,5-80,5-80,5/10 +``` +- **Set trigger values (the value at which the status changes to "people"):** +``` +LD2410S_SetTrigger n,n1..n16 +``` +- **Set hold values (the value of holding the "people" status):** +``` +LD2410S_SetHold n,n1..n16 +``` +- **Set device output mode `0`-short, `1`-normal:** +``` +LD2410S_Out_Mode 0/1 +``` +_Console output in short mode:_ +``` +16:09:49.247 RSL: SENSOR = {"Time":"2024-11-09T16:09:49","LD2410S":{"Distance":0.0, "People":0}} +``` +_Console output in normal mode:_ +``` +16:22:59.255 RSL: SENSOR = {"Time":"2024-11-09T16:22:59","LD2410S":{"Distance":187.0, "People":2, "Energy":[0,0,209,217,86,131,104,141,80,128,116,253,251,209,51,232]}} +``` +- **Start autoupdate trigger and hold thresholds/ Params: trigger_scale,retension_factor,scan_time:** +``` +LD2410S_AutoUpdate 2,1,60 +``` +_Concole output:_ +``` +16:29:58.239 RSL: SENSOR = {"Time":"2024-11-09T16:29:58","LD2410S":{"Update threshold":"0%"}} +16:29:59.261 RSL: SENSOR = {"Time":"2024-11-09T16:29:59","LD2410S":{"Update threshold":"2%"}} +16:30:00.277 RSL: SENSOR = {"Time":"2024-11-09T16:30:00","LD2410S":{"Update threshold":"3%"}} +... +16:31:01.230 RSL: SENSOR = {"Time":"2024-11-09T16:31:01","LD2410S":{"Update threshold":"100%"}} +``` +And in main web page:
+ +- **Start reports every seconds (need for tuning in normal output mode):** +``` +LD2410S_Follow 0/1 +``` + +### Rules + +You can use the LD2410S trigger to create rules, example: +``` +rule1 ON LD2410S#Distance >0 DO state ENDON +rule2 ON LD2410S#People =2 DO state ENDON +``` diff --git a/docs/Supported-Peripherals.md b/docs/Supported-Peripherals.md index 1ab1772290..6ec42e4092 100644 --- a/docs/Supported-Peripherals.md +++ b/docs/Supported-Peripherals.md @@ -52,7 +52,8 @@ DS3502 | Digital potentiometer| I^2^C **[HC-SR04
HC-SR04P
JSN-SR04T)](HC-SR04)** | Ultrasonic sensor | gpio **HM330x** | SeedStudio Grove HM3301 particulate matter sensor | I^2^C [**HMC5883L**](https://github.com/arendst/Tasmota/blob/development/tasmota/tasmota_xsns_sensor/xsns_101_hmc5883l.ino) | 3-Axis digital compass sensor | I^2^C -**HLK-LD2410** | 24GHz mmWave presence sensor | serial +**[HLK-LD2410
HLK-LD2410B](HLK-LD2410)** | 24GHz mmWave presence sensor | serial +**[HLK-LD2410S](HLK-LD2410S)** | Low energy 24GHz mmWave presence sensor | serial **[Honeywell HIH](Honeywell-HIH)** | Temperature and humidity sensor| I^2^C **Honeywell HPMA115xx** | Particulate matter sensor| serial **HTU21** | Temperature and humidity sensor| I^2^C diff --git a/docs/_media/devices/HLK/LD2410/2410_main_web.png b/docs/_media/devices/HLK/LD2410/2410_main_web.png new file mode 100644 index 0000000000..7ddeb4ea68 Binary files /dev/null and b/docs/_media/devices/HLK/LD2410/2410_main_web.png differ diff --git a/docs/_media/devices/HLK/LD2410/2410_templ_example.png b/docs/_media/devices/HLK/LD2410/2410_templ_example.png new file mode 100644 index 0000000000..73798fefa9 Binary files /dev/null and b/docs/_media/devices/HLK/LD2410/2410_templ_example.png differ diff --git a/docs/_media/devices/HLK/LD2410/2410_web_engineering.png b/docs/_media/devices/HLK/LD2410/2410_web_engineering.png new file mode 100644 index 0000000000..d88b56087d Binary files /dev/null and b/docs/_media/devices/HLK/LD2410/2410_web_engineering.png differ diff --git a/docs/_media/devices/HLK/LD2410/2410_wiring.png b/docs/_media/devices/HLK/LD2410/2410_wiring.png new file mode 100644 index 0000000000..07f38dc7a9 Binary files /dev/null and b/docs/_media/devices/HLK/LD2410/2410_wiring.png differ diff --git a/docs/_media/devices/HLK/LD2410/board_2410b.jpg b/docs/_media/devices/HLK/LD2410/board_2410b.jpg new file mode 100644 index 0000000000..5f996b9ed2 Binary files /dev/null and b/docs/_media/devices/HLK/LD2410/board_2410b.jpg differ diff --git a/docs/_media/devices/HLK/LD2410/board_2410c.png b/docs/_media/devices/HLK/LD2410/board_2410c.png new file mode 100644 index 0000000000..557521f7b6 Binary files /dev/null and b/docs/_media/devices/HLK/LD2410/board_2410c.png differ diff --git a/docs/_media/devices/HLK/LD2410S/2410S_pinout.png b/docs/_media/devices/HLK/LD2410S/2410S_pinout.png new file mode 100644 index 0000000000..f93931880b Binary files /dev/null and b/docs/_media/devices/HLK/LD2410S/2410S_pinout.png differ diff --git a/docs/_media/devices/HLK/LD2410S/LD2410S_setting.png b/docs/_media/devices/HLK/LD2410S/LD2410S_setting.png new file mode 100644 index 0000000000..07f201a271 Binary files /dev/null and b/docs/_media/devices/HLK/LD2410S/LD2410S_setting.png differ diff --git a/docs/_media/devices/HLK/LD2410S/LD2410S_update.png b/docs/_media/devices/HLK/LD2410S/LD2410S_update.png new file mode 100644 index 0000000000..b137f11124 Binary files /dev/null and b/docs/_media/devices/HLK/LD2410S/LD2410S_update.png differ diff --git a/docs/_media/devices/HLK/LD2410S/LD2410S_web.png b/docs/_media/devices/HLK/LD2410S/LD2410S_web.png new file mode 100644 index 0000000000..52cdac0388 Binary files /dev/null and b/docs/_media/devices/HLK/LD2410S/LD2410S_web.png differ diff --git a/docs/_media/devices/HLK/LD2410S/LD2410s_board.png b/docs/_media/devices/HLK/LD2410S/LD2410s_board.png new file mode 100644 index 0000000000..37403fe662 Binary files /dev/null and b/docs/_media/devices/HLK/LD2410S/LD2410s_board.png differ