question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hanlongwangcommented, Apr 6, 2020

I am recording when a ding is detected using the camera.recordToFile function.

0reactions
dgreifcommented, Jun 4, 2020

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 call recordToFile if it is already in progress.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found