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();
This package has been deprecated
Author message:
deprecated
@scrypted/web-sdk
1.0.7 • Public • PublishedReadme
Keywords
nonePackage Sidebar
Install
npm i @scrypted/web-sdk
Weekly Downloads
2
Version
1.0.7
License
ISC
Unpacked Size
126 kB
Total Files
32