I have a plugin I’ve written to manage lock codes and so far, that’s pretty much the approach I’ve had to take even in Lua directly: keep trying until you stop getting errors. Setting PINs and schedules takes time, and during that time, you can’t communicate with the lock, and have no idea when it’s done. It also will frequently deadlock and cause a Luup reload, so even if you could query status, you’d have to tangle with that. There be monsters.
Well, doesn’t seem like anyone cares since there’s no other postings about Siri Shortcuts. But in case anyone is interested, I was able to do the following:
Get the next Airbnb guest from my calendar (Name, Checkout Date, last 4 digits of phone number, email)
Send Name and and Last4 as variables to Vera which programs the lock
Wait 15 and try: send checkout date as PIN restriction so the PIN would delete automatically.
By searching the PinCodes variable I can see if the PIN already exists and stop the shortcut and by checking for an error condition I can retry if the lock is busy.
Lastly, the shortcut calls another shortcut and emails the guest with checkin info.
1 Like
Best Home Automation shopping experience. Shop at Ezlo!