-
Notifications
You must be signed in to change notification settings - Fork 42
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
v3.0.0 #79
Merged
Merged
v3.0.0 #79
Conversation
This file contains 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
Collaborator
ehendrix23
commented
Feb 5, 2021
•
edited
Loading
edited
- Update to MyQ V6 API (fixed MyQ API Update. #67)
- Add support for lamps
- Following properties were added to api:
- last_state_update: date/time (UTC) when devices were updated last time (read-only)
- covers: dictionary of all devices that are covers/garage doors/gates (read-only)
- lamps: dictionary of all devices that are lamps (read-only)
- gateways: dictionary of all devices that are gateways (read-only)
- username: username used to authenticate (read/write)
- password: password used to authenticate (write-only)
- Following properties were added to MyQDevice:
- account: Account ID associated with device
- state_update: date/time (UTC) when device was updated last time. If this is older then last_state_update property from api then it means the device is not there anymore.
- New classes created:
- MyQGaragedoor: represents a garage door/gate. Inherits from MyQDevice
- MyQLamp: represents a lamp. Inherits from MyQDevice
- Methods open & close for garage door have new option wait_for_state (default False). If set to true then open/close will not return until garage door has completed opening/closing and return a Bool. If set the False then a Task object will be returned for the task that is waiting until the state is completed. This task can then be awaited upon for completion of open or close.
- Device updates will automatically occur every 5 seconds when an open or close is send through the API for the garage door/gate.
- Re-authentication is done before token will expire and performed asynchronously so it does not hold up retrieving device information or sending commands
- Update interval limit set to 10 seconds from 30 seconds
- Changed a number of ERROR or WARNING messages to DEBUG messages and raising exception
- Moved sending of requests into its own class with more detailed debug allowing debug level to be set separate from api
-) Added support for lamps
Changed update interval to 20 seconds from 5
…sh token instead of just default of 2 minutes.
…sh token instead of just default of 2 minutes.
-) Added User-Agent = null to header for authorization page -) Date stored for last token retrieval now based on local timezone
-) Reset token if a request returns 401 (unauthorized) -) Schedule re-authentication as separate task allowing current request to go through (expiration is set half of received expiration) -) If expires received is less then default then set to default.
-) Add last_status_update to api to get last time status was updated (UTC) -) Add status_update for each device to state last time status was updated (UTC) -) Added lock to status update ensuring only 1 task can execute it at a time.
-) When a request fails due to 401, re-authentication will be done and request then resend
-) Fixed not clearing authentication task upon failure
-) Failing to re-authenticate will now only result in debug log unless we have to re-authentication to continue -) Cleaned up authentication portion
-) Changed error messages for login requests to debug instead.
…sername/password. Try to prevent from account getting locked.
…nection is made each time. Hopefully reduce connection reset by peer messages
…nection is made each time. Hopefully reduce connection reset by peer messages
…that will be closed at tend of authentication.
-) Support for device state different from what is returned from MyQ. This to support waiting until an action is completed yet still return intermediate state (i.e. opening, closing) -) Moved wait_for_state to MyQDevice and ensure device state is reset
…handling -) Changed OPEN_CLOSE constant to ISSUE_COMMANDS
-) Device update when waiting for task to be completed (open/close) is now done every 5 seconds and not part of minimum update interval.
…ase something is changed on it.
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.