# @scrypted/web-sdk

> ```js import { connectScryptedClient, OnOff } from '@scrypted/web-sdk';

Latest version **1.0.7** (published 2022-02-11) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @scrypted/web-sdk
pnpm add @scrypted/web-sdk
yarn add @scrypted/web-sdk
bun add @scrypted/web-sdk
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2022-02-11 |
| First published | 2022-02-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 123.1 KB |
| Known vulnerabilities | 0 (+31 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | koush |

## Links

- npm: https://www.npmjs.com/package/@scrypted/web-sdk
- npm.io page: https://npm.io/package/@scrypted/web-sdk

## Dependencies (8)

- [axios](https://npm.io/package/axios.md) ^0.25.0
- [memfs](https://npm.io/package/memfs.md) ^3.4.1
- [linkfs](https://npm.io/package/linkfs.md) ^2.1.0
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2
- [adm-zip](https://npm.io/package/adm-zip.md) ^0.5.9
- [@scrypted/rpc](https://npm.io/package/@scrypted/rpc.md) ^1.0.4
- [@scrypted/types](https://npm.io/package/@scrypted/types.md) ^0.0.6
- [engine.io-client](https://npm.io/package/engine.io-client.md) ^5.2.0

## Recent versions

- 1.0.7 (latest) — 2022-02-11
- 1.0.6 — 2022-02-11
- 1.0.5 — 2022-02-11

## README

```js
import { connectScryptedClient, OnOff } from '@scrypted/web-sdk';

async function example() {
    const sdk = await connectScryptedClient({
        baseUrl: 'https://localhost:10443',
        pluginId: "@scrypted/core",
        username: process.env.SCRYPTED_USERNAME || 'admin',
        password: process.env.SCRYPTED_PASSWORD || 'swordfish',
    });

    const dimmer = sdk.systemManager.getDeviceByName<OnOff>("Office Dimmer");
    dimmer.turnOn();
    await new Promise(resolve => setTimeout(resolve, 5000));
    await dimmer.turnOff(); 
    // allow node to exit
    sdk.disconnect();
}

example();
```

---
_Source: https://npm.io/package/@scrypted/web-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
