tjhowse / modbus4mqtt

Modbus TCP <-> MQTT glue. YAML configuration. Robust.
Other
78 stars 34 forks source link

Add coils read/write feature #59

Open r-xyz opened 4 months ago

r-xyz commented 4 months ago

Hi @tjhowse ,

First of all thanks for the great bridge.

I would like to help implementing read/write feature for coils, since those are still broadly used in many devices. I decided to split #56 to implement it one step at a time.

The PR contains a first implementation for it which I tested and works locally. Please have a look at it, I will be happy to implement any suggested review to get it merged.

Regarding writing implementation, in particular, I think you might prefer to implement something similar to _process_writes to avoid many sequential writes.