Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


ChildrenOfHue 1.14

   (0 reviews)

1 Screenshot

About This File

It's a "simple" QA that relies on the QuickAppChildren to realise the Hue devices.

This means that the user interfaces are limited to what are supported by the child app classes.

Supported Hue device classes:

 

ZLLSwitch.

Hue switch with 4 buttons. Creates centralSceneEvents similar to a Fibaro keyFob (com.fibaro.remoteController)

The interpretation is

     keyId = hueKeyValue // 1000

     keyAttribute = ({"Pressed","HeldDown","Released","Released"})[hueKeyValue % 1000 +1]

It also supports setValue('value',value) to simulate a key press.

 

ZLLTemperature.

Hue temperature sensor. Behaves like a standard fibaro.com.temperatureSensor.

 

ZLLLightLevel.

Hue light sensor. Behaves like a standard fibaro.com.lightSensor.

The device quickAppVariables  'daylight' and 'dark' is updated with resp. Hue attribute.

 

ZLLPresence

Hue presence sensor. Behaves like a standard fibaro.com.motionSensor.

 

Extended color light

Hue RGB light. Behaves like a fibaro.com.philipsHueLight.

supports:

fibaro.call(<id>,"turnOn")

fibaro.call(<id>,"turnOff")

fibaro.call(<id>,"toggle")

fibaro.call(<id>,"setValue",value)                   -- dim value 0..100

   If the value is a table the value is sent directly to the Hue light as a Hue property table. 

  Ex. fibaro.call(<id>,"setValue",{effect='colorloop',bri=50})

        fibaro.call(<id>,"setValue",{startup={customsettings={xy={0.73500005089041,0.26499994910959}}}})

fibaro.call(<id>,"setColor",red, green,blue).  -- color 0..255

fibaro.call(<id>,"changeBrightness")             -- brightness 0..255

fibaro.call(<id>,"changeHue")                        -- 0..65535

fibaro.call(<id>,"changeSaturation")              -- 0..255

fibaro.call(<id>,"startLevelIncrease")

fibaro.call(<id>,"startLevelDecrease")

fibaro.call(<id>,"stopLevelChange")

fibaro.call(<id>,"toggleDim",<boolean>) -- Toggle dim direction. true with 'stop'

The device quickAppVariable  'state' is updated with the Hue state

 

Dimmable light

Hue dimmable white light. Behaves like a fibaro.com.multilevelSwitch.

supports:

fibaro.call(<id>,"turnOn")

fibaro.call(<id>,"turnOff")

fibaro.call(<id>,"toggle")

fibaro.call(<id>,"setValue",value)                   --- dim value 0..100

   If the value is a table the value is sent directly to the Hue light as a Hue property table. 

fibaro.call(<id>,"changeBrightness")             -- brightness 0..255

fibaro.call(<id>,"startLevelIncrease")

fibaro.call(<id>,"startLevelDecrease")

fibaro.call(<id>,"stopLevelChange")

fibaro.call(<id>,"toggleDim",<boolean>) -- Toggle dim direction. true with 'stop'

The device quickAppVariable  'state' is updated with the Hue state

 

Color temperature light

Mapped as a Dimmable light

 

Color light

Hue color light. Behaves like a fibaro.com.colorController.

supports:

fibaro.call(<id>,"turnOn")

fibaro.call(<id>,"turnOff")

fibaro.call(<id>,"toggle")

fibaro.call(<id>,"setValue",value)                   --- dim value 0..100

   If the value is a table the value is sent directly to the Hue light as a Hue property table. 

fibaro.call(<id>,"setColor",red, green,blue).  -- color 0..255

fibaro.call(<id>,"changeBrightness")             -- brightness 0..255

fibaro.call(<id>,"startLevelIncrease")

fibaro.call(<id>,"startLevelDecrease")

fibaro.call(<id>,"stopLevelChange")

The device quickAppVariable  'state' is updated with the Hue state

fibaro.call(<id>,"toggleDim",<boolean>) -- Toggle dim direction. true with 'stop'

 

Room

Hue light group. 

Behaves like a fibaro.com.multilevelSwitch.

fibaro.call(<id>,"turnOn")

fibaro.call(<id>,"turnOff")

fibaro.call(<id>,"toggle")

fibaro.call(<id>,"setValue",value)                   --- dim value 0..100

   If the value is a table the value is sent directly to the Hue group as a Hue property table. 

fibaro.call(<id>,"changeBrightness")             -- brightness 0..255

fibaro.call(<id>,"startLevelIncrease")

fibaro.call(<id>,"startLevelDecrease")

fibaro.call(<id>,"stopLevelChange")

fibaro.call(<id>,"setScene",<Hue scene ID or scene name>)

fibaro.call(<id>,"toggleDim",<boolean>) -- Toggle dim direction. true with 'stop'

 

Hue CLIPS devices

CLIPPresence          => com.fibaro.motionSensor          class='ZLLPresence'
CLIPTemperature.   => com.fibaro.temperatureSensor class='ZLLTemperature'
CLIPPressure           => com.fibaro.binarySwitch           class='BinarySwitch'
CLIPHumidity           => com.fibaro.humiditySensor.      class='Humidity'
CLIPOpenClose.      => com.fibaro.binarySensor.          class='BinarySensor'

 

 

The startLevelIncrease, startLevelDecrease, and stopLevelChange makes it possible to bind a remote controller that support centralSceneEvent to dim when a button is held down and stop dimming when the button is released.

 

The lights store their Hue values in a quickAppVariable 'state'.

This can be retrieved like below and ex. used to set default startup values for Hue lights...

local function getVar(id,name)
  local vars = api.get("/devices/"..id).properties.quickAppVariables or {}
  for _,v in ipairs(vars) do
    if v.name==name then return v.value end
  end
end

function QuickApp:main()
   state = getVar(1435,"state")                              -- retrieve current color
   fibaro.call(1435,{startup={customsettings={xy=state.xy}}) -- set as default startup
end

 

  • Like 2
  • Thanks 1
 Share


Other Files from jgab


User Feedback

Recommended Comments

Hi @jgab,

I am looking at your QA with a lot of interest and try to get an understanding if it is possible to command the Color Temperature of a White Ambiance bulb? Form what I see, we can control brightness (fibaro.call(ID, "changeBrightness", value) but cannot find any command to control the Color Temperature. Do you know it this is possible to do?

Thanks a lot for the help

Link to comment
Share on other sites

21 hours ago, AntoineF said:

Hi @jgab,

I am looking at your QA with a lot of interest and try to get an understanding if it is possible to command the Color Temperature of a White Ambiance bulb? Form what I see, we can control brightness (fibaro.call(ID, "changeBrightness", value) but cannot find any command to control the Color Temperature. Do you know it this is possible to do?

Thanks a lot for the help

Yes, you can set the temperature directly with

  local cal = math.floor((1000000 / 2700))
  fibaro.call(LampID,"setValue",{ct=cal})

I may add a "setTemperature" in the next release so you don't need to do the arithmetic...

  • Thanks 1
Link to comment
Share on other sites

2 hours ago, jgab said:

Yes, you can set the temperature directly with

  local cal = math.floor((1000000 / 2700))
  fibaro.call(LampID,"setValue",{ct=cal})

I may add a "setTemperature" in the next release so you don't need to do the arithmetic...

 

@jgab, thank you for the hint. I am trying to add this to a Lua scene but cannot make it work. Sorry for the burden, it's the first time I am looking into such thing. For a basic test, I just created a scene and run it without any condition to see if it works. My lamp ID created from your quick app is 34 so I am using:

 

local cal = math.floor((1000000 / 2700))

fibaro.call(34,"setValue",{ct=cal}

 

What is/are the other value to change? I tried a bunch of things to replace the ct or ct=cal etc....?

 

Thanks a lot

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...