Open wborn opened 1 year ago
Are there drop-in replacement interfaces available for the gnu.io API?
Not that I'm aware of. It would be nice if there was a facade for serial communications similar to slf4j. The code probably only depends on a subset of all gnu.io functionality so it may be easier to only add that subset to the interface(s).
See also https://github.com/openhab/openhab-addons/pull/16376 for another example of how to support multiple serial implementations in a library used by an add-on.
It would be nice when the library supports using other serial implementations instead of
gnu.io
.That way openHAB could use its own serial transport with it, which would solve several issues (https://github.com/openhab/openhab-addons/issues/7573).
This could for instance be implemented similar to the calimero-rxtx implementation (see also this comment). See also https://github.com/openhab/openhab-addons/pull/14051 for how such a mechanism can be used for using the openHAB serial transport.
CC: @ssalonen