I’m trying to finish my upgrade from OH 1.8 to OH2. I did a complete rebuilt from the group up, so there is nothing comflicting with the old version of OH. I think I have everything working except for communications using the serial binding. I am communication using an arduino attached to a raspberry Pi 3 via the GIPO serial. I am getting good data in through minicom, but it doesn’t seem to be getting into OH2. In my items file I have
String Serial “Serial [%s]” (g_Diagnosis) {serial="/dev/ttyAMA0@19200"}
which does not update as data comes over the serial line. This was working well in OH 1.8.3. I installed the 1.9 serial binding via the paper UI. At this point I don’t even know where to begin troubleshooting.
I had already added openhab (and pi, not sure which it cares about) to the dialout group. As I understand though, that only prevents writing to the serial bus, not reading from it.
For those using the Razberry board, it seems that this line -Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0" needs to be added to /usr/share/openhab2/runtime/karaf/bin/setenv under
export JAVA_OPTS="${JAVA_OPTS}
at the end and the ending quote needs to be removed after -Dorg.osgi.service.http.port.secure=${HTTPS_PORT}".