Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Set to new version 3.0.0 for V6 API * -) Updated to use new V6 API -) Added support for lamps * Added option to wait till garage door is opened or closed before returning call. * Additional debug Changed update interval to 20 seconds from 5 * Token received also has an expires value. Using half of that to refresh token instead of just default of 2 minutes. * Token received also has an expires value. Using half of that to refresh token instead of just default of 2 minutes. * Fixed token issue * Added last error received in warning message when request fails. * Fix for last refresh date of token * -) Changed length for PKCE to 43 -) Added User-Agent = null to header for authorization page -) Date stored for last token retrieval now based on local timezone * -) Fixed retry attempts to retry a request 5 times -) 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. * DEFAULT_TOKEN_REFRESH has to be an int now. * -) Add #attempt to warning message in request. -) 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. * Small fix for datetime object not imported * Other small fix in request. * -) Will raise AuthenticationError now when 401 is received. -) When a request fails due to 401, re-authentication will be done and request then resend * Updated README * Fix in authentication when request receives 401 * Set OPEN_CLOSE to true in example.py * -) Added some more debug messages -) Fixed not clearing authentication task upon failure * -) Changed logging request attempts from warning to debug -) Failing to re-authenticate will now only result in debug log unless we have to re-authentication to continue -) Cleaned up authentication portion * -) Added tr:except for authentication in login -) Changed error messages for login requests to debug instead. * -) Changed few more error log entries to debug * -) Set flag to not re-try authentication if it failed due to faulty username/password. Try to prevent from account getting locked. * -) Pushed something shouldn't have. * -) Don't use web session for authentication requests ensuring new connection is made each time. Hopefully reduce connection reset by peer messages * -) Don't use web session for authentication requests ensuring new connection is made each time. Hopefully reduce connection reset by peer messages * -) Changed, calling authenticate will now use it's own ClientSession that will be closed at tend of authentication. * -) Fix for resetting authentication task * -) removed redudant debug log entry * -) Fixed commands for turning lamps on & off * -) Change minimum update interval to 10 seconds from 30 seconds * -) Added typing -) 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 * -) Update example.py to show how to use wait_for_state and exception handling -) Changed OPEN_CLOSE constant to ISSUE_COMMANDS * -) last_update is not available for each device, fixed. * -) last_update is not available for each device, fixed. * Few more debug messaging * Fix for when there is no last_update * Fix for when there is no last_update * Updated wait task names for open & close * Fix state returned for device * Add state to debug message * Fix wait for task * Wait task for open and closed is fixed now. * -) Moved getting account and device portions in their own methods -) Device update when waiting for task to be completed (open/close) is now done every 5 seconds and not part of minimum update interval. * -) Removed sleep between open & close for cover since we now wait for state anyways. * -) Removed duplicate debug message * -) Fixed debug entry * Improved web scraping from login page making it less error prone in case something is changed on it.
- Loading branch information