---
title: "Noname Generic 8DI/8DO module"
description: "8 switches and 8 contacts from a generic Modbus RTU I/O module over RS-485, read as bit masks of two holding registers. Check the module's register table."
url: "https://taphome.com/en/compatibility/noname-generic-8di-8do-module/"
language: en
lastmod: 2026-11-10
generator: hugo
ai:
  topics: ["modbus-rtu","rs485","i/o-module","digital-io","holding-registers","bitmask"]
  questions: ["How to integrate a generic 8DI/8DO Modbus RTU module with TapHome?","What does the Generic 8DI/8DO module TapHome template control?","How to connect an 8DI/8DO RS-485 module to TapHome via Modbus RTU?","Does the Generic 8DI/8DO template work with modules that use coils and discrete inputs?","Which register addresses to enter for DO Register and DI Register?","Why does the 8DI/8DO module answer with Illegal data address?"]
---

# Noname Generic 8DI/8DO module

Communication: Modbus RTU

## Integration guide

This template connects a generic, unbranded Modbus RTU I/O module with **8 digital outputs and 8 digital inputs** to TapHome over RS-485. It creates eight **Switch** devices (DO1–DO8) and eight **Reed contact** devices (DI1–DI8). The template has no fixed manufacturer or model: it fits only a module whose register table matches the layout described below, so the register table of the module has to be checked before the template is used.

## Before you use this template

The template reads and writes **holding registers only** (Modbus function 03 for reading, function 06 for writing). It expects this register layout:

| Data | Register type | Register | Content |
|---|---|---|---|
| Outputs DO1–DO8 | Holding | one register, import parameter **DO Register** | bits 0–7 = state of DO1–DO8 |
| Inputs DI1–DI8 | Holding | one register, import parameter **DI Register** | bits 0–7 = state of DI1–DI8 |

> [!WARNING]
> Many low-cost 8DI/8DO RS-485 modules document their outputs as **coils** (functions 01, 05, 0F) and their inputs as **discrete inputs** (function 02), and use holding registers only for configuration. Such a module cannot be controlled by this template without changes. Check in the register table of the module that the outputs are available as a bit mask in one holding register and the inputs as a bit mask in one holding register before the module is installed.

The register type is fixed in the template scripts; only the two register addresses and the Slave ID can be changed at import.

## Hardware connection

The module is wired to the RS-485 bus of the TapHome Core:

- **A to A, B to B.** Terminal labels differ between manufacturers (A/B, A+/B−, D+/D−). If the module does not answer, swap the two wires.
- **Common ground:** on longer lines, connect the GND of the module to the GND of the bus if the module provides a terminal for it.
- **Bus topology:** a line bus with termination at both ends. Whether the module has a built-in termination resistor and how it is switched on depends on the module — check it on the module.
- **Unique Slave ID:** every device on the same RS-485 line needs its own Slave ID.

Check on the module before wiring: supply voltage, input type (dry contact, NPN or PNP, voltage input) and output type (relay or transistor) and their ratings. The template does not depend on these, but the wiring of loads and sensors does.

## Configuration

### Communication settings on the module

The template suggests these line parameters for the TapHome Modbus RTU interface:

| Parameter | Value |
|---|---|
| Baud rate | 9600 |
| Data bits | 8 |
| Parity | None |
| Stop bits | 1 |

The module has to use the same baud rate and framing, and its Slave ID has to match the import parameter. Where these are set — DIP switches, a configuration register or the manufacturer's configuration software — depends on the module; check it in the module documentation or on the module itself.

### Import parameters

| Parameter | Default | Meaning |
|---|---|---|
| **DO Register** | `1` | address of the holding register with the output bits |
| **DI Register** | `2` | address of the holding register with the input bits |
| **Slave ID** | `1` | Modbus address of the module |

