openHABian and Ping

OH3 on RPi4:

I am trying to ping other openHABian RPi controllers using the Network Binding and ip addresses from Tailscale.

I can only ping a controller on my local network, even though I’m using the external ip from Tailscale which seems strange. I can ping the other controllers from my Linux box so I know it works.

Do I need to install ping and/or arping on the RPi I’m trying to ping from? Would I do that from the command line in the RPi console, or from the command line after logging in to openHABian?

The document of the binding describes:

The binding has the following configuration options:

  • allowSystemPings: Use the external ICMP ping program of the operating system instead of the Java ping. Useful if the devices cannot be reached by Java ping. Default is true.
  • allowDHCPlisten: If devices leave and reenter a network, they usually request their last IPv4 address by using DHCP requests. By listening for those messages, the status update can be more “real-time” without having to wait for the next refresh cycle. Default is true.
  • arpPingToolPath: If the arp ping tool is not called arping and cannot be found in the PATH environment variable, the absolute path can be configured here. Default is arping.
  • cacheDeviceStateTimeInMS: The result of a device presence detection is cached for a small amount of time. Set this time here in milliseconds. Be aware that no new pings will be issued within this time frame, even if explicitly requested. Default is 2000.
  • preferResponseTimeAsLatency: If enabled, an attempt will be made to extract the latency from the output of the ping command. If no such latency value is found in the ping command output, the time to execute the ping command is used as fallback latency. If disabled, the time to execute the ping command is always used as latency value. This is disabled by default to be backwards-compatible and to not break statistics and monitoring which existed before this feature.

So it depends on your configuration.
I am using the OS systems ping ( but I don’t use Tailscale ).
In case you want to use ping you need to configure that in the bindings setup and ping needs to be available in the linux shell console. If it is not available it can be installed by using the apt command to install the ip-utils package.

Yes I did see that. My config. is the current stable release of openHABian. Since I can ping my system on this network, using an external ip address from Tailscale it would indicate that ping already works from within OH (like it’s already installed on openHABIAN). But then I can’t ping any of the OH controllers which are NOT on my network. Confused.

OK I just tried installing iputils-ping from the console and it says the latest version is already installed.

So if ping is in the linix shell running on the pi already, and the default configuration is to use that, it seems like it should be working.

I think it would help if you could give more details about your configuration like IP addresses of your OH host and the systems you would like to reach and also detailed settings of your binding.
The default is that the java ping will be used ( see configuration ). The OS ping tool will be used in case this is setup in your configuration.

It turned out that I needed to have Tailscale installed on the controller which was pinging the others. Once I did that everything started working.

1 Like