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.

python -m venv venv
source venv/bin/activate
pip install casambi-web-controller

Execution

Run the executable command provided by the package.

yeelight-srv -p 9800

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.2.0.tar.gz (4.3 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.2.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yeelight_web_controller-0.2.0.tar.gz
  • Upload date:
  • Size: 4.3 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.2.0.tar.gz
Algorithm Hash digest
SHA256 0700efd47055f419a1a01e030b8d0a61b8ce02031f0c5455c7db9520b1d54944
MD5 70fc22950c5a4ad79c45e63a1931de75
BLAKE2b-256 35b7af28174d075c333a3a086a60701fd8409eb7cc69953c79f605629c80a7b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for yeelight_web_controller-0.2.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.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for yeelight_web_controller-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f98a271ed5114e1cc8fc60f33dd2405ed04fe5e99833e56a0794a35b12c7fe3
MD5 bc5965e600dcc84852b57333e96b931f
BLAKE2b-256 9ab7218295f0ee97c0659582117ba0c53eb8c274ba8e66f46c1feb438ed013fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for yeelight_web_controller-0.2.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