Class: Seam::Resources::Device

Inherits:
BaseResource show all
Defined in:
lib/seam/resources/device.rb

Overview

Represents a device that has been connected to Seam.

Defined Under Namespace

Classes: DeviceManufacturer, DeviceProvider, Errors, Location, Properties, Warnings

Instance Attribute Summary collapse

Attributes inherited from BaseResource

#client, #data

Instance Method Summary collapse

Methods inherited from BaseResource

#[], aliased_accessor, attribute_aliases, date_accessor, discriminated_by, #initialize, #inspect, load_from_response, resource_accessor, resource_accessors, resource_list_accessor, resource_list_accessors, #update_from_response

Constructor Details

This class inherits a constructor from Seam::Resources::BaseResource

Instance Attribute Details

#can_configure_auto_lockBoolean?

Indicates whether the lock supports configuring automatic locking.

Returns:

  • (Boolean, nil)


2586
2587
2588
# File 'lib/seam/resources/device.rb', line 2586

def can_configure_auto_lock
  @can_configure_auto_lock
end

#can_hvac_coolBoolean?

Indicates whether the thermostat supports cooling.

Returns:

  • (Boolean, nil)


2589
2590
2591
# File 'lib/seam/resources/device.rb', line 2589

def can_hvac_cool
  @can_hvac_cool
end

#can_hvac_heatBoolean?

Indicates whether the thermostat supports heating.

Returns:

  • (Boolean, nil)


2592
2593
2594
# File 'lib/seam/resources/device.rb', line 2592

def can_hvac_heat
  @can_hvac_heat
end

#can_hvac_heat_coolBoolean?

Indicates whether the thermostat supports simultaneous heating and cooling.

Returns:

  • (Boolean, nil)


2595
2596
2597
# File 'lib/seam/resources/device.rb', line 2595

def can_hvac_heat_cool
  @can_hvac_heat_cool
end

#can_program_offline_access_codesBoolean?

Indicates whether the device supports programming offline access codes.

Returns:

  • (Boolean, nil)


2598
2599
2600
# File 'lib/seam/resources/device.rb', line 2598

def can_program_offline_access_codes
  @can_program_offline_access_codes
end

#can_program_online_access_codesBoolean?

Indicates whether the device supports programming online access codes.

Returns:

  • (Boolean, nil)


2601
2602
2603
# File 'lib/seam/resources/device.rb', line 2601

def can_program_online_access_codes
  @can_program_online_access_codes
end

#can_program_thermostat_programs_as_different_each_dayBoolean?

Indicates whether the thermostat supports different climate programs for each day of the week.

Returns:

  • (Boolean, nil)


2604
2605
2606
# File 'lib/seam/resources/device.rb', line 2604

def can_program_thermostat_programs_as_different_each_day
  @can_program_thermostat_programs_as_different_each_day
end

#can_program_thermostat_programs_as_same_each_dayBoolean?

Indicates whether the thermostat supports a single climate program applied to every day.

Returns:

  • (Boolean, nil)


2607
2608
2609
# File 'lib/seam/resources/device.rb', line 2607

def can_program_thermostat_programs_as_same_each_day
  @can_program_thermostat_programs_as_same_each_day
end

#can_program_thermostat_programs_as_weekday_weekendBoolean?

Indicates whether the thermostat supports weekday/weekend climate programs.

Returns:

  • (Boolean, nil)


2610
2611
2612
# File 'lib/seam/resources/device.rb', line 2610

def can_program_thermostat_programs_as_weekday_weekend
  @can_program_thermostat_programs_as_weekday_weekend
end

#can_remotely_lockBoolean?

Indicates whether the device supports remote locking.

Returns:

  • (Boolean, nil)


2613
2614
2615
# File 'lib/seam/resources/device.rb', line 2613

def can_remotely_lock
  @can_remotely_lock
end

#can_remotely_unlockBoolean?

Indicates whether the device supports remote unlocking.

Returns:

  • (Boolean, nil)


2616
2617
2618
# File 'lib/seam/resources/device.rb', line 2616

def can_remotely_unlock
  @can_remotely_unlock
