python-ring-doorbell icon indicating copy to clipboard operation
python-ring-doorbell copied to clipboard

Issue when calling live_streaming_json

Open Tominium opened this issue 4 years ago • 3 comments

Heres the code:`import json import getpass from pathlib import Path from pprint import pprint

from ring_doorbell import Ring, Auth from oauthlib.oauth2 import MissingTokenError

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("MyProject/1.0", json.loads(cache_file.read_text()), token_updated) else: username = input("Username: ") password = getpass.getpass("Password: ") auth = Auth("MyProject/1.0", None, token_updated) try: auth.fetch_token(username, password) except MissingTokenError: auth.fetch_token(username, password, otp_callback())

ring = Ring(auth)
ring.update_data()

devices = ring.devices()
pprint(devices)
doorbell = devices['doorbots'][0]
print(doorbell.live_streaming_json())

if name == "main": main() ` I get the error: TypeError: 'NoneType' object is not callable when i call print(doorbell.live_streaming_json())

Tominium avatar Jun 17 '20 21:06 Tominium

Change print(doorbell.live_streaming_json()) To this print(doorbell.live_streaming_json)

clinkadink avatar Jun 27 '20 14:06 clinkadink

Hi, is the live_streaming_json available on Ring gen 1 with no subscription? When I run it it returns "None" (I have the latest release 0.6.2 installed)

As I comparison I have the same device configured in Smartthings as RingPro (although it is just ordinary Ring doorbell) and I can see the livestream with the Smartthings app

darkogorgievski avatar Jan 20 '21 23:01 darkogorgievski

Same with me (Ring Doorbell 3 Pro), shows "None".

real-esekyl avatar Apr 08 '21 22:04 real-esekyl

There hasn't been any activity on this issue recently. This issue has been automatically marked as stale because of that. It will be closed if no further activity occurs. Please make sure to update to the latest ring_doorbell version and check if that solves the issue. Thank you for your contributions.

github-actions[bot] avatar Apr 18 '24 18:04 github-actions[bot]