Get user who initiated an event

I’m writing a SmartApp to log events and was wondering if there is a way to get the user who initiated that event? For instance, I want to know if it was either my wife or I who turned off a light.

1 Like

If only one of you is home you could likely do that, but right now SmartThings Doesn’t have any kind of microlocation.

Or you could use a pin code, maybe, but that’s a lot less convenient if you have to enter a code every time you turn on a light.

Meanwhile, start putting aside money for a marriage counselor. Or a divorce lawyer. I have a feeling you may need it if you continue down this path…

Just sayin’. :wink:

I think @robfarmer could be thinking of just the Mobile App user.

But I don’t believe SmartThings has a method or event attribute to indicate which login used… Yet?

Ah, mobile app user. That could be a security or convenience or debug issue, I get that. In which case you don’t need the counseling fund. :smile:

But I don’t know if it can be done.

Ha! Probably a bad example! I’m just trying to tie an interaction to a user in general.

Mobile App interactions or any interaction??

I am working with a venture that is working on occupancy sensing with the potential to identify who is where (with no hardware on the person), but its just a concept.

Sounds interesting. since the SmartThings app now allows you to create more than 1 user this may be a lead in to more user based controls or viability in the app. I have not played with the multi-user option, only noticed it was there. maybe a future enhancement would be to display in the log if the on/off command came from one user app or another. I am with @robfarmer this can be a good thing for some.

1 Like

Got it! Agree with everyone that microlocation occupancy detection will be very cool when we eventually get it. (One theory is that 10 years from now, home monitor systems will be able to track heartbeats. :heartbeat:)

1 Like

@tgauchat Mobile App would be fine. I’m really just experimenting on trying to predict behavior (turning lights on/off, actions/phrases, etc). It’d be nice if an app knew that around 9PM on weekdays we do “Good Night” and it presented the user with that option automatically. Right now I think it would have to be a seperate mobile app that was able to send commands to SmartThings.

Well… I would not be surprised if there is an undocumented method or Event Object Attribute that contains the login id (email address) of the Mobile App instance that triggered the Event.

There are quite a few hidden and undocumented functions.

Or this is something that is “not quite there” and a part of SmartThings’s plans to enhance multi-user functionality (such as adding access restrictions for individual Things on a user-by-user basis – currently all logins to the Account have full administrative level access).

You could ask support@smartthings.com and/or @April … it may take them a while to find the right person for this low priority request, but it would be nice to know, and great if you were able to get your ideas to work!