[Solved] OH3 - Network Binding not working

Hi folks,

my network binding isn’t working anymore after upgrade to OH3…
I checked if there were any changes to the network binding, but everything seems to be ok with my configuration.

this is my network.cfg

binding.network:allowSystemPings=true
binding.network:allowDHCPlisten=true
binding.network:arpPingToolPath=arping
binding.network:cacheDeviceStateTimeInMS=2000

my thing file looks like this

Thing network:pingdevice:192_168_xx_xx "POCO" @ "Home" [ hostname="192.168.xx.xx", macAddress="B6:B9:8A:xx:xx:xx" ]

and here’s my item

Switch  POCO_X3_Phone_Online  "POCO X3 Phone [%s]"  <presence>  (gPresence)  { channel="network:pingdevice:192_168_xx_xx:online" } 

I’m on Debian Buster and this config files were working on OH2.5…
I tested a few things, arping is installed and working…

root@openhab3:/var/lib/openhab# arping -I eth0 192.168.xx.xx
ARPING 192.168.xx.xx
60 bytes from b6:b9:8a:xx:xx:xx (192.168.xx.xx): index=0 time=215.482 msec
60 bytes from b6:b9:8a:xx:xx:xx (192.168.xx.xx): index=1 time=34.675 msec
^C
--- 192.168.xx.xx statistics ---
2 packets transmitted, 2 packets received,   0% unanswered (0 extra)

and this is my configuration from the web-interface…


maybe the arping path is wrong??

the thing shows HANDLER_INITIALIZING_ERROR

any suggestions welcome…
maybe someone can clarify what For input string: “0,090” means?!??

cheers, Dan

What does the log say?

My guess is something is trying to parse this as a number and failing…

Hi thanks,

there are no errors or warnings regarding the network binding in my logs…
I made no changes to my files - and they’ve been working before upgrading.
how can I find out why the handler isn’t initializing??

For me it looks like a binding-related error, but I don’t know what the network binding is doing “under it’s hood”…

It should work this way but it doesn’t - I have no idea where to start debugging.

cheers

Edit: and maybe someone can confirm that there were no changes to the network binding configuration since OH3.x stable? And has anyone a working network binding with OH3? Just to sort out configuration specific problems…

You need to crank the log level up to DEBUG or TRACE and see what clues are provided in the log.

1 Like

thanks @namraccr I’ll try that…

I changed the log level to DEBUG but still nothing in the logs.

Even if I change/reload the items or things file I only get

2021-01-23 14:17:14.494 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'network.items'

and

2021-01-23 14:16:13.364 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'network.things'

Now I tried to set the log level to TRACE but still no luck…
Also tried removing and re-adding the binding but no change :frowning:

I don’t know how to debug this without any information from the system…
still the handler is not initializing and my item has no state.

any further ideas?? and still the question: is the network binding working for anyone on OH3?

Network binding is working for me.

1 Like

thanks could you please tell on which OS you are?? Debian? And interesting to know if you’re using textual configuration or the UI for configuring the binding :wink:

I’m on a Raspi4 running openhabian, all set by UI.
IMHO the curious part is where this “0,090” string is coming from. Do you have anything like that in your files?

1 Like

No nothing… I could imagine that this is something OS related while network binding is trying to bind to the OS-functions (arping) …but this is working fine when I try to ping without OH3… it’s a mystery - mainly or especially because there are no DEBUG infos from the logs…

I’m stuck so far

anyone got this binding running with textual configuration??

maybe I try to set it up from UI - but I tried to avoid that, anyway this seems the only way to get any further with this problem for now… :face_with_raised_eyebrow:

So finally I found the solution to my problem

I realized that everytime I manually Stop & Start the network thing, the number “0,xxx” changed to something between 0,078 and 0,143 so I thought this may be a pingtime in (milli)seconds - but I couldn’t imagine what could cause this…

but then I remembered the fact that my system locale was set to de-DE.utf8 and in Germany we seperate such numbers with a “,” not a “.”… and after changing the locale to en-US.utf8 voila my network thing is initializing and online…

It took me over a week to find out what caused my problem - now I’m really happy

thanx for your helping hands @all

One last thing… I’m pretty sure, the locale of my OH2.5 linux container was set to de-DE.utf8 also, and it still worked… so maybe there is a way to catch this inside the network binding by a simple if clause like: if the string contains “,” then replace it with “.” or something like that…

Sounds like something the binding should handle silently.
My system is on de-DE.utf8 as well, but I do not see such errors!

1 Like

that’s weird… is de-DE.utf8 your only or your primary language (both locales installed)?
because on my system there only was de-DE installed but I know you can configure locale to use one as standard if more then one are installed.

you can check this by typing

dpkg-reconfigure locales

to the console…

so maybe that’s the cause why yours is working and mine was not

Good guess!
Yes, I have both the UK and US versions of english UTF8 additionally installed on my system.

1 Like

nice to know :wink: thanks

Hi,

sorry to necromance this thread, but I ran into the very same issue:
grafik

Locale settings below:

C
C.UTF-8
de_DE.utf8
en_US.utf8
POSIX
LANG=de_DE.UTF-8
LANGUAGE=de_DE
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=

Appreciating any hints on how to get it working :slightly_smiling_face:

BR
eric

Hi @iengineer

do you need further assistance??

Thanks Dan,

I did reconfigure locales, but just added en_US with out setting it to default locale. With en_US as default it seems to work for now.

:+1: thanks for the reply