armzilla / amazon-echo-ha-bridge

emulates philips hue api to other home automation gateways
Apache License 2.0
732 stars 168 forks source link

Change response.getStatusLine().getStatusCode() == 200 for fibaro #54

Closed Frakke0 closed 8 years ago

Frakke0 commented 8 years ago

Hi All,

I want to change this line of code (response.getStatusLine().getStatusCode() == 200), in com.armzilla.ha.hue -> HueMulator.class

So I want to change this: if(response.getStatusLine().getStatusCode() == 200){ return true; } to:

if((response.getStatusLine().getStatusCode() == 200) || (response.getStatusLine().getStatusCode() == 202)) { return true; }

But I'm not able to change this and build it again. Does anyone can tell me step by step how I can manage to do this?

Thank you very very much! :)

marcurdy commented 8 years ago

I'm curious under which condition the Echo returns a 202.

On Thu, Dec 10, 2015 at 11:38 AM, Frakke0 notifications@github.com wrote:

Hi All,

I want to change this line of code (response.getStatusLine().getStatusCode() == 200), in com.armzilla.ha.hue -> HueMulator.class

So I want to change this: if(response.getStatusLine().getStatusCode() == 200){ return true; } to:

if((response.getStatusLine().getStatusCode() == 200) || (response.getStatusLine().getStatusCode() == 202)) { return true; }

But I'm not able to change this and build it again. Does anyone can tell me step by step how I can manage to do this?

Thank you very very much! :)

— Reply to this email directly or view it on GitHub https://github.com/armzilla/amazon-echo-ha-bridge/issues/54.

Frakke0 commented 8 years ago

Hi Marcurdy,

It's not echo that returns a 202.

The problem is that phiilps hue returns a 200, but my fibaro controller is returning a 202 as "ok". So, when I say for example, turn on the bathroom lights, it sends the command, the lights are on, but still, echo is saying that he can't reach the lights (because it's getting a 202, and not a 200).

Regards

armzilla commented 8 years ago

i can quickly fix that.

On Thu, Dec 10, 2015 at 11:54 AM, Frakke0 notifications@github.com wrote:

Hi Marcurdy,

It's not echo that returns a 202.

The problem is that phiilps hue returns a 200, but my fibaro controller is returning a 202 as "ok". So, when I say for example, turn on the bathroom lights, it sends the command, the lights are on, but still, echo is saying that he can't reach the lights (because it's getting a 202, and not a 200).

Regards

— Reply to this email directly or view it on GitHub https://github.com/armzilla/amazon-echo-ha-bridge/issues/54#issuecomment-163702057 .

chicken goes cluck cluck, cow goes moo, lemur goes phh phh how bout you?

Frakke0 commented 8 years ago

Already got it fixed, thanks! :)

sameeraakbar commented 8 years ago

Hi, I am facing same issue too. Could you please fix this?