Skip to content
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 49 commits into from
Feb 5, 2021
Merged

v3.0.0 #79

merged 49 commits into from
Feb 5, 2021

Conversation

ehendrix23
Copy link
Collaborator

@ehendrix23 ehendrix23 commented Feb 5, 2021

  • 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.
@ehendrix23 ehendrix23 merged commit 9e3a077 into master Feb 5, 2021
@ehendrix23 ehendrix23 deleted the v6_API branch August 9, 2021 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MyQ API Update.
1 participant