-
Notifications
You must be signed in to change notification settings - Fork 55
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
Installed; nothing happens. Newbie help needed please. #54
Comments
Same. This was working at of 12/16/2019, but I think Ring changed something on their side. |
You're likely running into the authentication issue mentioned here: #52 The main code hasn't been updated to support oauth yet, so you'll need to switch to a version that has been updated. |
So that way works, but it only downloads 100 videos. I have many more videos than this, and am approaching the point at which they all get cleared off Ring’s server. I really need urgent help in getting more than 100 videos before they go entirely
On 7 Jan 2020, at 22:52, joeyberkovitz <[email protected]> wrote:
You're likely running into the authentication issue mentioned here: #52<#52>
The main code hasn't been updated to support oauth yet, so you'll need to switch to a version that has been updated.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#54?email_source=notifications&email_token=ABDIBARPBPYOM7NCAYNBH63Q4UBTHA5CNFSM4KBLWPF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIKSEJQ#issuecomment-571810342>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABDIBATWHGNOUIB7UVSLZSDQ4UBTHANCNFSM4KBLWPFQ>.
|
Not sure about the details, but if you're using my fork, it doesn't have the latest download code, so you should probably download the contents of the example folder from here and try to use those |
I’m just using the changed file for authentication from yours, everything else as stock. It pulls down the 100 most recent videos only.
The links one doesn’t do anything :(
On 8 Jan 2020, at 12:01, joeyberkovitz <[email protected]<mailto:[email protected]>> wrote:
Not sure about the details, but if you're using my fork, it doesn't have the latest download code, so you should probably download the contents of the example folder from here and try to use those
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#54?email_source=notifications&email_token=ABDIBAV3UQPFCBNB5OMTTPLQ4W573A5CNFSM4KBLWPF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIME6HA#issuecomment-572018460>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABDIBAUGHALMMVOQH5P6DDTQ4W573ANCNFSM4KBLWPFQ>.
|
The history function in doorbot.js also changed, try copying that too |
Correction - it works but I just get a few links in the console window
I’m in a real bind because I need to pull down an entire day of video (one video every 1 minute) that is days away from being cleared down by Ring themselves and I can’t for the life of me find anything that will just let me download that many videos :(
On 8 Jan 2020, at 13:42, joeyberkovitz <[email protected]<mailto:[email protected]>> wrote:
The history function in doorbot.js also changed, try copying that too
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#54?email_source=notifications&email_token=ABDIBAVA33YBXG3MINAHOO3Q4XJ5HA5CNFSM4KBLWPF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIMOOHY#issuecomment-572057375>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABDIBAQ5EY2PDYMSPHDE6UDQ4XJ5HANCNFSM4KBLWPFQ>.
|
I understand, that the authentification changed and OAuth is required now. I have the donwload-all.js from #48 (comment) that worked fine until mid of December 2019. From then on the DEBUG tells me that doorbot can not handle the token. Now i downloaded the doorbot.js from your fork but now i get the error of "Callback not defined" in doorbot:50:15, that has to do something with the Doorbot.history at doorbot.js:371:9 Can you give me the hint, what to do to make it run again? |
Here's where I got to. I checked both davglass and joey's projects out into two separate directories. I think merged everything in doorbotj/doorbot.js into doorbot/doorbot.js except the history() function which I kept from the davglass version. In all the example files, I edited the username and password. I also added the retries and userAgent and api version variables. Not being that familiar w/ node, I then did a couple extra things. I made sure that instead of loading from the npm archive, it installed the local code. 'npm install' and then 'npm link doorbot'. This second command makes sure that the local copy of doorbot code is the one that is installed. I had to add a few requirements by also doing the npm install. When you run node download-all.js it'll just tell you what package it's missing. I think I needed requests, dateformat, and some oauth one. From there it ran and downloaded about the last 100 or so videos from 1/7-1/8 2020. I'm stuck trying to figure out how to force it to go back further as I'd like to fill in the missing gaps from further back.j |
I updated download-all.js and doorbot.js in my fork. I tested the fix for download-all.js and it did a few loops before I stopped it, so it looks like it's working now. |
Thank you very much! |
oh my god that works! THANK YOU JOEY BERKOVITZ you've saved me a ton of bother! I especially like how in download-all you're able to set the ID of the 'newest' file from the series you want (tip - get it from the 'share' URL generated in RIng). By doing this you can then watch the terminal as it downloads and then cancel the process when you get to the start of the series. Thank you so much all for your help on this - I've never used Node before! |
Confirmed: Joey's fork works perfectly. |
For me it did not work. Installed it with 'npm i joeyberkovitz/doorbot' but the execution of download-all.js leds to a 'Cannot find module 'doorbot.js''. So in the donwload-all.js i changed the require('doorbot.js') to require('doorbot'). Now it works also for me. Thank you Mr Berkovitz! |
It's looking for doorbot.js instead of doorbot in download-all.js. I think you can copy the file into the directory you are executing from or use npm link and then change it to the package name. diff --git a/examples/download-all.js b/examples/download-all.js //Includes |
After updating the files with joeyberkovitz's branch and following the recommendations above, when I run node download-all.js, the terminal returns : "Done, Oldest File: 999999999999999999999999 |
Same - @joeyberkovitz would you mind having a look at it please? I'm assuming Ring changed something and it's just stuck on 9999999 (etc) now Thanks all |
Is this possibly related to the fact that you can't disable 2FA anymore? Can you try the following and see if you get an error. There's no point in even filling in the correct username and password since you'll have to rely on the auth token. const ring = RingAPI({ ring.devices((e, devices) => { If you do get an error, you'll need to use a separate script to obtain the auth and refresh tokens and then update it in the ".ringAlarmCache" file in your home directory. |
Thanks @joeyberkovitz - actually I was able to disable 2FA just fine before getting this problem. Do you still want me to try something? I may need some help with getting the tokens if so |
Yes. Try that script I sent and see if you get an error. At least on my account there's no way to disable 2FA, just switch it to email as a second factor. |
This is what I get, after changing the reference to 'doorbot' (removing the '.js')
And you're right - it attempts to verify access via email every time you run the download script, so there's no way to satisfy it (by entering the code online, you re-run the script and it generates another pseudo-2fa code) I'm stumped :( |
Maybe try running the ring-auth-cli from somewhere like here: https://github.com/dgreif/ring/wiki/Refresh-Tokens to get a refresh token After that, put your refresh token in your .ringAlarmCache file in the "refreshToken" key: {"oauthToken":"BLANK","refreshToken":"REFRESHTOKEN","hardware_id":"ID"} If that doesn't work, I'll have to write a similar script to generate a refresh token |
I managed to create a refresh token, but where is .ringAlarmCache? I tried placing this file everywhere i can think of but get this. Error: Api failed to return an authentication_token |
It should be in your home directory - /home/USER on Linux, C:\Users\USER\ on Windows. Also, this functionality is only included in my fork. |
installed your fork with "npm install https://github.com/joeyberkovitz/doorbot.git --save" replaced REFRESHTOKEN in {"oauthToken":"BLANK","refreshToken":"REFRESHTOKEN","hardware_id":"ID"} with my refresh token and it's getting real data now. thank you so much everyone! |
I had to remove the old doorbot package. Also after my Ubuntu upgrade, I had to npm install async and npm install dateformat. From there I copied the old examples directory and ran node download-all.js It appears to have grabbed them all. I'm going to look into the homebridge-ring next as I manually put the refresh token into my /home/greg/.ringAlarmCache file. I assume it times out after some short period of time. |
@joeyberkovitz Thanks for the constant contribution to this API. I'd tried reinstalling via your fork and refreshing tokens, however I'm stuck with the following codeblock
Any idea if I've missed any args that might be required? Thanks! |
Sounds like maybe there's something wrong work your save directory, variable called base. Otherwise will need some more logging to figure out your specific issue |
Thanks @joeyberkovitz for your prompt reply. Looks like
Doing I tried downgrading to Update: Removing the
This excludes videos marked as shared/favorites (under |
I was going to try to recreate the error. node download-all.js Same error. npm uninstall mkdirp All good including skipping and looping. var loopForOlder = true; For some reason, I did have to remove my old package-lock.json file to get it working the day before. I don't completely understand it, but at least it's working! |
So I've installed node and I believe, this package. I go into the doorbot folder and edit downloads.js and links.js to have my username and password. I've turned off 2fa to keep things simple.
MacBook-Pro:downloads mac$ node /Users/mac/node_modules/doorbot/examples/download.js
done
MacBook-Pro:downloads mac$
This creates a 'Downloads' folder with nothing in it.
Similarly, links.js just opens and closes (if I run it as node /folder/links.js which I assume is the way to do these things)
I am new to node and scripts generally so don't know if I'm missing anything obvious. Please help?
The text was updated successfully, but these errors were encountered: