https://github.com/adamwojt/yee-cli
Simple Yeelight room control CLI written in Python. Control your lights from terminal.
https://github.com/adamwojt/yee-cli
cli home-automation iot light python terminal yeelight
Last synced: 5 months ago
JSON representation
Simple Yeelight room control CLI written in Python. Control your lights from terminal.
- Host: GitHub
- URL: https://github.com/adamwojt/yee-cli
- Owner: adamwojt
- License: mit
- Created: 2021-02-12T18:39:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-17T12:38:33.000Z (over 5 years ago)
- Last Synced: 2025-11-29T02:59:35.329Z (7 months ago)
- Topics: cli, home-automation, iot, light, python, terminal, yeelight
- Language: Python
- Homepage: https://github.com/adamwojt/yee-cli/
- Size: 36.1 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
=======
Yee CLI
=======
.. image:: https://brands.home-assistant.io/_/yeelight/logo.png
.. image:: https://img.shields.io/pypi/v/yee-cli.svg
:target: https://pypi.python.org/pypi/yee-cli
.. image:: https://github.com/adamwojt/yee-cli/workflows/ci/badge.svg?branch=master&event=push
:target: https://github.com/adamwojt/yee-cli/actions
.. image:: https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336
:target: https://timothycrosley.github.io/isort/
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
Simple Yeelight Room control CLI written in Python. Control your lights from terminal.
Installation
------------
.. code-block:: text
pip install yee-cli
Config
------
* Location: ``~/.yee_rooms``
* Format: ``JSON``
* Example:
.. code-block:: json
{
"office":[
"192.168.1.1",
"192.168.1.2"
],
"bedroom":[
"192.168.1.3",
"192.168.1.4"
]
}
* Config path can be also passed with ``-c`` flag or ``YEE_ROOM_CONFIG`` env variable
* To find bulb IPs use tools like ``nmap``, ``nutty`` or check on your `YeeLight app `_
Usage
-----
``yee [-c --config] [ROOM_NAME*] COMMAND [ARGS]...```
*\*Use room names from config*
**Example Usage:**
.. code-block:: text
yee bedroom on
yee bedroom dim 10
yee color_list
yee bedroom color indianred
... romance on !
**Commands:**
.. code-block:: text
color Set lights to given color.
color_list Available color list
dim Dim lights to level (1-100).
off Turn lights off.
on Turn lights on.
random_color Switch to random color.
toggle Toggle lights.
Troubleshooting
---------------
Connection Issues (make sure):
* IP addresses of bulbs in config are correct.
* LAN Control is ON (https://www.yeelight.com/faqs/lan_control).
* You are connected to same WIFI network as your bulbs.
Other:
* For more debug ideas visit https://github.com/skorokithakis/python-yeelight
* If your bulb IP addresses keep changing you may want to set static DHCP lease on your router.
Credits
-------
* Wouldn't be possible without `skorokithakis/python-yeelight `_.
* Uses `webcolors `_
* Uses `click `_
* Created with Cookiecutter_ and the `johanvergeer/cookiecutter-poetry`_ project template.
After writing almost all I realised that author of `python-yeelight `_ also wrote CLI. Check it out - it has different API / config and more features >>> `yeecli `_
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`johanvergeer/cookiecutter-poetry`: https://github.com/johanvergeer/cookiecutter-poetry