This update makes many changes for use in conjunction with my updated SmartThings device type. It also adds support for bulbs and WW support on the Magic Home ("LEDeNet") UFO.
This PR includes the following changes:
[Removed] require Color. I've manually added color conversion code to handle the removal.
[Changed] IP handling. This method pulls a static IP from a SmartThings device's configuration as opposed to using the LEDeNet API to find the first LEDeNet device on a network (allows for multiple devices).
[Changed] On/Off handling now supports methods that pass [status] or [switch](some smart apps do this)
[Changed] Color handling now detects and changes color using HSV, H, S, V, or WW. Additionally, it detects which type of device is being handled to manage these colors for the device's specs.
[Changed] HTTP headers are sent back to ST for refreshing the device's state to match a bulb's settings (in case someone uses the app to update it, etc...)
[Changed] Previously, the gateway used HSL. It's been corrected to use HSV, now.
Notes:
Since the new SmartThings Device Type uses a multitile, it has a button for Warm White and Cool White. WW sends a hue of 16.6% and a saturation of ~27.45%. If these values are received, WW mode is enabled.
Bugs:
For some reason, the color #FFFFFF will actually change the color to #FF0000. I have an idea of why this happens, but have yet to fix it.
There are definitely more bugs... haven't found them all, though.
To-do:
Some bulbs accept a cool white value (I think?). If we receive #FFFFFF, CW should be enabled.
Add a mode to auto-detect the type of device at the assigned IP.
Add color fading.
Add support for RGB-only devices, or White-Only devices.
Let me know if you have any questions or requests. I'm actively working on this code to add new features, but wanted to get it sent over for you to take a look. Since this is meant to be used in conjunction with my updated SmartThings device type, feel free to take a look at that, as well.
This update makes many changes for use in conjunction with my updated SmartThings device type. It also adds support for bulbs and WW support on the Magic Home ("LEDeNet") UFO.
This PR includes the following changes:
Notes:
Bugs:
To-do:
Let me know if you have any questions or requests. I'm actively working on this code to add new features, but wanted to get it sent over for you to take a look. Since this is meant to be used in conjunction with my updated SmartThings device type, feel free to take a look at that, as well.