Every time the status of the lock is requested, two calls are made to the August API. I see homebridge-august making these calls to august-api when it refreshes the state of the lock:
lockStatus:
const lockStatus = await this.platform.august.status(this.device.lockId);
which calls through to the august-api status object, which then does this:
let { body } = await this.put(/remoteoperate/${lockId}/status)
and lockDetails:
const lockDetails = await this.platform.august.details(this.device.lockId);
which calls through to august-api details object, which then does this:
let { body } = await this.get(/locks/${lockId})
Solution
Almost all the data is available in the lockDetails call, except for if the lock is jammed (retryCount > 1). We should just use lockDetails and work out another way to handle a jammed lock.
Alternatives
No response
Additional context
Calls to the August API is rate limited, so reducing the number of calls to the API is a good thing in general. Also some people are running into issues when they have multiple locks, they hit the rate limit.
Problem
Every time the status of the lock is requested, two calls are made to the August API. I see homebridge-august making these calls to august-api when it refreshes the state of the lock: lockStatus:
const lockStatus = await this.platform.august.status(this.device.lockId);
which calls through to the august-api status object, which then does this:let { body } = await this.put(
/remoteoperate/${lockId}/status)
and lockDetails:const lockDetails = await this.platform.august.details(this.device.lockId);
which calls through to august-api details object, which then does this:let { body } = await this.get(
/locks/${lockId})
Solution
Almost all the data is available in the lockDetails call, except for if the lock is jammed (retryCount > 1). We should just use lockDetails and work out another way to handle a jammed lock.
Alternatives
No response
Additional context
Calls to the August API is rate limited, so reducing the number of calls to the API is a good thing in general. Also some people are running into issues when they have multiple locks, they hit the rate limit.