Starting an animation via REST

This will probably seem to be a very basic question … but here goes.

I am trying to get implement on/off and color change of a strip via REST.
I have created a very simple rest.yaml - like this

shape: 150
animation:
  typename: fill.Fill
  palette: blue
controls:
  typename: rest
  external_access: true
  port: 8787

and then from REST I want to be able to turn it on/off and change the palette.
I can see that I should be able to PUT to the palette using RGB values (although I have not got the syntax right yet) but I have not worked out how to make it run.

Can you help?

There’s more details here: https://github.com/ManiacalLabs/BiblioPixel/blob/master/bibliopixel/control/rest/README.rst

I have been going through that but have not been able to work out how to force a “run” or whatever is needed to turn the LEDs on and then off.

I apologize - but it make take me a little bit to figure this one out. If at all. You’ve found a feature of BiblioPixel that was written by someone who left the project and I’m not really sure it was ever ready for prime time. I’m actually in the process of removing a bunch of things like this.
I wish I had an easy answer for you on this one but I’ve been trying it myself and mostly it just crashes.

I saw from an old message in Google Groups that someone else had success using the REST interface and having had a quick look at the code it does look very simple (in that there is not much there) … but I have not been able to work out the trick yet.

It would be a shame to lose the capability since it looks like it would make it very easy to integrate with other things.

I will persist in trying to work it out.

Update:

I now have the lights coming on.
Went back to basics and made the lights come on via the YAML by putting a “driver” section in the YAML.
I had assumed that the device had remembered the way it was set from earlier command line invocations of bp but either it had not remembered or that is not how it works.
Anyway - now that I have the lights switching on, I can change them via REST.

For anyone else struggling with this, here is what I did.
I made 2 yaml files
init.yaml and strip.yaml
Contents as follows:
init.yaml

driver:
  typename: serial
  c_order: BGR
  ledtype: APA102
shape: 30
controls:
  typename: rest
  external_access: true
  port: 8787

(8787 is the default port number so is not needed but I put it there as a reminder for when I look at it in the future when trying to work out what is going on/wrong)

strip.yaml

animation:
  typename: fill.Fill
  palette: [0,0,0]

(where 0,0,0 is all LEDs off)

Then started BiblioPixel with
bp init.yaml + strip.yaml

Then can change colours simply by sending URLs to it in form
/set/animation.palette[0]/50,0,0
to set R=50, G=0, B=0
and
/set/animation.palette[0]/0,0,0
to turn them off

So … I know this is way too basic for AllPixel devices but I think I will now be to make it to drive some cupboard lighting from Home-Assistant which should in turn also mean driving it from Alexa.