diff --git a/fhem/FHEM/31_HUEDevice.pm b/fhem/FHEM/31_HUEDevice.pm index cc5c7f8e7..d2c5d5121 100644 --- a/fhem/FHEM/31_HUEDevice.pm +++ b/fhem/FHEM/31_HUEDevice.pm @@ -22,62 +22,76 @@ use SetExtensions; use vars qw(%FW_webArgs); # all arguments specified in the GET my %hueModels = ( - LCT001 => {name => 'Hue Bulb' ,type => 'Extended color light' ,subType => 'extcolordimmer', - icon => 'hue_filled_white_and_color_e27_b22', }, - LCT002 => {name => 'Hue Spot BR30' ,type => 'Extended color light' ,subType => 'extcolordimmer', - icon => 'hue_filled_br30.svg', }, - LCT003 => {name => 'Hue Spot GU10' ,type => 'Extended color light' ,subType => 'extcolordimmer', - icon => 'hue_filled_gu10_par16', }, - LCT007 => {name => 'Hue Bulb V2' ,type => 'Extended color light' ,subType => 'extcolordimmer', - icon => 'hue_filled_white_and_color_e27_b22', }, - LLC001 => {name => 'Living Colors G2' ,type => 'Color light' ,subType => 'colordimmer', - icon => 'hue_filled_iris', }, - LLC005 => {name => 'Living Colors Bloom' ,type => 'Color light' ,subType => 'colordimmer', - icon => 'hue_filled_bloom', }, - LLC006 => {name => 'Living Colors Gen3 Iris' ,type => 'Color light' ,subType => 'colordimmer', - icon => 'hue_filled_iris', }, - LLC007 => {name => 'Living Colors Gen3 Bloom' ,type => 'Color light' ,subType => 'colordimmer', - icon => 'hue_filled_bloom', }, - LLC010 => {name => 'Hue Living Colors Iris' ,type => 'Color light' ,subType => 'colordimmer', - icon => 'hue_filled_iris', }, - LLC011 => {name => 'Hue Living Colors Bloom' ,type => 'Color light' ,subType => 'colordimmer', - icon => 'hue_filled_bloom', }, - LLC012 => {name => 'Hue Living Colors Bloom' ,type => 'Color light' ,subType => 'colordimmer', - icon => 'hue_filled_bloom', }, - LLC013 => {name => 'Disney Living Colors' ,type => 'Color light' ,subType => 'colordimmer', - icon => 'hue_filled_storylight', }, - LLC014 => {name => 'Living Colors Aura' ,type => 'Color light' ,subType => 'colordimmer', - icon => 'hue_filled_aura', }, - LLC020 => {name => 'Hue Go' ,type => 'Color light' ,subType => 'extcolordimmer', - icon => 'hue_filled_go', }, - LST001 => {name => 'Hue LightStrips' ,type => 'Color light' ,subType => 'colordimmer', - icon => 'hue_filled_lightstrip', }, - LST002 => {name => 'Hue LightStrips Plus' ,type => 'Extended color light' ,subType => 'extcolordimmer', - icon => 'hue_filled_lightstrip', }, - LWB001 => {name => 'Living Whites Bulb' ,type => 'Dimmable light' ,subType => 'dimmer', - icon => 'hue_filled_living_whites', }, - LWB003 => {name => 'Living Whites Bulb' ,type => 'Dimmable light' ,subType => 'dimmer', - icon => 'hue_filled_living_whites', }, - LWB004 => {name => 'Hue Lux' ,type => 'Dimmable light' ,subType => 'dimmer', - icon => 'hue_filled_white_and_color_e27_b22', }, - LWB006 => {name => 'Hue White' ,type => 'Dimmable light' ,subType => 'dimmer', - icon => 'hue_filled_white_and_color_e27_b22', }, - LWB007 => {name => 'Hue Lux' ,type => 'Dimmable light' ,subType => 'dimmer', - icon => 'hue_filled_white_and_color_e27_b22', }, - LWL001 => {name => 'LivingWhites Outlet' ,type => 'Dimmable plug-in unit' ,subType => 'dimmer', - icon => 'hue_filled_outlet', }, - - LLM001 => {name => 'Color Light Module' ,type => 'Extended color light' ,subType => 'extcolordimmer',}, + LCT001 => {name => 'Hue Bulb' ,type => 'Extended color light' ,subType => 'extcolordimmer', + gamut => 'B', icon => 'hue_filled_white_and_color_e27_b22', }, + LCT002 => {name => 'Hue Spot BR30' ,type => 'Extended color light' ,subType => 'extcolordimmer', + gamut => 'B', icon => 'hue_filled_br30.svg', }, + LCT003 => {name => 'Hue Spot GU10' ,type => 'Extended color light' ,subType => 'extcolordimmer', + gamut => 'B', icon => 'hue_filled_gu10_par16', }, + LCT007 => {name => 'Hue Bulb V2' ,type => 'Extended color light' ,subType => 'extcolordimmer', + gamut => 'B', icon => 'hue_filled_white_and_color_e27_b22', }, + LCT010 => {name => 'Hue Bulb V3' ,type => 'Extended color light' ,subType => 'extcolordimmer', + gamut => 'C', icon => 'hue_filled_white_and_color_e27_b22', }, + LCT011 => {name => 'Hue BR30' ,type => 'Extended color light' ,subType => 'extcolordimmer', + gamut => 'C', icon => 'hue_filled_br30.svg', }, + LCT014 => {name => 'Hue Bulb V3' ,type => 'Extended color light' ,subType => 'extcolordimmer', + gamut => 'C', icon => 'hue_filled_white_and_color_e27_b22', }, + LLC001 => {name => 'Living Colors G2' ,type => 'Color light' ,subType => 'colordimmer', + gamut => 'A', icon => 'hue_filled_iris', }, + LLC005 => {name => 'Living Colors Bloom' ,type => 'Color light' ,subType => 'colordimmer', + gamut => 'A', icon => 'hue_filled_bloom', }, + LLC006 => {name => 'Living Colors Gen3 Iris' ,type => 'Color light' ,subType => 'colordimmer', + gamut => 'A', icon => 'hue_filled_iris', }, + LLC007 => {name => 'Living Colors Gen3 Bloom' ,type => 'Color light' ,subType => 'colordimmer', + gamut => 'A', icon => 'hue_filled_bloom', }, + LLC010 => {name => 'Hue Living Colors Iris' ,type => 'Color light' ,subType => 'colordimmer', + gamut => 'A', icon => 'hue_filled_iris', }, + LLC011 => {name => 'Hue Living Colors Bloom' ,type => 'Color light' ,subType => 'colordimmer', + gamut => 'A', icon => 'hue_filled_bloom', }, + LLC012 => {name => 'Hue Living Colors Bloom' ,type => 'Color light' ,subType => 'colordimmer', + gamut => 'A', icon => 'hue_filled_bloom', }, + LLC013 => {name => 'Disney Living Colors' ,type => 'Color light' ,subType => 'colordimmer', + gamut => 'A', icon => 'hue_filled_storylight', }, + LLC014 => {name => 'Living Colors Aura' ,type => 'Color light' ,subType => 'colordimmer', + gamut => 'A', icon => 'hue_filled_aura', }, + LLC020 => {name => 'Hue Go' ,type => 'Color light' ,subType => 'extcolordimmer', + gamut => 'C', icon => 'hue_filled_go', }, + LST001 => {name => 'Hue LightStrips' ,type => 'Color light' ,subType => 'colordimmer', + gamut => 'A', icon => 'hue_filled_lightstrip', }, + LST002 => {name => 'Hue LightStrips Plus' ,type => 'Extended color light' ,subType => 'extcolordimmer', + gamut => 'C', icon => 'hue_filled_lightstrip', }, + LWB001 => {name => 'Living Whites Bulb' ,type => 'Dimmable light' ,subType => 'dimmer', + icon => 'hue_filled_living_whites', }, + LWB003 => {name => 'Living Whites Bulb' ,type => 'Dimmable light' ,subType => 'dimmer', + icon => 'hue_filled_living_whites', }, + LWB004 => {name => 'Hue Lux' ,type => 'Dimmable light' ,subType => 'dimmer', + icon => 'hue_filled_white_and_color_e27_b22', }, + LWB006 => {name => 'Hue Lux' ,type => 'Dimmable light' ,subType => 'dimmer', + icon => 'hue_filled_white_and_color_e27_b22', }, + LWB007 => {name => 'Hue Lux' ,type => 'Dimmable light' ,subType => 'dimmer', + icon => 'hue_filled_white_and_color_e27_b22', }, + LTW001 => {name => 'Hue A19 White Ambience', ,type => 'Color temperature light' ,subType => 'ctdimmer', + icon => 'hue_filled_white_and_color_e27_b22', }, + LTW004 => {name => 'Hue A19 White Ambience', ,type => 'Color temperature light' ,subType => 'ctdimmer', + icon => 'hue_filled_white_and_color_e27_b22', }, + LTW013 => {name => 'Hue GU10 White Ambience', ,type => 'Color temperature light' ,subType => 'ctdimmer', + icon => 'hue_filled_gu10_par16', }, + LTW014 => {name => 'Hue GU10 White Ambience', ,type => 'Color temperature light' ,subType => 'ctdimmer', + icon => 'hue_filled_gu10_par16', }, + LLM001 => {name => 'Color Light Module' ,type => 'Extended color light' ,subType => 'extcolordimmer', + gamut => 'B', }, LLM010 => {name => 'Color Temperature Module' ,type => 'Color temperature light' ,subType => 'ctdimmer', }, LLM011 => {name => 'Color Temperature Module' ,type => 'Color temperature light' ,subType => 'ctdimmer', }, LLM012 => {name => 'Color Temperature Module' ,type => 'Color temperature light' ,subType => 'ctdimmer', }, + LWL001 => {name => 'LivingWhites Outlet' ,type => 'Dimmable plug-in unit' ,subType => 'dimmer', + icon => 'hue_filled_outlet', }, - RWL020 => {name => 'Hue Dimmer Switch' ,type => 'ZLLSwitch' ,subType => 'sensor', - icon => 'hue_filled_hds', }, - RWL021 => {name => 'Hue Dimmer Switch' ,type => 'ZLLSwitch' ,subType => 'sensor', - icon => 'hue_filled_hds', }, - ZGPSWITCH => {name => 'Hue Tap' ,type => 'ZGPSwitch' ,subType => 'sensor', - icon => 'hue_filled_tap', }, + RWL020 => {name => 'Hue Dimmer Switch' ,type => 'ZLLSwitch' ,subType => 'sensor', + icon => 'hue_filled_hds', }, + RWL021 => {name => 'Hue Dimmer Switch' ,type => 'ZLLSwitch' ,subType => 'sensor', + icon => 'hue_filled_hds', }, + ZGPSWITCH => {name => 'Hue Tap' ,type => 'ZGPSwitch' ,subType => 'sensor', + icon => 'hue_filled_tap', }, 'FLS-H3' => {name => 'dresden elektronik FLS-H lp' ,type => 'Color temperature light' ,subType => 'ctdimmer',}, 'FLS-PP3' => {name => 'dresden elektronik FLS-PP lp' ,type => 'Extended color light' ,subType => 'extcolordimmer', }, @@ -95,6 +109,18 @@ my %hueModels = ( 'DM01' => {name => 'Busch-Jaeger ZigBee Light Link Dimmer', type => 'Dimmable light' ,subType => 'dimmer', }, ); +my %gamut = ( + A => { r => { hue => 0, x => 0.704, y => 0.296 }, + g => { hue => 100, x => 0.2151, y => 0.7106 }, + b => { hue => 184, x => 0.138, y => 0.08 }, }, + B => { r => { hue => 0, x => 0.675, y => 0.322 }, + g => { hue => 100, x => 0.409, y => 0.518 }, + b => { hue => 184, x => 0.167, y => 0.04 }, }, + C => { r => { hue => 0, x => 0.692, y => 0.308 }, + g => { hue => 100, x => 0.17, y => 0.7 }, + b => { hue => 184, x => 0.153, y => 0.048 }, }, +); + my %dim_values = ( 0 => "dim06%", 1 => "dim12%",