In this chapter I will explain how can we controll Easybulb/miLight using RaspberryPi. This is part of my Home Automation project.
Easybulb™ is smart bulb, energy-efficient, multicolour lights, which is all controlled by your iPhone, iPad, iPod Touch, Android phones and tablets.
The idea is simple. You have a controller that can act as a Access point or it can connect to an existing WiFi network. This controller can communicate wireless with led bulbs. Each controller can command up to 4 bulbs. There is not "preset" paring between a controller and bulbs, that means that if you buy additional bulbs you can pair with controller and start using.
What is cool about the controller is that it allows commands via network. You can find more information about the API here.
So let's start. First we need to install the library (the code is here):
# pip install ledcontroller
Based on this library I created a script that will allow you to control your lights bulb:
Open the script and update the ip address of the controller:
controller_ip = '12.23.1.12'
Save to update the IP address and you can start using it. How to use:
python lights.py -e "lights_on"
python lights.py -e "set_color" -a "yellow_orange"
python lights.py -e "set_brightness" -a 50
python lights.py -e "lights_off"
Just some examples that are enough for my setup. You can modify the script to fit your needs.
Congratz! Now you can turn on and off lights from your shell.
Comments
Please log in or sign up to comment.