OH2 Network Binding - Device always online

Thanks for your response.

I tried to verify that.
Windows 7: failed ping has exit code 1, successfull ping has exit code 0. Binding works
Windows 10: ping exit code in both cases 0. Binding does not work correctly

Sorry for this question, but i’m not realy familiar with OpenHab development and GitHub. Were can I find the sources for this binding? Were can I report such an issue?

I found this file:

Is this the right one? As far as I can see, this code only evaluates the return value which would lead to exactly my behaviour on Windows 10.

Greetings, Jan

Yes that’s the right one. We cannot rely on the return value then for windows. We can check the text response if it contains “TTL”, “:” or an IP address. Everything else is localized I guess.

Yes, something like

success = ((exitValue == 0) && (strResult.indexOf("TTL=") > -1) && (strResult.indexOf("Bytes=") > -1))

for example would match for the Windows OS versions I have tested.

Sorry to ask again a little off topic: Were is such an issue reported correctly? The Network Binding is not listed in the openhab/openhab2-addons repository. I found it on https://github.com/steve-bate/openhab2 but there i can’t create issues.

Jan

The network binding just recently moved within the openhab2-addons repository to “/bundles” (the new build system). You can also just edit the file on github instead of opening an issue. Travis makes sure that it still compiles.

Please remove the “Bytes=” part though. Not sure if that will be localized as well and TTL should be sufficient.

same problem, but on Synology - I’m running network binding 2.4

The latest version I could find is 2.5 on the following link:
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.network/

(I haven’t tried 2.5, not sure how to upgrade from 2.4 to 2.5 without losing all network things)

Is there a version that fixes the problem?