Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature to download snapshots (not continuous fetch, but like an official app timeline) #1172

Open
dgreif opened this issue Feb 25, 2023 Discussed in #1151 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@dgreif
Copy link
Owner

dgreif commented Feb 25, 2023

Discussed in #1151

Originally posted by hsakoh February 6, 2023
I am using a video doorbell 4 in Japan.
I take a snapshot every 5 minutes.
I would like to download past snapshots and convert them to time lapse.

I know that the following exist as RestAPI.
GET https://api.ring.com/evm/v2/timeline/devices/{doorbotId}?start_time={from}&end_time={to}&order=desc
{from},{to} = ISO-8601 extended format (UTCZ) e.g. 2023-02-06T00%3A00%3A00Z.

From the supplemental_data/footages[]/url of the response, get an mp4 file with a few frames of multiple snapshots.

I would like ring-client-api to support this API.

response example

{
  "items": [
    {
      "schema": "Event",
      "source_id": "222222222",
      "event_id": "2222222222222222",
      "start_time": "2023-01-01T21:26:27Z",
      "end_time": "2023-01-01T21:26:47Z",
      "event_type": "motion",
      "source_type": null,
      "duration_ms": 25400,
      "session_duration": 20000,
      "state": "timed_out",
      "had_subscription": true,
      "is_favorite": false,
      "recording_status": "ready",
      "cv": {
        "person_detected": null,
        "stream_broken": false,
        "detection_type": "motion",
        "cv_triggers": null,
        "detection_types": [
          {
            "detection_type": "motion",
            "verified_timestamps": [
              33333333333333
            ]
          }
        ]
      },
      "properties": {
        "is_alexa": false,
        "is_sidewalk": false,
        "is_autoreply": false
      },
      "origin": null,
      "error_message": null,
      "updated_at": "2023-01-01T21:27:06.760Z",
      "visualizations": {
        "cloud_media_visualization": {
          "schema": "CloudMediaVisualization",
          "media": [
            {
              "schema": "Media",
              "url": "https://filestore-xxxxxxx-us-west-2-prod-data.s3.us-west-2.amazonaws.com/....",
              "start_time": "2023-01-01T21:26:27.000Z",
              "end_time": "2023-01-01T21:26:48.000Z",
              "custom_metadata": {
                "time_based_recording_enabled": false,
                "audio_encoding": "AAC",
                "video_encoding": "H264"
              },
              "is_e2ee": false,
              "manifest_id": null,
              "file_type": "VIDEO",
              "file_family": "VIDEO",
              "preroll_duration_ms": 3571,
              "playback_duration": 25140,
              "source": "Apsara"
            },
            .....
          ]
        },
        "local_media_visualization": {
          "schema": "LocalMediaVisualization",
          "media": []
        },
        "radar_visualization": null,
        "single_coordinate_visualization": null,
        "map_visualization": null
      },
      "device": {
        "id": 222222222,
        "description": "xxxxxxxxxxx",
        "type": "doorbell_oyster"
      },
      "owner_id": "11111111"
    }
    .....
  ],
  "supplemental_data": {
    "footages": [
      {
        "schema": "Footage",
        "source_id": "222222222",
        "start_time": "2023-01-01T23:35:10.530Z",
        "end_time": "2023-01-02T00:04:13.649Z",
        "duration_ms": 3000,
        "url": "https://filestore-xxxxxxx-us-east-1-prod-data.s3.amazonaws.com/....",
        "storage_type": "Cloud",
        "snapshots": [
          1675726510530,
          1675726818875,
          1675727127018,
          1675727435233,
          1675727743006,
          1675728051338
        ],
        "deleted": false
      },
      .....
    ]
  },
  "pagination_key": "ey..."
}
```</div>
@dgreif dgreif added the enhancement New feature or request label Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant