{"id":23006,"library":"yeelight","title":"Yeelight Python Library","description":"A Python library for controlling YeeLight RGB bulbs over local network using the Yeelight WiFi LED light protocol. Version 0.7.16 supports Python >=3.4, with active maintenance. Release cadence is irregular.","status":"active","version":"0.7.16","language":"python","source_language":"en","source_url":"https://github.com/skorokithakis/python-yeelight","tags":["yeelight","smart-bulb","wifi-light","home-automation"],"install":[{"cmd":"pip install yeelight","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Standard import path.","wrong":"","symbol":"Bulb","correct":"from yeelight import Bulb"},{"note":"Exception was renamed in early versions.","wrong":"from yeelight import YeeLightException","symbol":"BulbException","correct":"from yeelight import BulbException"}],"quickstart":{"code":"import yeelight\nimport os\n\nbulb_ip = os.environ.get('BULB_IP', '192.168.1.100')\nbulb = yeelight.Bulb(bulb_ip)\nbulb.turn_on()\nbulb.set_rgb(255, 0, 0)\nbulb.set_brightness(50)","lang":"python","description":"Connect to a bulb by IP and set color to red at 50% brightness."},"warnings":[{"fix":"Enable 'LAN Control' in Yeelight app under Settings -> LAN Control.","message":"Bulb must be on network and not in 'lan control' disabled mode. Yeelight app has a setting 'LAN Control' that must be enabled for the library to work.","severity":"gotcha","affected_versions":"all"},{"fix":"Avoid using music_mode; use standard commands.","message":"The 'music_mode' parameter and related methods are deprecated and may be removed in future versions.","severity":"deprecated","affected_versions":">=0.5.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Validate bulb IP and ensure LAN control enabled. Use `yeelight.discover_bulbs()` to find bulbs.","cause":"Bulb is not discoverable or IP incorrect.","error":"yeelight.Bulb('192.168.1.100').turn_on()"},{"fix":"Check network connectivity, disable firewall for local network, and ensure bulb firmware supports the command.","cause":"Bulb unreachable, possibly due to firewall or bulb not supporting command.","error":"yeelight.main.BulbException: Bulb did not respond"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}