Releases: python-ring-doorbell/python-ring-doorbell
0.7.3
0.7.2
0.7.1
0.7.0
New features
- #231 Support for light groups (and thus Transformers indirectly) (thanks @decompil3d!)
Fixes
- #196 Fix snapshot functionality (thanks @dshokouhi!)
- #225 Fix live stream functionality (thanks @JoeDaddy7105!)
- #228 Avoid multiple clients in list by maintaining consistent hardware ID (thanks @riptidewave93!)
- #185 Return
None
instead of0
for battery level when a device is not battery powered (thanks @balloob!) - #218 Fix snapshot again and add download option (thanks @kvntng17!)
Misc
- #224 Fix build failures (thanks @JoeDaddy7105!)
- #233 Move to GitHub Actions (thanks @decompil3d!)
0.6.2
0.6.1
0.6.0
Major breaking change
Ring APIs offer 1 endpoint with all device info. 1 with all health for doorbells etc. The API used to make a request from each device to the "all device" endpoint and fetch its own data.
With the new approach we now just fetch the data once and each device will fetch that data. This significantly reduces the number of requests.
See updated test.py on usage.
Changes:
- Pass a user agent to the auth class to identify your project (at request from Ring)
- For most updates, just call
ring.update_all()
. If you want health data (wifi stuff), calldevice.update_health_data()
on each device - Renamed
device.id
->device.device_id
,device.account_id
->device.id
to follow API naming. - Call
ring.update_all()
at least once before querying for devices - Querying devices now is a function
ring.devices()
instead of propertyring.devices
- Removed
ring.chimes
,ring.doorbells
,ring.stickup_cams
- Cleaned up tests with pytest fixtures
- Run Black on code to silence hound.
0.5.0
Breaking Change
The Auth
class no longer takes an otp_callback
but now takes an otp_code
. It raises MissingTokenError
if otp_code
is required. See the updated example. This prevents duplicate SMS messages. Thanks to @steve-gombos
Timeout has been increased from 5 to 10 seconds to give requests a bit more time (by @cyberjunky)
0.4.0
Major breaking change.
This release is a major breaking change to clean up the auth and follow proper OAuth2. Big thanks to @steve-gombos for this.
All authentication is now done inside Auth
. The first time you need username, password and optionally an 2-factor auth callback function. After that you have a token and that can be used.
The old cache file is no longer in use and can be removed.
Example usage (also available as test.py
):
import json
from pathlib import Path
from ring_doorbell import Ring, Auth
cache_file = Path('test_token.cache')
def token_updated(token):
cache_file.write_text(json.dumps(token))
def otp_callback():
auth_code = input("2FA code: ")
return auth_code
def main():
if cache_file.is_file():
auth = Auth(json.loads(cache_file.read_text()), token_updated)
else:
username = input("Username: ")
password = input("Password: ")
auth = Auth(None, token_updated)
auth.fetch_token(username, password, otp_callback)
ring = Ring(auth)
print(ring.devices)
if __name__ == '__main__':
main()
Version 0.2.9
- Fixed Compatibility with Python 2 (old-school typing syntax in docstrings); fix for OAuth.SCOPE - @ZachBenz #163
- Implemented timeouts for HTTP requests methods - @tchellomello #165
- Use auth expires_in to refresh oauth tokens. - @jeromelaban #167
- Fixed logic and simplified module imports - @tchellomello #168