TapHome sends the register address to the module unchanged and counts from 0. If the register table of the module numbers registers from 1 (for example 40001, 40002), subtract 1 — see [Modbus register addressing](https://taphome.com/en/docs/integration/modbus/). The **IP address** import parameter has no effect on a Modbus RTU interface and can stay at its default.

In TapHome, add a Modbus RTU interface with the line parameters above and import the template with the Slave ID and the two register addresses of the module.

## Device capabilities

### Digital outputs DO1–DO8

Each output is a **Switch** device. Its state is read every 1000 ms from bit 0 (DO1) to bit 7 (DO8) of the **DO Register**. Switching is handled by the write script of the TapHome module, not by each output: when any output changes, TapHome writes the bit mask of all eight outputs to the **DO Register** in one write (function 06), and only when the value changes. Bits 8–15 of the written value are always 0.

### Digital inputs DI1–DI8

Each input is a **Reed contact** device that shows bit 0 (DI1) to bit 7 (DI8) of the **DI Register**, read every 1000 ms. It suits door and window contacts, float switches or auxiliary relay contacts wired to the inputs of the module.

> [!NOTE]
> Check on the module that bit 0 really corresponds to the first channel and that the module accepts a bit mask written with function 06 to the output register.

## Troubleshooting

### No response from the module

1. Check the RS-485 wiring and swap A and B if needed.
2. Check that the Slave ID of the module matches the import parameter **Slave ID**.
3. Check that the baud rate, parity and stop bits of the module match the Modbus RTU interface (9600, 8N1 suggested).
4. Check the termination at both ends of the bus.

### "Illegal data address" error

The register address is shifted by 1 (the module documentation numbers registers from 1), or the module does not have this register layout at all — for example when its outputs are coils and its inputs are discrete inputs. Compare the import parameters with the register table of the module.

### Outputs or inputs map to the wrong channels

The bit order of the module differs from the template (bit 0 = channel 1). Check the bit assignment in the register table of the module.

## Available devices 16

These devices appear in TapHome after import.

Generic 8DI/8DO module Module

Write (module)

```taphome
MODBUSWNE(SH, $[DORegister], Int16, St2 | (St3 << 1) | (St4 << 2) | (St5 << 3) | (St6 << 4) | (St7 << 5) | (St8 << 6) | (St9 << 7))
```

DO1 Switch

Values / States: ON · OFF

Read switch state

```taphome
MODBUSR(H, $[DORegister], Int16) & 1
```

DO2 Switch

Values / States: ON · OFF

Read switch state

```taphome
(MODBUSR(H, $[DORegister], Int16) & 2 )>>1
```

DO3 Switch

Values / States: ON · OFF

Read switch state

```taphome
(MODBUSR(H, $[DORegister], Int16) & 4)>>2
```

DO4 Switch

Values / States: ON · OFF

Read switch state

```taphome
(MODBUSR(H, $[DORegister], Int16) & 8)>>3
```

DO5 Switch

Values / States: ON · OFF

Read switch state

```taphome
(MODBUSR(H, $[DORegister], Int16) & 16)>>4
```

DO6 Switch

Values / States: ON · OFF

Read switch state

```taphome
(MODBUSR(H, $[DORegister], Int16) & 32)>>5
```

DO7 Switch

Values / States: ON · OFF

Read switch state

```taphome
(MODBUSR(H, $[DORegister], Int16) & 64)>>6
```

DO8 Switch

Values / States: ON · OFF

Read switch state

```taphome
(MODBUSR(H, $[DORegister], Int16) & 128)>>7
```

DI1 Reed Contact

Read

```taphome
MODBUSR(H, $[DIRegister], Int16) & 1
```

DI2 Reed Contact

Read

```taphome
(MODBUSR(H, $[DIRegister], Int16) & 2)>>1
```

DI3 Reed Contact

Read

```taphome
(MODBUSR(H, $[DIRegister], Int16) & 4)>>2
```

DI4 Reed Contact

Read

```taphome
(MODBUSR(H, $[DIRegister], Int16) & 8)>>3
```

DI5 Reed Contact

Read

```taphome
(MODBUSR(H, $[DIRegister], Int16) & 16)>>4
```

DI6 Reed Contact

Read

```taphome
(MODBUSR(H, $[DIRegister], Int16) & 32)>>5
```

DI7 Reed Contact

Read

```taphome
(MODBUSR(H, $[DIRegister], Int16) & 64)>>6
```

DI8 Reed Contact

Read

```taphome
(MODBUSR(H, $[DIRegister], Int16) & 128)>>7
```

**Connection:** Modbus RTU • 9600 baud• 8N1 • Slave ID: $\[SlaveId]

## Import parameters

Enter these values when you import the XML.

| Asked in the app | Default       |
|------------------|---------------|
| DO Register      | `1`           |
| DI Register      | `2`           |
| Slave ID         | `1`           |
| IP address       | `192.168.0.1` |

## Related Documentation

- [Modbus Integration](https://taphome.com/en/compatibility/modbus-guide/)
- [Modbus](https://taphome.com/en/docs/integration/modbus/)
- [Simple configuration using templates](https://taphome.com/en/docs/integration/modbus/templates/)
- [Modbus scripts and prefetch](https://taphome.com/en/docs/script/modbus-scripts/)
- [Modbus functions](https://taphome.com/en/docs/script/modbus/)
- [Modbus data types](https://taphome.com/en/docs/script/modbus-data-types/)

