Replies: 1 comment 1 reply
-
This is pretty well covered in the readme. As a consumer of this API, there is no polling required, you simply subscribe to events for the device/location and have it execute whatever you want when data is updated. However, on the backend, the Ring API is really three different APIs and how real-time they are varies a bit. Hub devices (i.e. devices such as Alarm and Smart Lighting) use a websocket connection and state updates are near real-time, within the limits of the round-trip network delay to Ring servers, so somewhat dependency on your Internet latency. Measured latency is generally <100ms for these. Cameras/doorbells are a bit more complicated. They use push notifications for things like motion events and doorbell dings, these are relatively quick, 1-3 seconds usually (same as the delay you see on a notification to your phone). Everything else for cameras is polled, which is what the cameraStatusPollingSeconds option is for, to tell it how often to poll for things like, a floodlight switching on/off. Overall, there's little reason to poll for this frequently as the backend Ring API doesn't update quickly anyway, so polling every 2 seconds is just a way to get yourself blocked/throttled. The good thing is, this is mostly just for settings, so timing is usually not critical anyway. Summary: Alarm/Smart Lighting devices: <1s Again, as a consumer of this library, you don't have to worry about any of this, you just subscribe to device events and act on whatever state changes you want. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to get notified when a device status changes? E.g. call my webhook? Or must call the api every 2 seconds? Need realtime-ish notifications.
Beta Was this translation helpful? Give feedback.
All reactions