# Timed maintenance login

**URL:** <https://forum.inductiveautomation.com/t/timed-maintenance-login/82415>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [November 28, 2023, 10:20am UTC](https://forum.inductiveautomation.com/t/timed-maintenance-login/82415 "2023-11-28T10:20:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe\_Haase](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@Joe\_Haase](https://forum.inductiveautomation.com/u/Joe_Haase)\
**Post date:** [November 28, 2023, 10:20am UTC](https://forum.inductiveautomation.com/t/timed-maintenance-login/82415/1 "2023-11-28T10:20:41Z")

</div>

I have been testing and evaluating switching over to Ignition for a central HMI system for a few weeks, and have been making great strides.

One thing I can not wrap my head around, is how to do a maintenance login that times out after (x) number of minutes, from within the same app. Although I easily could have maintenance staff use their own logins, 99.99% of the time maintenance will walk away as soon as a problem is resolved, leaving the operators with the ability to have unauthorized access to dangerous functions.

Any suggestions on how to get away from this??

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 28, 2023, 10:43am UTC](https://forum.inductiveautomation.com/t/timed-maintenance-login/82415/2 "2023-11-28T10:43:18Z")

</div>

Please edit your question (pencil icon) and add the Perspective or Vision tag as appropriate. The answer may depend on that.

Welcome to the forum.

---

<div class="post-metadata">

**Author:** ![Joe\_Haase](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@Joe\_Haase](https://forum.inductiveautomation.com/u/Joe_Haase)\
**Post date:** [November 28, 2023, 12:55pm UTC](https://forum.inductiveautomation.com/t/timed-maintenance-login/82415/3 "2023-11-28T12:55:25Z")

</div>

Thanks Transistor... noted and updated.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [November 28, 2023, 12:59pm UTC](https://forum.inductiveautomation.com/t/timed-maintenance-login/82415/4 "2023-11-28T12:59:02Z")

</div>

Now that we know we are working in vision, you can use [system.security.logout - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/system.security.logout) to programmatically log out a user via a script.

A simple way would be to setup a client timer script that runs every X seconds, have it check the value of [system.util.getInactivitySeconds - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/system.util.getInactivitySeconds) which will give you how many seconds since the keyboard/mouse has been touched, and if it exceeds a certain amount, then log them out.

You may also want a button that logs out as well so the maintenance can do what they need, then log out, or the operator can log them out if they need immediately so they can then login and do what they need.

---

<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 28, 2023, 1:07pm UTC](https://forum.inductiveautomation.com/t/timed-maintenance-login/82415/5 "2023-11-28T13:07:04Z")

</div>

If you want to enforce a maximum logged-in time, do what Brian suggests, but _ **don't** _ check user inactivity. Instead, use the timer event to log a timestamp when a maintenance user logs in, and log them out some fixed duration later.

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [November 28, 2023, 8:11pm UTC](https://forum.inductiveautomation.com/t/timed-maintenance-login/82415/7 "2023-11-28T20:11:22Z")

</div>

> [@pturmel](#):
>
> Instead, use the timer event to log a timestamp when a maintenance user logs in, and log them out some fixed duration later.

This is the way. Our client specifies 30 minutes maximum for any levels above an operator level/role. This way even supervisors can't log in to have some extra functionality and leave it for an operator to get into things they shouldn't be getting into.

---

<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 29, 2023, 1:43am UTC](https://forum.inductiveautomation.com/t/timed-maintenance-login/82415/8 "2023-11-29T01:43:34Z")

</div>

A combination would make sense to me: inactivity plus fixed time as fallback

---

<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 29, 2023, 1:15pm UTC](https://forum.inductiveautomation.com/t/timed-maintenance-login/82415/10 "2023-11-29T13:15:22Z")

</div>

> [@Jasper\_Monroe](#):
>
> chart settings

Wrong topic?
