I am trying to detect the status of my computer (sleeping/not sleeping) using the network binding. It had worked before, but for some reason (I think after updating openhab) the computer is always showing online.
It is funny because I can run arping on the openhab server “arping 192.168.1.90” and I see it responding when the computer is asleep. If I do a normal ping it does not.
I have tried many different configurations including setting “binding.network:allowSystemPings=true/false” in my /etc/openhab2/system/network.cfg file.
It sounds like you have your Network binding configured to use arping then. The point of arping is it can detect devices that are just asleep on the network (e.g. iPhones). For your use case though, you probably need to disable it. Probably the most expedient way to do that would be to set the arPingToolPath to /dev/null or some path that doesn’t exist. The binding will complain when OH first starts but without arping being available it won’t use it to detect your devices, only ping.
An alternate approach might be found in the target computer’s BIOS, there may be options to power off the LAN port when sleeping. Assuming you don’t want to use wake-on-lan.