Skip to main content

Using WIFI communication to control Yeelight-based home lighting system via HTTP GET.

Project description

Yeelight Web Controller

Using WIFI communication to control a Yeelight-based home lighting system via a web interface, run on local machines PC/Mac.

Prerequisites

  • Python 3.12 or higher.

Installation

Create a virtual environment, activate it, and install the yeelight-web-controller package using your preferred Python package manager.

Execution

Run the executable command provided by the package. Note: You can pass -p or --port to specify a custom web service port (default is 9800).

API Endpoints

1. Acquire device inventory

  • URL: /api/lights
  • Method: GET
  • Description: Returns a list of all available devices on the local network, including their IP address, hardware ID, model code, current color temperature (Kelvin), and brightness percentage.
  • Example: http://localhost:9800/api/lights

2. Configure light state

  • URL: /api/set
  • Method: GET
  • Parameters:
    • id (string): The specific hardware ID of the device.
    • temp (integer): The target color temperature in Kelvin.
    • brightness (float): The target brightness level from 0 to 1 (0 triggers power off, values between 0 and 1 trigger Moonlight Mode if supported, and 1 triggers 100% Normal Mode).
  • Description: Sequentially configures the color temperature and brightness level for the specified device with a 1-second linear transition.
  • Example: http://localhost:9800/api/set?id=0x000000002ce4355f&temp=4800&brightness=1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yeelight_web_controller-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

yeelight_web_controller-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file yeelight_web_controller-0.1.0.tar.gz.

File metadata

  • Download URL: yeelight_web_controller-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yeelight_web_controller-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6fb4d5ef530cacb0a2463ab7e1332694bba5d9fa02e7e93a78fd377ce2430ec2
MD5 7e020e4ab348da7c555d33cce9c155fa
BLAKE2b-256 7c6a455543b675349cb5ac67fecf900b321835adc5fba56ae7d1567575427c01

See more details on using hashes here.

Provenance

The following attestation bundles were made for yeelight_web_controller-0.1.0.tar.gz:

Publisher: python-publish.yml on dongnh/yeelight_webcontrol

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

File details

Details for the file yeelight_web_controller-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for yeelight_web_controller-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d10e94c2c1456a6fb8b887b8ae4d8552940e97227ac2e0e5866cf121f383e88
MD5 ad8f1699f65f528a64cf174a962ef8d2
BLAKE2b-256 ab32127c6fb9a1dd688d71f7c3b6245c802d938a7741fce9f1c64a9f442b534a

See more details on using hashes here.

Provenance

The following attestation bundles were made for yeelight_web_controller-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on dongnh/yeelight_webcontrol

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 Pingdom Monitoring Sentry Error logging StatusPage Status page