January 17, 2024 · 3 min read
Local Control for Yeelights using Home Assistant
Yeelights offer smart lighting solutions that can be controlled locally, enhancing privacy and user control. This guide explains how to enable local control for Yeelights without depending on external servers.
Step 1: Obtain Device Token
To begin local control setup, retrieve the device token for your Yeelight bulbs using the "Get_MiHome_devices_token" program from GitHub. Follow the repository instructions to get each device’s unique token.
Step 2: Find IP Addresses
Use the Mi Home app to locate your bulbs' IP addresses. Navigate to the devices section, select your Yeelight, and check the device details for the IP address. A bonus recommendation: assign static IPs to prevent configuration issues later.
Step 3: Install Python-miio
Install the required library with this command:
pip install python-miio
Step 4: Enable Developer Mode
Run this command, substituting your bulb's IP address and token:
miiocli yeelight --ip 192.168.x.x --token <token> set_developer_mode 1
Step 5: Add to Home Assistant
Navigate to devices in Home Assistant, add the Yeelight integration, and follow the on-screen prompts. Your bulb should auto-discover, or you can manually enter static IP addresses if configured.
Coming next: integrating this setup with Alexa for local control through Home Assistant.
Next
A Night Owl's Worst Nightmare: The Capitalistic Nightmare