homebridge-plugins / homebridge-august

The Homebridge August plugin allows you to access your August/Yale Locks from HomeKit with Homebridge.
ISC License
36 stars 9 forks source link

Fix debugging issue and reduce August API calls #69

Closed dacarson closed 1 year ago

dacarson commented 1 year ago

:recycle: Current situation

Two issues are reported: https://github.com/donavanbecker/homebridge-august/issues/67 Multiple calls to August-API which is rate limited https://github.com/donavanbecker/homebridge-august/issues/68 Debugging issue

:bulb: Proposed solution

Minor fix for debugging so that it now dumps full JSON object LockStatus is returned inside LockDetails. So rather than request Status and then Details, just request Details and use the Status object contained within it. This does remove the ability to report if the lock is jammed - though this seems like a minor issue when compared to reducing the calls to the August API.

:gear: Release Notes

https://github.com/donavanbecker/homebridge-august/issues/68 - Fully print the JSON object for AugustEvent when debugging is enabled. https://github.com/donavanbecker/homebridge-august/issues/67 - Cut the number of calls to the August API in half for each lock.

:heavy_plus_sign: Additional Information

Test the compilation of Typescript file and make sure it worked. I don't have a Typescript compiler so I make the changes in the generated lock.js file, and then copied the changes back to the .ts file.

Testing

Tested with AUG-SL04-M01-G04 without DoorSense using changes in lock.js file:

Reviewer Nudging

Make sure it all compiles correctly to js, and that it functions. Or send me a copy of the .js file and I can validate it.

donavanbecker commented 1 year ago

will merge into beta for testing.