Simple shell utility to discover and control Yeelight Wifi Smart bulb
Please read the blog post for more details on this project.
Just copy the files in this repo to your linux machine, the utilities used by the code are shell, awk, netcat, arp - all of which should be bundled with your OS.
- Plug in the yeelight smart bulb
- Turn on the light switch
- Run ./configure-light.sh (if you already know the IP address of your smart bulb then write it to ip.list and skip to step 5)
- Wait till light-configure exits, confirm that it ended successfully (If not, try repeating steps 2 and 3)
- Run ./light.sh -h for options on how to control the bulb
light.sh [command] <color> -- utility to control Yeelight smart bulb over wifi
where command can have one of the following values:
on - turn on the light
off - turn off the light
color <color> - set the color to <color> where <color> is a color (red/blue/green/white and so on)
disco - turns on disco mode
sunrise - turns on sunrise mode
notify-blue - notification in blue color
notify-green - notification in green color
notify-red - notification in red color
brightness <level> - set brightness to <level> where <level> is an integer from 1 (dimmest) to 100 (brightest)
dim - dim brightness to level 10
undim - reset brightness to level 100
- Update the colors file with color name and hex codes to use more colors
- Allow for control of multple smart bulbs in the same network
- In case configure-light.sh finds zero devices try running nmap and try again
sudo nmap -sP 192.168.1.*