How to connect device to openhab2

Hi,
recently i installed OH2 with mosquitto on my raspberry pi 3 b+ and i configured everything and i programed my nodeMCU with sonoff code and got it to connect to the mqtt broker.
My question is how can i add the device to openhab and make a switch so i can turn it on and off?

https://docs.openhab.org/v2.1/tutorials/demo.html

… and