Jump to content

Phillips Hue Support


ajiuo

Recommended Posts

Thanks for the explanation. I'd like to play back what I'm understanding, with some extrapolation.

 

1. It is good to have the ability to cycle power as a fail safe but not use the switch everyone uses because that switch is used to call a scene via ISY (needs network module) to the RPi or other python capable machine.

 

2. When power is turned off to hue-equipped fixture(s):

- much much less seamless, including:

- start up delay while hue-net stabilizes (which needs to be factored into any ISY programming)

- no memory of last scene (on to 100% white light)

 

3. if the bridge fails, I would have to use ISY/inlinelinc/microswitch to power cycle lights, with drawbacks outlined in 2 above.

 

4. If RPi fails, I have to use iOS app to do anything, short of power cycling (with drawbacks outlined in 2 above)

 

5. If ISY fails, I would have to use iOS app to do anythinG, as long as inlinelinc/microswitch isn't off (since it's controlled only by ISY)?

 

6. If ISY and bridge are both down, I'm f.., er, out of luck.

 

7. If I were to use multiple bridges and one (or more) of them failed, the others would NOT pick up the slack for the one(s) that failed.

 

 

Am I missing/misunderstanding anything?

Link to comment
Thanks for the explanation. I'd like to play back what I'm understanding, with some extrapolation.

1. It is good to have the ability to cycle power as a fail safe but not use the switch everyone uses because that switch is used to call a scene via ISY (needs network module) to the RPi or other python capable machine.

5. If ISY fails, I would have to use iOS app to do anythinG, as long as inlinelinc/microswitch isn't off (since it's controlled only by ISY)?

7. If I were to use multiple bridges and one (or more) of them failed, the others would NOT pick up the slack for the one(s) that failed.

Am I missing/misunderstanding anything?

 

The other comments were all correct, a few notes on the above:

 

1) No network module needed, I subscribe to the ISY event sink like the admin console. There isn't a formal API today for getting the button presses (I get it from the debug output) but UDI is adding this in the 4.0 release so it will be a formal supported API

5) I considered putting one 8 button keypad somewhere like my garage and linking some of the buttons to the inline lincs with scenes. This would give a final 'backup' that didn't require the ISY nor the Hue to at least force the lights off or on white. That said, it comes down to how often you think the system might fail. You do have 3 devices (ISY, the RPi or another linux box, and the Hue controller). That said, I'm making the leap and going to try and make this the normal mode for a bunch of my rooms

7) The bridges each create their own distinct network, not sure if they act as repeaters for unknown networks or not. But lights are linked to one so you wouldn't be able to use the second as a backup :(

Link to comment
  • 8 months later...

I integrated the Hue lights into my ISY setup. The three hue lights are installed in pendant lights at our bar. Before I installed the Hue lights, these lights already had two insteon switches (3-way switch setup) controlling them. In the end, I wired the insteon switches to be always on (always powering the Hue devices) and detect whether they're switched on or off, then use the network module to relay message out to turn them on / off and also move through different scenes (after the lights are on, subsequent on messages toggle the scene, a FON resets to scene 1). The lights are really responsive and since they're always powered there is very little lag time.

 

I also like to use the Hue lights for notifications - like front door motion and garage entry. (use the {"alert": "select"} command string for a flash)

 

The other added bonus of keeping them always powered is that the lights remember the last scene that was selected assuming you don't send color information in your on command (use the {"on": true} command string).

 

Thanks Jsbar4321 for sharing the network module information to get started - Great stuff.

Link to comment

Do adlib some more, you using the pi and a program I missed? The always on is an interesting way to handle them. I had thought about using one or two in the bathroom with colors as time notifications for the wife and kids to know it's time to be about out the door for work/school stuff like that.

 

It would be nice for insteon to license the color shift from Phillips and build it right into their bulb ;)

Link to comment

No I'm not using any external setups for my HUE + ISY integration.

 

