Page 1 of 1

philips hue?

Posted: 25 Nov 2014 20:41
by henkster
Is it possible to get a handle or hook or action for philips hue so that we can make a flow for it?

Re: philips hue?

Posted: 14 Jan 2015 18:34
by TheBrain1984
I also have some hue elements at home. I wrote some flows, maybe they'll help you.

http://automagic4android.com/flow.php?i ... f243008fe4

Re: philips hue?

Posted: 16 Jan 2015 00:55
by henkster
Wow. Elaborate. How did you find this out? "Simple" http get request.. did not know. However I am only using the starterkit bulbs (without color changing, only dimming). How to solve this instead if pushing certain rgb codes to color lamps? I tried "hue white" flow... but nothing happened. Thanks in advance for your answer!

Re: philips hue?

Posted: 16 Jan 2015 06:59
by TheBrain1984
Hi,

the solution should be to copy the Hue: white flow a few times and to change the value for "bri".

To make sure, you can change the brightness by yourself and then check it by using this in your browser:

{global_http}/api/{global_username}/lights/1

global_http= "http://"+ adress of your hue-bridge (or to your router portforwarding to your hue-bridge)
global_username= the username you configured in the hue-api.

Here is a small manual for the hue-api
http://www.developers.meethue.com

Re: philips hue?

Posted: 26 Aug 2015 08:25
by Tordenfod
Wow.. Or i am lost :-)
Simply cant find out whats up n down in these actions...
What i want to be able to do is to turn on my hue ( group or bulb ) with an action from NFC or via an my Sony wristband SWR10..is there an noob learning place where the kung-fu needed to learn and understand this? I'm all ears...

Re: philips hue?

Posted: 08 Oct 2015 15:31
by TheBrain1984
Tordenfod wrote:Wow.. Or i am lost :-)
Simply cant find out whats up n down in these actions...
What i want to be able to do is to turn on my hue ( group or bulb ) with an action from NFC or via an my Sony wristband SWR10..is there an noob learning place where the kung-fu needed to learn and understand this? I'm all ears...
Just simply turn them on, like in the state it were the last time you turned them off, or in any special color (if they can do colors)?

Sorry for my late answer, bur I weren't such active the last months.

Re: philips hue?

Posted: 01 Dec 2017 20:39
by Ancio
I'm a bit late ...
I would like to know how I should use the flow that were posted just above.
Thank you

Re: philips hue?

Posted: 01 Dec 2017 21:29
by TheBrain1984
Ancio wrote:I'm a bit late ...
I would like to know how I should use the flow that were posted just above.
Thank you
Puh, were should I start. First of all you have to import the Flows of course.
As you see these flows are little bit older and I hope that they are still compatible with Hue

I try to describe them a little bit:

Switch: Hue in 05_Switches
This is the Flow which starts after pressing the widget. It asks you which bulbs you want to control now. Of course your bulbs have other names then mine, so you should change the answer list in the input dialog.
In the script after the input the names will be transformed to variables "toswitchX" where X is the "number" of the bulb. So if you have more or less then 3 you should copy or delete the variables depending on how many you want to control. If you checked the bulb, the toswitch-var will be "1", if not "0". Of course you have to change the names in the "containsElement"-command too.
The next input dialog asks you which profile (see below how I defined "profile") you want to set. The answer list should have the exact values on profiles you defined.

Hue: <profilename> in 06_1_Hue_Profile
These are very simple flows. These flows set the variables "LX" where X is the "number" of the bulb to the settings the bulb will get in the specific profile. After defining the future settings of the bulbs the Flow "Hue Action" will be started. If you want to control more or less then 3 bulbs you have to add or delete LX-variables.

Hue Action in 06_2_Hue_Steuerung
Now that we know which bulbs to change (every toswitchX variable with a value of "1") and how (the LX-var) this flow does the change. It uses a simple HTTP-API-Call
TheBrain1984 wrote:{global_http}/api/{global_username}/lights/1

global_http= "http://"+ adress of your hue-bridge (or to your router portforwarding to your hue-bridge)
global_username= the username you configured in the hue-api.

Here is a small manual for the hue-api
http://www.developers.meethue.com
Hue GET (null, I, II) in 06_2_Hue_Steuerung
Last but not least, the HUE GET-Flows get the actual settings of the bulbs abd change the widget, so that it shows the actual color of the bulbs. The GET-Flows also run every time you turn on the display of your phone.

Requirements:
That you have an API-User for your Hue-Bridge that can be used by automagic.

TODO:
  • change the names of the bulbs
  • changes in the "script"-actions where the variables "toswitchX" and "LX" are used depending on how many bulbs you want to control
  • setting the global-vars "global_http" and "global_username"
  • Hue Action: Add or delete some Loops, depending on how many bulbs you want to control. In every added Loop you have to change the URL you call. You have to substitute the number at the end.
enjoy.

Re: philips hue?

Posted: 03 Jun 2019 10:04
by Tobias
Hallo TheBrain,

Vielen Dank für diese tollen Hinweise zur Hue Anbindung, hab es so zum laufen bekommen! Auch bereits um mehrere Lampen konnte ich es so erweitern, inclusive Rückmeldung der Farben. Ganz toll, meinen Respekt!

VG, Tobi

Re: philips hue?

Posted: 03 Jun 2019 11:19
by TheBrain1984
Hallo Tobi,

freut mich, wenn ich helfen konnte ;)