Unlock Command Question

I have an Alfred DB2 smart lock. I normally write my own apps. I wanted the lock to unlock when I returned home. I use Wetzel’s “iPhone WiFi Presence Sensor” to determine if I’m away or home which I have tested that in various ways and it works perfectly.
My issue is my code to unlock the Alfred lock doesn’t work or at least, it takes quite a while to unlock. The command I use is AlfredLock.unlock(). However, if I use the Rule Machine and replicate my app’s code, the door unlocks perfectly. I’m wondering is Rule Machine uses a different command other than “locks name”.unlock() to unlock. Any ideas?

We use the same commands as those published for the capability, so yes RM uses deviceWrapper(s).unlock().
Where deviceWrapper is the name of an input element of type capability.lock