Commit 9e3a077
authored
v3.0.0 (#79)
* 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.1 parent 642933e commit 9e3a077
File tree
12 files changed
+1211
-350
lines changed- pymyq
12 files changed
+1211
-350
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
54 | 62 | | |
55 | 63 | | |
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
60 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
61 | 84 | | |
62 | 85 | | |
63 | 86 | | |
| 87 | + | |
64 | 88 | | |
65 | 89 | | |
66 | 90 | | |
67 | 91 | | |
68 | 92 | | |
69 | 93 | | |
| 94 | + | |
70 | 95 | | |
71 | 96 | | |
72 | 97 | | |
73 | 98 | | |
74 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
75 | 110 | | |
76 | | - | |
| 111 | + | |
| 112 | + | |
77 | 113 | | |
78 | 114 | | |
79 | 115 | | |
80 | 116 | | |
81 | | - | |
82 | | - | |
83 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
84 | 137 | | |
85 | 138 | | |
86 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
15 | 35 | | |
16 | 36 | | |
17 | 37 | | |
| |||
22 | 42 | | |
23 | 43 | | |
24 | 44 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
52 | 133 | | |
53 | 134 | | |
54 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
0 commit comments