Philips Hue LED

Discussion in 'General Discussion' started by DarylMc, Jul 26, 2013.

  1. DarylMc

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,308
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Hello everyone

    I recently purchased some Philips Hue lamps.

    https://www.meethue.com/en-US

    They are rated 8.5W and 600lm and I am quite pleased with the light output and colour capabilities.

    Every time they are power cycled the lamp reverts to a reasonably pleasant semi warm white (no recall of last setting).

    There is an Android and iPhone app for dimming, colours, schedules etc.

    I was wondering if anyone else has had a go at them and if and how I might go about creating some control from a CBus key input.

    Here is a picture of the API debugger.
    Would it be possible to "PUT" that to the lights from CBus via TCP and "GET" a response to indicate status?
    The purpose being to have on-off control and a few colour and brightness settings operated by CBus.

    Thanks

    Daryl
     

    Attached Files:

    DarylMc, Jul 26, 2013
    #1
  2. DarylMc

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,308
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Attached is a picture of the box with dimensions and a bit more information about the lamp than I could find anywhere on the internet.
     

    Attached Files:

    DarylMc, Jul 27, 2013
    #2
  3. DarylMc

    EddieC

    Joined:
    Oct 25, 2015
    Messages:
    4
    Likes Received:
    0
    Location:
    UK
    Daryl,

    Did you get anywhere further with sending commands to your Hue bulbs?

    I'd be interested in finding a solution for my installation so that I can send scene set commands to the Hue from the Wiser 2.

    Thanks


    Eddie
     
    EddieC, Nov 1, 2015
    #3
  4. DarylMc

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,308
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    No I did not.
     
    DarylMc, Nov 2, 2015
    #4
  5. DarylMc

    jboer

    Joined:
    Apr 27, 2012
    Messages:
    458
    Likes Received:
    35
    Location:
    Sydney
    I think this may be possible, can someone so a wireshark capture for me to look at?
     
    jboer, Nov 2, 2015
    #5
  6. DarylMc

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,308
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Hi jboer
    Give me a few days I will try to get that done unless someone beats me to it.
    My initial hope was to send commands from Homegate logic engine.
    No one replied and I'm not sure it is possible.
    Do you know if Wiser 2 is more suitable for JSON?
     
    DarylMc, Nov 2, 2015
    #6
  7. DarylMc

    jboer

    Joined:
    Apr 27, 2012
    Messages:
    458
    Likes Received:
    35
    Location:
    Sydney
    No idea I am sorry, I haven't had anything to do with the 2s yet. My guess would be no, but of course don't know for sure.
     
    jboer, Nov 2, 2015
    #7
  8. DarylMc

    EddieC

    Joined:
    Oct 25, 2015
    Messages:
    4
    Likes Received:
    0
    Location:
    UK
    Would be really great if you could look at this.

    Here is a capture of the command I sent, screen grab of the wireshark and a copy of the wireshark capture file.

    If you need any more info, please let me know.

    Many thanks


    Eddie

    Screen Shot 2015-11-02 at 20.28.59.png

    Screen Shot 2015-11-02 at 20.30.38.jpg

    View attachment Captue.zip
     
    EddieC, Nov 2, 2015
    #8
  9. DarylMc

    jboer

    Joined:
    Apr 27, 2012
    Messages:
    458
    Likes Received:
    35
    Location:
    Sydney
    Ok thanks, in the debugger, if you send that as a POST or GET command do the lights react?
     
    jboer, Nov 3, 2015
    #9
  10. DarylMc

    EddieC

    Joined:
    Oct 25, 2015
    Messages:
    4
    Likes Received:
    0
    Location:
    UK
    I send the command with a PUT and this initiates the change of state.

    Here is an exert from the Hue site:

    Using this debugger utility you can populate the components of an HTTP call ? the basis of all web traffic and of the hue RESTful interface.

    URL: this is actually the local address of a specific resource (thing) inside the hue system. It could be light, a group of lights or many more things. This is the object you?ll be interacting with in this command.

    A body: this is the part of the message which describes what you want to change and how. Here you enter, in JSON format, the resource name and value you?d like to change/add.

    A method: here you have a choice of the 4 HTTP methods the hue call can use.
    GET: this is the command to fetch all information about the addressed resource
    PUT: this is the command to modify an addressed resource
    POST: this is the command to create a new resource inside the addressed resource
    DELETE: this is the command to deleted the addressed resource
    Response: In this area you?ll see the response to your command. Also in JSON format.

    Link is here:

    http://www.developers.meethue.com/documentation/getting-started


    Regards


    Eddie
     
    EddieC, Nov 3, 2015
    #10
  11. DarylMc

    jboer

    Joined:
    Apr 27, 2012
    Messages:
    458
    Likes Received:
    35
    Location:
    Sydney
    mmm ok, I don't think there is much that we can do natively with the pascal stuff as they don't support PUT. I was hoping that you could do it with POST, and you may be able too, but from the brief look at the spec, we would have to change our commands a little. As I don't have one to play with it is going a little hard to much more with it for me. I am surprised there doesn't seem to be a way to open a port TCP/IP connection to the bridge.
     
    jboer, Nov 5, 2015
    #11
  12. DarylMc

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,308
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Thanks for looking at that.
    I believe it has been done through a raspberry pi.
     
    DarylMc, Nov 5, 2015
    #12
  13. DarylMc

    EddieC

    Joined:
    Oct 25, 2015
    Messages:
    4
    Likes Received:
    0
    Location:
    UK
    Took a look at the Raspberry Pi to try to create a gateway to the Hue.

    After a little searching, found a Python library for the Hue called PHue the details are as attached:

    https://github.com/studioimaginaire/phue

    The Python scripts work really well and provide full control of the Hue lights, just need to pass a command string to the Pi and then trigger the calling script.

    Next step is to connect the CBus to the Raspberry Pi. What methods have been used in the past and are there any recommendations on the best approach?

    I have a Wiser 2 and could use the logic scripting.

    Many thanks


    Eddie
     
    EddieC, Nov 9, 2015
    #13
  14. DarylMc

    arrikhan

    Joined:
    Oct 16, 2011
    Messages:
    48
    Likes Received:
    6
    Location:
    Australia
    I'm very keen to see how to connect from a wiser to a raspberry Pi (or similar). Am thinking of doing the same thing here for lifx lights (which also has a python library) which are similar to the Phillips hue lights.

    Switching wifi bulbs on/off etc from Cbus switches would be a great integration outcome to take advantage of these new bulbs on the market.

    BenC
     
    arrikhan, Dec 5, 2015
    #14
  15. DarylMc

    jboer

    Joined:
    Apr 27, 2012
    Messages:
    458
    Likes Received:
    35
    Location:
    Sydney
    Hey sorry about the delay, I personally would just send UDP packets between the Wiser and Pi, just read the Logic manual and it is pretty straight forward. You could do a socket connection between the 2 devices, there probably isn't much between it.
     
    jboer, Dec 5, 2015
    #15
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.