---
name: "getDeviceStatus"
mode: "api"
versionRequirements:
  - { name: "@ray-js/lock-sdk", version: "1.0.0" }
title: "getDeviceStatus - Get device status information."
summary: "Get device status information."
---

## getDeviceStatus

> [VERSION] @ray-js/lock-sdk >= 1.0.0

### Description

Read the device's overall status (online/sleep, etc.).

### Parameters

None


### Return Value

Type: `DeviceStatus`

Device status object

##### DeviceStatus

| Property | Type | Description |
| --- | --- | --- |
| `type` | `"offline" \| "online" \| "sleep"` | Overall status: Online / Offline / Sleep |
| `connectEnable` | `boolean` | Whether users are allowed to initiate a connection manually (e.g., BLE) |
| `onlineTypes` | `"local" \| "cloud" \| "ble" \| "localMatter" \| "unknown"[]` | List of online channels (bit semantics expanded by the platform into an array) |
| `sleepPeriod` | `Object` | Sleep window (sleep only) |
| `isWifiActive` | `boolean` | Whether the Wi-Fi module is powered on and running |
| `isWifiMatter` | `boolean` | Whether Wi-Fi supports the Matter solution |

##### DeviceStatus.sleepPeriod properties

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `start` | `number` | Yes | - | Start |
| `end` | `number` | Yes | - | End |


### Examples

#### Example

```ts
import { getDeviceStatus } from '@ray-js/lock-sdk';
const status = getDeviceStatus();
```
