This package has been deprecated

Author message:

deprecated

@scrypted/web-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published
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();

Readme

Keywords

none

Package Sidebar

Install

npm i @scrypted/web-sdk

Weekly Downloads

2

Version

1.0.7

License

ISC

Unpacked Size

126 kB

Total Files

32

Last publish

Collaborators

  • billyzoellers
  • bjia56
  • koush