You’d probably need to know a bit more about openHAB in general, before it makes much sense. Items, channels, things. Rules, sitemaps.
The specific modbus settings go into a file in the things folder, you can call it mymodbus.things or something like. There you can match your hardware details into things and channels for openHAB.
Elsewhere, you define Items and probably rules to work with the Items, and usually a sitemap to display some of them. This all general stuff you should find out from intro, demo, getting started etc.
Examples already posted of a real switch module setup and a meter connection.
You really, really need to read the general openHAB docs to get an idea of how it works with Items, things, channels. And how to get Items to interact with your user.
You’d need to install the modbus binding.
You’d need the appropriate hardware, an existing ethernet connection for Modbus-TCP or probably a USB-RS485 adaptor for Modbus-RTU
In a things file, you define a bridge thing that details the basic connection to your mystery modbus device.
You also define a poller thing that details each block of coils ,inputs, or registers you want to read or write.
You can have more than one poller per bridge.
You define channels as data things for each coil or register you want to read or write.
There’s usually several channels per poller.
In an items file, or using PaperUI, you defineItems as you wish of the type you want.
In an Item definition, you can link the Item to a bindings channel.
For development, you’ll be able to see your Items in PaperUI. But for real use, you’ll probably want to make a sitemap that includes at least some of your Items, and presents them the way you want e.g. as a switch that the user can see is on or off, and change it if they want.
You’re coming at this the wrong way. If you have existing modbus devices, openHAB can use them. Don’t worry about that.
The question is whether you can use openHAB, try installing it and playing with the demo setups…
You’e defined a poller thing belonging to that Modbus thing, This will read one coil, address 0, from your slave. Usually you’ll read many coils or registers here, but lets start simple.
This should already be polling now; if your mystery slave has any rx/tx LEDs you may be able to see activity.
Next, you need to define a data thing belonging to your poller. To describe what kind of data to read from what address, and how to write to it as well.
This seems like more work, but makes more sense when you have many data things.
Once you have a data thing, you have a channel that you can use in an Item definition to connect the Item with your modbus.