-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
use upstream nrjavaserial 3.15.0 on runtime #761
Conversation
Fixes: #750 Signed-off-by: Markus Rathgeb <[email protected]>
Signed-off-by: Markus Rathgeb <[email protected]>
I updated this PR to provide two nrjavaserial features:
The |
This results into this bundles being installed:
|
@openhab-5iver Would you like to review that change? |
I have to run out (actually helping a friend setup OH!), and will be working on helper libraries tomorrow. I can take a look later in the week and do some testing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To simplify the review process I added comments to the changes to explain why it has been done.
@@ -446,7 +446,7 @@ | |||
<dependency> | |||
<groupId>com.neuronrobotics</groupId> | |||
<artifactId>nrjavaserial</artifactId> | |||
<version>3.14.0</version> | |||
<version>3.15.0</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's just for testing (runtime
POM is used in itests and for the Bnd based demo applications). I don't see any need to use a non upstream implementation there (we can consider to change it if someone needs it because he develop on an arm64 machine).
@@ -17,7 +17,6 @@ | |||
<properties> | |||
<jetty.version>9.4.12.v20180830</jetty.version> | |||
<jna.version>4.5.2</jna.version> | |||
<nrjavaserial.version>3.15.0.OH2</nrjavaserial.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That property has not been necessary at all, as it is used at one place -- in the feature.
There is no "win" to define it here and reference in the feature.
We can define it in the feature.
Now the bundle declaration in the feature has been moved at all to another feature repository.
@@ -609,7 +609,7 @@ | |||
</feature> | |||
|
|||
<feature name="openhab-transport-serial" description="Serial Transport" version="${project.version}"> | |||
<bundle>mvn:org.openhab/nrjavaserial/${nrjavaserial.version}</bundle> | |||
<feature>openhab.tp-serial-rxtx-noliblockdev</feature> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't inject external dependencies but use a "target platform feature".
We do not use dependency="true"
here because we want to force the usage of that specific serial implementation.
@@ -154,7 +154,12 @@ | |||
|
|||
<feature name="openhab.tp-serial-rxtx" version="${project.version}"> | |||
<capability>openhab.tp;feature=serial;impl=rxtx</capability> | |||
<bundle>mvn:com.neuronrobotics/nrjavaserial/3.14.0</bundle> | |||
<bundle>mvn:com.neuronrobotics/nrjavaserial/3.15.0</bundle> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump upstream nrjavaserial from 3.14.0 to 3.15.0.
<bundle>mvn:com.neuronrobotics/nrjavaserial/3.15.0</bundle> | ||
</feature> | ||
|
||
<feature name="openhab.tp-serial-rxtx-noliblockdev" version="${project.version}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a separate feature for the openHAB "no liblockdev" nrjavaserial.
The "important" point here is, that we also provide the specific capability, so our features know about the provided serial implementation.
With the input from @wborn, shouldn't we simply ONLY use 3.15.0.OH2 as it is a kind of pre-release of the official 3.16.0 and we know that it solves a few issues that otherwise occur? |
Hm, I am using nrjavaserial 3.14.0 on several systems (arm 32bit and x86_64) running Debian Stretch (9). So it works with liblockdev. If there is no functionality lost I can think about switching to the OH released one. |
Signed-off-by: Markus Rathgeb <[email protected]>
@kaikreuzer I changed to provide only one nrjavaserial implementation (the OH one). I am looking forward to get the downstream changes merged upstream and to use that one after the next release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maggu2810, when I first looked at this, I incorrectly thought that there was a jar I could build and test. What I ended up doing was shutting down OH, modified the distro-2.5.0-SNAPSHOT-features.xml file as in the two feature.xml files, cleared cache and tmp, and restarted OH. Everything seemed to come up without nrjavaserial 3.14.0, but zwave is still having the same issue where it will not startup with OH and requires restarting the binding to get it running. Zigbee (still using the old serial transport) came up fine.
So, I either made a mess of things, or showed that at least a portion of this PR will work, but does not fix the zwave issue.
Oh... this got merged!? Teaches me not to leave tabs open!
@@ -154,7 +154,12 @@ | |||
|
|||
<feature name="openhab.tp-serial-rxtx" version="${project.version}"> | |||
<capability>openhab.tp;feature=serial;impl=rxtx</capability> | |||
<bundle>mvn:com.neuronrobotics/nrjavaserial/3.14.0</bundle> | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used that empty line to separate the commented stuff from other lines.
<!-- See: https://github.com/openhab/openhab-core/pull/761 --> | ||
<!-- See: https://github.com/openhab/openhab-core/issues/750 --> | ||
<!-- <bundle>mvn:com.neuronrobotics/nrjavaserial/3.15.0</bundle> --> | ||
<bundle>mvn:org.openhab/nrjavaserial/3.15.0.OH2</bundle> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be statically called, or should it be...
<bundle>mvn:org.openhab/nrjavaserial/${nrjavaserial.version}</bundle>
... like it was in the openhab-transport-serial?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version should be statically (I tried to already comment this in a self made review of my own changes).
@openhab-5iver I did not have a look at some specific binding problem. After there is only one version the binding author can perhaps have a look at. |
When debugging openHAB in Eclipse I ran into serial port locking issues again on Ubuntu 18.04.2. We resolved these in the distro by using 3.15.0.OH2 which doesn't use licklockdev. Errors similar to the one below may show after stopping/restarting openHAB when using serial ports on certain distros: RXTX fhs_lock() Error: opening lock file: /var/lock/LCK..ttyUSB0: File exists. It is mine testRead() Lock file failed See also: openhab#761 Signed-off-by: Wouter Born <[email protected]>
When debugging openHAB in Eclipse I ran into serial port locking issues again on Ubuntu 18.04.2. We resolved these in the distro by using 3.15.0.OH2 which doesn't use liblockdev. Errors similar to the one below may show after stopping/restarting openHAB when using serial ports on certain distros: RXTX fhs_lock() Error: opening lock file: /var/lock/LCK..ttyUSB0: File exists. It is mine testRead() Lock file failed See also: openhab#761 Signed-off-by: Wouter Born <[email protected]>
When debugging openHAB in Eclipse I ran into serial port locking issues again on Ubuntu 18.04.2. We resolved these in the distro by using 3.15.0.OH2 which doesn't use liblockdev. Errors similar to the one below may show after stopping/restarting openHAB when using serial ports on certain distros: RXTX fhs_lock() Error: opening lock file: /var/lock/LCK..ttyUSB0: File exists. It is mine testRead() Lock file failed See also: #761 Signed-off-by: Wouter Born <[email protected]>
* add nrjavaserial without liblockdev * use only one feature for a nrjavaserial implementation Fixes: openhab#750 Signed-off-by: Markus Rathgeb <[email protected]> GitOrigin-RevId: d2c7db6
When debugging openHAB in Eclipse I ran into serial port locking issues again on Ubuntu 18.04.2. We resolved these in the distro by using 3.15.0.OH2 which doesn't use liblockdev. Errors similar to the one below may show after stopping/restarting openHAB when using serial ports on certain distros: RXTX fhs_lock() Error: opening lock file: /var/lock/LCK..ttyUSB0: File exists. It is mine testRead() Lock file failed See also: openhab#761 Signed-off-by: Wouter Born <[email protected]> GitOrigin-RevId: 060530a
Fixes: #750
I see two possible fixes for #750:
openhab.tp;feature=serial;impl=rxtx
)I don't know what's the difference between 3.15.0.OH2 of openHAB's nrjavaserial and 3.15.0 of the upstream one.
The nrjavaserial repository of openHAB does not contain any tag or commit that tells me anything about that.
So, let's wait for a reply to #750 (comment)
At the moment I switch to the upstream one in this PR, but we can also remain at the OH spefic one, if working with upstream of nrjavaserial is not possible.