Samstag, 6. Dezember 2014

WiFi RGB LED controller + FHEM + Pebble

Since I want more control over my heating, I looked into it and decided to give FHEM a try, but more on that later when I actually get the hardware etc. But while looking through some FHEM stuff, I came across WiFi controllers for RGB strips. In the past I already used a Raspberry Pi and a self made IR adapter, but that was rather crude and inefficient.

So I went to Amazon and bought the following:
NEUER LW-12 WIFI WLAN LED RGB STRIPS CONTROLLER für iPhone, iPad, iOS, Android 24V *Weiß*
and
Besdata 5m 500CM RGB 5050 300 SMD LED Strip Leiste Streifen + 44 Key Fernbedienung + Netzteil 12V 6A 72W- RGB - Wasserdicht - PL709A+EU

I recommend you to get a waterproof strip regardless where you install it, because it is easier and safer to install, since you can't get shocked. The normal ones are just open circuitry.

After installing the LED strip and the controller, I set up the controller and was able to control the light with my smartphone and tablet, which is already quite nice. But having to take out the phone and turning on the light is not as efficient as turning a switch.
 I also noticed another "feature" of the controller: It acts as a WiFi repeater. Therefore, it is extremely important to change the standard password of the built in AP, which is always the same. You can do that through the App or web interface. I haven't found a way to turn it off and also the channel selection doesn't work for me and always uses channel 13.

Connecting it to FHEM was rather easy. Download the latest  LW12 from here or WifiLight from here. Then put one or both into your fhem/FHEM folder.

After that just enter:
define your_chosen_name WifiLight RGB LW12:ip.to.your.controller
or
define your_chosen_name LW12 ip.to.your.controller  
For most cases LW12 should be better, since it is just for the LW12 and can use its back channel etc. You can also use them side by side.

 After that I can now control the light with nearly anything I want...

So I made an APP for my Pebble. You can find it here on Github.
If you want to use it, just import it to cloudpebble.net and change the vars etc. to fit into your network etc.

On my Pebble, I added my APP as a quick launch and now I just have to hold the up button and press it again to turn on the light, regardless where I am in the room.