Govee Local API
Please note that scene and segment support is still very experimental.
See SUPPORTED_DEVICES.md for the full list of known device models and their capabilities.
Requirements
- Python >= 3.11
- Govee Local API enabled. Refer to https://app-h5.govee.com/user-manual/wlan-guide
Installation
From your terminal, run
pip install govee-local-api
or
python3 -m pip install govee-local-api
Usage
Basic Usage
import asyncio
from govee_local_api import GoveeController
async def main():
# Simple single-interface setup
controller = GoveeController()
# Discover devices
devices = await controller.scan_devices()
# Control a device
if devices:
device = devices[0]
await device.turn_on()
await device.set_brightness(80)
await device.set_color(255, 0, 0) # Red
asyncio.run(main())
Multi-Interface Setup
For complex network environments with multiple interfaces:
# Multiple listening addresses (basic)
controller = GoveeController(
listening_addresses=["192.168.1.100", "10.0.0.100", "172.16.1.100"]
)
Network Mask Configuration
For precise subnet-aware device routing (recommended for enterprise/VLAN environments), embed the network mask directly in the address using CIDR or netmask notation:
# Precise subnet matching with embedded network masks
controller = GoveeController(
listening_addresses=[
"192.168.1.100/24", # Main LAN (CIDR)
"192.168.10.100/255.255.255.0", # IoT VLAN (dotted netmask)
"10.0.0.100/8" # Management network
]
)
Supported Network Mask Formats
- CIDR Notation:
192.168.1.100/24,10.0.0.100/8, etc. - Dotted Decimal:
192.168.1.100/255.255.255.0, etc. - No mask:
192.168.1.100(uses heuristic subnet matching) - Wildcard:
0.0.0.0(listens on all interfaces, no subnet matching)
Advanced Features
Device Discovery and Control
async def discover_and_control():
controller = GoveeController(
listening_addresses=["192.168.1.100/24", "192.168.10.100/24"]
)
# Scan for devices across all networks
devices = await controller.scan_devices()
# Filter devices by network
main_lan_devices = [d for d in devices if d.ip.startswith("192.168.1.")]
iot_vlan_devices = [d for d in devices if d.ip.startswith("192.168.10.")]
# Control devices on specific networks
for device in main_lan_devices:
await device.turn_on()
await device.set_brightness(50)
for device in iot_vlan_devices:
await device.turn_off()
Direct Device Control
# Control device by IP address (uses intelligent transport selection)
await controller.control_device("192.168.1.100", turn_on=True)
await controller.control_device("192.168.1.100", brightness=75)
await controller.control_device("192.168.1.100", color_rgb=(0, 255, 0))
Documentation
- Supported Devices - Auto-generated list of known device models and their capabilities
- Network Mask Configuration Guide - Comprehensive guide for multi-network setups
- API Reference - Full API documentation
Use Cases
- Home Networks: Simple single-interface setup
- Small Office: Multi-interface with heuristic matching
- Enterprise/VLAN: Network mask configuration for precise routing
- IoT Deployments: Isolated network segments with dedicated interfaces
- Multi-Building: Physically separated networks with same IP ranges
Metadata
Release files for govee-local-api 3.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| govee_local_api-3.0.1.tar.gz | 24.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| govee_local_api-3.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.5 kB
Release files / govee_local_api-3.0.1.tar.gz
| Download URL | govee_local_api-3.0.1.tar.gz |
|---|---|
| Size | 24.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe7c4d0cdc62a1b8aa04e48778f686136d27544250b09dd3a1a69be75cd24e9c
|
|
BLAKE2b-256 checksum How to use checksums |
ed04ad6d2839089bce7dceacdb57ae91c8a53e120ee788fb9efd9407101201fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / govee_local_api-3.0.1-py3-none-any.whl
| Download URL | govee_local_api-3.0.1-py3-none-any.whl |
|---|---|
| Size | 26.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34c793a33e99107c413b252ebf90587d28c19b431e86b3194dda9a6baf503a78
|
|
BLAKE2b-256 checksum How to use checksums |
155a7dc322496c364eeeb529519402f3a487910089a488c05d10dd9d2b37db78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency log