-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
Extend NetUtils for network range scanning #4375
Conversation
Signed-off-by: Leo Siepel <[email protected]>
bundles/org.openhab.core/src/main/java/org/openhab/core/net/NetUtil.java
Outdated
Show resolved
Hide resolved
…tUtil.java Co-authored-by: Holger Friedrich <[email protected]> Signed-off-by: lsiepel <[email protected]>
Would be nice to have this in the next milestone. Anything I can do to get this forward? |
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.
Hi @lsiepel, it seems we have some doubts when it comes to the network scanning - we had some trouble with docker VMs during the last release phase. I am still not sure how this scanning should be implemented, restricting to primary interface, etc....
Additionally, it is not clear to me what is the benefit of getting rid of apache commons in this area - especially as we still need it for the telnet based addons.
Maybe you could try to convince us ;-)
Overall, the methods below do not harm in core. But not sure if this will be the basis for all plugins which try some kind of scanning or if we need to elaborate a more complex concept.
Besides that, one technical comment below.
bundles/org.openhab.core/src/main/java/org/openhab/core/net/NetUtil.java
Outdated
Show resolved
Hide resolved
You write we, so I suppose there has been a discussion amongst core maintainers?
If there are still doubts, i’m happy to incorporate suggestions as I really tho k this is a step forward. |
Sorry, you got me wrong. No recent discussion about this, my comment is just based on what I remember from the discussion about IP "scanning" for addon detection.
Fair enough, lets go forward and get this into core. 👍 |
Thanks for looking into this and sharing your doubts. |
Signed-off-by: Leo Siepel <[email protected]>
…core into netutils-extend
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.
Thanks @lsiepel for the patience regarding this PR.
I now went through the code and also had a quick look into the PRs in addons - I can now understand why you want this in core.
I have some doubts regarding that gist you added for the helper functions. See my comment below.
bundles/org.openhab.core/src/main/java/org/openhab/core/net/NetUtil.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core/src/main/java/org/openhab/core/net/NetUtil.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core/src/main/java/org/openhab/core/net/NetUtil.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core/src/main/java/org/openhab/core/net/NetUtil.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Leo Siepel <[email protected]>
Signed-off-by: Leo Siepel <[email protected]>
Signed-off-by: Leo Siepel <[email protected]>
Signed-off-by: Leo Siepel <[email protected]>
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.
LGTM.
Thanks for taking all the comments into consideration.
Looks much simpler now 👍
Multiple bindings scan the network for devices by looping though all ip addresses. When trying to get rid of the apache libs, i also noticed the code is similar and it would be better to deduplicate this.
In future we can discuss if this scanning should be limited to the openHAB network setting or to all interfaces, but that is beyond the scope of this PR. Atleast we then have a central place to control that behaviour.
Reference: #3965