end

#can_run_thermostat_programsBoolean?

Indicates whether the thermostat supports running climate programs.

Returns:

  • (Boolean, nil)


2619
2620
2621
# File 'lib/seam/resources/device.rb', line 2619

def can_run_thermostat_programs
  @can_run_thermostat_programs
end

#can_simulate_connectionBoolean?

Indicates whether the device supports simulating connection in a sandbox.

Returns:

  • (Boolean, nil)


2622
2623
2624
# File 'lib/seam/resources/device.rb', line 2622

def can_simulate_connection
  @can_simulate_connection
end

#can_simulate_disconnectionBoolean?

Indicates whether the device supports simulating disconnection in a sandbox.

Returns:

  • (Boolean, nil)


2625
2626
2627
# File 'lib/seam/resources/device.rb', line 2625

def can_simulate_disconnection
  @can_simulate_disconnection
end

#can_simulate_hub_connectionBoolean?

Indicates whether the hub supports simulating connection in a sandbox.

Returns:

  • (Boolean, nil)


2628
2629
2630
# File 'lib/seam/resources/device.rb', line 2628

def can_simulate_hub_connection
  @can_simulate_hub_connection
end

#can_simulate_hub_disconnectionBoolean?

Indicates whether the hub supports simulating disconnection in a sandbox.

Returns:

  • (Boolean, nil)


2631
2632
2633
# File 'lib/seam/resources/device.rb', line 2631

def can_simulate_hub_disconnection
  @can_simulate_hub_disconnection
end

#can_simulate_paid_subscriptionBoolean?

Indicates whether the device supports simulating a paid subscription in a sandbox.

Returns:

  • (Boolean, nil)


2634
2635
2636
# File 'lib/seam/resources/device.rb', line 2634

def can_simulate_paid_subscription
  @can_simulate_paid_subscription
end

#can_simulate_removalBoolean?

Indicates whether the device supports simulating removal in a sandbox.

Returns:

  • (Boolean, nil)


2637
2638
2639
# File 'lib/seam/resources/device.rb', line 2637

def can_simulate_removal
  @can_simulate_removal
end

#can_turn_off_hvacBoolean?

Indicates whether the thermostat can be turned off.

Returns:

  • (Boolean, nil)


2640
2641
2642
# File 'lib/seam/resources/device.rb', line 2640

def can_turn_off_hvac
  @can_turn_off_hvac
end

#can_unlock_with_codeBoolean?

Indicates whether the lock supports unlocking with an access code.

Returns:

  • (Boolean, nil)


2643
2644
2645
# File 'lib/seam/resources/device.rb', line 2643

def can_unlock_with_code
  @can_unlock_with_code
end

#capabilities_supportedArray<String>

Collection of capabilities that the device supports when connected to Seam. Values are access_code, which indicates that the device can manage and utilize digital PIN codes for secure access; lock, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; noise_detection, which indicates that the device supports monitoring and responding to ambient noise levels; thermostat, which indicates that the device can regulate and adjust indoor temperatures; battery, which indicates that the device can manage battery life and health; and phone, which indicates that the device is a mobile device, such as a smartphone. Important: Superseded by capability flags. Known values:

  • access_code
  • lock
  • noise_detection
  • thermostat
  • battery
  • phone

Returns:

  • (Array<String>)


2653
2654
2655
# File 'lib/seam/resources/device.rb', line 2653

def capabilities_supported
  @capabilities_supported
end

#connected_account_idString

Unique identifier for the account associated with the device.

Returns:

  • (String)


2656
2657
2658
# File 'lib/seam/resources/device.rb', line 2656

def 
  @connected_account_id
end

#custom_metadataHash{String => String, Boolean}

Set of key:value pairs. Adding custom metadata to a resource, such as a Connect Webview, connected account, or device, enables you to store custom information, like customer details or internal IDs from your application.

Returns:

  • (Hash{String => String, Boolean})


2659
2660
2661
# File 'lib/seam/resources/device.rb', line 2659

def 
  @custom_metadata
end

#device_idString

ID of the device.

