Skip to content

Releases: scottbonline/sense

0.11.2 Optimize processing of websocket messages

21 Apr 19:42
Compare
Choose a tag to compare

What's Changed

  • Optimize processing of websocket messages by @bdraco in #57

Full Changelog: 0.11.1...0.11.2

0.11.1 Rate limit and Refresh Token Improvements

06 Jan 03:46
Compare
Choose a tag to compare

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

29 Nov 22:42
Compare
Choose a tag to compare

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

28 Mar 22:59
Compare
Choose a tag to compare

Add 404 to api response that require authentication

Add exception for non-authentication errors in API call

22 Mar 16:16
Compare
Choose a tag to compare

Adds the new exception type SenseAPIException for non-authentication errors in API calls

Status code check on api call

14 Feb 04:38
Compare
Choose a tag to compare

Adds a check that the API call was successful. Instead of just returning an empty dict if the call fails, an exception is raised

Add Load authentication Function

12 Feb 22:50
Compare
Choose a tag to compare

Along with the MFA update in the previous release, it's helpful to be able to save/load the authentication session info without re-authenticating. The load_auth(access_token, user_id, monitor_id) provides this as an alternative to calling authenticate()

Add MFA Support

12 Feb 17:45
Compare
Choose a tag to compare

Added Support for authentication for users with MFA enabled. After the authenticate function is called, a SenseMFARequiredException will be raised at which point validate_mfa function can be called with the MFA code

Standardize on UTC

19 Jan 02:35
Compare
Choose a tag to compare

Times are standardized with timezone data on UTC
The "HOUR" Trend was removed because it is not supported

Monitor timezone and Trend start date

17 Jan 20:35
Compare
Choose a tag to compare

Added support for the monitor timezone (text str) and the trend start date via the property .time_zone and the function trend_start(scale)