Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listen -- ValueError #346

Open
justin2004 opened this issue Feb 10, 2024 · 4 comments
Open

listen -- ValueError #346

justin2004 opened this issue Feb 10, 2024 · 4 comments

Comments

@justin2004
Copy link

justin2004 commented Feb 10, 2024

I got the same result running the version in pip and from the main branch of this repo.

$ python3 ring_doorbell/cli.py --version
cli.py, version 0.8.7
$ python3 ring_doorbell/cli.py list
---------------------------------
Ring CLI
Front Door (doorbell_v4)

$ python3 ring_doorbell/cli.py listen
---------------------------------
Ring CLI
INFO:firebase_messaging.fcmpushclient:Registered with FCM
New push credentials created:
INFO:firebase_messaging.fcmpushclient:Succesfully logged in to MCS endpoint
Listening, press enter to cancel

# << i walked to the front door to active the device >>

 ERROR:firebase_messaging.fcmpushclient:Unexpected exception calling notification callback
Traceback (most recent call last):
  File "/home/justin/.local/lib/python3.10/site-packages/firebase_messaging/fcmpushclient.py", line 428, in _handle_data_message
    callback(ret_val, msg.persistent_id, obj)
  File "/home/justin/.local/lib/python3.10/site-packages/ring_doorbell/listen/eventlistener.py", line 181, in on_notification
    datetime.strptime(created_at, "%Y-%m-%dT%H:%M:%S.%f%z")
  File "/usr/lib/python3.10/_strptime.py", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/lib/python3.10/_strptime.py", line 349, in _strptime
    raise ValueError("time data %r does not match format %r" %
ValueError: time data '2024-02-10T14:24:53Z' does not match format '%Y-%m-%dT%H:%M:%S.%f%z'
@sdb9696
Copy link
Collaborator

sdb9696 commented Feb 10, 2024

I’ll look into this. Where are you based and do you know what firmware version you are running?

@justin2004
Copy link
Author

thanks @sdb9696 .
I've got a Ring Video Doorbell 2.
Radio-related software "14.0.25"

I am in Missouri.

@AndrewMohawk
Copy link

I'm seeing the same in NYC running 0.7.7 of the lib, it looks like the issue lies in the timestamp coming back from firebase

@AndrewMohawk
Copy link

I've made a small patch that works-for-me(tm) on 0.7.7 and applied it to the latest (I couldnt find how to do it to the older releases), but you should be able to copy/paste the changes as the code is the same!

#378

@justin2004 / @sdb9696

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants