Author Topic: PLUGIN: Magic Home Wifi LED Control (Bulbs & RGBW strips)  (Read 7302 times)

Offline ceefin

  • Full Member
  • ***
  • Posts: 113
  • Karma: +5/-0
PLUGIN: Magic Home Wifi LED Control (Bulbs & RGBW strips)
« on: March 17, 2016, 02:48:09 pm »
Magic Home Wifi LED Control

Supported Devices: Magic Home RGBW Wifi bulbs and the Magic Home UFO Wifi RGBW LED strip controller

Only tested/developed on UI7!

Bulbs: http://www.amazon.com/dp/B00SIDVZSW/
LED Controller: http://www.amazon.com/dp/B00MDKOSN0/

Features:
  • LUUP interface for changing lighting parameters based on scene needs
  • Device control via device detail panel
  • Support for built-in animation modes
  • Luup code examples specially tailored to each device
  • Dimming based on color code (set color code, then use dimming slider/luup call to set proportional brightness)
  • Set bulb/color settings before turning LEDs on
  • Etc...

Thanks to Rexbeckett for his MilightRGBW plugin that I used to climb my way up the learning curve with. I used a bit of the structure of his plugin and modified it to support the added functionality that the Magic Home bulbs have. This is my first plugin, and I look forward to helping others use it to expand their lighting options.

Known limitations:
  • The bulbs do not behave the same as the RGBW strips. W channel cannot be used concurrently w/ RGB in the bulbs. Had to build in a few different commands to deal with this.
  • Timer / alarm functionality of the system not built into the plugin. This can be handled using scenes; no need for me to duplicate that functionality.
  • These products do not (yet?) have the ability to smoothly transition from one manually specified color to another.

Documentation: https://drive.google.com/open?id=0Bx7-gkmA-6mLZThrVXV3WTh2UUU

Changelog:

V1.2 - Initial Release - 2016-02-04
« Last Edit: March 17, 2016, 08:17:15 pm by ceefin »

Offline jasonatepaint

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: PLUGIN: Magic Home Wifi LED Control (Bulbs & RGBW strips)
« Reply #1 on: April 14, 2016, 01:07:56 am »
Thanks for creating this plugin!  I've been using it for the last few months with the MagicLight RGBWW 10-watt wifi bulb with great success. The only complaint of the bulb (not the plugin) is that there is no built in functionality that dims the light on and off (like most standard dimmer modules).

Can you confirm that the RGBW Magic UFO - WiFi Controller (which you mentioned in another post -- right as you were creating the plugin) dims up/down when turned on/off?

I have a Fibaro RGBW controller and it's great but it's pricy, so I was looking for alternative options.

Thanks again!
Jason

Offline ceefin

  • Full Member
  • ***
  • Posts: 113
  • Karma: +5/-0
Re: PLUGIN: Magic Home Wifi LED Control (Bulbs & RGBW strips)
« Reply #2 on: April 15, 2016, 08:05:50 pm »
Yay! It's useful for someone else!!  ;D

So the Magic UFO, as best I can recall, does not have a fade on/off process. It really is just kind of a binary on or off, as best I can remember. Mine is currently packed up as we are going to move soon, so I can't test it.

It's possible to code a fade sequence using the dimmer commands already built into the plugin. I'm not sure of the processing overhead this would incur on the vera side, though. The fade would probably be a little choppy, to boot.

Similarly, I did some thinking on a way to code a fade sequence from one RGBW code to another but didn't get anywhere on implementing it prior to my initial release.

I came to the Magic UFO also after evaluating the Fibaro controller. I couldn't shell out that kind of money for a single lighting installation and an amazon reviewer pointed me toward the UFO. I had to figure out the API a bit, but in the end it wasn't too bad.

Offline jasonatepaint

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: PLUGIN: Magic Home Wifi LED Control (Bulbs & RGBW strips)
« Reply #3 on: April 17, 2016, 02:28:16 am »
Hmmmm. With my Magic 10-watt bulb, there is no way to fade the white LED. Setting a load level, causes the bulb to essentially turn off and then on to the new level.  I wrote code to test this and it does the same thing, flicking on and off on each new value. You can do it with the RGB side of the lamp, but it's not smooth at all.

I was hoping that since the LED strip controller allows use of both RBG and W at the same time, that fading could be supported (or coded) to fade on/off. 

It's unfortunate that I got a taste of the Fibaro already...  I may order a Magic controller and see what I can do. I'll see if fading is worth $80 a controller, if it doesn't work out.  ;D

Thanks again!

Offline tyfoon

  • Full Member
  • ***
  • Posts: 164
  • Karma: +0/-0
Re: PLUGIN: Magic Home Wifi LED Control (Bulbs & RGBW strips)
« Reply #4 on: June 28, 2016, 04:03:37 pm »
There are now a few very cheap led wifi controllers that can be controlled via de 'Magichome' app. This is an example at Banggood: http://www.banggood.com/ARILUX-AL-LC01-Super-Mini-LED-WIFI-Smart-RGB-Controller-For-RGB-LED-Strip-Light-DC-9-12V-p-1058603.html

All works fine via de Magichome app but after entering the IP number in the advanced setting (the plugin actually pulls the correct MAC address so I know there is communication) the Plugin still compliants that the IP address is not entered.

I have also set the setting in the app to 'open' so it can be controlled external.

Any tips?

Offline ceefin

  • Full Member
  • ***
  • Posts: 113
  • Karma: +5/-0
Re: PLUGIN: Magic Home Wifi LED Control (Bulbs & RGBW strips)
« Reply #5 on: June 28, 2016, 04:16:13 pm »
There are now a few very cheap led wifi controllers that can be controlled via de 'Magichome' app. This is an example at Banggood: http://www.banggood.com/ARILUX-AL-LC01-Super-Mini-LED-WIFI-Smart-RGB-Controller-For-RGB-LED-Strip-Light-DC-9-12V-p-1058603.html

