In addition to supporting online access codes, the Seam integration for igloohome supports the generation of offline access codes (that is, igloohome algoPIN™ codes) for all igloohome lock models, without the need for a bridge. You generate offline access (PIN) codes remotely, and the manufacturer maintains a server-based registry of synchronized encryption keys (tokens) to enable these offline codes. Then, owners or managers can share these codes with users through messaging or other similar applications, and the users do not need to install a special application to unlock the device.
Note the following igloohome-specific offline access code constraints:
General igloohome Offline Access Code Constraints
Constraint
Description
Hourly-Bound Offline Access Code Constraints
Daily-Bound Offline Access Code Constraints
One-Time-User Offline Access Code Constraints
Programming igloohome Offline Access Codes
You can create hourly-bound, daily-bound, and one-time-use offline access codes for igloohome devices.
Hourly-Bound Offline Access Codes
To create an hourly-bound offline access code, issue an access code creation request. Then, poll or use a webhook to confirm that the code was registered successfully in the igloohome offline access code server.
1. Create an Hourly-Bound Offline Access Code
To create an hourly-bound offline access code, provide the device_id of the lock for which you want to create the code and set is_offline_access_code to true. Specify the starts_at and ends_atISO 8601 timestamps to define the active time window for the offline code. You can also assign an optional name to the offline access code. For more details, see the Create Access Code endpoint.
Request:
# Get the device.device = seam.locks.get( device_id="11111111-1111-1111-1111-444444444444")# Confirm that the device supports offline access codes.if device.can_program_offline_access_codes:# Create the hourly-bound offline access code. seam.access_codes.create( device_id = device.device_id, name ="my hourly-bound offline code", starts_at ="2023-11-10T00:00:00-00:00", ends_at ="2023-11-15T18:00:00-00:00", is_offline_access_code =True )
// Get the device.Device device =seam.devices().get(DevicesGetRequest.builder().deviceId("11111111-1111-1111-1111-444444444444").build());// Confirm that the device supports offline access codes.if (device.getCanProgramOfflineAccessCodes()){// Create the hourly-bound offline access code.seam.accessCodes().create(AccessCodesCreateRequest.builder().deviceId(device.getDeviceId()).name("my hourly-bound offline code").startsAt("2023-11-10T00:00:00Z").endsAt("2023-11-15T18:00:00Z").isOfflineAccessCode(true).build());}
Unset: When initially created on Seam, the offline access code remains in an unset state, indicating that it is not yet available for use on the lock due to a configured future activation time.
Setting: As the scheduled starts_at time approaches, Seam initiates the process of readying the code for use on the lock, transitioning the status of the offline code to setting.
Set: Upon successful programming, the status updates to set, signaling that the code is ready to grant the designated user the ability to unlock the door.
There are two methods to verify that an time-bound offline access code has been registered in the offline access code server that the device manufacturer maintains:
Polling: Continuously query the access code until the status is updated. For instructions, see Polling Method.
Webhook: Wait for updates to arrive using webhook requests from the Seam API. For instructions, see Webhook Events Method.
Daily-Bound Offline Access Codes
To create a daily-bound offline access code, first issue a creation request. Then, poll or use a webhook to confirm that the code was registered successfully in the igloohome offline access code server.
1. Create a Daily-Bound Access Code
To create a daily-bound offline access code, provide the device_id of the lock for which you want to create the code and set is_offline_access_code to true. Specify the starts_at and ends_atISO 8601 timestamps to define the active time window for the offline code. For a daily-bound offline access code, you must specify the same time (but not the same date) in the starts_at and ends_at properties.
Because daily-bound offline access codes require day-level duration granularity, you can also set max_time_rounding to 1day (or 1d), instead of the default 1hour (or 1h). Note that the Seam API returns an error if max_time_rounding is 1hour and the necessary rounding amount exceeds one hour.
You can also assign an optional name to the offline access code. For more details, see the Create Access Code endpoint.
Request:
# Get the device.device = seam.locks.get( device_id="11111111-1111-1111-1111-444444444444")# Confirm that the device supports offline access codes.if device.can_program_offline_access_codes:# Create the daily-bound offline access code. seam.access_codes.create( device_id = device.device_id, name ="my daily-bound offline code", starts_at ="2023-11-17T00:00:00-00:00", ends_at ="2023-12-18T00:00:00-00:00", max_time_rounding ="1d", is_offline_access_code =True )
// Get the device.Device device =seam.devices().get(DevicesGetRequest.builder().deviceId("11111111-1111-1111-1111-444444444444").build());// Confirm that the device supports offline access codes.if (device.getCanProgramOfflineAccessCodes()){// Create the daily-bound offline access code.seam.accessCodes().create(AccessCodesCreateRequest.builder().deviceId(device.getDeviceId()).name("my daily-bound offline code").startsAt("2023-11-17T00:00:00Z").endsAt("2023-12-18T00:00:00Z").maxTimeRounding("1d").isOfflineAccessCode(true).build());}
Unset: When initially created on Seam, the offline access code remains in an unset state, indicating that it is not yet available for use on the lock due to a configured future activation time.
Setting: As the scheduled starts_at time approaches, Seam initiates the process of readying the code for use on the lock, transitioning the status of the offline code to setting.
Set: Upon successful programming, the status updates to set, signaling that the code is ready to grant the designated user the ability to unlock the door.
There are two methods to verify that an time-bound offline access code has been registered in the offline access code server that the device manufacturer maintains:
Polling: Continuously query the access code until the status is updated. For instructions, see Polling Method.
Webhook: Wait for updates to arrive using webhook requests from the Seam API. For instructions, see Webhook Events Method.
One-Time-Use Offline Access Codes
igloohome one-time-use offline access codes are valid for 24 hours from the starts_at timestamp that you configure. These codes expire after a single use. For detailed instructions, see Creating One-Time-Use Offline Access Codes.