Simple python lib to interact with Xiaomi lamps [WIP]
To configure all your lamps, you need to download Yeelight app from App Store or Google Play. When you will be asked about region, choose Frankfurt.
(This is a region with a minimum latency, and unfortunately I also did not understand how to find out which region the user is in.)
Add all your lamps, and most importantly, give them recognizable short names without special characters, so it will be easier for you to control the lamps in the future.
Well done! You are ready to install the library and you can uninstall yeelight if you don't need it.
git clone https://github.com/mishailovic/lampa.py
cd lampa.py
pip3 install -r requirements.txt
python3 login.py
This script will automatically receive all your lamp's credentials, just follow the instructions in the terminal.
>>> import lampa
>>> lampa.toggle("bedside", "on") # ("bedside" is a name of my lamp which i configured in yeelight app.)
lamp turns on, hooray!
Comming soon!