I have a number of fixed network resources that send messages to the HUE lights. To find new settings: I basically set the color, brightness and states from the HUE app on my phone, then run the get command (in JSbar4312's post) grab the color information for each of my different hue settings.

 

HTTP GET /api/

 

Run this from within your network resources pane via the "Test" command (if test doesn't show, save first)

You'll get a response with the color information of each bulb. If you have a complex color setting (different colors on each bulb), it may be tougher to use this method to get all the settings. I will usually just pop into linux and use curl:

 

curl --request GET http:///api/

 

For each light you should get something like this:

{"1":{"state": {"on":true,"bri":31,"hue":32531,"sat":203,"xy":[0.3409,0.3665],"ct":192,"alert":"none","effect":"none","colormode":"xy","reachable":true}...}

 

For my network resources, I grab only the color information and brightness that I want and remove all the other parameters:

{"on": true, "bri": 31, "hue": 32531, "sat": 203, "xy":[0.3409,0.3665], "ct":192}

 

In my example I set all the bulbs to the same color setting using the groups/0/action string in the Path.

 

6AVzc8G.png

 

Then I have a few generic commands for on/off/flash and colorloop that can be applied to any of my hue settings. I usually use these for my notifications (the {"alert": "select"} works whether the lights are on/off).

 

n8H0Qsk.png

cEndNKz.png

 

In the ISY, I detect switch activity on my Insteon switches (ON,OFF,FON and FOFF). When an ON/OFF is detected I change a state variable for the kitchen light. If the variable is true, then I have a function that will send the network resource 'HUE-All On'. If the variable is false, I have a function that sends the network resource 'HUE-All Off'.

 

I then have another state variable for the current Hue color setting. If the hue lights are already on (i.e. the previous state variable is true), then subsequent taps on the INSTEON light switch ON will add 1 to the current Hue color setting state variable. Based on this Hue color setting state variable, I have functions for each Hue color setting that enumerate to 0-9. If 9 is reached, it sets the Hue color setting state variable back to 0.

 

Here are some pictures of the functions I use:

 

9jmcws6.png

 

HVJRRQW.png

 

B7n2fRo.png

 

qPMRxf1.png

 

YYNsDlF.png

Link to comment
  • 2 months later...

Hi All,

 

First, many thanks for all of your hard work and thought in figuring out how to bridge the worlds of Hue and Insteon. I now have control of my hue lights through the ISY interface. However, I have an issue remaining that I can't seem to figure out and am hoping for your help.

 

I have at least a couple of KeyPadLincs that I would like to use to control the Hue Bulbs and that is no problem. Where I do have a problem is keeping the state of the bulbs and the Insteon devices synchronized when people use other means (re Hue Apps) to control the bulbs. As a simple example, if I turn on the Hue bulbs from a keypad, the keypad will show the bulbs in an 'on' state. However, if someone subsequently turns the bulbs off with a non-insteon device like the Hue app, the bulbs will be off but the keypadlinc still shows as being on.

 

I guess what I would ideally be looking for is some way to read the state of the bulbs into a variable into a program. I have the network module and have been using PUT requests to modify the state of the bulbs and I would ideally like to use the output of the GET requests for this purpose, but can't see a way to do this.

 

Any advice?

 

Thanks in advance!

Link to comment

Michel,

 

That's great, thank you. Prior to buying the ISY, I bought the hue bulbs and the Nest thermostat. After some initial glee with the industrial design, I have to say I have been disappointed and frustrated about their closed approach to orchestration. The Nest is getting swapped out for an Insteon thermostat and it sure would be nice if I could have full control of the Hue bulbs with the ISY.

 

Do you have any frame for when we can expect to see something? Even a timeframe at the level of '2nd half of 2014' would be great.

 

Many thanks

Link to comment
  • 2 months later...
  • 2 months later...

It is more of an API user then a key. You just need to create user (which requires pressing the button), and then you will be able to send commands.

 

My HUE IP: 192.168.1.11 (replace with the IP of your HUE)

My HUE User: isyuser

 

To start, GoTo: http://192.168.1.11/debug/clip.html

 

To make user:

Url: http://192.168.1.11/api

body: {"devicetype": "ISY", "username": "isyuser"}

Press Get...

4.1.6. Notes

The link button on the bridge must have been recently pressed for the command to execute successfully. If the link button has not been pressed a 101 error will be returned. (http://developers.meethue.com/4_configu ... reate_user)

 

To control lights:

Url: /api/isyuser/groups/0/action

body: {"on": true, "bri": 31, "hue": 32531, "sat": 203, "xy":[0.3409,0.3665], "ct":192}

Press Put...

 

You should not specify all methods of color as shown in the above example, use either "xy" or hue/sat, or bri/ct. I use bri/ct for my switches as it lets you set the color temperature and brightness of "white". Read about it here: http://developers.meethue.com/2_groupsapi.html

 

These are all the commands my 8-button-keypad-linc + ISY currently send:

bright as can be {"on": true, "bri": 255, "ct":160}

(blueish) dim-cool-white {"on": true, "bri": 0, "ct":153}

(yellowish) dim-warm-white {"on": true, "bri": 0, "ct":420}

turn-off {"on": false}

color-loop {"effect": "colorloop"}

cancel color loop {"effect": "none"}

 

 

I will try to post more later... I would love to make this super easy for everyone, so you could chose HUE moods and then cut&paste the code in to ISY.

Link to comment
Total newbie here...

 

Is there an easy way to add and control Hue lightbulbs? I would love to tell my bulbs to blink or change colors at a certain time to remind me of things, like feed the dogs!

 

The command for that one is {"alert":"select"} as always PUT to "/api/isyuser/groups/0/action"

 

“none†– The light is not performing an alert effect.

“select†– The light is performing one breathe cycle.

“lselect†– The light is performing breathe cycles for 30 seconds or until an "alert": "none" command is received.

 

Simple way to make isyuser from browser address bar:

http://192.168.1.11/api?{"devicetype": "ISY", "username": "isyuser"}

(remember to use the IP of your HUE, probably not .11)

Link to comment

This was too easy. I'm hooked on this now. I've replaced the can lights in my living room with these. Next I want to put one in the garage. I'll have the garage light turn red when the door is opening and green when fully open. This will make it easier for me to back my Jeep in and know the door is fully open. Also I'll have the light turn from green back to red when I've backed up as far as I should to clear the door.

 

Thanks again for the tips!

Link to comment
  • 1 month later...

These instructions don't work with current firmware and only worked before because of a bug


To make user:
Url: http://192.168.1.11/api
body: {"devicetype": "ISY", "username": "isyuser"}
Press Get...
4.1.6. Notes
The link button on the bridge must have been recently pressed for the command to execute successfully. If the link button has not been pressed a 101 error will be returned. (http://developers.meethue.com/4_configu ... reate_user)
 

The username must be a minimum of 10 characters so the old firmware returned the error but then processed it as if the username hadn't been supplied.  Current versions just fail.  Specifying isy994user works fine.

 

Also the command must be submitted using Post not Get.

Link to comment
  • 2 weeks later...

I went the custom route and have developed a custom linux interface (written in python) to connect ISY to HUE.  I'm using it for over 25 bulbs now and its working great.  

 

One thing that would make this MUCH easier - is there any way to use variables or any kind of dynamic setting in the ISY Network Resources module?  Just to turn the lights on and off I need to have a different network resource for each light - 

 

ie if the command is

 

/hue/lights/1/on (from memory so might not be exactly accurate but this turns light one on)

 

and then for light 2 

 

/hue/lights/2/on

 

is there any way to have 

 

/hue/lights/[isy variable or some other dynamic setting]/on 

 

This would enable a lot more functionality with a lot less network resources.     I'm a hacker/programmer so any interesting ways anyone can think to do this?  Also - my current interface to from Isy->Hue is in python but I code in Java as well.   Universal Devices folks - let me know if you want help building the Hue module.

 

Jim

Link to comment

Awesome!  I have purchased a very large number of "smart home" hubs over the years and I must say after owning a Isy994i for a couple  I am incredibly impressed by the level of support, frequency of updates, and active development from Universal Devices.    It's great!

 

I know with software development you can't really give hard dates but is there a general target for when 5.0 will be released?   (ie - months, years?)

 

Tx

 

Jim

Link to comment

Hi Arw01 - 

 

I was debating doing something similar.  I am listening to the wamp connection in real time and was thinking about having the below variables

 

HUELIGHTON

HUELIGHTOFF

 

then setting  HUELIGHTON = 18 would signal my middle-ware server to turn on hue lamp 18.   I decided to think more about this approach before moving forward because it gets more complex with non binary requests.  (Light Brightness 0 - 255 for example).  

 

One thing I was thinking about was splitting variables like that into 5 or ten groups (we don't need 0-255 level control)

 

HUELIGHTBRIGHT1, HUELIGHTBRIGHT2, etc.  And have HUELIGHTBRIGHT1 equal a brightness of 50, HUELIGHTBRIGHT2 equal a brightness of 100, etc.

 

What was holding me back was trying to figure out whether setting up all these variables was easier than just creating a lot of network resources.   I am familiar with how the variable system works but haven't used it in the UI yet.  I was thinking managing the hue light #s (master bedroom = lights 20,21,22) in the network resources seemed easier because then lots of programs could reference them and if the hue ids change I only have to change it in a couple places (Network Resources - Bedroom on, Bedroom off, Bedroom dim, etc).   With the variable approach I think i would have to change them in every single program that touches the master bedroom lights.

 

Thoughts on either approach?  My middle-ware server is already listening to the wamp stream and it accepts HTTP requests from other systems to make hue state changes so I can go with either approach relatively easily.   The big question is how much time each one requires spending in the ISY user interface and how hard each approach will be to manage/update in the future.   I think people who have had the ISY for a lot longer than me can probably weigh in and help me out here. 

 

Thanks!

 

Jim

Link to comment
  • 1 month later...

Hi Everyone,

What is the best way to issue relative brightness commands to Hues? I know how to set a Hue to a specific brightness (e.g. "bri": 60) but I would like to be able to issue a command to start (and later stop) a brightness increase/decrease. I would issue these commands from my Insteon dimmers, keypads etc (re-wired where needed to supply always-on power to the bulbs). I just am unsure on how replicate the "live dimming" I currently have with dumb bulbs using my Insteon hardware.

 

Thanks very much.

Link to comment

rbnelson,

 

Seems like nice work. but a couple of questions for you (I'm new at this)

1 - Does the light have to constantly change color or can they remain at a constant color?

2 - How do you configure your ISY to trigger these events?

3 - I'd like to have several scenes, each having different colors/lighting effects and be able to trigger from the ISY a scene at random, would this be a function of your software or would it be how I setup my program in the ISY?  Example:  have several scenes   WatchTV_01, WatchTV_02, WatchTV_03 etc.  Everynight, one of the scene at random would be triggered, so I could have a different color/setting every night

 

For anyone on the board,

I've played quite a bit (2 evenings) in trying to follow this guide and get my token ID but seems a little harder than what's explained here.  I did get a number that I beleive is a token ID but it's much longer than what I see in the examples in this thread, also I have no responses to the curl commands used for testing.  Does anyone have a sure fire way to get this token ID?  A newer method perhaps? Or a "For Dummies guide"?   Seems like I'm missing something.

Link to comment

1. Lights which are set to Manual or Off are static and won't change colors.  Only lights set to Auto will change.  Each interval colors are assigned to lights based on the Simple, Ascending or Descending setting.

2. The ISY doesn't require any configuration, it generates events automatically to any software that registers for them.

3. My software doesn't support this scenario.  But you could create an action with those scenes and then set one or more Insteon buttons as triggers.  The first time a button is clicked on, the first scene is selected.  If the button is pressed again while the action is on then the next scene is selected.

 

For your other questions, the automatically token is 31 hex characters long (probably an off by one bug, I suspect they mean to generate 32 chars).  Rather than using a generated token you can supply your own when you register.  Supplied tokens are a minimum of 10 chars but can be anything.

 

The easiest way to generate a token is to use my software which has a button you can click to "Create hue user".

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...