Follow this one and aks questions back: https://forum.mysensors.org/topic/6694/openhab-2-2-mysensors-serial-gateway-how-to-install.
This is the one I have used and more or less it works. I have intermitent disconnections, but I am not fully sure if it is due to a bad radio link...
After following the full tutorial of the link above, I noticed I was not being able to connect. I would suggest you skip the part about downloading MySensors.git. This will install an alternative driver that I found not needed.
It is important to give OpenHab access permissions to the binding:
cd /usr/share/openhab2/addons/
sudo wget http://www.oberfoell.com/openhab2/org.openhab.binding.mysensors-2.2.0-SNAPSHOT.jar
sudo chown openhab:openhab org.openhab.binding.mysensors-2.2.0-SNAPSHOT.jar
And to the USB connection:
sudo usermod -a -G dialout openhab
sudo usermod -a -G tty openhab
In my configuration, I have a thing named "gw1" (this name you can change to whatever you like) defined for the gateway:
Bridge mysensors:bridge-ser:gw1 [ serialPort="/dev/ttyUSB0", sendDelay=200, startupCheckEnabled=false, networkSanCheckEnabled=false ] {
// define things connected to that bridge here
}
As you can see, I am using directly ttyUSB0 to communicate to the serial gateway. You can check the right port by using the Arduino IDE in the Raspberry Pi and the serial monitor.