Comments (22)
@problemss it's taken a lot of debugging and digging through other libraries, but I finally got to the root source of the issue on events not registering. It all has to do with how we are authenticating and setting up a session with Ring. I have most of the fix in place, but need to think through corner cases before I push it up. I've got a busy weekend, but I should have an update out early next week. Thanks for your patience, this was a tough one to track down!
from ring.
@dgreif that is awesome! Thank you so much! I will be out of town next week for the 4th but am excited to try the fix out when I get back! I also greatly appreciate you spreading the knowledge in the other project as well.
from ring.
@problemss I found some time to work on it this morning and I got all the session stuff finished up. Give v3.4.0
a try!
from ring.
@problemss you have it right. All you need to do is update the homebridge-ring-alarm npm module and restart homebridge
from ring.
I can also confirm the update fixed my issue with motion events not being captured. Thank you!
from ring.
@problemss @johnsonjoshuaa thank you both for confirming that it's working! I just released another update that should improve motion/ding alert times even more. Give v3.5.1
a try when you get a chance. It looks like Ring automatically captures a snapshot when there is an event, and HomeKit was sometimes requesting it after it was already updated. When this happened, it could take up to 30 seconds before another snapshot would be taken. This delayed the notification from Home by ~10-15 seconds, and then you would see a notification with no snapshot, which got replaced by a notification with a snapshot once a new one was available. Now I am a little smarter about how I compare snapshot timestamps, so if a snapshot was taken within the last 10 seconds before Home requests it, we use it without waiting for a new one. The end result (at least for me) is that motion alerts are delivered within ~3 seconds of when they occur, with snapshot in tow every time.
from ring.
The Ring api for getting new events is definitely less than ideal. If you have any other setups that are polling for events, you will definitely run into conflicts. That means if you have anything using the python library or another homebridge plugin like homebridge-platform-ring-video-doorbell
, they will be competing to grab the events from Ring. It's hard to track down these issues, so you just have to know what else you have set up. Another thing you can do is pass cameraDingsPollingSeconds: 1
, which will poll for events every second instead of the 5 second default. Let me know if you figure out what is causing your issues as it may help others down the road.
from ring.
I will disable the other ring python library I have setup and see if that does it.
from ring.
Happens de same to me, no other ring library but sensor doesn’t fire up, I receive notifications from ring app but no from plugin sensor
from ring.
I disabled and set to 1 second. Still not triggering. Is there any debugging I can turn on to look into it?
from ring.
There isn't currently any debug flags that you can turn on to see additional details, but that's something I could add. This particular issue is very hard to track down because the Ring api is very fragile. If one other client is grabbing events, you will lose the ability so see them. I'm going to look into auth sessions a little more and see if I can make it less fragile, but I can't make any promises. If you really want to debug it locally, you can add a console.log('active dings', activeDings)
in node_modules/homebridge-ring-alarm/api/api.js
after the line that has poolForActiveDings$.next();
. This will log the array of dings fetched from the api every poll. My guess is that you will see []
every time, even when there is an event, which means the API is being pinged somewhere else and the events are being cleared before you get a chance to see them. I'll let you know if I come up with any other ideas
from ring.
Just for your info, there is a plug-in in homeassistant who works perfectly with.
from ring.
@divemasterjm do you have the homeassistant plugin running at the same time as the homebridge plugin? If so, that might be what's conflicting. Try turning that off and running just homebridge.
from ring.
@dgreif So i had to put the console login under if (!activeDings || !activeDings.length) {
and under activeDings.forEach(activeDing => {
or else the module would become unresponsive. After putting those logs in place. Only the one under !activeDings is being called, the other log never gets called, confirming your assumption that it is always empty []. I am going to try a few more things now that I have your code open and let you know if I figure anything out.
I also turned off my IFTTT triggers just in case.
from ring.
So I am in the fetchActiveDings()
function
I am trying to print out the URL it is using but I am just getting this
https://api.ring.com/clients_api/dings/active?burst=false
I assume the clients_api will get replaced when the URL is actually called? Is there a way I can get the full URL so I can call it manually?
from ring.
@problemss that actually is the full url. Should be able to do a GET
to that endpoint. Also need to include the Authorization
header and I think you need 'user-agent': 'android:com.ringapp:2.0.67(423)'
from previous testing, but that one might be optional.
from ring.
guys. unfortunately for getting motion event we should create a session and use it.
without session no motion alert at all.
PS: dings/active?api_version=9&auth_token=zzbGBjWFcvCZKArwFQfH.
from ring.
@odenisenko as long as we include the hardware_id header from the session motion events work great. We don’t have to include the session auth_token, oauth authorization header is a better approach for authentication. Are you experiencing something different?
from ring.
@dgreif I am excited to try it out when I get home. I feel stupid for asking, but I assume it is just npm update home bridge-ring-alarm correct or so I have to manually replace it?
from ring.
@dgreif works like a charm!!!! Thank you!!
from ring.
@dgreif Thank you for the update. I installed it and I did notice the screenshots, and notifications where much quicker. The screenshots are also usable now. I noticed prior to the update the screenshot would be delayed and not always catch what triggered the motion. After the update the 7 motion events I have triggered on all 3 devices have resulted in a usable screenshot. So from my perspective everything works great!
from ring.
@johnsonjoshuaa I appreciate the feedback and testing. Glad to hear it's working well!
from ring.
Related Issues (20)
- Ring Intercom not ringing HOT 31
- subscribe to locationMode changes HOT 6
- Cannot get schema for 'EcDsaSignature' target HOT 1
- Unable to Live Stream HOT 1
- Push notifications stop after ~24 hours HOT 107
- Motion Detect on All Ring Cameras - Not Getting to HB or HK HOT 3
- Ring Access Controller HOT 1
- Ring-client-api not finding rest-client HOT 4
- No Devices Showing HOT 2
- Doorbell button not working with Ring Intercom HOT 3
- onDoorbellPressed and onMotionDetected not getting triggered HOT 1
- Allow Node JS 20 HOT 3
- Ring Sensors delayed on ring Base Station HOT 6
- No devices found and location looks to be wrong HOT 4
- Install of homebridge-ring v11.8.0 (2023-06-09) fails using Homebridge UI HOT 2
- Audio from/through Homekit app to Ring Doorbell not working HOT 4
- Nevermind, Router problem
- No chime or TVOS notifications HOT 30
- Failing to connect to ring server api HOT 2
- Live Stream never starts HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ring.