Docs / iglooworks / Concepts / AlgoPIN Codes
AlgoPIN Codes
AlgoPIN generates valid PIN codes for a lock without WiFi, cellular, or remote access to the lock.
How It Works
sequenceDiagram
Note over Your Server, Our Server: iglooworks API
Your Server->>Our Server: Request AlgoPIN
Our Server-->>Your Server: AlgoPIN code
Your Server->>Guest: AlgoPIN code
Guest->>Lock: Enter AlgoPIN code
Lock->>Lock: Unlock
Types of AlgoPIN Codes
| Type | Validity | Variances | API |
|---|---|---|---|
| One-Time (OTP) | Single use | 10 | Create a One-Time AlgoPIN |
| Permanent | No end date | 10 | Create a Permanent AlgoPIN |
| Duration (Hourly) | 1 to 672 hours | 3 | Create an Hourly AlgoPIN |
| Duration (Daily) | 29 to 367 days | 3 | Create a Daily AlgoPIN |
| Passage | 1 to 12 hours | 1 | Create a Passage AlgoPIN |
A Passage AlgoPIN unlocks the lock and keeps it unlocked for the chosen number of hours. Passage requires newer lock firmware.
AlgoPIN Limitations
| Limitation | Explanation |
|---|---|
| AlgoPIN-supported devices only | The device has to support AlgoPIN. See Supported Devices. |
| Paired devices | Pair the device with the iglooworks app first. |
| 24-hour activation | AlgoPIN codes valid for more than 24 hours need activation on the lock. Use the PIN code on the lock within the first 24 hours of its validity. |
| 256 rule | You can't delete an AlgoPIN whose start date is more than 256 hours after its creation. |
| 199 rule | The lock's whitelist and blacklist hold at most 199 PIN codes in total (AlgoPIN and Bluetooth PIN codes). |
| PINs per duration | For one duration, you can generate only as many PINs as the type's variances. |
Variance: Multiple AlgoPIN Codes for the Same Duration
For a given duration, each variance returns a different PIN code. The Types table above lists the number of variances per type.
One-Time and Permanent support 10 variances on locks with newer firmware. Some older locks gain this with a firmware update; others support 5.
Example of hourly PIN codes for one lock, three variances each:
| Start time | End time | PIN codes (variance 1, 2, 3) | deviceId |
|---|---|---|---|
| 2PM | 3PM | 511093918, 945844647, 052368115 | IGB403fe3b9d |
| 2PM | 4PM | 633654730, 437755350, 337288611 | IGB403fe3b9d |
| 3PM | 5PM | 297248165, 196981787, 384522901 | IGB403fe3b9d |
| 3PM | 5PM | 948950871, 142404925, 817840781 | IGP114cde456 |
The following request returns a unique PIN code (e.g. 4642226):
Changing the variance returns a second unique PIN code (e.g. 1419472) for the same duration: