Ehem… Think you confused something @mstormi.
Definitely the openhab Modbus binding only can act as MASTER and can contact slaves vio modbus TCP, modbus RTU over TCP, modbus serial in the modes RTU, ASCII and BIN…
And yes as the thread opener correctly said, some slave devices cause issues if multiple Masters try to contact them or when they only can act as master themselves… Also some devices do support being master and slave at the same time, some don’t… Some modbus TCP devices offer a second (or even more) ports to be able to react to different masters or being master on one port and slave on the other… But not all do that… A modbus slave mode would be really interesting for openHAB and would increase the usage a lot…
I am not sure about the exact way to go, but there are more or less expensive and elegant possibilities to get that done, as there is according to my knowledge no modbus binding, which makes openhab act as a slave…
Option one: try to make all devices being a slave and distribute the necessary data via openhab rules and channel links. Problem, doesn’t work for all, e. g. KOSTAL Piko CI, if it wants to use the internal grid power limitation, needs to be master towards the Kostal Smart meter, in slave mode you can’t write the grid power data to the inverter… It’s solvable, by calculating the proper powerlimit inside openhab and write that value to the CI in slave Mode…
Option two: some devices offer serial and tcp modbus interfaces and can configure them different, so let the inverter be the master on the serial and slave on the tcp interface can work.
Option three, use a Comercial modbus gateway… One would need a gateway, that is slave on both sides (not sure which one does that) and need to configure it that it emulates the registers to be written by the master… May need some reverse engineering to figure out, what the master writes to which register. And what he wants to read there…
Option four: Use (commercial or free trial) of OAS Open Automation Software as a gateway (on a own pi or maybe on your openhab device paralell), it can act as a modbus master and and as a slave… And maybe most interesting it can, if configured right convert everything for and back to mqtt and use the mosquitto on your openhab as the broker…
Option five: find something that is really free, that acts as a modbus slave and communicates as e. g. Mqtt, I am sure there is some software out there, which does that and may even run on a Esp, a Adruino (AT Mega) or a pi zero.
Option six: programm a slave yourself and access it by the exec binding…
I am personally investigating option 4 and 5 atm…