Get Gateway IP Address

It's pretty easy to get the Client IP address via {[System]Client/Network/IPAddress}

However, the same thing does not exist for the gateway. The similarly named tag {[System]Client/Network/GatewayAddress} returns the full address (i.e. http://localhost:8088).

How can I get the IP address of the gateway?
I'll have clients connected to specific gateways in different areas of the plant, all running the same project, and I need to determine which area based on which gateway they're connected to.

What do you get when you're connected to one not localhost? All of mine return an IP address, but none of them have been added to our DNS, either.

Another option could be tu use [System]Gateway/SystemName. As long as you've given them separate names, of course.

Yes, I get the IP address if it's not localhost.

I can use replace(replace({[System]Client/Network/GatewayAddress},"http://",""),":8088","") to peel the IP out in that case, since they're all on :8088.

Try one of these as well:


Will {[System]Client/Network/GatewayAddress} always be localhost for a client running on the gateway?

An expression tag at the gateway scope will work for my use case.


I had been trying to use a client tag, but since it's by definition gateway-dependent, there's really no need for every client to have its own tag with the gateway IP.