Referencia
Cada acción, desde la CLI govee, Rust, Python, Node.js o una consola DMX.
Encontrar dispositivos
scan
Busca dispositivos e informa de lo que responde.
let devices = govee.scan(None).await?;
let lan_only = govee.scan(Some(&[Mode::Lan])).await?;Parámetros
Govee::scan
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
modes | Option<&[Mode]> | opcional | — |
Govee::transport_problems
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
modes | Option<&[Mode]> | opcional | — |
govee scan
govee scan --mode lanParámetros
govee scan
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
--timeout-ms | MS | opcional | 3000 |
devices = await govee.scan()
lan_only = await govee.scan(["lan"])Parámetros
Govee.scan
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
modes | Sequence[str] | None | opcional | None |
Govee.transport_problems
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
modes | Sequence[str] | None | opcional | None |
const devices = await govee.scan()
const lanOnly = await govee.scan(['lan'])Parámetros
Govee.scan
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
modes | Array<string> | opcional | — |
Govee.transportProblems
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
modes | Array<string> | opcional | — |
devices
Designa varios dispositivos a la vez, y después lístalos o envíales un comando.
for device in govee.devices(Filter::all(), None).await?.list() {
println!("{}", device.id);
}
let ambient = govee.devices(Filter::targets(["ambient"]), None).await?;
for outcome in ambient.brightness(40).await {
if let Err(error) = outcome.result {
eprintln!("{}: {error}", outcome.id);
}
}Parámetros
Govee::devices
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
filter | Filter | obligatorio | — |
mode | Option<Mode> | opcional | — |
govee devices
govee devices H6159 kitchen
govee on ambient
govee brightness group:ambient 40Parámetros
govee devices
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
TARGET | TARGET… | opcional | — |
for device in (await govee.devices()).list():
print(device.id)
ambient = await govee.devices(["ambient"])
await ambient.brightness(40)Parámetros
Govee.devices
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
targets | Sequence[str] | None | opcional | None |
enables | str | None | opcional | None |
mode | str | None | opcional | None |
for (const device of (await govee.devices()).list()) {
console.log(device.id)
}
const ambient = await govee.devices(['ambient'])
await ambient.brightness(40)Parámetros
Govee.devices
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
targets | Array<string> | opcional | — |
options.enables | string | opcional | — |
options.mode | string | opcional | — |
device
Obtén un handle para un dispositivo, por identidad o por nombre.
let kitchen = govee.device("kitchen", None)?;
let over_lan = govee.device("kitchen", Some(Mode::Lan))?;Parámetros
Govee::device
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
target | impl Into<Target<'t>> | obligatorio | — |
mode | Option<Mode> | opcional | — |
govee on kitchen
govee status 1C:8B:C4:A2:C0:46:64:6Ekitchen = govee.device("kitchen")
over_lan = govee.device("kitchen", mode="lan")Parámetros
Govee.device
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
target | str | obligatorio | — |
mode | str | None | opcional | None |
const kitchen = govee.device('kitchen')
const overLan = govee.device('kitchen', { mode: 'lan' })Parámetros
Govee.device
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
target | string | obligatorio | — |
options.mode | string | opcional | — |
identify
Enciende cada dispositivo por turno, para que una persona asocie una identidad a un aparato de la sala.
govee.identify(Some(&["kitchen"][..]), &Walk::default(), &()).await?;Parámetros
Govee::identify
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
targets | Option<&[T]> | opcional | — |
walk | &Walk | obligatorio | — |
observer | &(dyn WalkObserver + Sync) | obligatorio | — |
DeviceHandle::identify
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
options | &Identify | obligatorio | — |
govee identify
govee identify H6159
govee identify 1C:8B:C4:A2:C0:46:64:6E kitchenParámetros
govee identify
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
TARGET | TARGET… | opcional | — |
--color | COLOR | opcional | #00FF00 |
--wait-ms | MS | opcional | 1000 |
--hold-ms | MS | opcional | 5000 |
--keep | flag | opcional | — |
await govee.identify("kitchen", hold=10)Parámetros
Govee.identify
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
targets | str | Sequence[str] | None | opcional | None |
color | Color | opcional | (0, 255, 0) |
wait | float | opcional | 1.0 |
hold | float | opcional | 5.0 |
keep | bool | opcional | False |
mode | str | opcional | "lan" |
DeviceHandle.identify
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
color | Color | opcional | (0, 255, 0) |
full_brightness | bool | opcional | True |
await govee.identify('kitchen', { hold: 10 })Parámetros
Govee.identify
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
targets | string | Array<string> | opcional | — |
options.color | [number, number, number] | Uint8Array | opcional | [0, 255, 0] |
options.wait | number | opcional | 1 |
options.hold | number | opcional | 5 |
options.keep | boolean | opcional | false |
options.mode | string | opcional | 'lan' |
DeviceHandle.identify
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
color | [number, number, number] | Uint8Array | opcional | [0, 255, 0] |
fullBrightness | boolean | opcional | true |
describe
Muestra lo que declara el archivo del dispositivo para un modelo.
let spec = govee.device(&id, None)?.spec()?;govee describe DEVICEParámetros
govee describe
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
TARGET | TARGET | obligatorio | — |
spec = govee.device(id).spec()const spec = govee.device(id).spec()status
Pide al dispositivo su estado actual.
let state = device.status().await?;
let cached = device.last_status();govee status DEVICEParámetros
govee status
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
DEVICE | DEVICE | obligatorio | — |
state = await device.status()
cached = device.last_status()const state = await device.status()
const cached = device.lastStatus()watch
Sigue los eventos: aparece un dispositivo, cambia el estado de un modo.
let mut events = govee.events();
while let Ok(event) = events.recv().await {
println!("{event:?}");
}govee watch
govee watch --jsonParámetros
govee watch
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
--rescan-ms | MS | opcional | 0 |
async for event in govee.events():
print(event)for await (const event of govee.events()) {
console.log(event)
}doctor
Indica todo lo que está mal en la configuración.
for problem in govee.problems() {
eprintln!("{problem}");
}govee doctorfor problem in govee.problems():
print(problem)for (const problem of govee.problems()) {
console.error(problem)
}Controlar una luz
power
Enciende o apaga el dispositivo.
device.power(true).await?;Parámetros
DeviceHandle::power
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
on | bool | obligatorio | — |
govee on DEVICE
govee off DEVICEParámetros
govee on
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
DEVICE | DEVICE | obligatorio | — |
govee off
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
DEVICE | DEVICE | obligatorio | — |
await device.power(True)Parámetros
DeviceHandle.power
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
on | bool | obligatorio | — |
await device.power(true)Parámetros
DeviceHandle.power
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
on | boolean | obligatorio | — |
brightness
Ajusta el brillo de todo el dispositivo.
device.brightness(40).await?;Parámetros
DeviceHandle::brightness
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
level | i64 | obligatorio | — |
govee brightness DEVICE 40Parámetros
govee brightness
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
DEVICE | DEVICE | obligatorio | — |
VALUE | VALUE | obligatorio | — |
await device.brightness(40)Parámetros
DeviceHandle.brightness
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
level | int | obligatorio | — |
await device.brightness(40)Parámetros
DeviceHandle.brightness
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
level | number | obligatorio | — |
color
Pon un solo color en todo el dispositivo.
device.color([255, 61, 0]).await?;Parámetros
DeviceHandle::color
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
rgb | [u8; 3] | obligatorio | — |
govee color DEVICE "#ff3d00"Parámetros
govee color
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
DEVICE | DEVICE | obligatorio | — |
COLOR | COLOR | obligatorio | — |
await device.color((255, 61, 0))Parámetros
DeviceHandle.color
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
rgb | Color | obligatorio | — |
await device.color([255, 61, 0])Parámetros
DeviceHandle.color
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
rgb | [number, number, number] | Uint8Array | obligatorio | — |
color_temp
Ajusta la temperatura de blanco, en kelvin.
device.color_temp(4000).await?;Parámetros
DeviceHandle::color_temp
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
kelvin | i64 | obligatorio | — |
govee colortemp DEVICE 4000Parámetros
govee colortemp
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
DEVICE | DEVICE | obligatorio | — |
KELVIN | KELVIN | obligatorio | — |
await device.color_temp(4000)Parámetros
DeviceHandle.color_temp
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
kelvin | int | obligatorio | — |
await device.colorTemp(4000)Parámetros
DeviceHandle.colorTemp
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
kelvin | number | obligatorio | — |
segment
Pinta las zonas.
device.segment(&Paint {
zones: None,
colors: &frame,
resolution: Resolution::default(),
gradient: false,
}).await?;Parámetros
DeviceHandle::segment
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
paint | &Paint<'_> | obligatorio | — |
govee segment DEVICE "#ff3d00"
govee segment DEVICE --zones 0,1,2 "#ff3d00"Parámetros
govee segment
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
DEVICE | DEVICE | obligatorio | — |
--zones | LIST | opcional | — |
--resolution | RESOLUTION | opcional | app |
COLORS | COLORS | obligatorio | — |
--gradient | flag | opcional | — |
await device.segment(colors=frame)Parámetros
DeviceHandle.segment
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
colors | Color | Sequence[Color] | bytes | obligatorio | — |
zones | Sequence[int] | None | opcional | None |
resolution | Resolution | opcional | "app" |
gradient | bool | opcional | False |
await device.segment(frame)Parámetros
DeviceHandle.segment
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
colors | [number, number, number] | Array<[number, number, number]> | Uint8Array | obligatorio | — |
zones | Array<number> | opcional | — |
resolution | number | 'app' | 'native' | 'groups' | opcional | 'app' |
gradient | boolean | opcional | false |
gradient
Indica si el firmware interpola entre zonas, sin pintar.
device.gradient(true).await?;Parámetros
DeviceHandle::gradient
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
on | bool | obligatorio | — |
govee gradient DEVICE onParámetros
govee gradient
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
DEVICE | DEVICE | obligatorio | — |
STATE | on | off | obligatorio | — |
await device.gradient(True)Parámetros
DeviceHandle.gradient
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
on | bool | obligatorio | — |
await device.gradient(true)Parámetros
DeviceHandle.gradient
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
on | boolean | obligatorio | — |
music
Reproduce un efecto que el dispositivo genera a partir de su propio micrófono.
device.music(&Music {
effect: 3,
sensitivity: 60,
soft: false,
color: None,
}).await?;Parámetros
DeviceHandle::music
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
music | &Music | obligatorio | — |
govee music DEVICE 3 --sensitivity 60Parámetros
govee music
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
DEVICE | DEVICE | obligatorio | — |
EFFECT | EFFECT | obligatorio | — |
--sensitivity | LEVEL | opcional | 50 |
--soft | flag | opcional | — |
--color | COLOR | opcional | — |
await device.music(effect=3, sensitivity=60)Parámetros
DeviceHandle.music
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
effect | int | obligatorio | — |
sensitivity | int | opcional | 50 |
soft | bool | opcional | False |
color | Color | None | opcional | None |
await device.music(3, 60)Parámetros
DeviceHandle.music
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
effect | number | obligatorio | — |
sensitivity | number | opcional | 50 |
soft | boolean | opcional | false |
color | [number, number, number] | Uint8Array | opcional | — |
govee_toolkit::scenes::fetch("SKU").await?;
device.scene_named("Aurora").await?;Parámetros
DeviceHandle::scene
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
scene | &Scene | obligatorio | — |
DeviceHandle::scene_named
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
query | &str | obligatorio | — |
govee scenes fetch SKU
govee scenes list SKU
govee scene DEVICE "Aurora"Parámetros
govee scene
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
DEVICE | DEVICE | obligatorio | — |
SCENE | SCENE | obligatorio | — |
await fetch_scenes("SKU")
await device.scene("Aurora")Parámetros
DeviceHandle.scene
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
scene | str | int | Scene | obligatorio | — |
await fetchScenes('SKU')
await device.scene('Aurora')Parámetros
DeviceHandle.scene
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
scene | string | number | Scene | obligatorio | — |
device.draw(&Drawing {
cells: Some(&[0, 1, 2]),
colors: &[[255, 61, 0]],
resolution: Resolution::default(),
args: &Args::new(),
}).await?;Parámetros
DeviceHandle::draw
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
drawing | &Drawing<'_> | obligatorio | — |
govee send DEVICE draw_cells --arg cells=0,1,2 --arg colors=ff3d00Parámetros
govee send
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
DEVICE | DEVICE | obligatorio | — |
COMMAND | COMMAND | obligatorio | — |
--arg | NAME=VALUE… | opcional | — |
await device.draw((255, 61, 0), cells=[0, 1, 2])Parámetros
DeviceHandle.draw
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
colors | Color | Sequence[Color] | bytes | obligatorio | — |
cells | Sequence[int] | None | opcional | None |
resolution | Resolution | opcional | "app" |
args | dict[str, Arg] | None | opcional | None |
await device.draw({ cells: [0, 1, 2], colors: [255, 61, 0] })Parámetros
DeviceHandle.draw
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
drawing.cells | Array<number> | opcional | — |
drawing.colors | [number, number, number] | Array<[number, number, number]> | Uint8Array | obligatorio | — |
drawing.resolution | number | 'app' | 'native' | 'groups' | opcional | — |
drawing.args | Record<string, boolean | number | string | Uint8Array | Array<number> | Array<[number, number, number]>> | opcional | — |
Animar los segmentosLAN
open_stream
Abre el canal de segmentos y mantenlo armado.
let stream = device.open_stream(StreamOptions::default()).await?;
println!("{} zones at {} Hz", stream.zones(), stream.rate_hz());
stream.set_zone(0, [255, 61, 0])?;
stream.close().await?;Parámetros
DeviceHandle::open_stream
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
options | StreamOptions | obligatorio | — |
# frames.txt: one frame per line, one color per zone.
govee stream DEVICE --resolution native < frames.txtParámetros
govee stream
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
DEVICE | DEVICE | obligatorio | — |
--resolution | RESOLUTION | opcional | app |
--rate | HZ | opcional | — |
--gradient | flag | opcional | — |
stream = await device.open_stream()
print(stream.zones, stream.rate_hz)
stream.set_zone(0, (255, 61, 0))
await stream.close()Parámetros
DeviceHandle.open_stream
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
resolution | Resolution | opcional | "app" |
rate | Rate | opcional | "measured" |
gradient | bool | opcional | False |
const stream = await device.openStream()
console.log(stream.zones, stream.rateHz)
stream.setZone(0, [255, 61, 0])
await stream.close()Parámetros
DeviceHandle.openStream
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
resolution | number | 'app' | 'native' | 'groups' | opcional | 'app' |
rate | number | 'measured' | opcional | 'measured' |
gradient | boolean | opcional | false |
set_zone
Ajusta una zona del stream.
stream.set_zone(7, [255, 61, 0])?;Parámetros
SegmentStream::set_zone
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
index | usize | obligatorio | — |
color | [u8; 3] | obligatorio | — |
# One frame per line, one color per zone.
echo "000000,ff3d00,000000" | govee stream DEVICE --resolution 3stream.set_zone(7, (255, 61, 0))Parámetros
SegmentStream.set_zone
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
index | int | obligatorio | — |
color | Color | obligatorio | — |
stream.setZone(7, [255, 61, 0])Parámetros
SegmentStream.setZone
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
index | number | obligatorio | — |
color | [number, number, number] | Uint8Array | obligatorio | — |
set_all, fill and clear
Ajusta todas las zonas a la vez.
stream.set_all(&frame)?;
stream.fill([255, 61, 0])?;
stream.clear()?;Parámetros
SegmentStream::set_all
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
colors | &[[u8; 3]] | obligatorio | — |
SegmentStream::fill
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
color | [u8; 3] | obligatorio | — |
govee segment DEVICE "#000000"stream.set_all(frame)
stream.fill((255, 61, 0))
stream.clear()Parámetros
SegmentStream.set_all
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
colors | Sequence[Color] | bytes | obligatorio | — |
SegmentStream.fill
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
color | Color | obligatorio | — |
stream.setAll(frame)
stream.fill([255, 61, 0])
stream.clear()Parámetros
SegmentStream.setAll
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
colors | Array<[number, number, number]> | Uint8Array | obligatorio | — |
SegmentStream.fill
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
color | [number, number, number] | Uint8Array | obligatorio | — |
close
Cierra el canal.
println!("{} frames", stream.frames_sent());
stream.close().await?;# The stream ends when standard input ends.print(stream.frames_sent)
await stream.close()console.log(stream.framesSent)
await stream.close()Controlar una instalación por DMXLAN
govee-dmx profile
Muestra la tabla de canales de un modelo, para hacer el patch en una consola.
govee-dmx profile H6159
govee-dmx profile H6159 --personality segmentParámetros
govee-dmx profile
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
SKU | SKU | obligatorio | — |
--personality | PERSONALITY | opcional | — |
--json | flag | opcional | — |
govee-dmx patch
Escanea la LAN y escribe el patch con el que funciona el nodo.
govee-dmx patch
govee-dmx patch --personality segment --universe 1
govee-dmx patch --dry-runParámetros
govee-dmx patch
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
--patch | FILE | opcional | — |
--personality | PERSONALITY | opcional | full |
--universe | UNIVERSE | opcional | 0 |
--reset | flag | opcional | — |
--dry-run | flag | opcional | — |
--config | CONFIG | opcional | — |
--json | flag | opcional | — |
govee-dmx identify
Enciende cada aparato del patch por turno, para que una persona lea la instalación.
govee-dmx identify
govee-dmx identify --address 33
govee-dmx identify --universe 1
govee-dmx identify H6159 kitchenParámetros
govee-dmx identify
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
TARGET | TARGET… | opcional | — |
--universe | UNIVERSE | opcional | — |
--address | CHANNEL | opcional | — |
--patch | FILE | opcional | — |
--color | COLOR | opcional | #00FF00 |
--wait-ms | MS | opcional | 1000 |
--hold-ms | MS | opcional | 5000 |
--keep | flag | opcional | — |
--config | CONFIG | opcional | — |
--json | flag | opcional | — |
govee-dmx run
Recibe Art-Net en el puerto 6454 y controla los dispositivos del patch.
govee-dmx run
govee-dmx run --scan
govee-dmx run --dry-run --debugParámetros
govee-dmx run
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
--patch | FILE | opcional | — |
--scan | flag | opcional | — |
--personality | PERSONALITY | opcional | full |
--universe | UNIVERSE | opcional | 0 |
--dry-run | flag | opcional | — |
--no-reset | flag | opcional | — |
--debug | flag | opcional | — |
--config | CONFIG | opcional | — |
--json | flag | opcional | — |
Comandos en bruto y configuración
send
Envía una entrada del archivo del dispositivo, por su nombre.
device.send("brightness", &args).await?;
let reply = device.read("status", &args).await?;Parámetros
DeviceHandle::send
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
command | &str | obligatorio | — |
args | &Args | obligatorio | — |
DeviceHandle::read
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
command | &str | obligatorio | — |
args | &Args | obligatorio | — |
govee send DEVICE brightness --arg level=40Parámetros
govee send
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
DEVICE | DEVICE | obligatorio | — |
COMMAND | COMMAND | obligatorio | — |
--arg | NAME=VALUE… | opcional | — |
await device.send("brightness", level=40)
reply = await device.read("status")Parámetros
DeviceHandle.send
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
command | str | obligatorio | — |
**args | Arg | opcional | — |
DeviceHandle.read
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
command | str | obligatorio | — |
**args | Arg | opcional | — |
await device.send('brightness', { level: 40 })
const reply = await device.read('status')Parámetros
DeviceHandle.send
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
command | string | obligatorio | — |
args | Record<string, boolean | number | string | Uint8Array | Array<number> | Array<[number, number, number]>> | opcional | — |
DeviceHandle.read
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
command | string | obligatorio | — |
args | Record<string, boolean | number | string | Uint8Array | Array<number> | Array<[number, number, number]>> | opcional | — |
device.provision_wifi(&credentials).await?;Parámetros
DeviceHandle::provision_wifi
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
credentials | &WifiCredentials | obligatorio | — |
govee provision DEVICE --ssid my-networkParámetros
govee provision
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
DEVICE | DEVICE | obligatorio | — |
--ssid | SSID | opcional | — |
--password | PASSWORD | opcional | — |
--open | flag | opcional | — |
--utc-offset-hours | HOURS | opcional | 0 |
--utc-offset-minutes | MINUTES | opcional | 0 |
await device.provision_wifi("network name", "password")Parámetros
DeviceHandle.provision_wifi
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
network | str | obligatorio | — |
password | str | obligatorio | — |
utc_offset_hours | int | opcional | 0 |
utc_offset_minutes | int | opcional | 0 |
await device.provisionWifi("network name", "password")Parámetros
DeviceHandle.provisionWifi
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
network | string | obligatorio | — |
password | string | obligatorio | — |
utcOffsetHours | number | opcional | 0 |
utcOffsetMinutes | number | opcional | 0 |
Choose a mode
Restringe un comando a un modo.
let mode = device.serving_mode()?;
let health = device.health(Mode::Lan);Parámetros
DeviceHandle::health
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
mode | Mode | obligatorio | — |
govee on DEVICE --mode lanParámetros
govee
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
--json | flag | opcional | — |
--mode | lan | ble | cloud | opcional | — |
--config | PATH | opcional | — |
--env-file | PATH | opcional | — |
--no-env | flag | opcional | — |
mode = device.serving_mode()
health = device.health("lan")Parámetros
DeviceHandle.health
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
mode | str | obligatorio | — |
const mode = device.servingMode()
const health = device.health('lan')Parámetros
DeviceHandle.health
| Nombre | Tipo | Obligatorio | Valor por defecto |
|---|---|---|---|
mode | string | obligatorio | — |