[SOLVED] Archlinux install on RaspberryPI with rfxcom and mysensors

  • Platform information:
    • Hardware: Raspberry 3B
    • OS: Archlinux AArch64
    • Java Runtime Environment: Oracle JDK 8
    • openHAB version: 2.2.0
  • Issue of the topic: Unable to access serial devices, getting a NoSuchPortException
  • Please post configurations (if applicable):
    • Mysensors.things config:
Bridge mysensors:bridge-ser:gateway [ serialPort="/dev/mysensorsgw", sendDelay=200 ] {
}
  • Rfxcom.things config:
Bridge rfxcom:bridge:e0755ec5 [ serialPort="/dev/rfxtrx0", disableDiscovery=true ]
  • Udev rules:
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A11DAINL",  SYMLINK+="rfxtrx0", GROUP="dialout", MODE="0666"
SUBSYSTEMS=="usb", ATTRS{idProduct}=="7523", ATTRS{idVendor}=="1a86", SYMLINK+="mysensorsgw"
  • If logs where generated please post these here using code fences:
2018-05-18 23:56:51.141 [ERROR] [col.serial.MySensorsSerialConnection] - No such port: /dev/mysensorsgw
gnu.io.NoSuchPortException: null
	at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:273) [25:com.neuronrobotics.nrjavaserial:3.12.0.OH]
	at org.openhab.binding.mysensors.internal.protocol.serial.MySensorsSerialConnection.establishConnection(MySensorsSerialConnection.java:51) [231:org.openhab.binding.mysensors:2.3.0.201803141156]
	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection.connect(MySensorsAbstractConnection.java:148) [231:org.openhab.binding.mysensors:2.3.0.201803141156]
	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection.run(MySensorsAbstractConnection.java:127) [231:org.openhab.binding.mysensors:2.3.0.201803141156]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

Hi,

I’m currently running Raspbian without any issue, both Rfxcom and MySensors’ gateway are working with Openhab. This confirms that the above configuration is correct.

For software specific versions (dnsmasq + other things), as Debian/Raspbian package release process is a bit slow, I would like to swich to Archlinux. It’s a distro that I know pretty well and I like it, so I tried Openhab on it.

Unfortunately, none of my serial devices work with Openhab. I get the error given above. I also tried on my main Arch system on my desktop (Intel Core i7) and I get the same stack trace.
The dialout group does not exist on Archlinux, the uucp group is used instead, and the lock one.

I did test the ARMv7 version of Archlinux ARM yet, but I’ve just prepared an SD card and will test this weekend.

I dit not test another controller like Domoticz yet.

I know Arch is not officially supported, but is this a known issue?
Am I in a dead end with this?
Should I stick with Raspbian?

Thanks.

EDIT: I’ve just tested MyController, which is another Java controller, and the MySensors’ gateway is properly detected and working. Don’t know if this gives a clue…

EDIT2:
fixed log (correct /dev/xxx)
and I forgot to join my extra java opt:

EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/rfxtrx0:/dev/mysensorsgw"

I manage to make it work on my desktop.
What I did was to simply compare the groups of my main user with the openhab one:

bebr ~ id                                                                                                                                                                                                                      
uid=1000(bebr) gid=1000(bebr) groups=1000(bebr),10(wheel),14(uucp),54(lock),92(audio),618(adbusers),995(docker),1001(sdkusers)
bebr ~ id openhab                                                                                                                                                                                                              
uid=619(openhab) gid=617(openhab) groups=617(openhab)

The uucp was missing. Adding openhab to this group make the serial work again.
I’ll try on my raspberry and report.

If this is a user/group problem, I’ll contact the archlinux package maintainer of openhab to fix this.

I finally managed to make it work on my Raspberry PĂŹ 3B.

The Archlinux Arm Aarch64 (ARMv8 64 bits) does not work because, the library libNRJavaSerial.so is not 64 bits compliant (at this time).
So I had to stick with Archlinux ARM 32bits (ARMv7 version).

Recommended Java version for openhab is Java 8. I couldn’t make Zulu to work, so I installed the Oracle JDK. The package jdk-arm provides it and is available in AUR.
And openhab2 package is also available in AUR. However this last does not add the openhab user to the uucp group which is mandatory to access serial devices. I already added a comment in the AUR package about this.

Both RFXcom and MySensors’ gateway are properly working.

I hope this can be useful for someone :wink:

1 Like