# I need to get the IP addresses from the Perspective Sessions. Any ideas as I don't find anything in the forum

**URL:** <https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [November 2, 2022, 3:48pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997 "2022-11-02T15:48:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![CTrenkamp](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ctrenkamp/32/38440_2.png) [@CTrenkamp](https://forum.inductiveautomation.com/u/CTrenkamp)\
**Post date:** [November 2, 2022, 3:48pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/1 "2022-11-02T15:48:46Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/0/80da3f24d8814cb9f0d94eea751ce606936d90dd.png)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 2, 2022, 3:50pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/2 "2022-11-02T15:50:32Z")

</div>

`host` session property: [Session Properties - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Session+Properties)

And for all sessions, try [system.perspective.getSessionInfo - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/system.perspective.getSessionInfo)

---

<div class="post-metadata">

**Author:** ![CTrenkamp](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ctrenkamp/32/38440_2.png) [@CTrenkamp](https://forum.inductiveautomation.com/u/CTrenkamp)\
**Post date:** [November 2, 2022, 3:52pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/3 "2022-11-02T15:52:27Z")

</div>

Why didn't I think of that. Trying to extract IP addresses and Users from Windows has been so much fun I didn't think of the obvious in this case. Thanks Kevin.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 2, 2022, 4:36pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/4 "2022-11-02T16:36:16Z")

</div>

Do note that if a client is behind a NAT router, you will only get the IP of the router. And there is no help for that. (And none possible, at least for browsers.)

---

<div class="post-metadata">

