Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@ryanforever/kasa

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ryanforever/kasa

control kasa lights

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

rf-kasa-controller

wrapper for kasa api

usage

const kasa = new KasaController({
	username: process.env.KASA_USERNAME,
	password: process.env.KASA_PASSWORD
})

kasa.toggle("lightName")

methods

they are async

.set(lightname, string) set a light to various settings, using NLP

kasa.set("all", "dim warm white")

.on(lightName) turns a light on (use "all" to turn all active lights off)

.off(lightName) turns a light off (use "all" to turn all active lights off)

.scene([map])

kasa.scene([
	["bed", "dim blue"],
	["couch", "red"],
	["desk", "on"]
])

.allOn() turns all active lights on

.allOff() turns all active lights off

.toggle("lightName") toggles light state on and off

.color("lightName", "dim red") sets color of light

.getLights() returns a list of available lights in your account

.findLight("lightName")

.getState("lightName")

.getInfo("lightName")

.getLightIds() returns all active light ids

.color() options

you can use natural language, using keywords

state keywords:

on, off

color keywords:

red, blue, green, yellow, orange, purple, pink, white

brightness keywords:

bright, high, full, max, dim, medium, dark, low

color temperature keywords:

warm, cool, daylight/day

other keywords:

circadian

Keywords

kasa

FAQs

Package last updated on 13 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts