Home AMX User Forum NetLinx Modules & Duet Modules

Amx controlling a Plhilips Hue

Hello,

I'm trying to control my Philips Hue lamps with an AMX NI-3000. I want to have all the code in Netlinx, so no Duet modules.

With Wireshark I've found the following request to send, to acticvate lamp 1. Somehow It doesn't work If i send this to the Hue-bridge. Is there some who allready has been playing with this?

"'PUT http://192.168.2.6/api/Newdeveloper/lights/1/state HTTP/1.1',13,10,
'Host: 192.168.2.6',13,10,
'Connection: keep-alive',13,10,
'Content-Length: 11',13,10,
'CSP: active',13,10,
'Cache-Control: no-cache',13,10,
'Origin: chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm',13,10,
'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36',13,10,
'Content-Type: text/plain;charset=UTF-8',13,10,
'Accept: */*',13,10,
'Accept-Encoding: gzip, deflate, sdch',13,10,
'Accept-Language: nl,en-US;q=0.8,en;q=0.6',13,10,
13,10,
'{"on":true}',13,10"

Comments

  • RaphayoRaphayo Posts: 111
    Correct me if i'm wrong but you will news to trunk your string. And ending probably ending the command with 13,10





    "'PUT /api/Newdeveloper/lights/1/state HTTP/1.1',13,10"
    "'Host: 192.168.2.6',13,10"
    "'Connection: keep-alive',13,10"
    "'Content-Length: 11',13,10"
    "'CSP: active',13,10"
    "'Cache-Control: no-cache',13,10"
    "'Origin: chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm',13,10,
    "'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36',13,10"
    "'Content-Type: text/plain;charset=UTF-8',13,10"
    "'Accept: */*',13,10"
    "'Accept-Encoding: gzip, deflate, sdch',13,10"
    "'Accept-Language: nl,en-US;q=0.8,en;q=0.6',13,10,
    13,10"
    "'{"on":true}',13,10,13,10"
  • PhreaKPhreaK Posts: 966
    You'll need to auth with the bridge first (using the physical button pairing). The bridge has a handy little debugger interface on it that will help get your head around the CLIP API. Once you have that sorted then you should be able to port to AMX for your use case.

    To make things a little easier that Wiresharking the output from the app, head on over here for the full run down.
  • DutchDutch Posts: 2
    Raphayo wrote: »
    Correct me if i'm wrong but you will news to trunk your string. And ending probably ending the command with 13,10

    "'PUT /api/Newdeveloper/lights/1/state HTTP/1.1',13,10"
    "'Host: 192.168.2.6',13,10"
    "'Connection: keep-alive',13,10"
    "'Content-Length: 11',13,10"
    "'CSP: active',13,10"
    "'Cache-Control: no-cache',13,10"
    "'Origin: chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm',13,10,
    "'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36',13,10"
    "'Content-Type: text/plain;charset=UTF-8',13,10"
    "'Accept: */*',13,10"
    "'Accept-Encoding: gzip, deflate, sdch',13,10"
    "'Accept-Language: nl,en-US;q=0.8,en;q=0.6',13,10,
    13,10"
    "'{"on":true}',13,10,13,10"

    you sir made my day! I had tot use "'PUT /api/Newdeveloper/lights/1/state HTTP/1.1',13,10" instead of the whole URL. Thnak you very mutch.
    Preak I allready registed myself as an User so that was not the problem. I could control the lamps all ready with postman.
  • bobbob Posts: 296
    This site is down.

    Anyone willing to share a ready Netlinx module? Thanks in advance!
  • ericmedleyericmedley Posts: 4,177
    bob wrote: »
    This site is down.

    Anyone willing to share a ready Netlinx module? Thanks in advance!

    I just looked and there doesn't seem to be one on the AMX site. Probably going to need to roll your own or pay someone to do it for you. Sorry.
Sign In or Register to comment.