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: [url=http://www.amazon.com/dp/B00SIDVZSW/]http://www.amazon.com/dp/B00SIDVZSW/[/url]
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: [url=https://drive.google.com/open?id=0Bx7-gkmA-6mLZThrVXV3WTh2UUU]https://drive.google.com/open?id=0Bx7-gkmA-6mLZThrVXV3WTh2UUU[/url]

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: [url=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]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[/url]

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: [url=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]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[/url]

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.