Skip to main content

Govee Local API

Upload Python Package

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

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

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

govee_local_api-3.0.0.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

govee_local_api-3.0.0-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

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

Hashes for govee_local_api-3.0.0.tar.gz
Algorithm Hash digest
SHA256 7066576fc3b0ef4f4c9c9fe18cfb0e0e02bd8b8c901a14c60ec9a1aadcfdb3fd
MD5 fed2c635d07c346ca60467b2f192ec17
BLAKE2b-256 9681ea8d2cc4b1ecd36f88fe5b401d7e20591d37b9c023909cd16d8e49f50c6c

See more details on using hashes here.

Provenance

The following attestation bundles were made for govee_local_api-3.0.0.tar.gz:

Publisher: deploy.yml on Galorhallen/govee-local-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file govee_local_api-3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for govee_local_api-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c12cc43ea5e573a056b5f6b9d017b94b0c486db7070c3f96f057d6ecf207b7d
MD5 7dde948ca941b7b765e76079ee944629
BLAKE2b-256 2491ab1557ee3fe96b1cab936626120448a8f99e45ef7c5ea9aff5fab2ef26c4

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page