python-ring-doorbell
python-ring-doorbell copied to clipboard
listen -- ValueError
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'
I’ll look into this. Where are you based and do you know what firmware version you are running?
thanks @sdb9696 . I've got a Ring Video Doorbell 2. Radio-related software "14.0.25"
I am in Missouri.
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
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!
https://github.com/tchellomello/python-ring-doorbell/pull/378
@justin2004 / @sdb9696
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.
This should now be fixed in the master branch with https://github.com/tchellomello/python-ring-doorbell/pull/378. Will hopefully get round to doing a release over the next few days.