Reference
Every action, from the govee CLI, Rust, Python, Node.js or a DMX console.
Find devices
scan
Look for devices and report what answers.
let devices = govee.scan(None).await?;
let lan_only = govee.scan(Some(&[Mode::Lan])).await?;Parameters
Govee::scan
| Name | Type | Required | Default |
|---|---|---|---|
modes | Option<&[Mode]> | optional | — |
Govee::transport_problems
| Name | Type | Required | Default |
|---|---|---|---|
modes | Option<&[Mode]> | optional | — |
govee scan
govee scan --mode lanParameters
govee scan
| Name | Type | Required | Default |
|---|---|---|---|
--timeout-ms | MS | optional | 3000 |
devices = await govee.scan()
lan_only = await govee.scan(["lan"])Parameters
Govee.scan
| Name | Type | Required | Default |
|---|---|---|---|
modes | Sequence[str] | None | optional | None |
Govee.transport_problems
| Name | Type | Required | Default |
|---|---|---|---|
modes | Sequence[str] | None | optional | None |
const devices = await govee.scan()
const lanOnly = await govee.scan(['lan'])Parameters
Govee.scan
| Name | Type | Required | Default |
|---|---|---|---|
modes | Array<string> | optional | — |
Govee.transportProblems
| Name | Type | Required | Default |
|---|---|---|---|
modes | Array<string> | optional | — |
devices
Name several devices at once, then list them or send them one command.
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);
}
}Parameters
Govee::devices
| Name | Type | Required | Default |
|---|---|---|---|
filter | Filter | required | — |
mode | Option<Mode> | optional | — |
govee devices
govee devices H6159 kitchen
govee on ambient
govee brightness group:ambient 40Parameters
govee devices
| Name | Type | Required | Default |
|---|---|---|---|
TARGET | TARGET… | optional | — |
for device in (await govee.devices()).list():
print(device.id)
ambient = await govee.devices(["ambient"])
await ambient.brightness(40)Parameters
Govee.devices
| Name | Type | Required | Default |
|---|---|---|---|
targets | Sequence[str] | None | optional | None |
enables | str | None | optional | None |
mode | str | None | optional | None |
for (const device of (await govee.devices()).list()) {
console.log(device.id)
}
const ambient = await govee.devices(['ambient'])
await ambient.brightness(40)Parameters
Govee.devices
| Name | Type | Required | Default |
|---|---|---|---|
targets | Array<string> | optional | — |
options.enables | string | optional | — |
options.mode | string | optional | — |
device
Get a handle for one device, by identity or by name.
let kitchen = govee.device("kitchen", None)?;
let over_lan = govee.device("kitchen", Some(Mode::Lan))?;Parameters
Govee::device
| Name | Type | Required | Default |
|---|---|---|---|
target | impl Into<Target<'t>> | required | — |
mode | Option<Mode> | optional | — |
govee on kitchen
govee status 1C:8B:C4:A2:C0:46:64:6Ekitchen = govee.device("kitchen")
over_lan = govee.device("kitchen", mode="lan")Parameters
Govee.device
| Name | Type | Required | Default |
|---|---|---|---|
target | str | required | — |
mode | str | None | optional | None |
const kitchen = govee.device('kitchen')
const overLan = govee.device('kitchen', { mode: 'lan' })Parameters
Govee.device
| Name | Type | Required | Default |
|---|---|---|---|
target | string | required | — |
options.mode | string | optional | — |
identify
Light each device in turn, so a person maps an identity to a fixture in the room.
govee.identify(Some(&["kitchen"][..]), &Walk::default(), &()).await?;Parameters
Govee::identify
| Name | Type | Required | Default |
|---|---|---|---|
targets | Option<&[T]> | optional | — |
walk | &Walk | required | — |
observer | &(dyn WalkObserver + Sync) | required | — |
DeviceHandle::identify
| Name | Type | Required | Default |
|---|---|---|---|
options | &Identify | required | — |
govee identify
govee identify H6159
govee identify 1C:8B:C4:A2:C0:46:64:6E kitchenParameters
govee identify
| Name | Type | Required | Default |
|---|---|---|---|
TARGET | TARGET… | optional | — |
--color | COLOR | optional | #00FF00 |
--wait-ms | MS | optional | 1000 |
--hold-ms | MS | optional | 5000 |
--keep | flag | optional | — |
await govee.identify("kitchen", hold=10)Parameters
Govee.identify
| Name | Type | Required | Default |
|---|---|---|---|
targets | str | Sequence[str] | None | optional | None |
color | Color | optional | (0, 255, 0) |
wait | float | optional | 1.0 |
hold | float | optional | 5.0 |
keep | bool | optional | False |
mode | str | optional | "lan" |
DeviceHandle.identify
| Name | Type | Required | Default |
|---|---|---|---|
color | Color | optional | (0, 255, 0) |
full_brightness | bool | optional | True |
await govee.identify('kitchen', { hold: 10 })Parameters
Govee.identify
| Name | Type | Required | Default |
|---|---|---|---|
targets | string | Array<string> | optional | — |
options.color | [number, number, number] | Uint8Array | optional | [0, 255, 0] |
options.wait | number | optional | 1 |
options.hold | number | optional | 5 |
options.keep | boolean | optional | false |
options.mode | string | optional | 'lan' |
DeviceHandle.identify
| Name | Type | Required | Default |
|---|---|---|---|
color | [number, number, number] | Uint8Array | optional | [0, 255, 0] |
fullBrightness | boolean | optional | true |
describe
Report what the device file declares for a model.
let spec = govee.device(&id, None)?.spec()?;govee describe DEVICEParameters
govee describe
| Name | Type | Required | Default |
|---|---|---|---|
TARGET | TARGET | required | — |
spec = govee.device(id).spec()const spec = govee.device(id).spec()status
Ask the device for its current state.
let state = device.status().await?;
let cached = device.last_status();govee status DEVICEParameters
govee status
| Name | Type | Required | Default |
|---|---|---|---|
DEVICE | DEVICE | required | — |
state = await device.status()
cached = device.last_status()const state = await device.status()
const cached = device.lastStatus()watch
Follow events: a device appears, a mode changes health.
let mut events = govee.events();
while let Ok(event) = events.recv().await {
println!("{event:?}");
}govee watch
govee watch --jsonParameters
govee watch
| Name | Type | Required | Default |
|---|---|---|---|
--rescan-ms | MS | optional | 0 |
async for event in govee.events():
print(event)for await (const event of govee.events()) {
console.log(event)
}doctor
Report everything wrong with the 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)
}Control a light
power
Turn the device on or off.
device.power(true).await?;Parameters
DeviceHandle::power
| Name | Type | Required | Default |
|---|---|---|---|
on | bool | required | — |
govee on DEVICE
govee off DEVICEParameters
govee on
| Name | Type | Required | Default |
|---|---|---|---|
DEVICE | DEVICE | required | — |
govee off
| Name | Type | Required | Default |
|---|---|---|---|
DEVICE | DEVICE | required | — |
await device.power(True)Parameters
DeviceHandle.power
| Name | Type | Required | Default |
|---|---|---|---|
on | bool | required | — |
await device.power(true)Parameters
DeviceHandle.power
| Name | Type | Required | Default |
|---|---|---|---|
on | boolean | required | — |
brightness
Set the brightness of the whole device.
device.brightness(40).await?;Parameters
DeviceHandle::brightness
| Name | Type | Required | Default |
|---|---|---|---|
level | i64 | required | — |
govee brightness DEVICE 40Parameters
govee brightness
| Name | Type | Required | Default |
|---|---|---|---|
DEVICE | DEVICE | required | — |
VALUE | VALUE | required | — |
await device.brightness(40)Parameters
DeviceHandle.brightness
| Name | Type | Required | Default |
|---|---|---|---|
level | int | required | — |
await device.brightness(40)Parameters
DeviceHandle.brightness
| Name | Type | Required | Default |
|---|---|---|---|
level | number | required | — |
color
Set one color for the whole device.
device.color([255, 61, 0]).await?;Parameters
DeviceHandle::color
| Name | Type | Required | Default |
|---|---|---|---|
rgb | [u8; 3] | required | — |
govee color DEVICE "#ff3d00"Parameters
govee color
| Name | Type | Required | Default |
|---|---|---|---|
DEVICE | DEVICE | required | — |
COLOR | COLOR | required | — |
await device.color((255, 61, 0))Parameters
DeviceHandle.color
| Name | Type | Required | Default |
|---|---|---|---|
rgb | Color | required | — |
await device.color([255, 61, 0])Parameters
DeviceHandle.color
| Name | Type | Required | Default |
|---|---|---|---|
rgb | [number, number, number] | Uint8Array | required | — |
color_temp
Set the white temperature, in kelvin.
device.color_temp(4000).await?;Parameters
DeviceHandle::color_temp
| Name | Type | Required | Default |
|---|---|---|---|
kelvin | i64 | required | — |
govee colortemp DEVICE 4000Parameters
govee colortemp
| Name | Type | Required | Default |
|---|---|---|---|
DEVICE | DEVICE | required | — |
KELVIN | KELVIN | required | — |
await device.color_temp(4000)Parameters
DeviceHandle.color_temp
| Name | Type | Required | Default |
|---|---|---|---|
kelvin | int | required | — |
await device.colorTemp(4000)Parameters
DeviceHandle.colorTemp
| Name | Type | Required | Default |
|---|---|---|---|
kelvin | number | required | — |
segment
Paint the zones.
device.segment(&Paint {
zones: None,
colors: &frame,
resolution: Resolution::default(),
gradient: false,
}).await?;Parameters
DeviceHandle::segment
| Name | Type | Required | Default |
|---|---|---|---|
paint | &Paint<'_> | required | — |
govee segment DEVICE "#ff3d00"
govee segment DEVICE --zones 0,1,2 "#ff3d00"Parameters
govee segment
| Name | Type | Required | Default |
|---|---|---|---|
DEVICE | DEVICE | required | — |
--zones | LIST | optional | — |
--resolution | RESOLUTION | optional | app |
COLORS | COLORS | required | — |
--gradient | flag | optional | — |
await device.segment(colors=frame)Parameters
DeviceHandle.segment
| Name | Type | Required | Default |
|---|---|---|---|
colors | Color | Sequence[Color] | bytes | required | — |
zones | Sequence[int] | None | optional | None |
resolution | Resolution | optional | "app" |
gradient | bool | optional | False |
await device.segment(frame)Parameters
DeviceHandle.segment
| Name | Type | Required | Default |
|---|---|---|---|
colors | [number, number, number] | Array<[number, number, number]> | Uint8Array | required | — |
zones | Array<number> | optional | — |
resolution | number | 'app' | 'native' | 'groups' | optional | 'app' |
gradient | boolean | optional | false |
gradient
Set whether the firmware interpolates between zones, without painting.
device.gradient(true).await?;Parameters
DeviceHandle::gradient
| Name | Type | Required | Default |
|---|---|---|---|
on | bool | required | — |
govee gradient DEVICE onParameters
govee gradient
| Name | Type | Required | Default |
|---|---|---|---|
DEVICE | DEVICE | required | — |
STATE | on | off | required | — |
await device.gradient(True)Parameters
DeviceHandle.gradient
| Name | Type | Required | Default |
|---|---|---|---|
on | bool | required | — |
await device.gradient(true)Parameters
DeviceHandle.gradient
| Name | Type | Required | Default |
|---|---|---|---|
on | boolean | required | — |
music
Play an effect the device renders from its own microphone.
device.music(&Music {
effect: 3,
sensitivity: 60,
soft: false,
color: None,
}).await?;Parameters
DeviceHandle::music
| Name | Type | Required | Default |
|---|---|---|---|
music | &Music | required | — |
govee music DEVICE 3 --sensitivity 60Parameters
govee music
| Name | Type | Required | Default |
|---|---|---|---|
DEVICE | DEVICE | required | — |
EFFECT | EFFECT | required | — |
--sensitivity | LEVEL | optional | 50 |
--soft | flag | optional | — |
--color | COLOR | optional | — |
await device.music(effect=3, sensitivity=60)Parameters
DeviceHandle.music
| Name | Type | Required | Default |
|---|---|---|---|
effect | int | required | — |
sensitivity | int | optional | 50 |
soft | bool | optional | False |
color | Color | None | optional | None |
await device.music(3, 60)Parameters
DeviceHandle.music
| Name | Type | Required | Default |
|---|---|---|---|
effect | number | required | — |
sensitivity | number | optional | 50 |
soft | boolean | optional | false |
color | [number, number, number] | Uint8Array | optional | — |
govee_toolkit::scenes::fetch("SKU").await?;
device.scene_named("Aurora").await?;Parameters
DeviceHandle::scene
| Name | Type | Required | Default |
|---|---|---|---|
scene | &Scene | required | — |
DeviceHandle::scene_named
| Name | Type | Required | Default |
|---|---|---|---|
query | &str | required | — |
govee scenes fetch SKU
govee scenes list SKU
govee scene DEVICE "Aurora"Parameters
govee scene
| Name | Type | Required | Default |
|---|---|---|---|
DEVICE | DEVICE | required | — |
SCENE | SCENE | required | — |
await fetch_scenes("SKU")
await device.scene("Aurora")Parameters
DeviceHandle.scene
| Name | Type | Required | Default |
|---|---|---|---|
scene | str | int | Scene | required | — |
await fetchScenes('SKU')
await device.scene('Aurora')Parameters
DeviceHandle.scene
| Name | Type | Required | Default |
|---|---|---|---|
scene | string | number | Scene | required | — |
device.draw(&Drawing {
cells: Some(&[0, 1, 2]),
colors: &[[255, 61, 0]],
resolution: Resolution::default(),
args: &Args::new(),
}).await?;Parameters
DeviceHandle::draw
| Name | Type | Required | Default |
|---|---|---|---|
drawing | &Drawing<'_> | required | — |
govee send DEVICE draw_cells --arg cells=0,1,2 --arg colors=ff3d00Parameters
govee send
| Name | Type | Required | Default |
|---|---|---|---|
DEVICE | DEVICE | required | — |
COMMAND | COMMAND | required | — |
--arg | NAME=VALUE… | optional | — |
await device.draw((255, 61, 0), cells=[0, 1, 2])Parameters
DeviceHandle.draw
| Name | Type | Required | Default |
|---|---|---|---|
colors | Color | Sequence[Color] | bytes | required | — |
cells | Sequence[int] | None | optional | None |
resolution | Resolution | optional | "app" |
args | dict[str, Arg] | None | optional | None |
await device.draw({ cells: [0, 1, 2], colors: [255, 61, 0] })Parameters
DeviceHandle.draw
| Name | Type | Required | Default |
|---|---|---|---|
drawing.cells | Array<number> | optional | — |
drawing.colors | [number, number, number] | Array<[number, number, number]> | Uint8Array | required | — |
drawing.resolution | number | 'app' | 'native' | 'groups' | optional | — |
drawing.args | Record<string, boolean | number | string | Uint8Array | Array<number> | Array<[number, number, number]>> | optional | — |
Animate the segmentsLAN
open_stream
Open the segment channel and keep it armed.
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?;Parameters
DeviceHandle::open_stream
| Name | Type | Required | Default |
|---|---|---|---|
options | StreamOptions | required | — |
# frames.txt: one frame per line, one color per zone.
govee stream DEVICE --resolution native < frames.txtParameters
govee stream
| Name | Type | Required | Default |
|---|---|---|---|
DEVICE | DEVICE | required | — |
--resolution | RESOLUTION | optional | app |
--rate | HZ | optional | — |
--gradient | flag | optional | — |
stream = await device.open_stream()
print(stream.zones, stream.rate_hz)
stream.set_zone(0, (255, 61, 0))
await stream.close()Parameters
DeviceHandle.open_stream
| Name | Type | Required | Default |
|---|---|---|---|
resolution | Resolution | optional | "app" |
rate | Rate | optional | "measured" |
gradient | bool | optional | False |
const stream = await device.openStream()
console.log(stream.zones, stream.rateHz)
stream.setZone(0, [255, 61, 0])
await stream.close()Parameters
DeviceHandle.openStream
| Name | Type | Required | Default |
|---|---|---|---|
resolution | number | 'app' | 'native' | 'groups' | optional | 'app' |
rate | number | 'measured' | optional | 'measured' |
gradient | boolean | optional | false |
set_zone
Set one zone of the stream.
stream.set_zone(7, [255, 61, 0])?;Parameters
SegmentStream::set_zone
| Name | Type | Required | Default |
|---|---|---|---|
index | usize | required | — |
color | [u8; 3] | required | — |
# One frame per line, one color per zone.
echo "000000,ff3d00,000000" | govee stream DEVICE --resolution 3stream.set_zone(7, (255, 61, 0))Parameters
SegmentStream.set_zone
| Name | Type | Required | Default |
|---|---|---|---|
index | int | required | — |
color | Color | required | — |
stream.setZone(7, [255, 61, 0])Parameters
SegmentStream.setZone
| Name | Type | Required | Default |
|---|---|---|---|
index | number | required | — |
color | [number, number, number] | Uint8Array | required | — |
set_all, fill and clear
Set every zone at once.
stream.set_all(&frame)?;
stream.fill([255, 61, 0])?;
stream.clear()?;Parameters
SegmentStream::set_all
| Name | Type | Required | Default |
|---|---|---|---|
colors | &[[u8; 3]] | required | — |
SegmentStream::fill
| Name | Type | Required | Default |
|---|---|---|---|
color | [u8; 3] | required | — |
govee segment DEVICE "#000000"stream.set_all(frame)
stream.fill((255, 61, 0))
stream.clear()Parameters
SegmentStream.set_all
| Name | Type | Required | Default |
|---|---|---|---|
colors | Sequence[Color] | bytes | required | — |
SegmentStream.fill
| Name | Type | Required | Default |
|---|---|---|---|
color | Color | required | — |
stream.setAll(frame)
stream.fill([255, 61, 0])
stream.clear()Parameters
SegmentStream.setAll
| Name | Type | Required | Default |
|---|---|---|---|
colors | Array<[number, number, number]> | Uint8Array | required | — |
SegmentStream.fill
| Name | Type | Required | Default |
|---|---|---|---|
color | [number, number, number] | Uint8Array | required | — |
close
Close the channel.
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()Drive a rig over DMXLAN
govee-dmx profile
Print the channel table of one model, to patch a desk with.
govee-dmx profile H6159
govee-dmx profile H6159 --personality segmentParameters
govee-dmx profile
| Name | Type | Required | Default |
|---|---|---|---|
SKU | SKU | required | — |
--personality | PERSONALITY | optional | — |
--json | flag | optional | — |
govee-dmx patch
Scan the LAN and write the patch the node runs from.
govee-dmx patch
govee-dmx patch --personality segment --universe 1
govee-dmx patch --dry-runParameters
govee-dmx patch
| Name | Type | Required | Default |
|---|---|---|---|
--patch | FILE | optional | — |
--personality | PERSONALITY | optional | full |
--universe | UNIVERSE | optional | 0 |
--reset | flag | optional | — |
--dry-run | flag | optional | — |
--config | CONFIG | optional | — |
--json | flag | optional | — |
govee-dmx identify
Light each patched fixture in turn, so a person reads the rig.
govee-dmx identify
govee-dmx identify --address 33
govee-dmx identify --universe 1
govee-dmx identify H6159 kitchenParameters
govee-dmx identify
| Name | Type | Required | Default |
|---|---|---|---|
TARGET | TARGET… | optional | — |
--universe | UNIVERSE | optional | — |
--address | CHANNEL | optional | — |
--patch | FILE | optional | — |
--color | COLOR | optional | #00FF00 |
--wait-ms | MS | optional | 1000 |
--hold-ms | MS | optional | 5000 |
--keep | flag | optional | — |
--config | CONFIG | optional | — |
--json | flag | optional | — |
govee-dmx run
Receive Art-Net on port 6454 and drive the patched devices.
govee-dmx run
govee-dmx run --scan
govee-dmx run --dry-run --debugParameters
govee-dmx run
| Name | Type | Required | Default |
|---|---|---|---|
--patch | FILE | optional | — |
--scan | flag | optional | — |
--personality | PERSONALITY | optional | full |
--universe | UNIVERSE | optional | 0 |
--dry-run | flag | optional | — |
--no-reset | flag | optional | — |
--debug | flag | optional | — |
--config | CONFIG | optional | — |
--json | flag | optional | — |
Raw commands and setup
send
Send one entry of the device file, by name.
device.send("brightness", &args).await?;
let reply = device.read("status", &args).await?;Parameters
DeviceHandle::send
| Name | Type | Required | Default |
|---|---|---|---|
command | &str | required | — |
args | &Args | required | — |
DeviceHandle::read
| Name | Type | Required | Default |
|---|---|---|---|
command | &str | required | — |
args | &Args | required | — |
govee send DEVICE brightness --arg level=40Parameters
govee send
| Name | Type | Required | Default |
|---|---|---|---|
DEVICE | DEVICE | required | — |
COMMAND | COMMAND | required | — |
--arg | NAME=VALUE… | optional | — |
await device.send("brightness", level=40)
reply = await device.read("status")Parameters
DeviceHandle.send
| Name | Type | Required | Default |
|---|---|---|---|
command | str | required | — |
**args | Arg | optional | — |
DeviceHandle.read
| Name | Type | Required | Default |
|---|---|---|---|
command | str | required | — |
**args | Arg | optional | — |
await device.send('brightness', { level: 40 })
const reply = await device.read('status')Parameters
DeviceHandle.send
| Name | Type | Required | Default |
|---|---|---|---|
command | string | required | — |
args | Record<string, boolean | number | string | Uint8Array | Array<number> | Array<[number, number, number]>> | optional | — |
DeviceHandle.read
| Name | Type | Required | Default |
|---|---|---|---|
command | string | required | — |
args | Record<string, boolean | number | string | Uint8Array | Array<number> | Array<[number, number, number]>> | optional | — |
device.provision_wifi(&credentials).await?;Parameters
DeviceHandle::provision_wifi
| Name | Type | Required | Default |
|---|---|---|---|
credentials | &WifiCredentials | required | — |
govee provision DEVICE --ssid my-networkParameters
govee provision
| Name | Type | Required | Default |
|---|---|---|---|
DEVICE | DEVICE | required | — |
--ssid | SSID | optional | — |
--password | PASSWORD | optional | — |
--open | flag | optional | — |
--utc-offset-hours | HOURS | optional | 0 |
--utc-offset-minutes | MINUTES | optional | 0 |
await device.provision_wifi("network name", "password")Parameters
DeviceHandle.provision_wifi
| Name | Type | Required | Default |
|---|---|---|---|
network | str | required | — |
password | str | required | — |
utc_offset_hours | int | optional | 0 |
utc_offset_minutes | int | optional | 0 |
await device.provisionWifi("network name", "password")Parameters
DeviceHandle.provisionWifi
| Name | Type | Required | Default |
|---|---|---|---|
network | string | required | — |
password | string | required | — |
utcOffsetHours | number | optional | 0 |
utcOffsetMinutes | number | optional | 0 |
Choose a mode
Restrict a command to one mode.
let mode = device.serving_mode()?;
let health = device.health(Mode::Lan);Parameters
DeviceHandle::health
| Name | Type | Required | Default |
|---|---|---|---|
mode | Mode | required | — |
govee on DEVICE --mode lanParameters
govee
| Name | Type | Required | Default |
|---|---|---|---|
--json | flag | optional | — |
--mode | lan | ble | cloud | optional | — |
--config | PATH | optional | — |
--env-file | PATH | optional | — |
--no-env | flag | optional | — |
mode = device.serving_mode()
health = device.health("lan")Parameters
DeviceHandle.health
| Name | Type | Required | Default |
|---|---|---|---|
mode | str | required | — |
const mode = device.servingMode()
const health = device.health('lan')Parameters
DeviceHandle.health
| Name | Type | Required | Default |
|---|---|---|---|
mode | string | required | — |