Référence
Chaque action, depuis la CLI govee, Rust, Python, Node.js ou une console DMX.
Trouver les appareils
scan
Chercher les appareils et indiquer ce qui répond.
let devices = govee.scan(None).await?;
let lan_only = govee.scan(Some(&[Mode::Lan])).await?;Paramètres
Govee::scan
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
modes | Option<&[Mode]> | facultatif | — |
Govee::transport_problems
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
modes | Option<&[Mode]> | facultatif | — |
govee scan
govee scan --mode lanParamètres
govee scan
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
--timeout-ms | MS | facultatif | 3000 |
devices = await govee.scan()
lan_only = await govee.scan(["lan"])Paramètres
Govee.scan
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
modes | Sequence[str] | None | facultatif | None |
Govee.transport_problems
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
modes | Sequence[str] | None | facultatif | None |
const devices = await govee.scan()
const lanOnly = await govee.scan(['lan'])Paramètres
Govee.scan
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
modes | Array<string> | facultatif | — |
Govee.transportProblems
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
modes | Array<string> | facultatif | — |
devices
Désigner plusieurs appareils à la fois, puis les lister ou leur envoyer une commande.
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);
}
}Paramètres
Govee::devices
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
filter | Filter | obligatoire | — |
mode | Option<Mode> | facultatif | — |
govee devices
govee devices H6159 kitchen
govee on ambient
govee brightness group:ambient 40Paramètres
govee devices
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
TARGET | TARGET… | facultatif | — |
for device in (await govee.devices()).list():
print(device.id)
ambient = await govee.devices(["ambient"])
await ambient.brightness(40)Paramètres
Govee.devices
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
targets | Sequence[str] | None | facultatif | None |
enables | str | None | facultatif | None |
mode | str | None | facultatif | None |
for (const device of (await govee.devices()).list()) {
console.log(device.id)
}
const ambient = await govee.devices(['ambient'])
await ambient.brightness(40)Paramètres
Govee.devices
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
targets | Array<string> | facultatif | — |
options.enables | string | facultatif | — |
options.mode | string | facultatif | — |
device
Obtenir un handle vers un appareil, par identité ou par nom.
let kitchen = govee.device("kitchen", None)?;
let over_lan = govee.device("kitchen", Some(Mode::Lan))?;Paramètres
Govee::device
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
target | impl Into<Target<'t>> | obligatoire | — |
mode | Option<Mode> | facultatif | — |
govee on kitchen
govee status 1C:8B:C4:A2:C0:46:64:6Ekitchen = govee.device("kitchen")
over_lan = govee.device("kitchen", mode="lan")Paramètres
Govee.device
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
target | str | obligatoire | — |
mode | str | None | facultatif | None |
const kitchen = govee.device('kitchen')
const overLan = govee.device('kitchen', { mode: 'lan' })Paramètres
Govee.device
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
target | string | obligatoire | — |
options.mode | string | facultatif | — |
identify
Allumer chaque appareil tour à tour, pour qu'une personne associe une identité à un projecteur de la pièce.
govee.identify(Some(&["kitchen"][..]), &Walk::default(), &()).await?;Paramètres
Govee::identify
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
targets | Option<&[T]> | facultatif | — |
walk | &Walk | obligatoire | — |
observer | &(dyn WalkObserver + Sync) | obligatoire | — |
DeviceHandle::identify
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
options | &Identify | obligatoire | — |
govee identify
govee identify H6159
govee identify 1C:8B:C4:A2:C0:46:64:6E kitchenParamètres
govee identify
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
TARGET | TARGET… | facultatif | — |
--color | COLOR | facultatif | #00FF00 |
--wait-ms | MS | facultatif | 1000 |
--hold-ms | MS | facultatif | 5000 |
--keep | flag | facultatif | — |
await govee.identify("kitchen", hold=10)Paramètres
Govee.identify
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
targets | str | Sequence[str] | None | facultatif | None |
color | Color | facultatif | (0, 255, 0) |
wait | float | facultatif | 1.0 |
hold | float | facultatif | 5.0 |
keep | bool | facultatif | False |
mode | str | facultatif | "lan" |
DeviceHandle.identify
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
color | Color | facultatif | (0, 255, 0) |
full_brightness | bool | facultatif | True |
await govee.identify('kitchen', { hold: 10 })Paramètres
Govee.identify
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
targets | string | Array<string> | facultatif | — |
options.color | [number, number, number] | Uint8Array | facultatif | [0, 255, 0] |
options.wait | number | facultatif | 1 |
options.hold | number | facultatif | 5 |
options.keep | boolean | facultatif | false |
options.mode | string | facultatif | 'lan' |
DeviceHandle.identify
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
color | [number, number, number] | Uint8Array | facultatif | [0, 255, 0] |
fullBrightness | boolean | facultatif | true |
describe
Indiquer ce que le fichier d'appareil déclare pour un modèle.
let spec = govee.device(&id, None)?.spec()?;govee describe DEVICEParamètres
govee describe
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
TARGET | TARGET | obligatoire | — |
spec = govee.device(id).spec()const spec = govee.device(id).spec()status
Demander à l'appareil son état actuel.
let state = device.status().await?;
let cached = device.last_status();govee status DEVICEParamètres
govee status
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
DEVICE | DEVICE | obligatoire | — |
state = await device.status()
cached = device.last_status()const state = await device.status()
const cached = device.lastStatus()watch
Suivre les événements : un appareil apparaît, l'état de santé d'un mode change.
let mut events = govee.events();
while let Ok(event) = events.recv().await {
println!("{event:?}");
}govee watch
govee watch --jsonParamètres
govee watch
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
--rescan-ms | MS | facultatif | 0 |
async for event in govee.events():
print(event)for await (const event of govee.events()) {
console.log(event)
}doctor
Signaler tout ce qui ne va pas dans la configuration.
for problem in govee.problems() {
eprintln!("{problem}");
}govee doctorfor problem in govee.problems():
print(problem)for (const problem of govee.problems()) {
console.error(problem)
}Piloter une lumière
power
Allumer ou éteindre l'appareil.
device.power(true).await?;Paramètres
DeviceHandle::power
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
on | bool | obligatoire | — |
govee on DEVICE
govee off DEVICEParamètres
govee on
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
DEVICE | DEVICE | obligatoire | — |
govee off
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
DEVICE | DEVICE | obligatoire | — |
await device.power(True)Paramètres
DeviceHandle.power
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
on | bool | obligatoire | — |
await device.power(true)Paramètres
DeviceHandle.power
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
on | boolean | obligatoire | — |
brightness
Régler la luminosité de tout l'appareil.
device.brightness(40).await?;Paramètres
DeviceHandle::brightness
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
level | i64 | obligatoire | — |
govee brightness DEVICE 40Paramètres
govee brightness
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
DEVICE | DEVICE | obligatoire | — |
VALUE | VALUE | obligatoire | — |
await device.brightness(40)Paramètres
DeviceHandle.brightness
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
level | int | obligatoire | — |
await device.brightness(40)Paramètres
DeviceHandle.brightness
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
level | number | obligatoire | — |
color
Régler une couleur pour tout l'appareil.
device.color([255, 61, 0]).await?;Paramètres
DeviceHandle::color
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
rgb | [u8; 3] | obligatoire | — |
govee color DEVICE "#ff3d00"Paramètres
govee color
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
DEVICE | DEVICE | obligatoire | — |
COLOR | COLOR | obligatoire | — |
await device.color((255, 61, 0))Paramètres
DeviceHandle.color
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
rgb | Color | obligatoire | — |
await device.color([255, 61, 0])Paramètres
DeviceHandle.color
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
rgb | [number, number, number] | Uint8Array | obligatoire | — |
color_temp
Régler la température de blanc, en kelvins.
device.color_temp(4000).await?;Paramètres
DeviceHandle::color_temp
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
kelvin | i64 | obligatoire | — |
govee colortemp DEVICE 4000Paramètres
govee colortemp
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
DEVICE | DEVICE | obligatoire | — |
KELVIN | KELVIN | obligatoire | — |
await device.color_temp(4000)Paramètres
DeviceHandle.color_temp
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
kelvin | int | obligatoire | — |
await device.colorTemp(4000)Paramètres
DeviceHandle.colorTemp
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
kelvin | number | obligatoire | — |
segment
Peindre les zones.
device.segment(&Paint {
zones: None,
colors: &frame,
resolution: Resolution::default(),
gradient: false,
}).await?;Paramètres
DeviceHandle::segment
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
paint | &Paint<'_> | obligatoire | — |
govee segment DEVICE "#ff3d00"
govee segment DEVICE --zones 0,1,2 "#ff3d00"Paramètres
govee segment
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
DEVICE | DEVICE | obligatoire | — |
--zones | LIST | facultatif | — |
--resolution | RESOLUTION | facultatif | app |
COLORS | COLORS | obligatoire | — |
--gradient | flag | facultatif | — |
await device.segment(colors=frame)Paramètres
DeviceHandle.segment
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
colors | Color | Sequence[Color] | bytes | obligatoire | — |
zones | Sequence[int] | None | facultatif | None |
resolution | Resolution | facultatif | "app" |
gradient | bool | facultatif | False |
await device.segment(frame)Paramètres
DeviceHandle.segment
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
colors | [number, number, number] | Array<[number, number, number]> | Uint8Array | obligatoire | — |
zones | Array<number> | facultatif | — |
resolution | number | 'app' | 'native' | 'groups' | facultatif | 'app' |
gradient | boolean | facultatif | false |
gradient
Indiquer si le firmware interpole entre les zones, sans peindre.
device.gradient(true).await?;Paramètres
DeviceHandle::gradient
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
on | bool | obligatoire | — |
govee gradient DEVICE onParamètres
govee gradient
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
DEVICE | DEVICE | obligatoire | — |
STATE | on | off | obligatoire | — |
await device.gradient(True)Paramètres
DeviceHandle.gradient
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
on | bool | obligatoire | — |
await device.gradient(true)Paramètres
DeviceHandle.gradient
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
on | boolean | obligatoire | — |
music
Jouer un effet que l'appareil produit à partir de son propre micro.
device.music(&Music {
effect: 3,
sensitivity: 60,
soft: false,
color: None,
}).await?;Paramètres
DeviceHandle::music
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
music | &Music | obligatoire | — |
govee music DEVICE 3 --sensitivity 60Paramètres
govee music
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
DEVICE | DEVICE | obligatoire | — |
EFFECT | EFFECT | obligatoire | — |
--sensitivity | LEVEL | facultatif | 50 |
--soft | flag | facultatif | — |
--color | COLOR | facultatif | — |
await device.music(effect=3, sensitivity=60)Paramètres
DeviceHandle.music
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
effect | int | obligatoire | — |
sensitivity | int | facultatif | 50 |
soft | bool | facultatif | False |
color | Color | None | facultatif | None |
await device.music(3, 60)Paramètres
DeviceHandle.music
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
effect | number | obligatoire | — |
sensitivity | number | facultatif | 50 |
soft | boolean | facultatif | false |
color | [number, number, number] | Uint8Array | facultatif | — |
govee_toolkit::scenes::fetch("SKU").await?;
device.scene_named("Aurora").await?;Paramètres
DeviceHandle::scene
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
scene | &Scene | obligatoire | — |
DeviceHandle::scene_named
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
query | &str | obligatoire | — |
govee scenes fetch SKU
govee scenes list SKU
govee scene DEVICE "Aurora"Paramètres
govee scene
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
DEVICE | DEVICE | obligatoire | — |
SCENE | SCENE | obligatoire | — |
await fetch_scenes("SKU")
await device.scene("Aurora")Paramètres
DeviceHandle.scene
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
scene | str | int | Scene | obligatoire | — |
await fetchScenes('SKU')
await device.scene('Aurora')Paramètres
DeviceHandle.scene
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
scene | string | number | Scene | obligatoire | — |
device.draw(&Drawing {
cells: Some(&[0, 1, 2]),
colors: &[[255, 61, 0]],
resolution: Resolution::default(),
args: &Args::new(),
}).await?;Paramètres
DeviceHandle::draw
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
drawing | &Drawing<'_> | obligatoire | — |
govee send DEVICE draw_cells --arg cells=0,1,2 --arg colors=ff3d00Paramètres
govee send
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
DEVICE | DEVICE | obligatoire | — |
COMMAND | COMMAND | obligatoire | — |
--arg | NAME=VALUE… | facultatif | — |
await device.draw((255, 61, 0), cells=[0, 1, 2])Paramètres
DeviceHandle.draw
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
colors | Color | Sequence[Color] | bytes | obligatoire | — |
cells | Sequence[int] | None | facultatif | None |
resolution | Resolution | facultatif | "app" |
args | dict[str, Arg] | None | facultatif | None |
await device.draw({ cells: [0, 1, 2], colors: [255, 61, 0] })Paramètres
DeviceHandle.draw
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
drawing.cells | Array<number> | facultatif | — |
drawing.colors | [number, number, number] | Array<[number, number, number]> | Uint8Array | obligatoire | — |
drawing.resolution | number | 'app' | 'native' | 'groups' | facultatif | — |
drawing.args | Record<string, boolean | number | string | Uint8Array | Array<number> | Array<[number, number, number]>> | facultatif | — |
Animer les segmentsLAN
open_stream
Ouvrir le canal des segments et le garder armé.
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?;Paramètres
DeviceHandle::open_stream
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
options | StreamOptions | obligatoire | — |
# frames.txt: one frame per line, one color per zone.
govee stream DEVICE --resolution native < frames.txtParamètres
govee stream
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
DEVICE | DEVICE | obligatoire | — |
--resolution | RESOLUTION | facultatif | app |
--rate | HZ | facultatif | — |
--gradient | flag | facultatif | — |
stream = await device.open_stream()
print(stream.zones, stream.rate_hz)
stream.set_zone(0, (255, 61, 0))
await stream.close()Paramètres
DeviceHandle.open_stream
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
resolution | Resolution | facultatif | "app" |
rate | Rate | facultatif | "measured" |
gradient | bool | facultatif | False |
const stream = await device.openStream()
console.log(stream.zones, stream.rateHz)
stream.setZone(0, [255, 61, 0])
await stream.close()Paramètres
DeviceHandle.openStream
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
resolution | number | 'app' | 'native' | 'groups' | facultatif | 'app' |
rate | number | 'measured' | facultatif | 'measured' |
gradient | boolean | facultatif | false |
set_zone
Régler une zone du flux.
stream.set_zone(7, [255, 61, 0])?;Paramètres
SegmentStream::set_zone
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
index | usize | obligatoire | — |
color | [u8; 3] | obligatoire | — |
# One frame per line, one color per zone.
echo "000000,ff3d00,000000" | govee stream DEVICE --resolution 3stream.set_zone(7, (255, 61, 0))Paramètres
SegmentStream.set_zone
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
index | int | obligatoire | — |
color | Color | obligatoire | — |
stream.setZone(7, [255, 61, 0])Paramètres
SegmentStream.setZone
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
index | number | obligatoire | — |
color | [number, number, number] | Uint8Array | obligatoire | — |
set_all, fill and clear
Régler toutes les zones à la fois.
stream.set_all(&frame)?;
stream.fill([255, 61, 0])?;
stream.clear()?;Paramètres
SegmentStream::set_all
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
colors | &[[u8; 3]] | obligatoire | — |
SegmentStream::fill
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
color | [u8; 3] | obligatoire | — |
govee segment DEVICE "#000000"stream.set_all(frame)
stream.fill((255, 61, 0))
stream.clear()Paramètres
SegmentStream.set_all
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
colors | Sequence[Color] | bytes | obligatoire | — |
SegmentStream.fill
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
color | Color | obligatoire | — |
stream.setAll(frame)
stream.fill([255, 61, 0])
stream.clear()Paramètres
SegmentStream.setAll
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
colors | Array<[number, number, number]> | Uint8Array | obligatoire | — |
SegmentStream.fill
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
color | [number, number, number] | Uint8Array | obligatoire | — |
close
Fermer le 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()Piloter une installation en DMXLAN
govee-dmx profile
Afficher la table des canaux d'un modèle, pour patcher une console.
govee-dmx profile H6159
govee-dmx profile H6159 --personality segmentParamètres
govee-dmx profile
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
SKU | SKU | obligatoire | — |
--personality | PERSONALITY | facultatif | — |
--json | flag | facultatif | — |
govee-dmx patch
Scanner le réseau local et écrire le patch à partir duquel le nœud tourne.
govee-dmx patch
govee-dmx patch --personality segment --universe 1
govee-dmx patch --dry-runParamètres
govee-dmx patch
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
--patch | FILE | facultatif | — |
--personality | PERSONALITY | facultatif | full |
--universe | UNIVERSE | facultatif | 0 |
--reset | flag | facultatif | — |
--dry-run | flag | facultatif | — |
--config | CONFIG | facultatif | — |
--json | flag | facultatif | — |
govee-dmx identify
Allumer chaque projecteur patché tour à tour, pour qu'une personne lise l'installation.
govee-dmx identify
govee-dmx identify --address 33
govee-dmx identify --universe 1
govee-dmx identify H6159 kitchenParamètres
govee-dmx identify
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
TARGET | TARGET… | facultatif | — |
--universe | UNIVERSE | facultatif | — |
--address | CHANNEL | facultatif | — |
--patch | FILE | facultatif | — |
--color | COLOR | facultatif | #00FF00 |
--wait-ms | MS | facultatif | 1000 |
--hold-ms | MS | facultatif | 5000 |
--keep | flag | facultatif | — |
--config | CONFIG | facultatif | — |
--json | flag | facultatif | — |
govee-dmx run
Recevoir l'Art-Net sur le port 6454 et piloter les appareils patchés.
govee-dmx run
govee-dmx run --scan
govee-dmx run --dry-run --debugParamètres
govee-dmx run
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
--patch | FILE | facultatif | — |
--scan | flag | facultatif | — |
--personality | PERSONALITY | facultatif | full |
--universe | UNIVERSE | facultatif | 0 |
--dry-run | flag | facultatif | — |
--no-reset | flag | facultatif | — |
--debug | flag | facultatif | — |
--config | CONFIG | facultatif | — |
--json | flag | facultatif | — |
Commandes brutes et mise en place
send
Envoyer une entrée du fichier d'appareil, par son nom.
device.send("brightness", &args).await?;
let reply = device.read("status", &args).await?;Paramètres
DeviceHandle::send
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
command | &str | obligatoire | — |
args | &Args | obligatoire | — |
DeviceHandle::read
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
command | &str | obligatoire | — |
args | &Args | obligatoire | — |
govee send DEVICE brightness --arg level=40Paramètres
govee send
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
DEVICE | DEVICE | obligatoire | — |
COMMAND | COMMAND | obligatoire | — |
--arg | NAME=VALUE… | facultatif | — |
await device.send("brightness", level=40)
reply = await device.read("status")Paramètres
DeviceHandle.send
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
command | str | obligatoire | — |
**args | Arg | facultatif | — |
DeviceHandle.read
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
command | str | obligatoire | — |
**args | Arg | facultatif | — |
await device.send('brightness', { level: 40 })
const reply = await device.read('status')Paramètres
DeviceHandle.send
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
command | string | obligatoire | — |
args | Record<string, boolean | number | string | Uint8Array | Array<number> | Array<[number, number, number]>> | facultatif | — |
DeviceHandle.read
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
command | string | obligatoire | — |
args | Record<string, boolean | number | string | Uint8Array | Array<number> | Array<[number, number, number]>> | facultatif | — |
device.provision_wifi(&credentials).await?;Paramètres
DeviceHandle::provision_wifi
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
credentials | &WifiCredentials | obligatoire | — |
govee provision DEVICE --ssid my-networkParamètres
govee provision
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
DEVICE | DEVICE | obligatoire | — |
--ssid | SSID | facultatif | — |
--password | PASSWORD | facultatif | — |
--open | flag | facultatif | — |
--utc-offset-hours | HOURS | facultatif | 0 |
--utc-offset-minutes | MINUTES | facultatif | 0 |
await device.provision_wifi("network name", "password")Paramètres
DeviceHandle.provision_wifi
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
network | str | obligatoire | — |
password | str | obligatoire | — |
utc_offset_hours | int | facultatif | 0 |
utc_offset_minutes | int | facultatif | 0 |
await device.provisionWifi("network name", "password")Paramètres
DeviceHandle.provisionWifi
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
network | string | obligatoire | — |
password | string | obligatoire | — |
utcOffsetHours | number | facultatif | 0 |
utcOffsetMinutes | number | facultatif | 0 |
Choose a mode
Limiter une commande à un seul mode.
let mode = device.serving_mode()?;
let health = device.health(Mode::Lan);Paramètres
DeviceHandle::health
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
mode | Mode | obligatoire | — |
govee on DEVICE --mode lanParamètres
govee
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
--json | flag | facultatif | — |
--mode | lan | ble | cloud | facultatif | — |
--config | PATH | facultatif | — |
--env-file | PATH | facultatif | — |
--no-env | flag | facultatif | — |
mode = device.serving_mode()
health = device.health("lan")Paramètres
DeviceHandle.health
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
mode | str | obligatoire | — |
const mode = device.servingMode()
const health = device.health('lan')Paramètres
DeviceHandle.health
| Nom | Type | Obligatoire | Par défaut |
|---|---|---|---|
mode | string | obligatoire | — |