Search Results for

    Show / Hide Table of Contents

    Class HsDevice

    • C#
    • Visual Basic
    [Obfuscation(Exclude = true, ApplyToMembers = true)]
    [Serializable]
    public class HsDevice : AbstractHsDevice
    <Obfuscation(Exclude:=True, ApplyToMembers:=True)>
    <Serializable>
    Public Class HsDevice
        Inherits AbstractHsDevice
    Inheritance
    System.Object
    AbstractHsDevice
    HsDevice
    Inherited Members
    AbstractHsDevice.Changes
    AbstractHsDevice.Ref
    AbstractHsDevice.Address
    AbstractHsDevice.AssociatedDevices
    AbstractHsDevice.Code
    AbstractHsDevice.DisplayedStatus
    AbstractHsDevice.Image
    AbstractHsDevice.Interface
    AbstractHsDevice.IsValueInvalid
    AbstractHsDevice.LastChange
    AbstractHsDevice.Location
    AbstractHsDevice.Location2
    AbstractHsDevice.Misc
    AbstractHsDevice.Name
    AbstractHsDevice.PlugExtraData
    AbstractHsDevice.Relationship
    AbstractHsDevice.Status
    AbstractHsDevice.StatusString
    AbstractHsDevice.TypeInfo
    AbstractHsDevice.UserAccess
    AbstractHsDevice.UserNote
    AbstractHsDevice.Value
    AbstractHsDevice.VoiceCommand
    AbstractHsDevice.Version
    AbstractHsDevice._address
    AbstractHsDevice._assDevices
    AbstractHsDevice._cacheChanges
    AbstractHsDevice._displayedStatus
    AbstractHsDevice._image
    AbstractHsDevice._interface
    AbstractHsDevice._invalidValue
    AbstractHsDevice._lastChange
    AbstractHsDevice._location
    AbstractHsDevice._location2
    AbstractHsDevice._misc
    AbstractHsDevice._name
    AbstractHsDevice._plugExtraData
    AbstractHsDevice._relationship
    AbstractHsDevice._status
    AbstractHsDevice._statusString
    AbstractHsDevice._typeInfo
    AbstractHsDevice._userAccess
    AbstractHsDevice._userNote
    AbstractHsDevice._value
    AbstractHsDevice._voiceCommand
    AbstractHsDevice._version
    AbstractHsDevice.RevertChanges()
    AbstractHsDevice.IsValueValid()
    AbstractHsDevice.AddMiscFlag(EMiscFlag)
    AbstractHsDevice.ContainsMiscFlag(EMiscFlag)
    AbstractHsDevice.RemoveMiscFlag(EMiscFlag)
    AbstractHsDevice.ClearMiscFlags()
    AbstractHsDevice.GetMiscForFlags(EMiscFlag[])
    AbstractHsDevice.GetAddressFromAddressString(String)
    AbstractHsDevice.GetCodeFromAddressString(String)
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: HomeSeer.PluginSdk.Devices
    Assembly: PluginSdk.dll


    A device connected to a HomeSeer system. This is the top level item displayed to users when they are looking at the devices connected to their system.


    Constructors

    View Source

    HsDevice()

    Declaration
    • C#
    • Visual Basic
    HsDevice()
    Sub New
    View Source

    HsDevice(Int32)

    Create a HomeSeer device with the specified unique ID

    Declaration
    • C#
    • Visual Basic
    public HsDevice(int deviceRef)
    Public Sub New(deviceRef As Integer)
    Parameters
    Type Name Description
    System.Int32 deviceRef

    The unique ID associated with this device

    Fields

    View Source

    _featureDisplayPriority

    Declaration
    • C#
    • Visual Basic
    List<int> _featureDisplayPriority
    _featureDisplayPriority As List(Of Integer)
    Field Value
    Type Description
    System.Collections.Generic.List<System.Int32>

    Properties

    View Source

    FeatureDisplayPriority

    A list of Refs indicating the order of importance for the features of a device where 1 is the most important. This helps HomeSeer determine how to display features in the UI.

    You must call GetDeviceWithFeaturesByRef(Int32) to fill this property, otherwise this will be an empty list.

    Declaration
    • C#
    • Visual Basic
    public List<int> FeatureDisplayPriority { get; set; }
    Public Property FeatureDisplayPriority As List(Of Integer)
    Property Value
    Type Description
    System.Collections.Generic.List<System.Int32>
    Remarks

    This should typically be left to the user to configure, but it is recommended that you pre-configure it for users with the best setup possible by adding the HsFeatures in the desired order when using DeviceFactory to create a HsDevice.

    See EFeatureDisplayType for additional info on controlling the way features are displayed.

    View Source

    Features

    A list of HsFeatures that make up the device.

    Declaration
    • C#
    • Visual Basic
    public List<HsFeature> Features { get; }
    Public ReadOnly Property Features As List(Of HsFeature)
    Property Value
    Type Description
    System.Collections.Generic.List<HsFeature>

    Methods

    View Source

    Duplicate(Int32)

    Make a copy of the device with a different unique ID.

    This will not duplicate features associated with the device.

    Declaration
    • C#
    • Visual Basic
    public HsDevice Duplicate(int deviceRef)
    Public Function Duplicate(deviceRef As Integer) As HsDevice
    Parameters
    Type Name Description
    System.Int32 deviceRef

    The new unique ID for the copy

    Returns
    Type Description
    HsDevice

    A copy of the device with a new reference ID

    View Source

    GetFeatureByType(TypeInfo)

    Get the first feature of the specified type associated with this device.

    Declaration
    • C#
    • Visual Basic
    public HsFeature GetFeatureByType(TypeInfo featureType)
    Public Function GetFeatureByType(featureType As TypeInfo) As HsFeature
    Parameters
    Type Name Description
    TypeInfo featureType

    The TypeInfo describing the desired feature

    Returns
    Type Description
    HsFeature

    The feature associated with the device that matches that specified featureType

    Exceptions
    Type Condition
    System.Collections.Generic.KeyNotFoundException

    Thrown if there are no features or if a feature with the specified featureType was not found.

    View Source

    GetFeaturesInDisplayOrder()

    Get a collection of HsFeatures in the same order defined by FeatureDisplayPriority

    Declaration
    • C#
    • Visual Basic
    public List<HsFeature> GetFeaturesInDisplayOrder()
    Public Function GetFeaturesInDisplayOrder As List(Of HsFeature)
    Returns
    Type Description
    System.Collections.Generic.List<HsFeature>

    A List of HsFeatures ordered by DisplayPriority

    • View Source
    In This Article
    Back to top HomeSeer Technologies