**Author:** ![CTrenkamp](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ctrenkamp/32/38440_2.png) [@CTrenkamp](https://forum.inductiveautomation.com/u/CTrenkamp)\
**Post date:** [November 2, 2022, 6:27pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/5 "2022-11-02T18:27:36Z")

</div>

Fortunately I don't have that issue. Just a plant network I am trying to get the PC IP's for which is now working.

---

<div class="post-metadata">

**Author:** ![CTrenkamp](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ctrenkamp/32/38440_2.png) [@CTrenkamp](https://forum.inductiveautomation.com/u/CTrenkamp)\
**Post date:** [November 3, 2022, 9:05pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/6 "2022-11-03T21:05:53Z")

</div>

So a new problem: I have several plants, each with their own gateways. I am using the meta:visible item to control when a button is seen based on the PC IP address that Perspective is being used on. It works wonderfully in all but one plant. No matter what I do if I put conditions on the meta:visible item in one of the plants it disappears regardless of IP. All props are identical and the project is inherited from a global source at the corporate site.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [November 3, 2022, 10:01pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/7 "2022-11-03T22:01:38Z")

</div>

> [@CTrenkamp](#):
>
> No matter what I do if I put conditions on the meta:visible item in one of the plants it disappears regardless of IP

This sounds more like that IP value is just never meeting the requirements you've set for visibility. Do you have insight into what the value is, and have you investigated why it's never meeting your criteria?

---

<div class="post-metadata">

**Author:** ![CTrenkamp](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ctrenkamp/32/38440_2.png) [@CTrenkamp](https://forum.inductiveautomation.com/u/CTrenkamp)\
**Post date:** [November 3, 2022, 10:07pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/8 "2022-11-03T22:07:16Z")

</div>

Yes the value qualifies and I have it visible for my use and verification.

---

<div class="post-metadata">

**Author:** ![CTrenkamp](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ctrenkamp/32/38440_2.png) [@CTrenkamp](https://forum.inductiveautomation.com/u/CTrenkamp)\
**Post date:** [November 3, 2022, 10:08pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/9 "2022-11-03T22:08:14Z")

</div>

It also works on that gateways designer. Project properties are also the same as other sites. I am thinking something in the gateway but haven't found anything yet.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [November 3, 2022, 11:27pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/10 "2022-11-03T23:27:22Z")

</div>

> [@CTrenkamp](#):
>
> Yes the value qualifies

Perspective seems to think it does not. Are you examining the IP within Perspective, or did you obtain the IP from the computer? Load balancers and network firewalls wreak havoc between local workstations and gateways. If you're able to message me the value you're encountering and the display conditions I'll try to look at what's happening.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 3, 2022, 11:54pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/11 "2022-11-03T23:54:44Z")

</div>

I have a popup that contains low level details from session props that I use to diagnose issues like this. Maybe create something to show the session props in the client and check these are what you're expecting to see?

---

<div class="post-metadata">

**Author:** ![CTrenkamp](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ctrenkamp/32/38440_2.png) [@CTrenkamp](https://forum.inductiveautomation.com/u/CTrenkamp)\
**Post date:** [November 4, 2022, 12:00am UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/12 "2022-11-04T00:00:30Z")

</div>

I am using session.props.host to get the IP. I also display it in a label field on one of the pages for verification which is working at the plant and showing each PC's IP like it should. The same code works at the other plants.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [November 4, 2022, 3:20pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/13 "2022-11-04T15:20:46Z")

</div>

Without supplying the code and value here you'll need to contact support.

---

<div class="post-metadata">

**Author:** ![CTrenkamp](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ctrenkamp/32/38440_2.png) [@CTrenkamp](https://forum.inductiveautomation.com/u/CTrenkamp)\
**Post date:** [November 4, 2022, 4:17pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/14 "2022-11-04T16:17:19Z")

</div>

For the button:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/a/2a335a465e07a7de0738fd1016083ddc8a9e1c23.png)  
And the custom property in session props:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/9/b9a4e4be2196ece03764b707010cf53b33f1beb1.png)  
And again this works in all other plants. I have used .host and as seen here .address.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [November 4, 2022, 4:23pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/15 "2022-11-04T16:23:43Z")

</div>

But I still need to know the offending value _as the session believes it to be_, AND I need to know what `"10." + {[SITE_BOF]Site Number}` equates to for the session.

By the way, this could all be avoided by using Security Levels via Security Zones.

---

<div class="post-metadata">

**Author:** ![CTrenkamp](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ctrenkamp/32/38440_2.png) [@CTrenkamp](https://forum.inductiveautomation.com/u/CTrenkamp)\
**Post date:** [November 4, 2022, 4:30pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/16 "2022-11-04T16:30:37Z")

</div>

We do not use logins for the operators who can use this button. We use a corporate AD account tied to SAP. I am keeping external people who can also access this application from using the button when they shouldn't be. The line computers autologin with windows but perspective can't pull this info and they have no logins. The only way I can isolate is to use a distinct IP that is unique to each plant and is tied to a site tag. All plant IP's begin with 10.XXX with XXX being the plant number.

---

<div class="post-metadata">

**Author:** ![CTrenkamp](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ctrenkamp/32/38440_2.png) [@CTrenkamp](https://forum.inductiveautomation.com/u/CTrenkamp)\
**Post date:** [November 4, 2022, 4:32pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/17 "2022-11-04T16:32:35Z")

</div>

If you know of a way to take a corporate AD account and tie it to a security level please enlighten me as I do not now how to do that since I have never had to do it before.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 4, 2022, 4:33pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/18 "2022-11-04T16:33:10Z")

</div>

How does this ever work at all? How can `left({this.props.address}, 6) = 10.` ever be true?

edit: nevermind, it's equaling the concatenation of `10.` + whatever. Or apparently it's not in this case.

---

<div class="post-metadata">

**Author:** ![CTrenkamp](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ctrenkamp/32/38440_2.png) [@CTrenkamp](https://forum.inductiveautomation.com/u/CTrenkamp)\
**Post date:** [November 4, 2022, 4:34pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/19 "2022-11-04T16:34:11Z")

</div>

I am taking the first 6 of the IP and then comparing to everything on the other side of the equals. Again it works in all other plants.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 4, 2022, 4:36pm UTC](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997/20 "2022-11-04T16:36:09Z")

</div>

Throw up labels that show us the value of `props.address` and the site number so we're not just blindly believing it. Another label that shows an expression concatenating the 2 might be interesting, in case there's some weird numeric casting at play.

[Next page](https://forum.inductiveautomation.com/t/i-need-to-get-the-ip-addresses-from-the-perspective-sessions-any-ideas-as-i-dont-find-anything-in-the-forum/65997.md?page=2)