All works fine via de Magichome app but after entering the IP number in the advanced setting (the plugin actually pulls the correct MAC address so I know there is communication) the Plugin still compliants that the IP address is not entered.

I have also set the setting in the app to 'open' so it can be controlled external.

Any tips?

I haven't seen this controller prior to today. I need to install some LEDs, and this is even cheaper than the Magic UFO!

I'll admit that I haven't used the plugin in a while as I've been moving and we had a baby just after I published it. I do have a need to setup a few new lightbulbs to use it, so let me tinker with it and see if there's anything I need to tweak/fix.

Thank you for letting me know, and I'll let you know if I come up with anything.

Offline tyfoon

  • Full Member
  • ***
  • Posts: 164
  • Karma: +0/-0
Re: PLUGIN: Magic Home Wifi LED Control (Bulbs & RGBW strips)
« Reply #6 on: June 29, 2016, 02:09:12 pm »
This actually started working! Did not change anything , maybe it needed more time to get all the info. Let's see if it keeps working

For 8 euros not a bad investment for not critical uses!

Thanks for your work

Offline Panos81

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: PLUGIN: Magic Home Wifi LED Control (Bulbs & RGBW strips)
« Reply #7 on: October 30, 2016, 01:16:03 pm »
Hello,
i have a 5 channel controller RGBWW that uses the MagicHome app.
my problem is that the app has only 6 timers, and i need much more because i use it for the lights of an aquarium.
i am in the controller settings, in the uprgate software section, and i need a file for the update.
how can i make such a file? can i use something from that post?

all these are not very familiar to me, can someone help, please?

Thank you!

Offline tomgru

  • Hero Member
  • *****
  • Posts: 1402
  • Karma: +18/-6
Re: PLUGIN: Magic Home Wifi LED Control (Bulbs & RGBW strips)
« Reply #8 on: October 31, 2016, 09:49:35 am »
same brand on amazon?  not as cheap, but close.

https://www.amazon.com/dp/B01JZ2SI6Q?psc=1

Offline sammythebu11

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: PLUGIN: Magic Home Wifi LED Control (Bulbs & RGBW strips)
« Reply #9 on: December 08, 2016, 07:03:25 pm »
Thanks for the plugin!
I have two UFO controllers, do I have a way to differentiate them in the LUUP call? for example, I want one controller to turn on in a certain color and the other one in a different one. is there a way to do this?

Thanks,

Sam

Offline ceefin

  • Full Member
  • ***
  • Posts: 113
  • Karma: +5/-0
Re: PLUGIN: Magic Home Wifi LED Control (Bulbs & RGBW strips)
« Reply #10 on: December 09, 2016, 06:05:33 pm »
Thanks for the plugin!
I have two UFO controllers, do I have a way to differentiate them in the LUUP call? for example, I want one controller to turn on in a certain color and the other one in a different one. is there a way to do this?

Thanks,

Sam

Absolutely - you create a device for each controller in the plugin's detail page. Setup each with the appropriate IP, then you can send commands to them independently.

Offline sammythebu11

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: PLUGIN: Magic Home Wifi LED Control (Bulbs & RGBW strips)
« Reply #11 on: December 14, 2016, 09:10:39 am »
Thanks Ceefin,

I have created the two devices and can control them with a scene, I just can't get the luup code to set the color.
here is what I am using in the luip code:

luup.call_action("urn:ceefin-mcvforum-com:serviceId:MagicHomeRGBW1","SetMode", { newMode= 51},133)
luup.call_action("urn:ceefin-mcvforum-com:serviceId:MagicHomeRGBW1","SetSpeed", { newSpeed= 15},133)

Thanks,

Sam

Offline ceefin

  • Full Member
  • ***
  • Posts: 113
  • Karma: +5/-0
Re: PLUGIN: Magic Home Wifi LED Control (Bulbs & RGBW strips)
« Reply #12 on: December 23, 2016, 08:15:35 am »

luup.call_action("urn:ceefin-mcvforum-com:serviceId:MagicHomeRGBW1","SetMode", { newMode= 51},133)
luup.call_action("urn:ceefin-mcvforum-com:serviceId:MagicHomeRGBW1","SetSpeed", { newSpeed= 15},133)


These two commands tell it to start the blue strobe mode (newMode=51), and pulse it.

If you want to be able to set the RGB color, you need this one..

luup.call_action("urn:ceefin-mcvforum-com:serviceId:MagicHomeRGBW1","SetRGBW", { newRGBW = "255,255,255,255"}, 133)

This sets an RGBW strip to all colors lit (full white mode). The format is RRR,GGG,BBB,WWW. You can find the color code you want by playing in the ios app and then copying what numbers that uses into the above luup call.

Other modes are available, scroll down in the instructions tab and you'll see them listed.. in the event you want to have it fade red/green for the holidays or something.

Hope that helps, and sorry it took a bit for me to get back to you.

Offline dannieboiz

  • Sr. Member
  • ****
  • Posts: 381
  • Karma: +1/-2
Re: PLUGIN: Magic Home Wifi LED Control (Bulbs & RGBW strips)
« Reply #13 on: March 18, 2017, 02:58:46 pm »
Has anyone gotten this to work in UI5? It installed fine but the device wouldn't open and it doesn't display in the device dashboard for me.

Offline ceefin

  • Full Member
  • ***
  • Posts: 113
  • Karma: +5/-0
Re: PLUGIN: Magic Home Wifi LED Control (Bulbs & RGBW strips)
« Reply #14 on: March 18, 2017, 09:40:55 pm »
Sorry, I haven't tested it or done any tweaking for UI5.