todbot / blink1

Official software for blink(1) USB RGB LED by ThingM
https://blink1.thingm.com/
Other
953 stars 237 forks source link

lastColor API call fails #646

Open TheRealBenForce opened 4 years ago

TheRealBenForce commented 4 years ago

I'm on v2.2.3

I can set a color:

http://localhost:8934/blink1/fadeToRGB?rgb=%23FF11FF&time=2.7

{
  "blink1Serials": [
    "20004AE9"
  ],
  "lastColor": "#ff11ff",
  "lastTime": 2.7,
  "lastLedn": 0,
  "cmd": "fadeToRGB"
}

When I try to retrieve last color:

http://localhost:8934/blink1/lastColor

Cannot GET /blink1/lastColor

I have read in issue #316 the API changed to retrieve last color using fadeToRGB endpoint by itself, but it is not accurate, color shows as #000000

http://localhost:8934/blink1/fadeToRGB

{
  "blink1Serials": [
    "20004AE9"
  ],
  "lastColor": "#000000",
  "lastTime": 0.1,
  "lastLedn": 0,
  "cmd": "fadeToRGB",
  "status": "bad hex color specified undefined"
}