How to show ip

Part of the confusion is that many/most of the devices that a typical OH configuration uses do not have IP addresses. So putting the IP address into the generic standard for Things doesn’t make sense. That’s where Garry’s question came from.

So to step back a bit, why do you want to display the IP addresses in the sitemap? What do you plan on using this information for? Is it just to have a list of the IP addresses in your system somewhere? If so I might recommend Fing as a better approach. Or even better configure your DHCP to serve out static IPs to the devices and configure a local DNS so you don’t even need to care about IP addresses.

Now, one thing that can be useful with IPs in OH is a way to track the online/offline status of devices. The Network binding is made for this sort of thing and I use it myself as part of my monitoring in OH. This way in Rules when I ask OH to cause a device to do something (e.g. open the garage door), I can get an alert that the garage door opener is offline instead of the command just silently failing.

See Design Patterns: Generic Is Alive

1 Like