Skip to content

Commit 7aa62f7

Browse files
jeroenstJeroenSt
andauthored
Added dingtian_DT-R004 (#1871)
Co-authored-by: JeroenSt <[email protected]>
1 parent cc18fbb commit 7aa62f7

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed

_templates/dingtian_DT-R004

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
date_added: 2024-04-26
3+
title: Dingtian 4 Channel
4+
model: DT-R004
5+
image: https://raw.githubusercontent.com/jeroenst/templates/8a4aa285e4ab283d993165501f67824d985b936d/assets/device_images/dingtian_DT-R004.webp
6+
template32: '{"NAME":"Dingtian DT-R004","GPIO":[0,9408,225,9440,0,0,0,0,227,9952,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,226,162,0,163,160,0,0,161],"FLAG":0,"BASE":1}'
7+
link: https://nl.aliexpress.com/item/4000091488766.html
8+
mlink: https://www.dingtian-tech.com/en_us/relay4.html
9+
flash: serial
10+
category: relay
11+
type: Relay Board
12+
standard: global
13+
---
14+
## Warning
15+
When ordering this board ask for relay board with test firmware, otherwise the ESP32 will be locked.
16+
17+
Relay 1 is connected to GPIO 16 which is used for PSRAM in Tasmota, to prevent a pulse on Relay 1 upon boot use the tasmota32-nopsram firmware. (https://github.com/arendst/Tasmota/discussions/21266)
18+
19+
### Description
20+
Dingtian relay boards are ESP32 based boards with 2, 4, 8, 16, 24 or 32 relays and inputs.
21+
22+
At the 2 and 4 relay boards the relays and inputs are directly connected to the gpio's of the ESP32.
23+
24+
Example for the 4 relay board:
25+
![image](https://raw.githubusercontent.com/jeroenst/templates/8a4aa285e4ab283d993165501f67824d985b936d/assets/device_images/dingtian_DT-R004.webp)
26+
27+
Pinout for the 4 relay board:
28+
![image](https://raw.githubusercontent.com/jeroenst/templates/8a4aa285e4ab283d993165501f67824d985b936d/assets/pinouts/dingtian_DT-R004.webp)
29+
30+
### Mqtt Messages
31+
Inputs state are reported through SENSOR message at teleperiod:
32+
33+
```shell
34+
MQT: tele/dingtian1/SENSOR = "{"Time":"2024-04-26T09:17:15","Switch1":"ON","Switch2":"ON","Switch3":"ON","Switch4":"ON"}"
35+
```
36+
37+
Input changes are only reported when using switchmode 15 or 16:
38+
39+
```shell
40+
MQT: stat/dingtian1/SENSOR = {"Time":"2024-04-26T09:24:02","Switch1":"OFF","Switch2":"ON","Switch3":"OFF","Switch4":"OFF"} (retained)
41+
```
42+
43+
When using switchmode 0, Input changes are not reported, but the output changes are reported:
44+
45+
```shell
46+
MQT: stat/dingtian1/RESULT = {"POWER1":"ON"}
47+
```
48+
49+
### Note
50+
51+
For using Modbus on the RS485 port (if ordered with this option) have a look at https://tasmota.github.io/docs/Modbus-Bridge/
86.1 KB
Loading
22.4 KB
Loading

0 commit comments

Comments
 (0)