Page 7 of 9
Re: [122] Philips Hue support
Posted: Friday 31 October 2014 21:07
by mvdarend
gizmocuz wrote:
Is this transition time possible via the API ?
Yes, you can find it here:
http://www.developers.meethue.com/docum ... lights-api
transitiontime uint16
The duration of the transition from the light’s current state to the new state. This is given as a multiple of 100ms and defaults to 4 (400ms). For example, setting transistiontime:10 will make the transition last 1 second.
Here's an example: (Full brightness Reading theme with a 1 minute transition)
Code: Select all
{"on":true,"bri":255,"sat":212,"hue":13088,"transitiontime":600}
Edit: Is there a way to send the above example directly through Domoticz? I'm still finding my way around and can't seem to find a way.
Re: [122] Philips Hue support
Posted: Monday 03 November 2014 23:27
by bbqkees
It is pretty simple right now to implement the following:
-transition time
-colorloop
-alert
With the transition time parameter you can create a Wake Up Light.
1. Create a virtual switch.
2. Create an 'on' script like below and put it into the scripts directory (see the older Hue tutorial):
cat > hue_wake_8_on.sh
#! /bin/bash
curl -s -H "Accept: application/json" -X PUT --data '{"on":true, "bri":255, "transitiontime":600}'
http://bridge-ip-address/api/newdevelop ... ts/8/state ; \
The above script will turn on the light with number 8 and go from 0 to 255 brightness in 60 seconds.
3. chmod 0755 hue_wake_*
4. Enter this script as the 'On' script in the switch settings.
5. Create an 'off' script to turn of the light in the morning after you wake up.
cat > hue_wake_8_off.sh
#! /bin/bash
curl -s -H "Accept: application/json" -X PUT --data '{"on":false}'
http://bridge-ip-address/api/newdevelop ... ts/8/state ; \
6. chmod 0755 hue_wake_*
7. Enter a timer in this virtual switch when you want to wake up minus the transition time.
With other scripts like this you can also implement the 'alert' function which will cause the lamp to blik for a certain time.
{"alert": "lselect"} will cause 30 seconds of blinking.
{"alert": "select"} will cause a short blinking burst.
{"alert": "lselect", "hue": 20000} will cause the light to blink for 30 second with an orange color.
If you include other parameters other than alert, then the lamp will remember those settings after the blinking period is over.
If you only include the alert parameter, than the light will return to its previous state when it stops blinking.
Re: [122] Philips Hue support
Posted: Tuesday 04 November 2014 6:52
by mvdarend
Thanks for that bbqkees, I'll give it a try.
Re: [122] Philips Hue support
Posted: Monday 24 November 2014 23:16
by LanWolf
Is it also possible to implement support for color temperature? I would like to set my lights to warm white when waking up / entering the room in the morning but seems impossible with hex codes.
It seems only possible to set cold white at the moment via the colorpicker.
There is the option to set color via CT option afaik, to be set between 154 and 500.
Re: [122] Philips Hue support
Posted: Wednesday 26 November 2014 10:55
by Mr-Leo
Or make picking a color optional, so you can set a warm color via the Hue App.
See:
http://www.domoticz.com/forum/viewtopic.php?f=6&t=4086
Re: [122] Philips Hue support
Posted: Tuesday 10 February 2015 17:06
by tcviper
Hello there,
Using latest domoticz beta version, added the HUE bridge fine but for some reason, light switches work but when i try to group them together the on/off doesnt do anything after adding each light into the group. Any idea on this? Whenever i click on or off from a group, the lights only go off.
Re: [122] Philips Hue support
Posted: Tuesday 10 February 2015 21:01
by LJ80
tcviper wrote:Hello there,
Using latest domoticz beta version, added the HUE bridge fine but for some reason, light switches work but when i try to group them together the on/off doesnt do anything after adding each light into the group. Any idea on this? Whenever i click on or off from a group, the lights only go off.
I had something almost similair.
My solution was adding the switch via a blocky command instead of coupling this switch in the group.
Re: [122] Philips Hue support
Posted: Tuesday 10 February 2015 21:15
by tcviper
Can you tell me how you did that exactly?
Been trying to figure it out but im stuck here.
Re: [122] Philips Hue support
Posted: Tuesday 10 February 2015 23:27
by webster
No problems with group here
Made a group all lights 25%
Put the hue lights in
And It is working fine
Re: [122] Philips Hue support
Posted: Wednesday 11 February 2015 23:43
by LJ80
tcviper wrote:Can you tell me how you did that exactly?
Been trying to figure it out but im stuck here.
Just like this, and now it is respondig by on and off:
I even changed the off comand to turn of one extra lamp which in not going on by the on command.
Re: [122] Philips Hue support
Posted: Wednesday 18 February 2015 19:27
by micksel
Blueone wrote:Maybe a feature request when everything is working correct, the Hue tap support so it is also possible to use the switches in combination with domoticz.
It would be a wonderful function if it isn’t already implemented.
Re: [122] Philips Hue support
Posted: Thursday 19 February 2015 13:45
by bbqkees
micksel wrote:Blueone wrote:Maybe a feature request when everything is working correct, the Hue tap support so it is also possible to use the switches in combination with domoticz.
It would be a wonderful function if it isn’t already implemented.
There is no 'push' functionality in the bridge, so you need constant polling of the bridge to see the status of the Tap buttons.
So at the moment it is not really convenient to implement this natively in domoticz. You would need to poll at least once a second to get a response that is fast enough in practice. If you press a button on the Tap, and nothings happens for 10 seconds that is not good enough).
They might be working on such a functionality for a future firmware release see
click
But you can write a script if you want, with the Hue API you can write your own polling mechanism in f.i. LUA.
Re: [122] Philips Hue support
Posted: Thursday 19 February 2015 17:00
by micksel
bbqkees wrote:micksel wrote:Blueone wrote:Maybe a feature request when everything is working correct, the Hue tap support so it is also possible to use the switches in combination with domoticz.
It would be a wonderful function if it isn’t already implemented.
There is no 'push' functionality in the bridge, so you need constant polling of the bridge to see the status of the Tap buttons.
So at the moment it is not really convenient to implement this natively in domoticz. You would need to poll at least once a second to get a response that is fast enough in practice. If you press a button on the Tap, and nothings happens for 10 seconds that is not good enough).
They might be working on such a functionality for a future firmware release see
click
But you can write a script if you want, with the Hue API you can write your own polling mechanism in f.i. LUA.
Thanks for the answer and I will look at a script for now and hope for a future release
Re: [122] Philips Hue support
Posted: Tuesday 10 March 2015 23:44
by Morcegolas
bbqkees wrote:It is pretty simple right now to implement the following:
-transition time
-colorloop
-alert
With the transition time parameter you can create a Wake Up Light.
1. Create a virtual switch.
2. Create an 'on' script like below and put it into the scripts directory (see the older Hue tutorial):
cat > hue_wake_8_on.sh
#! /bin/bash
curl -s -H "Accept: application/json" -X PUT --data '{"on":true, "bri":255, "transitiontime":600}'
http://bridge-ip-address/api/newdevelop ... ts/8/state ; \
The above script will turn on the light with number 8 and go from 0 to 255 brightness in 60 seconds.
3. chmod 0755 hue_wake_*
4. Enter this script as the 'On' script in the switch settings.
5. Create an 'off' script to turn of the light in the morning after you wake up.
cat > hue_wake_8_off.sh
#! /bin/bash
curl -s -H "Accept: application/json" -X PUT --data '{"on":false}'
http://bridge-ip-address/api/newdevelop ... ts/8/state ; \
6. chmod 0755 hue_wake_*
7. Enter a timer in this virtual switch when you want to wake up minus the transition time.
With other scripts like this you can also implement the 'alert' function which will cause the lamp to blik for a certain time.
{"alert": "lselect"} will cause 30 seconds of blinking.
{"alert": "select"} will cause a short blinking burst.
{"alert": "lselect", "hue": 20000} will cause the light to blink for 30 second with an orange color.
If you include other parameters other than alert, then the lamp will remember those settings after the blinking period is over.
If you only include the alert parameter, than the light will return to its previous state when it stops blinking.
Nice done bbqkees! Just one question, I can't set my color to blink I already tried to put this on the script but with no luck:
#! /bin/bash
curl -s -H "Accept: application/json" -X PUT --data '{"alert": "lselect", "hue": 20000}'
http://ipofphilips/api/newdeveloper/lights/4/state; \
and
#! /bin/bash
curl -s -H "Accept: application/json" -X PUT --data '{"alert": "lselect", "bri":240, "hue":5911, "sat":254}'
http://ipofphilips/api/newdeveloper/lights/4/state; \
None of them change the color, If I hade white as the last color used by that lamp it will blink white :/
Hope you can help me.
Thanks.
Re: [122] Philips Hue support
Posted: Wednesday 11 March 2015 10:30
by bbqkees
Did you try the commands first in the Hue debug interface?
http://www.developers.meethue.com/docum ... ng-started
Otherwise first set the color, then add a second command for the blinking.
Re: [122] Philips Hue support
Posted: Wednesday 11 March 2015 10:48
by Morcegolas
Yes I did, if I make a script like this just to turn on the light with some color it works:
#! /bin/bash
curl -s -H "Accept: application/json" -X PUT --data '{"on": true, "bri":240, "hue":5911, "sat":254}'
http://ipofphilips/api/newdeveloper/lights/4/state; \
If I put the same thing with the alert command too it will change the color and blink, but it beaver it's strange, instead of turning ON/OFF it fades a little and then bright again to 100%. The code I used was this:
#! /bin/bash
curl -s -H "Accept: application/json" -X PUT --data '{"on": true, "bri":240, "hue":5911, "sat":254}'
http://ipofphilips/api/newdeveloper/lights/4/state; \
curl -s -H "Accept: application/json" -X PUT --data '{"alert": "lselect", "bri":240, "hue":5911, "sat":254}'
http://ipofphilips/api/newdeveloper/lights/4/state; \
Thanks.
Re: [122] Philips Hue support
Posted: Friday 13 March 2015 9:43
by bbqkees
I will try it myself this weekend, I played with these commands a few months ago, I cannot really recall anymore what the actual response from the lamps was.
Re: [122] Philips Hue support
Posted: Friday 13 March 2015 14:43
by LJ80
simple question:
It is very hard to select a normal warm white color with the hex code.
Or the light will be orange, or it will be very industrial white.
Does someone know or want to post their hex code?
Re: [122] Philips Hue support
Posted: Monday 16 March 2015 13:25
by iMiMx
LJ80 wrote:simple question:
It is very hard to select a normal warm white color with the hex code.
Or the light will be orange, or it will be very industrial white.
Does someone know or want to post their hex code?
It's not currently possible, as far as I'm aware, as Domoticz does not support the colour temperature setting - the only way is using a script direct to the bridge, then call this from Domoticz. Good explanation on the developer pages
http://www.developers.meethue.com/docum ... e-concepts
Re: [122] Philips Hue support
Posted: Monday 16 March 2015 16:57
by LJ80
iMiMx wrote:LJ80 wrote:simple question:
It is very hard to select a normal warm white color with the hex code.
Or the light will be orange, or it will be very industrial white.
Does someone know or want to post their hex code?
It's not currently possible, as far as I'm aware, as Domoticz does not support the colour temperature setting - the only way is using a script direct to the bridge, then call this from Domoticz. Good explanation on the developer pages
http://www.developers.meethue.com/docum ... e-concepts
Okay too bad then, hope Gizmocuz will make this possible in the future.
Or someonelse with the know how.
Thanks for your answer.