treban / pimatic-tradfri

This plugin provides a tradfri interface for pimatic.
https://pimatic.org/plugins/pimatic-tradfri/
GNU General Public License v2.0
11 stars 3 forks source link

Feature request: color change homekit integration #9

Open sverrevh opened 7 years ago

sverrevh commented 7 years ago

This plugin for homebridge (https://github.com/szokeptr/homebridge-tradfri-plugin) supports colors in Homekit. According to https://github.com/michbeck100/pimatic-hap/issues/74#issuecomment-316126320 changes need to be made to this plugin first in order to get it working with the pimatic-HAP plugin.

treban commented 7 years ago

This plugin already has implemented color changing. I think a accessory definition in the homekit plugin is needed. I will check the homekit interface, change my plugin if needed and make a pull request to make it possible.

sverrevh commented 7 years ago

Homekit/Pimatic-HAP expects a color in Hue and Saturation: Starting here is the conversion code from XY to Hue/saturation/light and the other way around: https://github.com/szokeptr/homebridge-tradfri-plugin/blob/master/index.js#L3542

http://stackoverflow.com/a/9493060 http://stackoverflow.com/a/36061908

michbeck100 commented 7 years ago

The conversion however must be done in pimatic-hap. I will have a look into this.

sverrevh commented 7 years ago

This is actually now less of an issue when you let the gateway handle HomeKit directly, also makes more sense to do so.