-
-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new Serial Transport based on jSerialComm #3982
Comments
I think it is useful to have alternative implementations besides nrjavaserial to also support platforms that aren't supported or don't work well with nrjavaserial. jSerialComm seems to have been considered earlier but because it used LGPL the Kura serial implementation was added to Eclipse SmartHome. Which is still there but probably unused. If jSerialComm has better features, works well and is more maintained it may also be preferred to #3632. |
It seems now jSerialComm it's double licensed LGPL 3.0 and Apache 2.0. |
@mvalla how does this work with, for example, the Zigbee Binding? I have a Sonoff Zigbee Dongle I'd like to use with openHAB on OpenBSD. RXTX is unsupported on OpenBSD so I'd love to swap this in and give it a test. |
Which Sonoff Zigbee Dongle you have exactly? |
SONOFF Zigbee 3.0 USB Dongle Plus V2 (ZBDongle-E) OpenBSD dmesg: umodem0 at uhub2 port 3 configuration 1 interface 0 "ITEAD SONOFF Zigbee 3.0 USB Dongle Plus V2" rev 1.10/4.42 addr 2 https://sonoff.tech/product/gateway-and-sensors/sonoff-zigbee-3-0-usb-dongle-plus-p/ |
@mvalla any thoughts? I'd love to test this |
Feel free to try it: support of serial communication using jSerialComm is not 100% complete but maybe what is missing can be added thanks to some testing |
Is there a packaged jar or kar I can deploy to test? |
here you are: you should remove .TXT from the file names, copy the jars to the
then to make sure only the new bundle is used, again from Karaf you should de-activate this bundle: From now on any use of the serial port in OH should use the new library. Let me know! |
@realPyR3X did you have time to test it? |
@mvalla I somehow missed this response from you 3 weeks ago. I was able to get "purejavacomm" working in the interim. by doing the same approach with stopping rxtx. I will swap that out for this and give it a test. |
@mvalla org.openhab.core.io.transport.serial.jserialcomm-4.2.0-SNAPSHOT.jar is not deploying from addons. The jSerialComm deploys but obviously doesn't start because it's missing the imports from the transport package:
|
that is because this jserialcomm addon is meant to be run on a OH 4.2 branch.. |
@mvalla actually I said that wrong jSerialcomm deploys but your transport doesn't It appears your are importing: org.openhab.core.io.transport.serial;version="[4.2,5)" This isn't resolving the version should probably be 4.1 are you on a dev branch? The transport serial exports: Export-Package = |
lol we commented at the same time. Can I just edit the manifest for now or does it have to be on a milestone |
I think editing the manifest should do the trick: |
@mvalla I set it to 4.1.2 to match the others. The bundle is active. Unfortunately my zigbee ember chipset can't open the serial devices. |
ok, if you set log level to DEBUG for |
@mvalla it works! I had an error in the manifest I edited. The chipset is online. |
@mvalla what will it take to get this to replace rxtx as the default serial transport? If not the default, what will be the process to enable it? i.e. disable rxtx through console and start the feature? |
Add a new OH Serial Transport bundle
org.openhab.core.io.transport.serial.jserialcomm
based on https://fazecast.github.io/jSerialComm/.From website: jSerialComm is a Java library designed to provide a platform-independent way to access standard serial ports without requiring external libraries, native code, or any other tools. It is meant as an alternative to RxTx and the (deprecated) Java Communications API, with increased ease-of-use, an enhanced support for timeouts, and the ability to open multiple ports simultaneously.
The library seems actively maintained, it supports Apple Silicon, has no dependecies, and also supports LISTENING_EVENT_PORT_DISCONNECTED events (supported by NRJavaSerial and not by Pure Java Comm), useful nowdays that Serial ports devices are via USB and therefore can be unplugged.
The library has also support for USB specific info (productID/serialNumber/vendorID/product description) when available.
It's double licensed LGPL 3.0 and Apache 2.0.
There is already another OH binding using jSerialComm: ProteusEcoMeter (not using OH Serial Transport).
Before starting implementation on a new PR, I would like to have opinion of @openhab/core-maintainers on this issue.
See also mvalla/openwebnet4j#34 (comment)
The text was updated successfully, but these errors were encountered: