Code to pulse a bulb

428 views
Skip to first unread message

Christopher Ambler

unread,
Apr 26, 2014, 9:58:17 PM4/26/14
to hue-h...@googlegroups.com
I'm wondering if anyone's written any code to pulse a bulb?

I'm thinking a set of light points (HSB start and HSB end) that cycles between them at a set rate.

I know about the alert status that will cycle full brightness on a particular H value, and I know about the color cycle, but I'm thinking more like cycling between, say, green and blue over a 10 second time span. Do this on 4 or 5 bulbs and you could make a cool "ocean effect" for example.

Anyone have a pointer to any code playing with this idea?

Leon Meijer

unread,
Apr 30, 2014, 4:09:49 PM4/30/14
to hue-h...@googlegroups.com
Hey guys,

See text after screens:




The Windows application HUEify that I’m writing has this feature.
It has a so called “Light track”.

See here for the latest version, for installation problems please contact me. It’s in beta phase yet.


Here’s an example of a light track code:



[1,3,11,12,16];500;[];1000;bg;true;213;267;240;255;0;255;2;8;none;none;0;100;150
Infinity

I’ll explain:
1. [1,3,11,12,16] : Array of lights to use.
2. 500 : Number of miliseconds to wait to switch to the next light.
3. [] : Array of groups to use.
4. 1000 : Number of miliseconds to wait to switch to the next group.
5. “bg” : Order BulbsGroups or GroupsBulbs (bg/gb) first lights or first groups.
6. True : True for on and false for off or blank for current state.
7. 213 : The HUE starting point (do it * 192 to get the actual color on the slider), this is lighter-blue.
8. 267 : The HUE maximum point (do it * 192 to get the actual color on the slider), this is darker-blue.
9. 240 : Saturnation minimum.
10. 255 : Saturnation maximum.
11. 0 : Minimum brightness (0 is not off).
12. 255 : maximum brightness.
13. 2 minimum transition-time.
14. 8 maximum transition-time.
15. None : either be none select or lselect (identification).
16. None : either be none or colorloop.
17. 0 : Repeat 0 times.
18. 100 : Number of miliseconds to wait before repeating.
19. 150 : Number of miliseconds to wait to jump to the next line.

Every randomization happenes on each light or group in the array on the same line so if you have one line with 5 lights, all 5 lights will have a different color for example.

The word “infinity” tells hueify to get going.

The app is available for Windows and OS X at the moment. I’m working on an iOS and Android version too anyway.

Create nice effects with it and for more examples, I hope to have www.hueify.nl online soon!

Hueify also have a Random HUE Saturnation Brightness effect for each light.

Regards,

Leon

In the track of light section of Hueify you can code it this way or create the “track” / “effect”  using the sliders.

Christopher Ambler

unread,
Apr 30, 2014, 4:34:19 PM4/30/14
to hue-h...@googlegroups.com
Looks like a cool app, but I'm looking for the code to actually do this.

Is your app open source? Is there a Github repo for it?

Jonathan

unread,
Jan 22, 2017, 5:48:59 AM1/22/17
to Philips Hue Hackers
hey, very interested by that. I would like to be able to pulse a bulb but sending multiple request on the bridge seems to make it crash. Any idea?
Reply all
Reply to author
Forward
0 new messages