Increase limit on cycle api states?

I’m writing a simple script that cycles through colors for the lifx light. Is there any reason it’s limited to 5 states? It means that code like this won’t run as there are 8 states.

  "states": [
    {
      "color": "red"
    },
    {
      "color": "orange"
    },
    {
      "color": "yellow"
    },
    {
      "color": "green"
    },
    {
      "color": "cyan"
    },
    {
      "color": "blue"
    },
    {
      "color": "purple"
    },
     {
      "color": "pink"
    } 
  ],
  "defaults": {
    "power": "on", // all states default to on
    "saturation": 0, // every state is white
    "brightness": 0.5, // every state is white
    "duration": 1.0 // all transitions will be applied over 1 seconds
  }
}
```

The more states we add to the cycle the more complex the matching algorithm that we use to find the closest color becomes. In order to not overload our servers we added a limit. The limit of 5 states was a number we decided also worked with the current rate limit.

Now that people have had a chance to kick the tires a bit we should have performance data that we can use to inform our decision, so I’ll add an action to our TODO list to review the limits.

Good news! We completed the review and decided to increase the limit to 10 states. The code has been updated in production and you should be good to start using it now.

2 Likes

This is seriously awesome developer service, thanks!