docs icon indicating copy to clipboard operation
docs copied to clipboard

Modbus: write coils

Open andig opened this issue 1 year ago • 0 comments

Thank you for your help. This was it.

I orientated myself to the reference (https://docs.evcc.io/en/docs/reference/modbus#writing-registers):

Writing Registers Both holding registers and coils can be written. For this, either type: writeholding for holding registers or type: writecoil for coils must be specified. type: writeholding always writes a 16-bit register (int or bool16). Therefore, for decode, uint16 must always be specified. type: writecoil writes a coil. Specifications for decode are ignored.

Originally posted by @Erik-Holzinger in https://github.com/evcc-io/evcc/discussions/16571#discussioncomment-10883241

Note: writing single coil via writecoil requires bool8 data type.

andig avatar Oct 21 '24 16:10 andig