HTTP API Color change issue with Set State

Ok after lots of messing around i’ve finally worked out what was causing me the issue with setting colours.

I was sending RGB values to the Set States endpoint and polling all lights afterwards did not return the same colour I set. I did notice however by pure fluke that the colour returned was a transitioning colour between the original and the requested colour.

By default I wasn’t sending a duration so I assume one is added automatically. If I provide a duration of 0 then everything starts to work as expected.

I can only assume that the API is doing the following:

  1. Client issues a colour change
  2. Server transitions to the colour using default 0.5 second transition.
  3. Before transition completed the API reads the current colour and stores that on internal database.

To test this try setting the colour purple rub:255,0,255 then set the colour red rub:255,0,0…

Afterwards call the API to get the status of all lights. Notice that the hue returned is in the range 270-300 (it’s pretty random). This I’m guessing is because the light is transitioning from purple to red. Even if you wait 10 seconds and read back the values they will be wrong.

Now set a duration of 0 and try again… all works as expected and a hue of 0 is returned.

NOTE: You can thank me later with a free bulb! :slight_smile:

Nobody want to confirm this as a genuine issue? Seem like a really important one to me!

Hey @pacomac,

Sorry you didn’t get a response here. We did manage to replicate this issue in our systems, and we have deployed a fix. Could you check again and see if thing are working as you expect?

Ok, I finally got to test this.

It seems that I can’t use fractional values as I could previously (i.e. 0.5 seconds) as this seems to give an instantaneous change now. If I use whole values above 1.0 It does however work.

P.S. I’m still waiting for a response to my ticket (reference is 223035). I sent o all the details you requested 2 days ago.


From my experience with the HTTP API, I think duration bug you’re talking about has been fixed.