Include lockcode in notification through HSM

I am receiving push notifications through HSM when z-wave lock status changes - but I am unable to include the user code.
I was getting user code with the SMS messages so it should be supported.
Would be great if I could know lock was physically changed. Been trying to use global variable to store lockcode - but not working. I have latest version of firmware.

You can build a conditional action to set a variable equal to the person's name (or whatever identifier you use in the lock code) and then send that variable within the notification by enter %variable_name%

I looked again and am not clear on how to capture the lockcode or associated description and set the variable to that value.
I have a lock device, are you saying I need a second lockdevice(virtual) to accomplish this?
I'm sure I'm just missing one small step.

No.....this is what you want to do to set this up.

Your trigger should be the lock unlocking. Create a lock string variable. Then in action go to Conditional Action and the Simple Conditional Action.

For the capability, select Lock Codes. Then select the lock, then select the user from the drop down list.
Then click done. Now you have to establish the action....from the drop-down select Set Mode and Variables, then from the second drop-down select Set Variables. Then select your variable from the list and select Set String. In the next box, type in the name of the person who the lock code belongs to. My example uses HVAC Mode as the variable (that's what i had available) and Jack as the name.

This is what you will end up with.


Repeat that for each lock code. Then select the action to send a message and enter the message using the variable name between percent signs to substitute the variable name in.

That will send the message, in my example of: Door unlocked by Jack.

Does that make sense now?

Thanks Ryan - yes that makes sense but I should be able to able to get the code itself or the associated description from the fields available with the device.

From a learning perspective - how would I get the message to say lock unlocked by '1' for lockcode 1 without setting the conditional strings if '1' set variable to 'Tom'. I'm not understanding how to reference those native variables or fields
I'm sure to run into this again.

Thank you so much for your help and patience.

I don't understand your question. You can't include device attributes in a message, only global variables. You see, devices don't talk to each other. Apps talk to devices. So, in order to get the info from one device to the other, RM needs to set that into a variable global or local). Otherwise you could just set it up, if lock code used X then send message Lock unlocked by X, but you would only save yourself. one step in the process and building a bunch of message statements is a PITA to me. But you could do that as well.

What i have above does this:

If code used X set variable to X
If code used Y set variable to Y
If code used Z set variable to Z

Send message Lock opened by variable.
So, the message says one of three things: lock opened by X. or Lock opened by Y or Lock opened by Z.

But you could do this instead.
If code used X send message Lock opened by X
If code used Y send message Lock opened by Y
If code used Z send message Lock opened by Z.

You would end up with the exact same message from both.

Thanks again - I will see if I can close this one up when I get a chance.

1 Like