Getting Started Cameras & Video Detection & Recording Automation & Events Actions Integration & Connectivity Network & Discovery AI & Remote Control MQTT Modbus ZeroMQ System & Administration Use Cases Troubleshooting About & Legal
Home / Documentation / Modbus Set Coils Action
Knowledge base

Modbus Set Coils

ModbusSetCoilsAction sets multiple coil values on a direct ModbusThing using a compact pattern. Use it for relay presets, digital outputs, safe partial updates, and event-driven hardware changes.

Apply a coil pattern to a direct Modbus device

The action updates the ModbusThing writable coil buffer. The device write loop sends changes when the buffered value differs from the last read device state.

1

Set true

Use 1 to turn a coil on.

0

Set false

Use 0 to turn a coil off.

x

No change

Use x for coils that must not be touched.

Relay and output presets

REL

Relay board control

Switch lamps, sirens, locks, controller inputs, or enable lines from rules or manual actions.

PART

Safe partial update

Pattern 1x0x sets coil 0 on, leaves coil 1 unchanged, sets coil 2 off, and leaves coil 3 unchanged.

EVT

Event-driven output

Attach the action to Event Manager rules when detection, QR, sound, or custom events should change hardware outputs.

Configuration parameters

ParameterRequiredDescriptionDefault
Title
YesDisplay name of the action.None
Modbus
YesTarget direct ModbusThing.None
Coils values
YesPattern matching ^[01x]+$: 1 on, 0 off, x unchanged.None

Operational notes

LEN

Use explicit patterns

A one-character value affects only the first coil. Use the full pattern when the intent is multi-output control.

SAFE

Actuator safety

Treat coil writes as actuator commands and test patterns before controlling motors, pumps, heaters, locks, or safety outputs.

Related Modbus pages

Related tasks and pages