How to send SMS when lock code used?

Looks like I can do this with a Rule Machine trigger, but then I have to pick every user, one lock at a time. I also don't see how the message can include the user, unless I set up a separate rule for each user, per lock. This seems tedious, especially if my user list is volatile.

Is there a way I can send an SMS whenever any lock code is used on any lock, and the message would state the lock and the user? It would be awesome if Lock Code Manager could do this :grin:

I'm trying to keep LCM out of the "action" business, once you open that door, the list of things it needs to do are endless...
This is the domain of RM, it has all the hooks for the actions already.

I just did this with RM and it works well. Create a RM trigger with lock codes and you can create actions from that. You will have to create an action (in the same rule) for each lock if you have more than one.

How about HSM? I just remembered that I have it set up to notify me when a lock is locked or unlocked, the only thing missing is a %user% and I would only have to update the HSM custom rule.

The lock code user name (code name) is %value%.

Actually, %device% is the lock and %value% is either lock or unlock :wink:

From HSM? Or RM?

From HSM

It should work in RM.

I already monitor lock/unlock in HSM, so thought if it were easy to add, having user would be nice.

I put together a quick and dirty app to monitor the locks and send an SMS when a code is used, so I'm OK there now :slight_smile:

I'll look to see if HSM could do the same thing RM does, which is basically overwrite "unlocked" with the user code name. We already know its unlocked, so that's useless information.

Are you using a custom HSM rule? If so, why not just do that in RM? What am I missing?

All the safety-type stuff is in HSM, so I like to have the lock monitoring done there. I have a screen print of my HSM rule a few posts above. It was so much easier to monitor the locks there than to set up a lot of rules to do so.

This works fine in RM. You use a trigger, select each lock as a trigger event (Lock codes), and select all of the codes. Then use %device% and %value% in the message. You could put every lock into that same trigger, each as its own trigger event. Then, you would get a message with the name of the device and the name of the user code.

It's one trigger.

OK, I understand now that I didn't really know how to set up a rule to do this :grin:

But still, I already have the HSM rule set up to monitor my locks, so makes more sense to keep the lock stuff there.

Another nice thing about HSM vs RM, is that I don't have to select the users. If I add a user later, then I have to remember to go into RM and select that user.

Except that HSM won't do what you want, so that makes no sense at all.

Well, you did mention that HSM might be updated to work like RM, so in that case it would.

And I already wrote an app, so I can leave the basic lock notifications in HSM and my app will only notify me when a lock code is used.

Hey, I was just answering the question you raised in the original post for this topic. groan...

OK, I am just going to keep beating this dead horse! :rofl:

The more I think about it, I would rather not that HSM be updated to substitute user for value when a lock code is used.

Reason being, how do I create a good sentence that would encompass user when a code is used but lock/unlock when a code is not used? Right now I use only %device% and %value%, so get messages like "Front Door Lock unlocked". A message of "Front Door Lock Grider" is kind of goofy...:wink:

LOL. Well, that's part of the challenge.

Actually, HSM Custom Rule doesn't even handle lock codes at all. So that's a whole new kettle of fish. It's not that hard, just never even looked at doing it. Also, lock codes events are only sent for unlock, not for lock. So you'd actually have two separate rules.

Imagine this scenario: When a certain lock code is entered, you want the siren to go off and the lights to flash. I will leave it to your imagination what scenario might warrant such a response. :sunglasses:

2 Likes