1.0.0 • Published 3 years ago

smart-light-disco v1.0.0

Weekly downloads
3
License
ISC
Repository
-
Last release
3 years ago

Party Mode For Smart Lights*

npm.io

Bulbs supported:

  • Kasa KL130

Planned support:

  • A19 C by GE
  • Only a select few smart bulbs are supported due to access to these bulbs

How to use

npm install smart-light-disco

const { Client } = require('tplink-smarthome-api');
const BulbWrapper = require('smart-light-disco');

const client = new Client();

(async () => {
  const device = await client.getDevice({ host: '192.168.254.35' })

  const isOn = await device.getPowerState()

  if (!isOn) {
    await device.togglePowerState()
  }

  // pass in the device
  const bulb = new BulbWrapper(device)

  // fire up disco
  bulb.startDisco(750)
})()