Include SharpTools User Name in Notification

The objective is to receive a Notification (email or text) when a SharpTools User presses a Switch on a Shared Dashboard, and include the name of the User that pressed the Switch.

I was able to create a Notification Rule that triggers when a SmartThings Switch transitions to ON, then sends an SMS Text.

Ideally, I’d like to trigger it based upon when a User actually presses a Switch on the Dashboard (rather than triggering off the SmartThings Device).

In either case, I’d like to include the SharpTools User Name in the Notification.

Is this possible?

There’s a Context Variable available that would tell you which user executed a Rule Tile on a dashboard, but they would have to directly execute the rule.

There is not a context variable available for device events as those are generated by your smart home hub and don’t have the context of where the event / action originated from.

1 Like

Thanks Josh! I poked around the link you sent, but I’m not finding a way to achieve it.

Would you entertain a Feature Request of a Dashboard Tile Press being a “Triggerable” Event (instead of the “Device” pictured below) ?

Or is there another way to make this happen?


Morning @josh

Just wanted to follow up on this.

When a Dashboard is shared with multiple Users, I think it would be very helpful to see where a command is originating from.

For example: Receive a custom notification such: “Alarm Disarmed by John”; “Alarm Armed by Mary”; etc.

The approach I mentioned in my previous reply could work for that. Instead of controlling the device or alarm directly, you would have a rule perform the action, then add the rule to the dashboard instead of the device/alarm.

In this example, I don’t have anything in the Triggers section since the rule will only be executed manually from a dashboard. Then I would just add this rule to my dashboard as a tile and anytime it is tapped, it would perform the Disarm action and send the notification with who tapped the tile.

As a reminder, you can execute a rule from Super Tiles natively.

Or in any tile which supports the hyperlink action, you can use the special $.runRule() hyperlink syntax.

1 Like

Thanks @josh

With your wonderful example and further explanation, I was able to set up a Test Tile to run a Test Rule… to trigger the device… to send a notification including the user’s name.

I can certainly see cases where that would be helpful and make sense.

Please bear with me on this one as my programming experience is just a fraction of yours :blush:

In using this Rule Method, for say 10 Dashboard Tiles:
I would have to Create 10 Individual Rules for Each Device/Tile where I would want this User Notification, then create 10 Individual Tiles calling each of those rules. Of course, if I want this notification on more Tiles/Devices, it becomes even more cumbersome. A minor point is that pressing the Rule Tile results in the Green Pop-Up “Executing Rule”, rather than the “Command Sent” Pop-Up.

Whereas if I could Trigger a Rule from any Dashboard “Tile”, I could create one rule referencing any/all 10 “Tiles” as the Trigger, then pass the TileName and User DisplayName with the Notification. As well, the Green Pop-Up would continue as “Command Sent”.

Any way… just a thought for a possible Feature in the future.

THANK YOU AS ALWAYS for your amazing program!!!

Can you help me better understand the use-case?

If I’m reading between the lines a bit, it sounds like you want to know who controls a device, is that right? Can you expand more on what you would do with that, exactly what type of information you would be looking for, and why would you need that information in a rule?

I’m struggling to read between the lines much further as to what problem we are trying to solve.

Yes, that’s correct.

I’ll do my best :slight_smile:

When I’m operating my own SmartThings App, I know what I’m turning on, off, etc at any given time and why I did it. But when sharing with multiple Users through SharpTools, I don’t have a sense of who is doing what, at what times, and how those actions may conflict with other User’s actions/expectations. Having this information will help me better assess my systems, solve problems, and help guide Users in terms of using a SharpTools Dashboard.

Here’s One Example:

  1. User A turns on the Living Room Fireplace at 6am in the morning, expecting it to be on and warming the room before coming down at 6:30am.
  2. In the meantime, User B intentionally (or unintentionally) turns off the fireplace at 6:05am
  3. User A enters the Living Room at 6:30am and is like… What happened, I could have swore I turned on the fireplace?
  4. User A says to me: I thought I turned on the fireplace. Why isn’t it working? I was freezing!!! Your system doesn’t work!
  5. With this information, I could go to User B and ask, did you mean to turn off the fireplace? To which they might say either: Yes, here’s why… or oops, I didn’t mean to do that, I was trying to do X instead.
  6. From there, I can help them both use the system better.
  7. Without this information, I have no idea who did what and when and why the fireplace was off when it was expected to be on.

With only two Users in the example above, perhaps a simple conversation would solve it. Now give me 5 Users and it becomes more difficult to figure out. With this information, I can see a much clearer picture of the User interactions.

I can imagine more scenarios in which having the “who triggered what” information would be helpful in solving problems :slight_smile:

Thanks for the examples. As I was reading through that, it sounded like wanting to refer to a log of user actions rather than a use-case around needing it in rules. Would having some sort of user actions log cover the need?

1 Like

You’re welcome! And thank YOU for your infinite patience :slight_smile:

I was thinking in terms of real time notifications, drawing my attention to things as they’re happening well, in real time :grin: Things like Armed Away, Armed Stay, Disarmed… “seeing” that User A came home and Disarmed the Alarm, or Armed Away while User B was still there, etc. I think the flexibility in any Tile becoming a trigger would open up a lot of possibilities, and less Rule writing.

That being said, the log idea is interesting!

If it already exists, I would love to take a look at it.

Hi @josh

Sorry for dropping the ball on this one… had some life stuff demanding my attention. I never got around to creating a Feature Request.

Just wondering if anything has changed in terms of allowing a Tile Press to become a triggerable event, or the User Actions Log you mentioned?

I’ve had several occasions where knowing who the User was that took an action would have been helpful in understanding what took place.