Cant set a code in my lock


#1

**1) Give a description of of the problem.
When I try to setcode for the lock I’m getting errors.

2) What is the expected behavior?
That I throw a virtual switch to set a code and when I close it the code deletes.

3) What is happening/not happening?
I’m getting errors.

**4) Post a Green Snapshot of the piston!

**5) Attach any logs (From [ST IDE]

eb74521-0d8b-4562-9533-f11d590fc2a8 4:32:49 PM: errorgroovy.lang.MissingMethodException: No signature of method: script_dth_426cdf87b62613f9afc304ac6c9f1ebc7b3c593d804d58b82db2bcd2eb8a2152.setCode() is applicable for argument types: (java.lang.Double) values: [3483.0]
Possible solutions: setCode(java.lang.Object, java.lang.Object), setCode(java.lang.Object, java.lang.Object, java.lang.Object), setLog(java.lang.Object), hashCode(), getLog(), section() @line 1733 (executePhysicalCommand)


#2

What type of Lock and what DTH are you using? Most locks require that you pass multiple parameters to set the code, such as the slot number that the code is going to be stored in and the user description. For example
setCode(1, 1234, ‘Ryan’). But it will all depend on what type of lock you have and what the DTH is expecting.

Also, your piston is a little strange to me. What do you want the triggering event to be? The switch gong on? Why do you have async on or something? The “On Events From” shouldn’t be there I don’t think.


#3

It’s a Yale zwave lock. I’m just using its integration into smartthings, no particular DTH. Originally I couldn’t set the codea from smartthings and they added the feature in an update.

I wanted the switch coming on setting the code and when I get that correct wanted it deleting it when it turns off.


#4

Why? Why not just set the code using an app like lock manager?


#5

Would I be able to set the code and delete it with a switch? I’m already able to manage codes in smartthings so wouldn’t need another app to manage it. I just want a simple way to throw a virtual switch to set a temporary code when the Babysitter is at the house and then delete it when the babysitter leaves. It makes it so I don’t have to ask for her birthday every time she comes over and I have a simple way to remove it when when she leaves.


#6

Were you able to get this working ?


#7

Actually I was. However, I never used it and removed it. It’s been 2 years and I don’t know if I could repeat it lol.