Lock Offline Error Handling for Schlage Integration
Posted July 7, 2022 by Customer Success ‐ 2 min read
Exciting update! A new feature is now available to use regarding lock offline errors.
How it works:
When attempting to run an action request on a lock that is offline, in addition to the original functionality where the event is queued (deviceEventQueueAction
event) and then rejected (deviceEventUpdateAction
event) - a new webhook event will be emitted to notify you that the lock is offline.
This new event is called deviceEventNotificationReported
and it includes a reference to the actionId and detail around the cause of failure - in this scenario the cause is that the lock is currently offline and unable to process the request.
Keep in mind, it can take up to 20 minutes for the cloud to register that a lock is offline.
These diagrams show how the Yonomi Platform will handle events once the webhook is enabled compared to how it is currently handled:
Before | After |
---|---|
![]() |
![]() |
Examples
Here are examples of the events that will be surfaced when an action is attempted on the lock. Note that the actionId is included in every event.
{ "type": "deviceEventQueueAction", "content": { "deviceId": "f0fb2d8b-c837-436a-a300-19a818850aa4", "actionId": "cf0a29f0-c31e-4f2e-8a15-f1edbb2b56aa", "traitName": "PinCodeCredential", "traitInstance": "default", "actionName": "createPinCodeCredential", "parameters": { "pinCodeCredential": { "pinCode": "222222", "name": "Pin 222222", "schedules": [] } } } }
{ "type": "deviceEventUpdateAction", "content": { "deviceId": "f0fb2d8b-c837-436a-a300-19a818850aa4", "actionId": "cf0a29f0-c31e-4f2e-8a15-f1edbb2b56aa", "status": "rejected" } }
{ "type": "deviceEventNotificationReported", "content": { "deviceId": "f0fb2d8b-c837-436a-a300-19a818850aa4", "notificationName": "errorDeviceOffline", "notificationType": "ERROR", "messageTemplate": "Device is offline, try reconnecting it.", "messageComputed": "Device is offline, try reconnecting it.", "evaluationContext": {}, "errorCategory": "ApplicationError", "errorCode": "TransientError", "inResponseToActionId": "cf0a29f0-c31e-4f2e-8a15-f1edbb2b56aa", "traitName": "PinCodeCredential", "traitInstance": "default" } }
Change Impact
Enabling this feature is completely optional and has no impact on existing functionality. Once it is enabled, you will see the new events and can handle them per your requirements.
How to get access:
Reach out to your Customer Success Representative to enable the new event - deviceEventNotificationReported
.