Returns:

  • (String)


2662
2663
2664
# File 'lib/seam/resources/device.rb', line 2662

def device_id
  @device_id
end

#device_typeString

Type of the device. Known values:

  • akuvox_lock
  • august_lock
  • brivo_access_point
  • butterflymx_panel
  • avigilon_alta_entry
  • doorking_lock
  • genie_door
  • igloo_lock
  • linear_lock
  • lockly_lock
  • kwikset_lock
  • nuki_lock
  • salto_lock
  • schlage_lock
  • smartthings_lock
  • wyze_lock
  • yale_lock
  • two_n_intercom
  • controlbyweb_device
  • ttlock_lock
  • igloohome_lock
  • four_suites_door
  • dormakaba_oracode_door
  • tedee_lock
  • akiles_lock
  • ultraloq_lock
  • yacan_lock
  • keyincode_lock
  • omnitec_lock
  • kisi_lock
  • aqara_lock
  • keynest_key
  • noiseaware_activity_zone
  • minut_sensor
  • ecobee_thermostat
  • nest_thermostat
  • honeywell_resideo_thermostat
  • tado_thermostat
  • sensi_thermostat
  • smartthings_thermostat
  • ios_phone
  • android_phone
  • ring_camera

Returns:

  • (String)


2709
2710
2711
# File 'lib/seam/resources/device.rb', line 2709

def device_type
  @device_type
end

#display_nameString

Display name of the device, defaults to nickname (if it is set) or properties.appearance.name, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices.

Returns:

  • (String)


2712
2713
2714
# File 'lib/seam/resources/device.rb', line 2712

def display_name
  @display_name
end

#is_managedTrueClass

Indicates whether Seam manages the device. See also Managed and Unmanaged Devices.

Returns:

  • (TrueClass)


2715
2716
2717
# File 'lib/seam/resources/device.rb', line 2715

def is_managed
  @is_managed
end

#nicknameString?

Optional nickname to describe the device, settable through Seam.

Returns:

  • (String, nil)


2718
2719
2720
# File 'lib/seam/resources/device.rb', line 2718

def nickname
  @nickname
end

#space_idsArray<String>

IDs of the spaces the device is in.

Returns:

  • (Array<String>)


2721
2722
2723
# File 'lib/seam/resources/device.rb', line 2721

def space_ids
  @space_ids
end

#workspace_idString

Unique identifier for the Seam workspace associated with the device.

Returns:

  • (String)


2724
2725
2726
# File 'lib/seam/resources/device.rb', line 2724

def workspace_id
  @workspace_id
end

Instance Method Details

#created_atTime

Date and time at which the device object was created.

Returns:

  • (Time)


2728
# File 'lib/seam/resources/device.rb', line 2728

date_accessor :created_at

#device_manufacturerDeviceManufacturer?

Manufacturer of the device. Represents the hardware brand, which may differ from the provider.

Returns:



2568
# File 'lib/seam/resources/device.rb', line 2568

resource_accessor :device_manufacturer, DeviceManufacturer

#device_providerDeviceProvider?

Provider of the device. Represents the third-party service through which the device is controlled.

Returns:



2571
# File 'lib/seam/resources/device.rb', line 2571

resource_accessor :device_provider, DeviceProvider

#errorsArray<Errors>

Array of errors associated with the device. Each error object within the array contains two fields: error_code and message. error_code is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. message provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it.

Returns:



2580
# File 'lib/seam/resources/device.rb', line 2580

resource_list_accessor :errors, Errors

#locationLocation?

Location information for the device.

Returns:



2574
# File 'lib/seam/resources/device.rb', line 2574

resource_accessor :location, Location

#propertiesProperties

Properties of the device.

Returns:



2577
# File 'lib/seam/resources/device.rb', line 2577

resource_accessor :properties, Properties

#warningsArray<Warnings>

Array of warnings associated with the device. Each warning object within the array contains two fields: warning_code and message. warning_code is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. message provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it.

Returns:



2583
# File 'lib/seam/resources/device.rb', line 2583

resource_list_accessor :warnings, Warnings