sidoh / ledenet_api

An API for the LEDENET Magic UFO LED WiFi Controller
MIT License
45 stars 12 forks source link

Control WW(WarmWhite) interface #1

Closed Animeimp closed 8 years ago

Animeimp commented 8 years ago

The RGB section is working perfectly, do you still plan on adding the WW control section? To turn on the WarmWhite is string.char(113) string.char(35) string.char (148) and to turn off is string.char(113) string.char(35) string.char(149)

Turn off 0x71, 0x24, 0x95

Turn on 0x71, 0x23, 0x94

sidoh commented 8 years ago

No plans to myself, mainly because I don't have a WW strip to test with.

If you want to open up a PR, I'd be happy to take a look.

Animeimp commented 8 years ago

I'll have to read up on how to do a pull request. I have the documentation from the Chinese authors, which I will attach here as well. One way to test though is move one of your color connections to the W input, and it will come on at a full 255 when you turn the WW on/off. 4.WIFI RGBW bulb communication protocol.xls.zip

Animeimp commented 8 years ago

Sorry, that was the Chinese version - here is the english version. 3.WIFI CCT bulb communication protocol.xls.zip

adamkempenich commented 8 years ago

@Animeimp @sidoh I've gotten the WW working properly (and added support for the physical lightbulbs, as well as the Flux-branded LED bulbs, along with improving the code for @sidoh's other SmartThings integration project.). I can issue a PR (on both projects) and send a copy of the code, if you'd like.

sidoh commented 8 years ago

Happy to look at a PR.

adamkempenich commented 8 years ago

Thanks, @sidoh. I'll issue a PR in a few days after I get my code cleaned up and more readable.

AMVS2 commented 8 years ago

@Animeimp I'm trying to discover the protocol for my WiFi370 RGB controller, v3. The protocols are very similar to the link you posted above of the Chinese authors documentation (4. WIFI RGBW ....). Where were you able to find that file of documentation? Can you link me to that? Or, do they have an RGB protocol in english? Thank you!

adamkempenich commented 8 years ago

@AMVS2 I'd like to add support for the WiFi370 (and the downlight model), but I won't be able to get to it for a couple of weeks since I'm moving, currently. If you're interested, the device type is carried in byte 2 when a discovery request is sent—The documentation posted above refers to it as the "Device Name". I have yet to find documentation for the RGB-only device (so far), but if you find any and would be willing to share, it would help a ton!

Animeimp commented 8 years ago

That documentation came from the seller. The miLights are similar, but I'm not sure if they use the checksum or not.

Animeimp commented 8 years ago

Also, there is some of the API here - https://www.npmjs.com/package/rgb-led

sidoh commented 8 years ago

@Animeimp: For the sake of clarity, what links the documentation you're providing to the particular controller this project is designed to control? It certainly seems like there's some (maybe complete) overlap, but I'm not seeing a reference to this controller in either of these links. I'm curious to see the page you found the spreadsheet on if you have it handy.

sidoh commented 8 years ago

Added support for this in the v1.0 release.

mattjanssen commented 7 years ago

@Animeimp Do you think the Magic UFO can run all four channels (R + G + B + WW) all the same time?

api.update_color_data(red: 32, green: 64, blue: 128, warm_white: 192)

The fact that it's rated at 96W makes me think so. 2 amps * 4 channels * 12 volts = 96 watts.

sidoh commented 7 years ago

Yes, that should work.

aap82 commented 7 years ago

@mattjanssen I can confirm it does, but I recommend using an amplifier.