Class Device
- Namespace
- OverKizApi.Models
- Assembly
- OverKizApi.dll
Represents a physical or virtual device registered in a setup. The DeviceUrl uniquely identifies the device across the entire API.
public sealed class Device
- Inheritance
-
Device
- Inherited Members
Properties
Attributes
Device attributes (manufacturer-specific, immutable metadata states).
[JsonPropertyName("attributes")]
public States Attributes { get; init; }
Property Value
- States
Device attributes (manufacturer-specific, immutable metadata states).
Available
Whether the device is currently reachable by the gateway.
[JsonPropertyName("available")]
public bool Available { get; init; }
Property Value
- bool
Whether the device is currently reachable by the gateway.
ControllableName
Controllable type name (e.g. "io:RollerShutterGenericIOComponent").
[JsonPropertyName("controllableName")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? ControllableName { get; init; }
Property Value
- string
Controllable type name (e.g.
"io:RollerShutterGenericIOComponent").
DataProperties
Manufacturer-defined data properties (opaque).
[JsonPropertyName("dataProperties")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(DeviceValuesConverter))]
public IReadOnlyList<object?>? DataProperties { get; init; }
Property Value
- IReadOnlyList<object>
Manufacturer-defined data properties (opaque).
Definition
Full capability definition (commands and states) for this device.
[JsonPropertyName("definition")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Definition? Definition { get; init; }
Property Value
- Definition
Full capability definition (commands and states) for this device.
DeviceAddress
Device address portion parsed from the device URL.
[JsonIgnore]
public string? DeviceAddress { get; }
Property Value
- string
Device address portion parsed from the device URL.
DeviceUrl
Unique device URL in the format protocol://gatewayId/deviceAddress[#subsystemId]
(e.g. io://1234-5678-9012/12345678).
[JsonPropertyName("deviceURL")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? DeviceUrl { get; init; }
Property Value
- string
Unique device URL in the format
protocol://gatewayId/deviceAddress[#subsystemId](e.g.io://1234-5678-9012/12345678).
Enabled
Whether the device is enabled in the user's setup.
[JsonPropertyName("enabled")]
public bool Enabled { get; init; }
Property Value
- bool
Whether the device is enabled in the user's setup.
GatewayId
Gateway serial number parsed from the device URL.
[JsonIgnore]
public string? GatewayId { get; }
Property Value
- string
Gateway serial number parsed from the device URL.
Id
Alias for DeviceUrl; provided for convenience.
[JsonIgnore]
public string? Id { get; }
Property Value
IsSubDevice
true if this device is a sub-device (has a SubsystemId).
[JsonIgnore]
public bool IsSubDevice { get; }
Property Value
- bool
true if this device is a sub-device (has a SubsystemId).
Label
User-visible label for the device.
[JsonPropertyName("label")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Label { get; init; }
Property Value
- string
User-visible label for the device.
PlaceOid
OID of the place (room/floor) the device is assigned to.
[JsonPropertyName("placeOid")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? PlaceOid { get; init; }
Property Value
- string
OID of the place (room/floor) the device is assigned to.
Protocol
Communication protocol parsed from the device URL prefix (e.g. Io).
[JsonIgnore]
public Protocol? Protocol { get; }
Property Value
States
Current live states reported by the device.
[JsonPropertyName("states")]
public States States { get; init; }
Property Value
- States
Current live states reported by the device.
SubsystemId
Sub-system index parsed from the device URL fragment, or null for top-level devices.
[JsonIgnore]
public int? SubsystemId { get; }
Property Value
Type
Whether the device is an actuator, a sensor, or unknown.
[JsonPropertyName("type")]
public ProductType Type { get; init; }
Property Value
- ProductType
Whether the device is an actuator, a sensor, or unknown.
UiClass
UI class parsed from UiClass.
[JsonIgnore]
public UIClass? UiClass { get; }
Property Value
Widget
UI widget parsed from WidgetName.
[JsonIgnore]
public UIWidget? Widget { get; }
Property Value
- UIWidget?
UI widget parsed from WidgetName.
Methods
GetMostFeaturedAliases()
Returns one alias per type, selecting the slot with the most features; source order breaks ties.
public IReadOnlyDictionary<string, SupportedAlias> GetMostFeaturedAliases()
Returns
- IReadOnlyDictionary<string, SupportedAlias>
The selected alias for each advertised type, keyed by the exact type name.
GetSupportedAliases()
Returns all valid advertised alias slots in source order, including repeated types.
public IReadOnlyList<SupportedAlias> GetSupportedAliases()
Returns
- IReadOnlyList<SupportedAlias>
The valid advertised alias slots in source order, or an empty list if none are available.
Remarks
Missing or non-list attributes return an empty list. Malformed entries are skipped. IDs may be nonempty strings or integer values; types and features are strings. Missing features are treated as an empty list. Unknown alias types are preserved.