Mobile SDK

Setup hardware

Now let’s open some doors! You will need the following hardware for a test setup:

IQ(s)

Repeater(s) – optional

Lock(s)

Tag(s)

Maintenance card

Below you may find the sequence of calls for the next steps. Those next steps being activating IQ and Lock, linking them into a “System Tree”, registering Tags and last granting access (which is done by creating accessors and access groups). More detail about the end-points and values you need to apply can be found online at the Developer page. Please be aware that hovering the coloured section provides more info.

Activate hardware: {{url}} -> https://hardware.my-clay.com/

POST {{url}}/v1/iqs

PATCH {{url}}/v1/iqs/{id}

properties

subscribed

true

POST {{url}}/v1/locks

POST {{url}}/v1/repeaters (if you have a repeater)

Link locks and repeaters to IQs (Set IQ hardware tree):

PUT {{url}}/v1/iqs/{id}/tree

As a next step; Locks can be physically linked to the IQ by presenting the ‘Maintenance Card’ and Repeaters, by pressing the reset button. To review the state of the ‘Tree’, check the Locks and Repeaters for iq_link_state online. If Repeater is added in the ‘Tree’, reset the Repeater.

You can verify the IQ Hardware tree by requesting following call from the API:

GET {{url}}/v1/iqs/{id}/tree

Detaching lock(s):

If a lock needs to be moved to a different location or replaced, it needs to be detached from its current installation. Detaching a lock is a process that consists of 2 steps:

1

First, a PATCH request is done on the lock endpoint (PATCH /v1/locks/{id}) with the following properties:

properties

iq_link_state

detached_pending

accessor_id

{id}

After step 1, please check if the lock has been properly detached. If a lock is detached, it will unlock upon presentation of any Tag. Instead of blinking green, an orange light is shown immediately.

In the case that you would like to remove any hardware from a tree, it is of utmost importance that the locks are physically detached, prior to removing them from the hardware tree.

Unless the locks are detached, please be aware that removing any hardware from a tree will remove all reference to the lock attached to the IQ. Once the IQ loses all reference to the lock, it will not be able to detach the lock. Since the relation between the IQ and locks are stored, the locks will become unmanageable and cannot be reused anymore.

Detaching lock(s) from the IQ

Removing hardware from the hardware tree on IQ (this removes all reference to the locks that were just detached)

Locks will now be re-usable and “free”

Before moving on to the next step, please check that the lock has been physically detached.

2

Second, the lock is removed from the tree by using the PUT request on the IQ (/v1/iqs/{id}/tree) endpoint.