-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimization: POST instead of GET to /devices/ID #93
Labels
enhancement
New feature or request
Comments
Note that you will need a new version of homebridge-indigo2 to support this. You can add it for now since the POST does the same thing as the GET in the current version you have. |
Excellent, I'll work on that, thanks. |
This is done and in the next release. |
Colorado4Wheeler
pushed a commit
that referenced
this issue
Apr 3, 2018
* **NOTE** As stated earlier, the entire HomeKit engine is being optimized and rewritten for various reasons. There is a new plugin configuration option that allows you to revert to the previous method if the new method is causing problem, but this is on a release-by-release basis, meaning that only changes in **this** release will roll back to using the old methods, the next release will not be able to roll back anything from this release. The functions impacted will be noted in the release notes as 'Library Change'. Please report any issues that are caused by the new library that are resolved by returning to the old methods. Each revision will re-enable this option automatically if it gets turned off. * **NOTE** All minor revisions can still be rolled back for Library Changes until the next full beta version is released * Added optimized Homebridge callback POST method to replace the current GET method, in preparation for an updated Homebridge-Indigo2 script that will parse the data instead of calling back to the API ([Issue #93]((#93)) * Fixed bug in configuration builder where if an error was tripped the exception would not populate ([Issue #94]((#94) and [Issue #92]((#92)) * Fixed bug in new library that would allow Homebridge to see a duplicate camera device and would send that device to HomeKit along with the normal camera ([Issue #83](#83)) * [Issue #94]((#94) resolved * [Issue #92]((#92) resolved * [Issue #93]((#93) implemented
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now, a GET to /devices/ID on homebridge-indigo2 will result in a getInfo request back to HKB.
Instead, you could send a POST to /devices/ID with the updated values directly, to avoid the call back to HKB.
Details:
POST to /devices/ID
Include header:
Content-Type: application/json
POST data is the same JSON data you return in a getInfo request
If I am unable to parse the POST data, I will treat it the same as a GET request and call getInfo.
The text was updated successfully, but these errors were encountered: