DoorPositionV1
Information regarding the door position and notification of events recorded by the sensor.
Trait Type: Standard
Reported States
Note: See Overview: Device Reported State for more information on reported state flows.
State Definitions
doorPosition state
Indicates the current value reported by door position sensor.
Data Type: enum
Valid Values
Enumerated Value | Description |
OPEN | doorPosition is open. |
CLOSED | doorPosition is closed. |
UNSUPPORTED | Device has not yet reported a value for this field. |
Device State Query GQL Examples
Request Example
query Device {
device(deviceId: "9a8f6104-6c50-476e-90ee-16b9a2dafc8d") {
id
traits {
... on DoorPositionV1DeviceTrait {
name
state {
doorPosition {
reported {
value
}
}
}
}
}
}
}
Response Example
{
"data": {
"device": {
"id": "9a8f6104-6c50-476e-90ee-16b9a2dafc8d",
"traits": [
{
"name": "DoorPositionV1",
"state": {
"doorPosition": {
"reported": {
"value": "OPEN"
}
}
}
}
]
}
}
}Notification Events
Note: See Overview: Device Notifications for more information on notfication event flows.
infoDoorOpened
Informs if there was an event from the device indicating that the door was opened.
Details Fields
Not applicable for this event.
Event Example
{
"eventType": "DEVICE_NOTIFICATION_REPORTED",
"notifications": [
{
"category": "notification",
"notificationName": "infoDoorOpened",
"notificationType": "INFO",
"type": "notification reported",
"createdAt": "2024-12-20T14:49:55.000Z",
"sampledAt": "2024-12-20T14:49:39.663Z",
"installationId": "819cd607-aede-482e-9aa0-8b65d420e300",
"deviceId": "9a8f6104-6c50-476e-90ee-16b9a2dafc8d",
"traitName": "DoorPositionV1",
"message": "Door is opened",
"id": "92197db2-63a4-4832-9a20-59dd188b6504",
"details": {}
}
]
}infoDoorClosed
Informs if there was an event from the device indicating that the door was closed.
Details Fields
Not applicable for this event.
Event Example
{
"eventType": "DEVICE_NOTIFICATION_REPORTED",
"notifications": [
{
"category": "notification",
"notificationName": "infoDoorClosed",
"notificationType": "INFO",
"type": "notification reported",
"createdAt": "2024-12-20T14:49:55.000Z",
"sampledAt": "2024-12-20T14:49:39.663Z",
"installationId": "819cd607-aede-482e-9aa0-8b65d420e300",
"deviceId": "9a8f6104-6c50-476e-90ee-16b9a2dafc8d",
"traitName": "DoorPositionV1",
"message": "Door is closed",
"id": "92197db2-63a4-4832-9a20-59dd188b6504",
"details": {}
}
]
}infoDoorPropped
Informs if there was an event from the device if the door position sensor senses that the door was propped.
Details Fields
Not applicable for this event.
Event Example
{
"eventType": "DEVICE_NOTIFICATION_REPORTED",
"notifications": [
{
"category": "notification",
"notificationName": "infoDoorPropped",
"notificationType": "INFO",
"type": "notification reported",
"createdAt": "2024-12-20T14:49:55.000Z",
"sampledAt": "2024-12-20T14:49:39.663Z",
"installationId": "819cd607-aede-482e-9aa0-8b65d420e300",
"deviceId": "9a8f6104-6c50-476e-90ee-16b9a2dafc8d",
"traitName": "DoorPositionV1",
"message": "Door is propped",
"id": "92197db2-63a4-4832-9a20-59dd188b6504",
"details": {}
}
]
}What made this section unhelpful for you?
On this page
- DoorPositionV1