BlackZork / mqmgateway

MQTT gateway for modbus networks
GNU Affero General Public License v3.0
44 stars 20 forks source link

Write to register from MQTT topic #16

Closed pki791 closed 1 year ago

pki791 commented 1 year ago

Hi. The readme states Allows to read and write to MODBUS registers from MQTT side with custom data conversion.

Please provide a config example how to properly allow a write from MQTT topic to modbus register. Thx

BlackZork commented 1 year ago

See unit tests for commands.

xspander commented 1 year ago

Is it possible to write multiple registers? 0x10 command

BlackZork commented 1 year ago

Read & write to multiple registers is not implemented yet.

BlackZork commented 1 year ago

Read implmented in 5de54c8.

A summary of changes:

Details in README.md, I added some unit tests for new scenarios.

BlackZork commented 1 year ago

Is it possible to write multiple registers? 0x10 command

@xspander Implemented in https://github.com/BlackZork/mqmgateway/commit/e13c1cf2c492a01fe1f9e84857f6a8ef3bfbd1bc. You can now specify "count" in command section.

Gateway accepts json list by default, or you can write converter that will create list of registers from published mqtt value.