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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0700efd47055f419a1a01e030b8d0a61b8ce02031f0c5455c7db9520b1d54944
|
|
| MD5 |
70fc22950c5a4ad79c45e63a1931de75
|
|
| BLAKE2b-256 |
35b7af28174d075c333a3a086a60701fd8409eb7cc69953c79f605629c80a7b5
|
Provenance
The following attestation bundles were made for yeelight_web_controller-0.2.0.tar.gz:
Publisher:
python-publish.yml on dongnh/yeelight_webcontrol
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yeelight_web_controller-0.2.0.tar.gz -
Subject digest:
0700efd47055f419a1a01e030b8d0a61b8ce02031f0c5455c7db9520b1d54944 - Sigstore transparency entry: 978047235
- Sigstore integration time:
-
Permalink:
dongnh/yeelight_webcontrol@96d13cebf970db43f94b4409763b93b17e6cc08f -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dongnh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@96d13cebf970db43f94b4409763b93b17e6cc08f -
Trigger Event:
release
-
Statement type:
File details
Details for the file yeelight_web_controller-0.2.0-py3-none-any.whl.
File metadata
- Download URL: yeelight_web_controller-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.9 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 |
1f98a271ed5114e1cc8fc60f33dd2405ed04fe5e99833e56a0794a35b12c7fe3
|
|
| MD5 |
bc5965e600dcc84852b57333e96b931f
|
|
| BLAKE2b-256 |
9ab7218295f0ee97c0659582117ba0c53eb8c274ba8e66f46c1feb438ed013fa
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yeelight_web_controller-0.2.0-py3-none-any.whl -
Subject digest:
1f98a271ed5114e1cc8fc60f33dd2405ed04fe5e99833e56a0794a35b12c7fe3 - Sigstore transparency entry: 978047309
- Sigstore integration time:
-
Permalink:
dongnh/yeelight_webcontrol@96d13cebf970db43f94b4409763b93b17e6cc08f -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dongnh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@96d13cebf970db43f94b4409763b93b17e6cc08f -
Trigger Event:
release
-
Statement type: