Set signed time

Sets trusted date and time on the device got from Tedee API.

SET_SIGNED_DATETIME code is 0x71

Input parameters

param[0 .. 7]: datetime received from Tedee API and decoded from base64, param[8 .. signature_len+7]: signature received from Tedee API.

Result

Result name

Value

Description

SUCCESS

0x00

Operation accepted. Wait for notification signed datetime.

INVALID_PARAM

0x01

Invalid params passed to lock.

ERROR

0x02

Error occured.

Output params

none

Example

  1. Get signed time from Tedee API.

  2. Decode datetime and signature from base64.

  3. Create such frame:

Datetime

Signature

8 bytes

Signature_len

  1. Encrypt prepared message,

  2. Send it on API commands characteristic,

  3. Receive response on API commands characteristic,

  4. Response is set as not encrypted so just discard that header byte,

  5. Parse response

Response

0x00 (SUCCESS)

  1. Wait for SIGNED_DATETIME notification.