denniedegroot / com.ring

Ring for Homey
https://www.athom.com
Other
15 stars 15 forks source link

Linked accounts no longer working fine after 2FA update 2.2.2 #52

Closed FrankSmeets01 closed 4 years ago

FrankSmeets01 commented 4 years ago

Hi, I was happy that 2FA was implemented, but I’m having issues when I connect it to a shared ring-account. I can’t connect my doorbell pro (It says no new devices) and the stickup cam can be installed but doesn’t receive motions (in Homey). When I connect Homey to my main Ring-account, it works fine. But the stickup cam (in Homey) then only receives motion notifications when I have notification enabled on my Ring-account. I don’t want this as I then the Ring app is giving notifications.

Can you please look into this?

kaohlive commented 4 years ago

Can you run the app with the cli and pm me the json output of the api call that gets logged in the console screen? Ill give it a look. But the MFA thing cant really have changed that. So I think Ring added some more API changes to their API to improve privacy and something like that must be breaking the app logic.

FrankSmeets01 commented 4 years ago

Hi kaohlive,

The issue with the Stickup Cam is resolved. For some reason the motion-schedule was enabled again!! Now the only issue is the Doorbell Pro that can't be added as the app is telling me 'no new devices found'. The doorbell pro is (like my Stickup cam) granted to my shared-account.

I have the api calls that get logged ... how do I send you a pm?

kaohlive commented 4 years ago

@FrankSmeets01 As far as I can tell you can not do that on github. You can on the Homey community. Find my post there and then you can message me. Running the app on cli you need to follow the developer instructions: https://apps.developer.athom.com/tutorial-Getting%20Started.html Follow steps 1,2,3 ensure you skip 4!! Then download the source from my fork or the one from the master by dennie and run step 5 from the folder where you put the source. You might need to run npm -i to ensure you get all packages properly installed.

This will run the app with all logging output in the node.js command. There should be a device listing there in the output with all your devices in there. Thats the one we need to check.

FrankSmeets01 commented 4 years ago

@kaohlive Homey Community says "you cannot send a personal message to that user" :-(

kaohlive commented 4 years ago

@FrankSmeets01 So I found the issue, your doorbell is part of the authorized_doorbots collection instead of the doorbots collection. The app currently only looks at that doorbots collection. I added that check to the code, no way to validate right now though. Once The current pull gets merged ill commit that version. Together with the floodlight support for stickup cams.

FrankSmeets01 commented 4 years ago

@kaohlive Thx for checking. Weird that only the doorbell is set to the 'authorized_*' collection. Which (I assume) is due to the fact that it's a shared account. I would expect that the stickup cam would also have a different collection as this one is also shared with the account that I'm using for Homey. So doesn't seem very consistent by Ring! Hopefully they will not change that in future!

kaohlive commented 4 years ago

maybe, no other device type has this aithorised version. So its a bit weird. I added that collection to the code as doorbell so lets see if that makes them work.

kaohlive commented 4 years ago

In my fork there is a version that should support this now. I created a new pull request for Dennie (sorry for spamming you)

FrankSmeets01 commented 4 years ago

@kaohlive If tested the version in your fork and the doorbell (with device type "authorized_doorbots") is now added to the Homey and works like a charm. Also the imagegrabber for the stickup cam works now.

Thx a lot for the good work.

Now let's await to have it in the official version from @denniedegroot .

FrankSmeets01 commented 4 years ago

Fixed in V2.3.0. Thx.