Difference between revisions of "HHC-N8I8OP"
(added photos) |
(added Modbus protocol and default configuration) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
There is Chinese software to configure the MAC address, IP address, Modbus baud-rate, etc. | There is Chinese software to configure the MAC address, IP address, Modbus baud-rate, etc. | ||
+ | |||
+ | == Configuration == | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Setting | ||
+ | ! Default Value | ||
+ | |- | ||
+ | | Mode | ||
+ | | TCP Service | ||
+ | |- | ||
+ | | Destination Port | ||
+ | | 5000 | ||
+ | |- | ||
+ | | Local Port | ||
+ | | 5000 | ||
+ | |- | ||
+ | | Implementer Name | ||
+ | | HHC-N8I8OP | ||
+ | |- | ||
+ | | Input Mode | ||
+ | | Ordinary | ||
+ | |- | ||
+ | | Automatic acquisition of IP | ||
+ | | off | ||
+ | |- | ||
+ | | Power-off preservation | ||
+ | | off | ||
+ | |- | ||
+ | | Local IP | ||
+ | | 192.168.0.105 | ||
+ | |- | ||
+ | | Subnet Mask | ||
+ | | 255.255.255.0 | ||
+ | |- | ||
+ | | Gateway | ||
+ | | 192.168.0.1 | ||
+ | |- | ||
+ | | Destination IP | ||
+ | | 192.168.0.101 | ||
+ | |- | ||
+ | | MAC Address | ||
+ | | 485300575500 | ||
+ | |- | ||
+ | | Domain Name | ||
+ | | | ||
+ | |- | ||
+ | | Serial Baud Rate | ||
+ | | 9600 | ||
+ | |- | ||
+ | | Serial Parity | ||
+ | | none | ||
+ | |- | ||
+ | | Serial Data Bits | ||
+ | | 8 | ||
+ | |- | ||
+ | | Serial Stop Bits | ||
+ | | 1 | ||
+ | |- | ||
+ | | Modbus TCP | ||
+ | | off | ||
+ | |- | ||
+ | | Heartbeat Time Interval | ||
+ | | 0 seconds | ||
+ | |- | ||
+ | | Heartbeat Content | ||
+ | | HHC-N8I8OP | ||
+ | |- | ||
+ | | Heartbeat Detection Time | ||
+ | | 0 seconds | ||
+ | |- | ||
+ | | Boot Firmware Version: | ||
+ | | HHC-N8O8OP-V1.2-V00002 | ||
+ | |- | ||
+ | | App Firmware Version: | ||
+ | | 20201231-VS0003 | ||
+ | |} | ||
+ | |||
+ | == Modbus == | ||
+ | |||
+ | === Modbus TCP === | ||
+ | |||
+ | By default the device has a simplistic non-Modbus plaintext "console style" protocol for querying the device. If you enable Modbus TCP mode via the configuration software, you can connect (using the same port) with Modbus TCP capable software. | ||
+ | |||
+ | === Coils === | ||
+ | |||
+ | The table below applies to the following Modbus function codes: | ||
+ | |||
+ | * Function 01: Read Coils | ||
+ | * Function 05: Write Single Coil | ||
+ | |||
+ | The following appears to be unsupported: | ||
+ | |||
+ | * Function 15: Write Multiple Coils | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Address (dec) | ||
+ | ! Description | ||
+ | |- | ||
+ | | 16 | ||
+ | | Relay #1 | ||
+ | |- | ||
+ | | 17 | ||
+ | | Relay #2 | ||
+ | |- | ||
+ | | 18 | ||
+ | | Relay #3 | ||
+ | |- | ||
+ | | 19 | ||
+ | | Relay #4 | ||
+ | |- | ||
+ | | 20 | ||
+ | | Relay #5 | ||
+ | |- | ||
+ | | 21 | ||
+ | | Relay #6 | ||
+ | |- | ||
+ | | 22 | ||
+ | | Relay #7 | ||
+ | |- | ||
+ | | 23 | ||
+ | | Relay #8 | ||
+ | |} | ||
+ | |||
+ | Attempting to read addresses 0-15 or 24-128 will not give a response. Reading addresses 16-23 is known to work, though it's possible there are more valid ranges further out in the address space. | ||
+ | |||
+ | Attempting to write addresses 256-280 will not give a response. Writing addresses 0-255 are known to work, but only the range 16-23 has an understood purpose at the moment. | ||
+ | |||
+ | === Discrete Inputs === | ||
+ | |||
+ | * Function 02: Read Discrete Inputs | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Address (dec) | ||
+ | ! Description | ||
+ | |- | ||
+ | | 32 | ||
+ | | Input #1 | ||
+ | |- | ||
+ | | 33 | ||
+ | | Input #2 | ||
+ | |- | ||
+ | | 34 | ||
+ | | Input #3 | ||
+ | |- | ||
+ | | 35 | ||
+ | | Input #4 | ||
+ | |- | ||
+ | | 36 | ||
+ | | Input #5 | ||
+ | |- | ||
+ | | 37 | ||
+ | | Input #6 | ||
+ | |- | ||
+ | | 38 | ||
+ | | Input #7 | ||
+ | |- | ||
+ | | 39 | ||
+ | | Input #8 | ||
+ | |} | ||
+ | |||
+ | The value returned is whether or not a logic high (+5V) is present on the input. The "+5V" and "COM" (GND / 0V) pins must be powered externally. | ||
+ | |||
+ | NOTE: A pulse (to +5V) on Input #9 is an override to turn all relays on along with a red LED, until a pulse (to +5V) on Input #10 turns them all off. | ||
+ | |||
+ | Attempting to read addresses 0-31 or 256-999 will not give a response. Reading addresses 32-255 is known to work, though it's possible there are more valid ranges further out in the address space. | ||
+ | |||
+ | === Holding Registers === | ||
+ | |||
+ | * Function 03: Read Holding Registers | ||
+ | * Function 06: Write Single Register | ||
+ | * Function 16: Write Multiple Registers | ||
+ | |||
+ | Attempting to read addresses 0-330 doesn't work, but more of the address space will need to be explored. | ||
+ | |||
+ | Attempting to write addresses 0-140 doesn't work, but more of the address space will need to be explored. | ||
+ | |||
+ | === Input Registers === | ||
+ | |||
+ | * Function 04: Read Input Registers | ||
+ | |||
+ | Attempting to read addresses 0-140 doesn't work, but more of the address space will need to be explored. | ||
== Factory Reset Button == | == Factory Reset Button == | ||
Line 91: | Line 272: | ||
[https://www.amazon.com/dp/B083KK3CZL Amazon.com: Walfront 8 Channel Network Relay Module Remote Control Relay Device Ethernet to RS485, TCP Relay Module: Home & Kitchen] | [https://www.amazon.com/dp/B083KK3CZL Amazon.com: Walfront 8 Channel Network Relay Module Remote Control Relay Device Ethernet to RS485, TCP Relay Module: Home & Kitchen] | ||
+ | |||
+ | [https://www.ebay.com/itm/283585060271 HHC-N8I8OP 8 Network TCP Relay Module Remote Control Relay Device DC7~24V | eBay] (source for photos) | ||
[https://www.aliexpress.com/i/4000127882795.html 8 way network relay RS485 to Ethernet switch controller MODBUS TCP IP relay|Relays| - AliExpress] | [https://www.aliexpress.com/i/4000127882795.html 8 way network relay RS485 to Ethernet switch controller MODBUS TCP IP relay|Relays| - AliExpress] | ||
Line 100: | Line 283: | ||
[https://www.chinese-forums.com/forums/topic/58422-need-help-with-baidu-wangpan/ Need help with Baidu Wangpan - Chinese Computing and Electronics - Chinese-forums.com] | [https://www.chinese-forums.com/forums/topic/58422-need-help-with-baidu-wangpan/ Need help with Baidu Wangpan - Chinese Computing and Electronics - Chinese-forums.com] | ||
− | [https://github.com/natm/iocontrollergw natm/iocontrollergw: I/O Controller Gateway] | + | [https://github.com/natm/iocontrollergw natm/iocontrollergw: I/O Controller Gateway | GitHub] |
[https://gitlab.com/sigmundk/hhc-n-8i8o-relais-board Sigmund Kreuzer / HHC-N-8I8O Relais board · GitLab] | [https://gitlab.com/sigmundk/hhc-n-8i8o-relais-board Sigmund Kreuzer / HHC-N-8I8O Relais board · GitLab] | ||
+ | |||
+ | [https://github.com/gabrielgbs97/hhc_n8i8op_mqtt gabrielgbs97/hhc_n8i8op_mqtt | GitHub] |
Latest revision as of 19:35, 7 December 2021
Overview
Ethernet (TCP) and Modbus (RS-485) interfaced 8-channel relay output and 10 optocoupler input module.
Software
There is Chinese software to configure the MAC address, IP address, Modbus baud-rate, etc.
Configuration
Setting | Default Value |
---|---|
Mode | TCP Service |
Destination Port | 5000 |
Local Port | 5000 |
Implementer Name | HHC-N8I8OP |
Input Mode | Ordinary |
Automatic acquisition of IP | off |
Power-off preservation | off |
Local IP | 192.168.0.105 |
Subnet Mask | 255.255.255.0 |
Gateway | 192.168.0.1 |
Destination IP | 192.168.0.101 |
MAC Address | 485300575500 |
Domain Name | |
Serial Baud Rate | 9600 |
Serial Parity | none |
Serial Data Bits | 8 |
Serial Stop Bits | 1 |
Modbus TCP | off |
Heartbeat Time Interval | 0 seconds |
Heartbeat Content | HHC-N8I8OP |
Heartbeat Detection Time | 0 seconds |
Boot Firmware Version: | HHC-N8O8OP-V1.2-V00002 |
App Firmware Version: | 20201231-VS0003 |
Modbus
Modbus TCP
By default the device has a simplistic non-Modbus plaintext "console style" protocol for querying the device. If you enable Modbus TCP mode via the configuration software, you can connect (using the same port) with Modbus TCP capable software.
Coils
The table below applies to the following Modbus function codes:
- Function 01: Read Coils
- Function 05: Write Single Coil
The following appears to be unsupported:
- Function 15: Write Multiple Coils
Address (dec) | Description |
---|---|
16 | Relay #1 |
17 | Relay #2 |
18 | Relay #3 |
19 | Relay #4 |
20 | Relay #5 |
21 | Relay #6 |
22 | Relay #7 |
23 | Relay #8 |
Attempting to read addresses 0-15 or 24-128 will not give a response. Reading addresses 16-23 is known to work, though it's possible there are more valid ranges further out in the address space.
Attempting to write addresses 256-280 will not give a response. Writing addresses 0-255 are known to work, but only the range 16-23 has an understood purpose at the moment.
Discrete Inputs
- Function 02: Read Discrete Inputs
Address (dec) | Description |
---|---|
32 | Input #1 |
33 | Input #2 |
34 | Input #3 |
35 | Input #4 |
36 | Input #5 |
37 | Input #6 |
38 | Input #7 |
39 | Input #8 |
The value returned is whether or not a logic high (+5V) is present on the input. The "+5V" and "COM" (GND / 0V) pins must be powered externally.
NOTE: A pulse (to +5V) on Input #9 is an override to turn all relays on along with a red LED, until a pulse (to +5V) on Input #10 turns them all off.
Attempting to read addresses 0-31 or 256-999 will not give a response. Reading addresses 32-255 is known to work, though it's possible there are more valid ranges further out in the address space.
Holding Registers
- Function 03: Read Holding Registers
- Function 06: Write Single Register
- Function 16: Write Multiple Registers
Attempting to read addresses 0-330 doesn't work, but more of the address space will need to be explored.
Attempting to write addresses 0-140 doesn't work, but more of the address space will need to be explored.
Input Registers
- Function 04: Read Input Registers
Attempting to read addresses 0-140 doesn't work, but more of the address space will need to be explored.
Factory Reset Button
The tactile button is hooked to pin 93 (PB7) of the microcontroller, it is used for factory reset.
Debug Interface
Header labeled "P2":
Silkscreen | MCU Pin | Function |
---|---|---|
G | GND | |
K | 76 | SWCLK/PA14 |
S | 72 | SWDIO/PA13 |
V | +3.3V |
Bill of Materials
HHC-N8I8OP-V1.2-2019/05/03
Name | Markings |
---|---|
U5 | AMS1117-3.3 2011 |
U6 | M2303ADN M4776028 MPSM23 |
?? | ST ULN2003 GO021010 |
?? | ATMLH021 02CM CN 2021E6H |
?? | GigaDevice GD32F107VCT6 CEEF481 AJ2038 |
?? | SP485EE 2027L H1PF54 |
?? | EL817 C038 |
?? | HanRun HR911105A 20/26 |
?? | HUI KE HK3FF-DC5V-SHG |
?? | KEFA KF2EDGV/R [2-pos] |
?? | KEFA KF2EDGV/R [3-pos] |
?? | KEFA KF2EDGV/R [12-pos] |
Online Resources
HHC-N8I8OP 8 Network TCP Relay Module Remote Control Relay Device DC7~24V | eBay (source for photos)
8 way network relay RS485 to Ethernet switch controller MODBUS TCP IP relay|Relays| - AliExpress
8I8O-road Modbus TCP relay switch_DANIU-IoT
Need help with Baidu Wangpan - Chinese Computing and Electronics - Chinese-forums.com
natm/iocontrollergw: I/O Controller Gateway | GitHub