Howdy, friends;
I'm having some trouble getting Ring working with Homebridge. I used the ring-auth-cli command (slick tool! nice work ✨) to generate a refreshToken, and it appears to have succeeded, but I get this error when I start up Homebridge:
[1/13/2020, 7:48:54 PM] [Ring] Request to https://app.ring.com/rhq/v1/devices/v1/locations failed
[1/13/2020, 7:48:54 PM] [Ring] Error connecting to API
[1/13/2020, 7:48:54 PM] [Ring] Error: Refresh token is not valid. Unable to authenticate with Ring servers.
at RingRestClient.getGrantData (/usr/local/lib/node_modules/homebridge-ring/lib/api/rest-client.js:85:15)
at RingRestClient.<anonymous> (/usr/local/lib/node_modules/homebridge-ring/lib/api/rest-client.js:89:36)
at Generator.next (<anonymous>)
at /usr/local/lib/node_modules/homebridge-ring/lib/api/rest-client.js:8:71
at new Promise (<anonymous>)
at __awaiter (/usr/local/lib/node_modules/homebridge-ring/lib/api/rest-client.js:4:12)
at RingRestClient.getAuth (/usr/local/lib/node_modules/homebridge-ring/lib/api/rest-client.js:88:16)
at RingRestClient.<anonymous> (/usr/local/lib/node_modules/homebridge-ring/lib/api/rest-client.js:113:33)
at Generator.throw (<anonymous>)
at rejected (/usr/local/lib/node_modules/homebridge-ring/lib/api/rest-client.js:6:65)
Just to be safe, I generated another refreshToken, but I'm still getting the same error. Am I just doing something silly?
Versions:
@shinypb I haven't had any other complaints about refreshTokens not working. Most likely, it's a copy/paste issue or your config file isn't structured quite right. I'd suggest you try it a few more times and ensure your config file is right
Howdy, Dusty;
Thanks for getting back to me. My config file (redacted) looks like this;
does anything seem obviously wrong to you?
{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:31",
"port": 51826,
"pin": "031-45-199"
},
"platforms": [
{
"platform": "Ring",
"refreshToken": "eyJhbGc...REDACTED...tE5j1w"
}
}
}
Thanks again!
On Tue, Jan 14, 2020 at 12:32 PM Dusty Greif notifications@github.com
wrote:
@shinypb https://github.com/shinypb I haven't had any other complaints
about refreshTokens not working. Most likely, it's a copy/paste issue or
your config file isn't structured quite right. I'd suggest you try it a few
more times and ensure your config file is right—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dgreif/ring/issues/225?email_source=notifications&email_token=AAAKFNXIMF7AALN3MOGHQ4LQ5YOMRA5CNFSM4KGMQSQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI6ATAY#issuecomment-574359939,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAKFNSDON5JEPGBQA2NDA3Q5YOMRANCNFSM4KGMQSQQ
.
@shinypb that config structure looks correct. I'm not sure why it wouldn't be working for you. I just tried the ring-auth-cli again with my account and the refresh token worked just fine. Make sure you are on the latest version of the plugin and give it one more try I guess
I uninstalled homebridge-ring and re-ran ring-auth-cli and I'm still getting the same error. It's possible that my computer is haunted ¯\_(ツ)_/¯. Let me know if there's anything else I can dig up for you to aid in debugging, but don't worry about it too much on my behalf — even though this plugin isn't working for me, I appreciate all of the effort you've put into making it. Thanks for making the internet rad.
@shinypb great news! homebridge-config-ui-x just added a new account linking flow specifically for this plugin. If you install v4.8.0 of homebridge-config-ui-x, you should be able to get your refresh token set up without using the cli. Let me know how it goes!
Ah, thanks for the pointer — I hadn't heard of homebridge-config-ui-x
before, and it's quite slick. Unfortunately, Ring continues to reject my
credentials, even having started from scratch using the
homebridge-config-ui-x setup flow.
I do appreciate your help and suggestions, but I think I've come to the end
of my Homebridge tinkering time for now. Perhaps my Homebridge server is
just haunted. :)
On Fri, Jan 17, 2020 at 3:59 PM Dusty Greif notifications@github.com
wrote:
>
@shinypb great news! homebridge-config-ui-x just added a new account
linking flow specifically for this plugin. If you install v4.8.0 of
homebridge-config-ui-x, you should be able to get your refresh token set up
without using the cli. Let me know how it goes!—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
>
@shinypb after reviewing your original post, I now realize this wasn't an issue with your refresh token at all, sorry for wasting your time on that! I've added some additional logging in v6.0.3 to help pin down the issue. Would you mind updating and posting the new error logs? Thanks!
Sure, happy to do so. I'm away from my computer until tomorrow; stay tuned.
On Sat, Jan 18, 2020 at 9:31 AM Dusty Greif notifications@github.com
wrote:
@shinypb https://github.com/shinypb after reviewing your original post,
I now realize this wasn't an issue with your refresh token at all, sorry
for wasting your time on that! I've added some additional logging in v
6.0.3 to help pin down the issue. Would you mind updating and posting the
new error logs? Thanks!—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dgreif/ring/issues/225?email_source=notifications&email_token=AAAKFNRTJUPLHARKILYQSVDQ6M4HDA5CNFSM4KGMQSQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJJ5XEY#issuecomment-575921043,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAKFNS6SB2ALAQTJDUL2WLQ6M4HDANCNFSM4KGMQSQQ
.
OK, you're gonna love this: the refreshToken error is a red herring. The real problem was showing up in homebridge's error log _above_ that:
[1/19/2020, 2:37:40 PM] [Ring] Error connecting to API
[1/19/2020, 2:37:40 PM] [Ring] Error: Error while obtaining machine id: Error: Command failed: ioreg -rd1 -c IOPlatformExpertDevice
/bin/sh: ioreg: command not found
Homebridge is running on my Mac via launchd, and—surprise!—/usr/sbin wasn't on the PATH I'd configured. I've opened up a pull request against the node-machine-id package that homebridge-ring uses to make it specify a full path to the ioreg command. If it gets merged, I'll open a PR up against this project to update the dependency.
Thanks for the troubleshooting help! ✌️
@shinypb so glad you got that figured out! I've had a few other users run into issues with /usr/sbin not being on their path, so thanks for doing that PR. I'll subscribe to the PR and get it pulled in if they merge it.
Hi all, I am experiencing an identical error as @shinypb and am running HomeBridge Config UI, but on a Raspberry Pi, and I am not sure I understand the resolution outlined here, or at least how it applies to a Raspberry instance vs on Mac. Any assistance would be appreciated! Thanks in advance.