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.9
- 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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file govee_local_api-3.0.0.tar.gz.
File metadata
- Download URL: govee_local_api-3.0.0.tar.gz
- Upload date:
- Size: 24.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7066576fc3b0ef4f4c9c9fe18cfb0e0e02bd8b8c901a14c60ec9a1aadcfdb3fd
|
|
| MD5 |
fed2c635d07c346ca60467b2f192ec17
|
|
| BLAKE2b-256 |
9681ea8d2cc4b1ecd36f88fe5b401d7e20591d37b9c023909cd16d8e49f50c6c
|
Provenance
The following attestation bundles were made for govee_local_api-3.0.0.tar.gz:
Publisher:
deploy.yml on Galorhallen/govee-local-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
govee_local_api-3.0.0.tar.gz -
Subject digest:
7066576fc3b0ef4f4c9c9fe18cfb0e0e02bd8b8c901a14c60ec9a1aadcfdb3fd - Sigstore transparency entry: 2345444045
- Sigstore integration time:
-
Permalink:
Galorhallen/govee-local-api@29424b17114ca56c7047d6bdfeab0c794d492ae5 -
Branch / Tag:
refs/tags/v3.0.0 - Owner: https://github.com/Galorhallen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@29424b17114ca56c7047d6bdfeab0c794d492ae5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file govee_local_api-3.0.0-py3-none-any.whl.
File metadata
- Download URL: govee_local_api-3.0.0-py3-none-any.whl
- Upload date:
- Size: 26.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c12cc43ea5e573a056b5f6b9d017b94b0c486db7070c3f96f057d6ecf207b7d
|
|
| MD5 |
7dde948ca941b7b765e76079ee944629
|
|
| BLAKE2b-256 |
2491ab1557ee3fe96b1cab936626120448a8f99e45ef7c5ea9aff5fab2ef26c4
|
Provenance
The following attestation bundles were made for govee_local_api-3.0.0-py3-none-any.whl:
Publisher:
deploy.yml on Galorhallen/govee-local-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
govee_local_api-3.0.0-py3-none-any.whl -
Subject digest:
1c12cc43ea5e573a056b5f6b9d017b94b0c486db7070c3f96f057d6ecf207b7d - Sigstore transparency entry: 2345444065
- Sigstore integration time:
-
Permalink:
Galorhallen/govee-local-api@29424b17114ca56c7047d6bdfeab0c794d492ae5 -
Branch / Tag:
refs/tags/v3.0.0 - Owner: https://github.com/Galorhallen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@29424b17114ca56c7047d6bdfeab0c794d492ae5 -
Trigger Event:
release
-
Statement type: