Jump to content

ISY and Phillips Hue Integration Step-By-Step (For dummies...like me)


DualBandAid

Recommended Posts

Posted

Well, I don't know, hence my question. :) A year ago, that seemed the best way. But there is this new product out there that I'm not familiar with that possibly might be a better way...and I thought maybe someone on this thread might have enough familiarity with it to weigh in. :)

Gotcha. I'm not looking to add more hardware or hubs, except maybe a node server at some point once I grasp that better and 5.x moves beyond alpha. I will give your method a shot. Thanks!

 

 

Sent from my iPhone using Tapatalk

Posted

 

 

I'm not looking to add more hardware or hubs

 

That's what so great about that product.  I believe it REPLACES all your hubs -- so you don't need a separate hub for every individual company's devices.  Nor do you need a separate app.  The app for that hub will control all your different devices.

 

https://www.smartthings.com/products

 

 

 

  • Your smart home needs a brain, so get started with a SmartThings Hub. It connects wirelessly with a wide range of smart devices and makes them work together.
  • Add smart devices and put your home to work. Choose from a wide range of compatible devices, including lights, speakers, locks, thermostats, sensors, and more.

 

And apparently it's also a mesh network so you can plug a few in to give you better wifi in the house.  I'm personally not ready to switch over to something to replace what I already have.  But I might at some point because all these various bridges are getting unwieldy.

  • Like 1
Posted

Wink made those implications too. It most likely just connects to your other hubs, increasing your hub count by one.

 

Sent from my SGH-I257M using Tapatalk

  • Like 1
Posted

When it comes to basic hue control, this is the easiest way to go when using the ISY since you don't need to worry about configuring a rasberry pi, polyglot, etc. However using the rasberry pi route gives you more capability.

 

Smartthings is nice and I believe it now supports hue lights without a bridge. However i think (long term) you'd be much happier with the ISY over Smartthings

  • Like 1
  • 4 weeks later...
Posted

Thank you very much for this info DualBandAid.  This worked perfectly for me, even though it felt a bit convoluted to set up.  Two things I realized.  First, I added a "effect":"none" parameter to my NR's since I noticed that if the bulbs are in a 'color loop' they will not respond to my color change programs.  As you mentioned, if certain parameters aren't included in the NR they presumably stay the same as they were.  If I put the lights in a 'color loop' via the API ("effect":"colorloop"), I needed to set the "effect" to "none" or it wouldn't respond as expected to my color change NR (i.e. the color wouldn't change, it just stayed in the color loop).  Seemed like a good thing to include in my base NR that I copied in case the bulbs are set to some other type of "effect", maybe via one of the several iOS apps for example.  Second, if you reset the Hue Hub, the username will change.  I reset mine and re-added my 4 bulbs in a logical order so the NR paths made more logical sense.  

 

PS, I think the Hue bulbs are cool.  Not exactly cheap and my experience is with the latest version bulbs (v3) that claim better colors than before (v2).  I can see myself getting more...  

Posted

Thanks for the feedback.  Can you cut and paste a sample of your base NR so I can add it back to the original?

It would be better if you quoted a least a small piece of somebody's post.

It gets that person's attention, let's others know who you are asking, and your post just happens to fall on a new page so it makes it hard to even know what you are posting about.

Posted

Thank you for the tip.


It would be better if you quoted a least a small piece of somebody's post.

It gets that person's attention, let's others know who you are asking, and your post just happens to fall on a new page so it makes it hard to even know what you are posting about.

 

Oops. 

 

As said, thank you for the tip.


Thank you very much for this info DualBandAid.  This worked perfectly for me, even though it felt a bit convoluted to set up.  Two things I realized.  First, I added a "effect":"none" parameter to my NR's since I noticed that if the bulbs are in a 'color loop' they will not respond to my color change programs.  As you mentioned, if certain parameters aren't included in the NR they presumably stay the same as they were.  If I put the lights in a 'color loop' via the API ("effect":"colorloop"), I needed to set the "effect" to "none" or it wouldn't respond as expected to my color change NR (i.e. the color wouldn't change, it just stayed in the color loop).  Seemed like a good thing to include in my base NR that I copied in case the bulbs are set to some other type of "effect", maybe via one of the several iOS apps for example.  Second, if you reset the Hue Hub, the username will change.  I reset mine and re-added my 4 bulbs in a logical order so the NR paths made more logical sense.  

 

PS, I think the Hue bulbs are cool.  Not exactly cheap and my experience is with the latest version bulbs (v3) that claim better colors than before (v2).  I can see myself getting more...  

 

 

 

 

Thanks for the feedback.  Can you cut and paste a sample of your base NR so I can add it back to the original?
Posted (edited)

 

Thank you for the tip.

 

Oops. 

 

As said, thank you for the tip.

 

 

 

 

Thanks for the feedback.  Can you cut and paste a sample of your base NR so I can add it back to the original?

 

 

Here's what I have in the body of the NR to turn the lights blue:

 

{"effect":"none", "on":true, "bri":255, "sat":255, "hue":46920, "transitiontime":5}

Edited by TrojanHorse
Posted (edited)
Let's see what I have online here....

 

 

This one is a list of Network Resources I use.  Typically I use three for each bulb. I could use a set of four NR for any all bulbs but ISY has a buffering problem and can send your new variable value for an old NR send. Using a set of three for each bulb resolves that and eliminates the safe timer using Wait 1 second between every send.

I use one for Setting levels, one for simple On, and one for simple Off.

 

post-4697-0-59592800-1468777921_thumb.jpg

 

Typically you would set up a brightness level, a colour and any other parameter in Integer variables. Then when you call a NR it uses those memory values to send the parameters.

This avoids a bank of NR for every brightness level and colour combination numbering into hundreds or more.

 

This one is for a bulb specified variable = one NR does all bulbs but is not used due to the above argument.

post-4697-0-21776700-1451062143_thumb.jpg

 

Ths one is only for bulb 2 as specified in the URL. Other parameters are specified in variables

post-4697-0-59952100-1451062132_thumb.jpg

Edited by larryllix
  • 1 month later...
Posted

This is an awesome write up! I got my iSY turning a Hue light on but for some reason I can't turn it off following the instructions from page 1:

 

To create a second Network Resource to turn the light off, everything is the same expect I have JUST this in the Body field...

