# 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.

## 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](https://docs.viam.com/operate/reference/services/discovery/) 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:

[Intelligent detection of configuration attributes for your hardware](https://www.youtube.com/watch?v=L3K2kUBrJcs)

(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](https://docs.viam.com/operate/reference/services/discovery/))

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:

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

[Adding the “webcam” Camera component to your config](https://www.youtube.com/watch?v=eOGd4OBab24)

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!):

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:

Your webcam is connected!

## 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](https://docs.viam.com/operate/reference/components/camera/webcam/#find-a-video-path-using-the-command-line) running commands on the terminal.

### How Viam is using discovery to simplify solutions

Several [solutions](/content/solutions/safety-monitoring/index.html) 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](https://github.com/viam-modules/viamrtsp) model of discovery to easily detect and manage larger systems of connected cameras.

What’s next?

Take a moment to [explore](https://docs.viam.com/operate/reference/services/discovery/) 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:

- [People detection alert with computer vision](https://codelabs.viam.com/guide/workshop-people/index.html)
- [Use a QR code scanner](https://codelabs.viam.com/guide/qrcode/index.html)
