Hello,
I have bought an 32 Input board. I would link the input to my Homeassistant as a Door Contact maybe.
But the manuall is all in China.
Can anyone help me? Maybe a member who had also the same board.
I had the Modul in my network with an local IP adress.
Example: Read 32-way DI, module address = 1:
Modbus TCP format: Hexadecimal
Host sends: 00 00 00 00 00 00 06 01 02 00 00 00 20
Slave Answer: 00 00 00 00 00 00 07 01 02 04 03 FF 01 02
Message Details:
Format of messages sent by the host:
Send content | The number of bytes | Send messages | remark |
---|---|---|---|
Protocol header | 5 | 0 0 0 0 0 | Fix all to 0 |
The following number of bytes | 1 | 06 | The number of text sections is reported later |
Module address | 1 | 01H | Module address = 1 |
Function code | 1 | 02H | Read registers <READ_STATE> |
The start register address | 2 | 0000H | 0000H - This register corresponds to the switching state of DI0 < the > of the 10001 register |
The register address is located in the 1zone|
|The number of read registers|2|0020H|Reads the > of registers < 10001-10032 registers for 24 switch inputs
Data send order: high bytes in the front, such as 0020,first:00|
Message format for slave answer:
Send content | The number of bytes | Send messages | remark |
---|---|---|---|
Protocol header | 5 | 0 0 0 0 0 | Fix all to 0 |
The following number of bytes | 1 | 04 | The number of text sections is reported later |
Module address | 1 | 01H | Module address = 1 |
Function code | 1 | 02H | Read registers <READ_STATE> |
Returns the byte length | 1 | 04H | |
Returns data | 4 | 03FF0102H | 03 From low to high represents the input state of DI0-DI7 |
03 indicates: DI-0, DI-1 high level ON, other low level OFF
The FF from low to high represents the input state of the DI8-DI15
FF means: DI-8–DI-15 All High Level ON
01 From low to high represents the input state of the DI16-DI123
01 means: DI-16 high level ON, other low level OFF
02 From low to high represents the input state of the DI24-DI31
02 indicates: DI-25 high level ON, other low level OFF|