Product
April 18, 2025

Intelligent detection of configuration attributes for your hardware

Discover how Viam's intelligent detection eliminates manual configuration, making hardware integration faster and more reliable for your robotics projects.
Esha Maharishi
Product Manager
On this page

Introduction

Viam supports a broad set of popular hardware, from cameras to sensors to motors and beyond.

Most of the time, connecting the hardware to Viam is a breeze–you plug the hardware into your compute device (laptop, Raspberry Pi, etc.), select the model from a menu on app.viam.com, and follow the short set of accompanying instructions to fill out a few JSON attributes.

However, sometimes we all wish things could be even easier - what if Viam could automatically detect the attribute values?

That’s where the new discovery service comes in: it allows you to use a separate “discovery” model that queries the hardware and returns the attribute values appropriate for your particular setup.

Let’s walk through it

Here, we’ll walk through how to use the “webcam-discovery” model of the discovery service to automatically detect the right attributes for the “webcam” Camera model.

First, on your machine’s “Configure” page on app.viam.com, add the “webcam-discovery” model of the discovery service:

(The “discovery” dropdown is where you can find all the hardware for which a “discovery” service is available. This list is also available, along with details about the discovery service API, in our docs)

Next, make sure to save your config on the top right, then expand the “Test” section of the webcam discovery service’s config card and copy the “video_path” attribute:

Screenshot of the expanded “Test” section of the webcam discovery service’s config card on the Viam platform.

Now, add the “webcam” Camera component to your config:

Finally, paste in the “video_path” value that we copied from the “webcam-discovery” service into the “video_path” field on the webcam’s config card (notice the helpful banner that points you to the “webcam-discovery” service in case you tried adding the webcam first, and got stuck trying to figure out the correct video path!):

Screenshot of the helpful banner in VIam's platform that points you to the “webcam-discovery” service in case you tried adding the webcam first.

Remember to save your config on the top right, and once your viam-server picks up the new config (within about 10 seconds), you can expand the “Test” section of the webcam’s config card to see the webcam output:

Screenshot of expand the “Test” section of the webcam’s config card showing the webcam output in the Viam platform.

Your webcam is connected!

Sign Up

The real win

The best part of this process is you didn’t have to hunt down the “video_path” value yourself - a process that would involve running commands on the terminal.

How Viam is using discovery to simplify solutions

Several solutions we are building on Viam involve setting up an intelligent security camera system with RTSP cameras.

For these setups, it’s been especially helpful to use the RTSP (Real-Time Streaming Protocol) cameras model of discovery to easily detect and manage larger systems of connected cameras.

What’s next?

Take a moment to explore our discovery models for other types of hardware, which also have a slightly more complicated configuration.

Also, now that you’ve got a webcam set up, feel free to explore other parts of the Viam platform by following our codelabs, like:

twitter iconfacebook iconlinkedin iconreddit icon

Find us at our next event

A spot illustration showing a calendar with all the dates crossed out.
Error! No upcoming events found. Please check back later!