update to reflect the "latest unofficial" protocol#1
Open
mrose17 wants to merge 5 commits intochadsmith:masterfrom
Open
update to reflect the "latest unofficial" protocol#1mrose17 wants to merge 5 commits intochadsmith:masterfrom
mrose17 wants to merge 5 commits intochadsmith:masterfrom
Conversation
i have reviewed the other packages by @adamheinmiller - https://github.com/adamheinmiller/ST_MyQ @pfeffed - https://github.com/pfeffed/liftmaster_myq and then updated this package to reflect a “best hits” approach. the changes: 1 headers: send User-Agent using brand from login response 2. parameters: use latest appId: and always send filterOn: 3. responses: look at both body.Message and body.ErrorMessage for error messages 4. make sure logged in before attempting to retrieve devices, et. al. 5. keep track of longevity of security token, refreshing as needed 6. use latest paths (all lower-case, slightly different paths) 7. and the big one: the return value on getDevices is flattened tree structure. first, identify locations that are associated with gateways; then, identify subordinate devices that are associated with garage doors. note that in some cases “bogus” devices are returned (probably due to incomplete registrations). in order to cull these, the deviceRecord.response attribute, if present, is consulted to see if a device is actually extant.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
i have reviewed the other packages by:
and then updated this package to reflect a “best hits” approach.
the changes:
1 headers: send User-Agent using brand from login response
2. parameters: use latest appId: and always send filterOn:
3. responses: look at both body.Message and body.ErrorMessage for error
messages
4. make sure logged in before attempting to retrieve devices, et. al.
5. keep track of longevity of security token, refreshing as needed
6. use latest paths (all lower-case, slightly different paths)
7. and the big one:
the return value on getDevices is flattened tree structure. first,
identify locations that are associated with gateways; then, identify
subordinate devices that are associated with garage doors.
note that in some cases “bogus” devices are returned (probably due to
incomplete registrations). in order to cull these, the
deviceRecord.response attribute, if present, is consulted to see if a
device is actually extant.