4.0.3 • Published 3 years ago

rf-kasa-controller v4.0.3

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

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

4.0.0

3 years ago

4.0.3

3 years ago

4.0.2

3 years ago

3.0.7

3 years ago

3.0.6

3 years ago

3.0.4

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.5

3 years ago

3.0.0

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago