Capture and sync edge data

You can use the data management service to capture data from supported components and services, then sync it to the cloud. You can also sync data from arbitrary folders on your machine.

How data capture and data sync works

The data management service writes data from your configured Viam resources to local storage on your edge device and syncs data from the edge device to the cloud:

  • The data management service writes captured data to local edge device storage (~/.viam/capture by default).
  • The data management service syncs data to the Viam cloud at a configured sync interval using encrypted gRPC calls and deletes it from the disk once synced.
  • You can capture and sync data independently; one can run without the other.

For more information, see How sync works.

Configure data capture and sync for individual resources

  1. Navigate to a configured resource in Builder mode in the Viam app.

  2. Find the Data capture section in the resource panel.

  3. Click + Add method.

    Disable data capture toggle
  4. If you see a warning Capture disabled on data management service, click Enable capture on data management service.

  5. Select a Method to capture data from.

  6. Set the capture frequency in hertz, for example to 0.2 with ReadImage on a camera to capture an image every 5 seconds.

  7. Save your config.

You can add multiple methods with different capture frequencies.

Click to see resources that support data capture and cloud sync

The following components and services support data capture and cloud sync:

TypeMethod
ArmEndPosition, JointPositions
BoardAnalogs, Gpios
CameraGetImages, ReadImage, NextPointCloud
EncoderTicksCount
GantryLengths, Position
MotorPosition, IsPowered
Movement sensorAngularVelocity, CompassHeading, LinearAcceleration, LinearVelocity, Orientation, Position
SensorReadings
ServoPosition
Vision serviceCaptureAllFromCamera
SLAM servicePosition, PointCloudMap

For instructions on configuring data capture and sync with JSON, go to Advanced data capture and sync configurations and follow the instructions for JSON examples.

View captured data

  1. Navigate to the DATA tab.
  2. Filter data by location, type of data, and more.

Stop data capture or data sync

Stop data capture for a specific resource

  1. Navigate to the Data capture section of your resource’s configuration card.

  2. Toggle the configured capture method’s switch to Off.

    Disable data capture toggle
  3. Save your config.

Stop data capture for all resources

  1. Navigate to the Data capture section of the data management service configuration card.

  2. Toggle the Capturing switch to Off.

    Disable data capture toggle
  3. Save your config.

Disable data sync

  1. Navigate to the Cloud sync section of the data management service configuration card.

  2. Toggle the Syncing switch to Off.

    Disable data sync toggle
  3. Save your config.

Next steps

For more information on available configuration attributes and options like capturing directly to MongoDB or conditional sync, see Advanced data capture and sync configurations. To leverage AI, you can now create a dataset with the data you’ve captured.