PLUGIN: Magic Home Wifi LED Control (Bulbs & RGBW strips)

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:

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

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:

[ul][li]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.[/li]
[li]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.[/li]
[li]These products do not (yet?) have the ability to smoothly transition from one manually specified color to another.[/li][/ul]

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

Changelog:

V1.2 - Initial Release - 2016-02-04

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

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.

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!

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?

[quote=“tyfoon, post:5, topic:191645”]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?[/quote]

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.

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

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!

same brand on amazon? not as cheap, but close.

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

[quote=“sammythebu11, post:10, topic:191645”]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[/quote]

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.

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

[quote=“sammythebu11, post:12, topic:191645”]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)[/quote]

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.

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.

Sorry, I haven’t tested it or done any tweaking for UI5.

Looks like the latest version of UI7 breaks this plugin, at least it stopped working for me. It looks like everything works except turning the devices on. That one is sort of important.

@Juppers I have noticed the same exact problem. The previous Beta didn’t work for me either, so I had to downgrade Vera to 7.19 in order to get my MagicHome LEDs to work again.

I turned on debug and it looks like the plugin is sending dim commands instead of switchpower commands for on, but sends the correct command for off. The new version probably has some restrictions on device types causing the issue, but I don’t knwo the plugin format well enough to know for sure.

50 06/25/17 20:04:52.416 luup_log:98: MagicHomeRGBW: DIMMING 0,128,128,0 to 100 <0x77f54320>
50 06/25/17 20:04:52.417 luup_log:98: MagicHomeRGBW: Dim calculations 1 <0x77f54320>
50 06/25/17 20:04:52.417 luup_log:98: MagicHomeRGBW: SLLT: RGBW_SET STATUS: 0,128,128,0 TARGET DIM: 100 TARGET RGBW: 0,128,128,0 <0x77f54320>

50 06/25/17 20:08:30.505 luup_log:98: MagicHomeRGBW: SWITCH STATUS CHANGE: GIVEN: 0 <0x77f54320>
50 06/25/17 20:08:30.506 luup_log:98: MagicHomeRGBW: Powering off! <0x77f54320>

I haven’t upgraded, so I haven’t run into this problem yet. I apologize that I haven’t fixed it as well.

It’s been about 16 months since I published the plugin. I’m sure some things have changed. For some reason I remember something about ‘on’ resulting in a dim setting of 100% (since that’s full ON). It worked this way previously (since it makes sense to me that anything dimmed > 0% is inherently ‘on’). If I need to throw a line in there for a SwitchPower call, that’s a pretty easy fix.

How are you controlling the bulbs? Are you using LUUP calls, or interacting with the device via the GUI/scenes?

Also, I’m in the process of packing & moving, so I will be unable to commit any significant time to the plugin at this time, but I’ll try.

Here’s how I control my outside garage lights using LUUP.

-- 181 is left light, 183 is right light
luup.call_action("urn:ceefin-mcvforum-com:serviceId:MagicHomeRGBW1","SetRGBW", { newRGBW = "0,0,0,255"}, 181)
luup.call_action("urn:ceefin-mcvforum-com:serviceId:MagicHomeRGBW1","SetRGBW", { newRGBW = "0,0,0,255"}, 183)
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue=1},181)
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue=1},183)

I think my intent in setting things up as they are, was so that the preferred color/dim levels could be set before sending the SwitchPower1 command.

I don’t do any interaction with these devices via scenes aside from running the luup code to make it to exactly what I need it to do.

Again, my apologies for the new version hiccup. I’m grateful that you guys are using the plugin and that you’ve gotten some enjoyment from my work. We’ll get it sorted out.

I typically interact with them with scenes and GUI/App. Mine are used as accent lighting for evenings, so they are typically turned on close to dark and go off a bit later. I’ll try LUUP calls to see if they will turn on with those.