Willing to send someone some free magiclight bulbs if they'll write a smartthings device handler


(Matthew Freestone) #1

I’m not a dev sadly, but if someone out there is willing to write a device handler for magiclight’s for smartthings…


(Robin) #2

Assuming you have the wifi model you’ll need a ‘connect’ app as well as a devive handler… I can’t help with either but I wish you luck.


(Matthew Freestone) #3

Thanks RobinWinWourne, I’m sure you’re correct.


(Matthew Freestone) #4

Also, for those who haven’t seen/used a magiclight, they are wifi based, very reliable AND best of all, they KEEP THEIR SETTINGS when used with a light switch. So, for example I have a sunrise/sunset smartthings setup for turning the switches on/off. Whatever color I set them to, they retain that setting even though they are losing power all day during the day. That alone makes them superior to everything else out there, they are nice and bright and reliable as well AND CHEAPER.


(Rob) #5

I’m not a good dev so I can’t help here but do you know if they have an open API so that I can use a raspberry pi to control them?
I’ve been looking for colored bulbs for my garage overhang that I can change for holidays. These look like a great option.


(Rob) #6

I found this - https://github.com/beville/flux_led

Seems interesting, I might have to buy one to play with to see if I can get it to work before buying the 4 I need.


(Matthew Freestone) #7

So I contacted MagicLight and they said they don’t have an API but they did provide me with the wifi protocol. Does that help anyone?


(Lisa Coleman) #8

I love these bulbs, how did you get it setup in SmartThings, please? Is it a virtual switch? My ST Hub doesn’t see them, do I need to wipe them, get them off wifi and start over with ST discovering them? I have them working with Alexa but got ST after I had been using these bulbs for years. Please and thank you for advice and direction :grinning:


(Matthew Freestone) #9

Sadly these don’t work with SmartThings, at least not that I’ve found. It will take someone creating a custom DTH and no one has done it yet.


(Michael Greene) #10

Any idea if there has been any traction here? I’ve already created device types for mFi switches and TPLink switches, and am tempted to make one for these since they’re so much cheaper, but obviously if someone already has I’d prefer to use an existing one.

With the lack of a full API I suspect there’s some protocol translation to be done, which I’ve also done with the mFi switches by using a Raspberry Pi as a middleman between the switches and SmartThings.


(Daniel Carter) #11

I’m looking too, so let me know if you create something or find anything.


(Matthew Freestone) #12

To my knowledge no, no one has created anything yet. :frowning:


(Gavin Melling) #13

Thought I’d have a look - the bulbs use UDP requests and responses, which SmartThings doesn’t support unfortunately.
Best bet would be to create a Raspberry Pi server application that translates REST requests into UDP and back again, but it’s not an insignificant amount of work to complete.


(Matthew Freestone) #14

The commands for MagicLight are done via UDP??? What are they smoking over there!?


(Michael Greene) #15

@Matthew_Freestone yeah, it’s all UDP. I’m using a Raspberry Pi server to translate REST to UDP for the TPLink devices, as @Gavin_Melling suggested. I suspect I could likely add another interface to that for Magic Light support, I just can’t decide if I really want to; though I love the idea of lower cost RGB bulbs. I ordered a couple of the officially supported Sylvania ones to try… looked like they were the cheapest of the officially supported ones, but they’re still basically 2x the cost of Magic Light.


(Matthew Freestone) #16

Well there’s an even bigger benefit to MagicLights over officially supported bulbs, and it’s that they retain their last setting even after power loss. So, you can use your normal light switches and have the bulb still turn on with the last setting you wanted. HUGE benefit the others don’t have. That’s my biggest reason for wanting to use Magic Lights.

I can’t understand why they would use UDP? UDP is best suited for streaming data, issuing commands is essentially what TCP was created for, why in the world would they use UDP??


(sidjohn1) #17

Lifx bulbs are officially supported by smartthings, are only $20 more, keep their settings during power loss, and from the specs their are better quality.

I’m one of the original Lifx Kickstarter backers and I have over 10 of them and I haven’t had a single failure. They are solid bulbs, I can’t recomend them enough. I know JD would say choice is good, and I agree but Lifx will get you where you want to go today.


(Matthew Freestone) #18

Really? Lifx bulbs retain settings after power loss??? I did not know this! Dang! Wish I had, would have bought them instead of the 4 MagicLight bulbs I have… Well, if they die I know what I’m replacing with…


(Chandler Newby) #19

From what I can tell from that wifi protocol .rar file @Matthew_Freestone provided, the bulbs only use UDP to set up their configuration. You could theoretically get them set up with the phone app, then run them with a custom device handler. You’d just have to find the IP address of the bulb and enter it into the settings of the device handler. If the bulb is constantly getting turned off and back on, it could be difficult to keep track of the IP. A static DHCP lease would probably solve that though.

I also found this repo with similar information: https://github.com/zoot1612/plugin_mh/blob/master/MH_Control