Deploy software packages to machines (OTA)

The following steps show you how to deploy and manage your machine’s software over the air (OTA).

For microcontrollers, see Over-the-air firmware updates for more information.

Prerequisites

Start by setting up one machine. Then, configure any hardware and software resources that you want to use with your machine and drive with your control logic.

Configure your software

  1. Go to your machine in the Viam app.

  2. Add drivers for your hardware resources and any other resources you want to use with your control logic. For more information, see Supported hardware.

  3. If you created a control logic module, add it to your machine.

    Configuration builder UI

Set the version and update strategy

For each module:

  1. Scroll to the module card for your control logic module.

  2. Select a Pinned version type.

    You can select a specific version or set the machine to always update to the latest major, minor, patch, or pre-release version once new versions are available. For more information on these configuration options, see Module versioning.

    By default, if the set version type allows for automatic updates, when a new version of a module or package becomes available, it will automatically update when the configuration is synced next. To ensure that updates only occur when your machines are ready, configure a maintenance window. With a configured maintenance window, configuration updates will only be applied when maintenance is allowed.

    Module card UI

Create a fragment

Viam has a built-in tool called fragments for using the same configuration on multiple machines. When deploying or updating software on many machines, you should use fragments to deploy your modules OTA to your machines. For more detailed information, see Reuse configuration.

  1. Navigate to your machine’s CONFIGURE tab.

  2. Switch to JSON.

  3. Copy the entire raw JSON.

  4. Go to app.viam.com/fragments.

  5. Add a fragment.

  6. Paste the copied JSON configuration into it.

  7. Set your privacy settings.

    There are three options for this:

    • Public: Any user inside or outside of your organization will be able to view and use this fragment.
    • Private: No user outside of your organization will be able to view or use this fragment.
    • Unlisted: Any user inside or outside of your organization, with a direct link, will be able to view and use this fragment.
  8. Click Save.

Add the fragment automatically to your machines with provisioning

Provisioning allows you to automatically add fragments to your machines. See Provisioning for more information.

Add the fragment to your machines manually

You can also add fragments manually to the machines that need it:

  1. Navigate to your machine’s CONFIGURE tab.

  2. Click the + button.

  3. Select Insert fragment.

    Add fragment
  4. Search for your fragment and add it.

  5. Click Save in the upper right corner of the screen.

You cannot add the same fragment to a machine twice.