Input - Lock Codes

Sorry, if this has been asked and answered, I couldn't find it.
What does the input values look like for listing lock codes in LCM on a Lock, by name, for selection in a custom app?

Like in RM

something along these lines should do it...

def lcText = device?.currentValue("lockCodes")
if (!lcText?.startsWith("{")) {
	lcText = decrypt(lcText)
}
def lockCodes
if (lcText) lockCodes = new JsonSlurper().parseText(lcText)

You can then iterate through lockCodes to fetch what you need...

1 Like