{"on”:false}

You don’t need all those other parameters if you are just turning a light off.

 

This is what I get back:

 

HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Expires: Mon, 1 Aug 2011 09:00:00 GMT
Connection: close
Access-Control-Max-Age: 3600
Access-C

 

I've double checked everything and it looks like it's working but the light stays on. Can anyone help me please? Thank you!!!

Posted (edited)

This is an awesome write up! I got my iSY turning a Hue light on but for some reason I can't turn it off following the instructions from page 1:

 

To create a second Network Resource to turn the light off, everything is the same expect I have JUST this in the Body field...

{"on”:false}

You don’t need all those other parameters if you are just turning a light off.

 

This is what I get back:

 

HTTP/1.1 200 OK

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0

Pragma: no-cache

Expires: Mon, 1 Aug 2011 09:00:00 GMT

Connection: close

Access-Control-Max-Age: 3600

Access-C

 

I've double checked everything and it looks like it's working but the light stays on. Can anyone help me please? Thank you!!!

Can you turn the bulb off from a cell phone app? Perhaps the zigbee connection from the Hub to the bulb is bad.

 

Another point is you got back a 200 code which means it communicated with ISY OK, indicating a possible problem with your syntax sent.

Edited by larryllix
Posted (edited)

This is what I have in my body field, and it works:

 

{"on": false}

 

The only thing I see different is a space between the ":" and the "f".

 

However, I also notice that there are also some differences in the headers.  Specifically, I notice that the "content-length" is different for OFF than for ON

Edited by oberkc
Posted

 I'll try it with a space although I don't have one in the on command and there isn't one in the instructions.

 

"Can you turn the bulb off from a cell phone app? Perhaps the zigbee connection from the Hub to the bulb is bad."

 

I have full control (on/off/dim/brighten/color/scenes) of that bulb and all my others from everywhere else, cell phone app, Hue remote, even Alexa.

Posted

Don't forget to check your "content-length".  As I stated earlier, mine is different for ON and OFF resources.  For me, everything else is NOT necessarily the same.

Posted

Content-lenght is the exact character length of the length of the body.

 

Of course the length of On and Off will be different. It should be exactly 1 byte difference.

 

Sent from my Nexus 6P using Tapatalk

Posted

Content-lenght is the exact character length of the length of the body.

 

Of course the length of On and Off will be different. It should be exactly 1 byte difference.

 

Sent from my Nexus 6P using Tapatalk

The big point is that they are different (though an ON command may also include other parameters that would exceed the 1 byte difference).  Unfortunately, in post 86, dreamerI90 claimed "everything is the same expect I have JUST this in the Body field...".  Clearly everything is NOT the same.

Posted (edited)

Yes

I would attempt to start over with the NR.

 

In the old days of computers at times you could get an occasional control character in a string of text and could not detect it or see it.

 

The answer was to start over or delete all fields and retype them.

 

Sent from my SGH-I257M using Tapatalk

Edited by larryllix
Posted

The big point is that they are different (though an ON command may also include other parameters that would exceed the 1 byte difference).  Unfortunately, in post 86, dreamerI90 claimed "everything is the same expect I have JUST this in the Body field...".  Clearly everything is NOT the same.

 

:-) I didn't claim it. These are the instructions from the first page:

 

"TASK 5 - Invoking this “Network Resource”

 

The final task is how to activate this functionality you created.  The way you do that is via an ISY program.  I’m not going to go into too much detail about that…unless someone requests it.  The short answer is, there is a programmatic “action” called “Networking”.  You can then either select “Wake on LAN” or “Resource”.  If you select “Resource” a pop-up menu appears of all the Network Resources you created.

 

For example, I have a program running in the background that monitors whether I have turned a particular Insteon-device scene on.  If the scene turns on, the ISY will trigger the Network Resource “LIGHT 1 ON”.  When the scene turns off, another program triggers a second Network Resource to turn the light off.  Yes, you need to create an entirely new resource to turn a light off. So to turn my light on, I have something like this in the Body field:

{"on":true, "bri":255, "sat":255, "hue":255, "transitiontime":5}

To create a second Network Resource to turn the light off, everything is the same expect I have JUST this in the Body field...

{"on”:false}

You don’t need all those other parameters if you are just turning a light off."

 

I followed the directions exactly and the light turns on when I run the on:true but does not turn off when I run the on:false.

Posted

My on Network Resource (turns the light on red):

 

PUT /api/(my Hue ID is here)/lights/2/state HTTP/1.1
Host: 10.167.1.204:80
User-Agent: Mozilla/4.0
Connection: Close
Content-Type: application/x-www-form-urlencoded
Content-Length: 64

{"on":true, "bri":255, "sat":255, "hue":255, "transitiontime":5}

 

My off Network Resource (does not turn the light off):

 

PUT /api/(my Hue ID is here)/lights/2/state HTTP/1.1
Host: 10.167.1.204:80
User-Agent: Mozilla/4.0
Connection: Close
Content-Type: application/x-www-form-urlencoded
Content-Length: 12

{"on”:false}

Posted

This turns it off:

{"on":false, "bri":0, "sat":0, "hue":0, "transitiontime":5}

 

This also turns it off:

{"on":false, "bri":255, "sat":255, "hue":255, "transitiontime":5}

 

It seems you do need all the other stuff after all!

  • Like 1
Posted

This turns it off:

{"on":false, "bri":0, "sat":0, "hue":0, "transitiontime":5}

 

This also turns it off:

{"on":false, "bri":255, "sat":255, "hue":255, "transitiontime":5}

 

It seems you do need all the other stuff after all!

Must be something wrong with their parsing engine.

 

Sent from my SGH-I257M using Tapatalk

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37.2k
    • Total Posts
      372.5k
×
×
  • Create New...