todbot / Blink1Control2

Blink1Control GUI to control blink(1) USB RGB LED devices.
http://blink1.thingm.com/
Apache License 2.0
154 stars 24 forks source link

Color pattern adding is broken in v2.2.9 #183

Open todbot opened 2 years ago

todbot commented 2 years ago

A regression happened in saving patterns, as reported here https://github.com/todbot/blink1/issues/669

This should add a color pattern:

curl 'http://localhost:8934/blink1/pattern/add?pname=blink4green&pattern=4,%2300ff00,1.5,%23000000,0.5'

with the JSON response being:

{
  "pattern": {
    "name": "blink4green",
    "id": "blink4green",
    "pattern": "4,#00ff00,1.5,0,0.5,0.1,0"
  },
  "status": "pattern add: pattern 'blink4green' added"
}

And the pattern is visible in curl 'http://localhost:8934/blink1/patterns'

But in v2.2.9, the JSON response to /blink1/pattern/add is:

{
  "pattern": null,
  "status": "pattern add: pattern 'blink3_red' added"
}

This is clearly a bug. Verified in v2.2.9 but works in v2.2.8.