onNewDing.subscribe sends the same ding over and over
See original GitHub issue camera.onNewDing.subscribe(ding => {
const event =
ding.kind === 'motion'
? 'Motion detected'
: ding.kind === 'ding'
? 'Doorbell pressed'
: `Video started (${ding.kind})`
console.log(
`${event} on ${camera.name} camera. Ding id ${
ding.id_str
}. Received at ${new Date()}`
)
Generates this on a doorbell press:
Doorbell pressed on Front Door camera. Ding id 6812430812854837500. Received at Sun Apr 05 2020 20:16:41 GMT-0700 (Pacific Daylight Time) Doorbell pressed on Front Door camera. Ding id 6812430812854837500. Received at Sun Apr 05 2020 20:16:41 GMT-0700 (Pacific Daylight Time) Doorbell pressed on Front Door camera. Ding id 6812430812854837500. Received at Sun Apr 05 2020 20:16:42 GMT-0700 (Pacific Daylight Time) Doorbell pressed on Front Door camera. Ding id 6812430812854837500. Received at Sun Apr 05 2020 20:16:42 GMT-0700 (Pacific Daylight Time) Doorbell pressed on Front Door camera. Ding id 6812430812854837500. Received at Sun Apr 05 2020 20:16:43 GMT-0700 (Pacific Daylight Time) Doorbell pressed on Front Door camera. Ding id 6812430812854837500. Received at Sun Apr 05 2020 20:16:43 GMT-0700 (Pacific Daylight Time)
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
I am recording when a ding is detected using the camera.recordToFile function.
This is something you will need to filter out on your end. By calling
recordToFile
, you may cause a new ding to be created simply by the way that Ring has it set up. You should keep track of whether or not you are currently recording, and not callrecordToFile
if it is already in progress.