Pin Code Best Practices

Posted May 2, 2023 by Customer Success ‐ 2 min read

A guide on how to best work with pin codes.

With the nature of IOT devices, there are inherent limitations that we are constrained by. This guide serves as guard rails for you to design and build your lock integration in the smoothest way possible.

Best Practices:

We’ve compiled a list of recommendations to implement into your solution to achieve optimal performance. These are optional and depend on your specific implementation and needs.

  • Buffer Requests - To avoid overloading a lock with too many requests at once, we recommend a 10 second sleep between requests to the same lock. Locks have a limited amount of storage which means that they can only handle a certain amount of requests at one time.

  • Confirmation Webhook - Wait for the deviceEventUpdateAction webhook events to determine what happened to a request before attempting a retry.

  • Retry Mechanism - You can use the confirmation webhook to determine whether a retry is necessary. Implement an exponential backoff algorithm to retry failed requests. This enables you to gracefully retry a failed request and allows the lock sufficient time to recover.

  • Connectivity Webhook - Using the deviceEventNotificationReported webhook events will inform you when a request fails due to the lock being offline. Check our blogpost for more information here.

  • Backup Codes - When an account is linked, create several backup pin codes that can be shared with a guest in the event you are unable to create a pin code due to lock connectivity or unexpected errors. Replace these codes after they have been shared with guests.

  • Locks per Account - When dealing with property management customers, we recommend having approximately 10 locks per account. This spreads the data storage across multiple accounts to ensure that no one account is overloaded with information from locks and pin codes.

  • Wifi Proximity - Ensure locks have adequate connectivity by placing them near wifi access points.

**Note: Webhook events must be enabled on your tenant to receive them. Reach out to a Customer Success Engineer to enable these events for you.