Managed and Unmanaged Devices

You can indicate the devices in your workspace that you intend to control using the Seam API.

To increase billing flexibility, Seam provides the ability to mark devices as managed or unmanaged.

  • Managed devices: These devices can be controlled fully through the Seam API and are billed to your Seam account as a regular device.

  • Unmanaged devices: These devices are not billed and, consequently, cannot be controlled through the Seam API.

Seam makes it possible to switch a device back and forth between the managed and unmanaged states.

Convert a Managed Device to Unmanaged

When you convert a device to an unmanaged state (that is, "unamange a device"), Seam pauses billing for the device and converts all the managed device resources (for example, access codes) to unmanaged resources. As a result, Seam no longer monitors the lifecycle of these unmanaged resources.


const deviceId = "77208078-6dd7-44e5-a3e4-a2ed3a34efc9"

// Take a managed device.
const device = await seam.devices.get({
  device_id: deviceId
})

// Set the managed status to false.
const updatedDevice = await seam.devices.update({
  device_id: deviceId,
  is_managed: false
})

// Retrieve the unmanaged device.
const unmanagedDevice = await seam.devices.unmanaged.get({
  device_id: deviceId
})

console.log(unmanagedDevice)

/*
{
  is_managed: false,
  device_id: '77208078-6dd7-44e5-a3e4-a2ed3a34efc9',
  device_type: 'yale_lock',
  connected_account_id: '4e5acceb-2bda-4dc1-814e-39c998431683',
  capabilities_supported: [ 'access_code', 'lock' ],
  workspace_id: '1d2826eb-4a26-4f46-bddb-ef5898baa859',
  created_at: '2023-08-29T04:30:14.914Z',
  errors: [],
  warnings: [],
  properties: {
    name: 'FRONT DOOR',
    online: true,
    manufacturer: 'august',
    image_url: 'https://connect.getseam.com/assets/images/devices/yale_assure-lock-touchscreen-wifi-smart-lock_satin-nickel_front.png',
    image_alt_text: 'Yale Assure Touchscreen Wifi Smart Lock, Satin Nickel, Front',
    model: { display_name: 'Lock', manufacturer_display_name: 'August' }
  }
}
*/

Convert an Unmanaged Device to Managed

To convert an unmanaged device back to managed (that is, to "manage a device"), retrieve the device using the unmanaged device API and use the update function to change the managed state of the device back to true. Note that you must also convert unmanaged device resources (for example, access codes) back to managed.

const deviceId = "77208078-6dd7-44e5-a3e4-a2ed3a34efc9"

// Retrieve the unmanaged device if needed.
const unmanagedDevice = await seam.devices.unmanaged.get({
  device_id: deviceId
})

// Update the device.
await seam.devices.unmanaged.update({
  device_id: deviceId, 
  is_managed: true
})

// Retrieve the device again.
const device = await seam.devices.get({
    device_id: deviceId
})

console.log(device)
/*
{
  device_id: '77208078-6dd7-44e5-a3e4-a2ed3a34efc9',
  device_type: 'yale_lock',
  capabilities_supported: [ 'access_code', 'lock' ],
  properties: {
    locked: true,
    online: true,
    door_open: false,
    manufacturer: 'august',
    battery_level: 0.9999532347993827,
    serial_number: '00000004-992d-45a0-bea1-9128fdcd8d12',
    august_metadata: {
      lock_id: 'lock-1',
      house_id: 'house-1',
      lock_name: 'FRONT DOOR',
      has_keypad: true,
      house_name: 'My House',
      keypad_battery_level: 'Not Available'
    },
    supported_code_lengths: [ 4, 5, 6, 7, 8 ],
    has_native_entry_events: true,
    name: 'FRONT DOOR',
    model: { display_name: 'Lock', manufacturer_display_name: 'August' },
    battery: { level: 0.9999532347993827, status: 'full' },
    image_url: 'https://connect.getseam.com/assets/images/devices/yale_assure-lock-touchscreen-wifi-smart-lock_satin-nickel_front.png',
    image_alt_text: 'Yale Assure Touchscreen Wifi Smart Lock, Satin Nickel, Front',
    code_constraints: [],
    supports_backup_access_code_pool: true
  },
  location: { timezone: 'America/Los_Angeles', location_name: 'My House' },
  connected_account_id: '4e5acceb-2bda-4dc1-814e-39c998431683',
  workspace_id: '1d2826eb-4a26-4f46-bddb-ef5898baa859',
  created_at: '2023-08-29T04:30:14.914Z',
  errors: [],
  warnings: [],
  is_managed: true
}
*/

Automatically Set New Devices to Unmanaged

You can configure a Connect Webview so that it automatically sets all new devices added to the workspace through this Connect Webview to unmanaged by default. To do so, when creating a Connect Webview, set automatically_manage_new_devices to false. Once the Connect Webview is authorized, Seam sets any device added to the workspace to unmanaged.

const connectWebview = await seam.connectWebviews.create({
    // accepted_providers: ["schlage", "august"...etc], <== Use this property for precise control of accepted providers.
    provider_category: "stable",
    automatically_manage_new_devices: false
})

console.log(connectWebview)

/*
{
  url: 'https://connect.getseam.com/connect_webviews/view?connect_webview_id=323b4ffa-ce24-4cff-a965-ff532563ec7a&auth_token=JrunXm29x7GCWFrVJsZHLFsD5YAioyaAu',
  status: 'pending',
  workspace_id: '1d2826eb-4a26-4f46-bddb-ef5898baa859',
  custom_metadata: {},
  accepted_devices: [],
  login_successful: false,
  accepted_providers: [
    'august',      'avigilon_alta',
    'schlage',     'smartthings',
    'yale',        'nuki',
    'salto',       'controlbyweb',
    'minut',       'my_2n',
    'kwikset',     'ttlock',
    'noiseaware',  'igloohome',
    'ecobee',      'four_suites',
    'wyze'
  ],
  any_device_allowed: false,
  connect_webview_id: '323b4ffa-ce24-4cff-a965-ff532563ec7a',
  custom_redirect_url: null,
  any_provider_allowed: false,
  device_selection_mode: 'none',
  wait_for_device_creation: false,
  custom_redirect_failure_url: null,
  automatically_manage_new_devices: false,
  created_at: '2023-08-29T04:59:13.890Z'
}
*/

Last updated

Logo

© Seam Labs, Inc. All rights reserved.