Releases: scottbonline/sense
0.12.3 Handle Unicode Errors
0.12.2 Optimizations
0.12.1 SSL Context Cached
0.12.0 Updated Kasa crypt and Removal of Python 2 Support
What's Changed
- Switch to using kasa-crypt for tplink encryption by @bdraco in #59
- Remove Support for Python2 by @kbickar in #60
As mentioned, Python 2 support has been dropped from this release onward.
Full Changelog: 0.11.2...0.12.0
0.11.2 Optimize processing of websocket messages
What's Changed
Full Changelog: 0.11.1...0.11.2
0.11.1 Rate limit and Refresh Token Improvements
What's Changed
- Rate limit calls strictly based on time between calls to the API by @dennypage in #54
- The
update_realtime()
function will now automatically refresh the auth token if it has expired
Support for Refresh Tokens
Sense has updated their API to auto-expire auth tokens every 30 days as well as implementing refresh tokens to request a new auth token. This update adds support for refresh tokens and automatically renewing the auth token on auth failures.
Breaking Changes
The new refresh token will need to be stored and loaded. Any script that implements the load_auth
function must be updated. Instead of
sense.load_auth(access_token, user_id, monitor_id)
it should be called with
sense.load_auth(access_token, user_id, device_id, refresh_token)
sense.set_monitor_id(monitor_id)
New Functions
Added two new functions:
renew_auth()
- manually renew the auth token
logout()
- logout
Last Release for Python 2
This will be the last major release supporting Python 2
API requests returning 404 throw Authentication Error
Add 404 to api response that require authentication
Add exception for non-authentication errors in API call
Adds the new exception type SenseAPIException
for non-authentication errors in API calls
Status code check on api call
Adds a check that the API call was successful. Instead of just returning an empty dict if the call fails, an exception is raised